Files
opencloud/vendor/github.com/opencloud-eu/libre-graph-api-go/model_email_address.go
Dominik Schmidt bc2a3f2c42 chore: bump libre-graph-api-go
Adapt the collaboration service to the changed GetUserPhoto return type.
2026-07-20 23:34:22 +02:00

165 lines
3.9 KiB
Go

/*
Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.8
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package libregraph
import (
"encoding/json"
)
// checks if the EmailAddress type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EmailAddress{}
// EmailAddress Represents an email address.
type EmailAddress struct {
// The email address.
Address *string `json:"address,omitempty"`
// The name associated with the email address.
Name *string `json:"name,omitempty"`
}
// NewEmailAddress instantiates a new EmailAddress object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewEmailAddress() *EmailAddress {
this := EmailAddress{}
return &this
}
// NewEmailAddressWithDefaults instantiates a new EmailAddress object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewEmailAddressWithDefaults() *EmailAddress {
this := EmailAddress{}
return &this
}
// GetAddress returns the Address field value if set, zero value otherwise.
func (o *EmailAddress) GetAddress() string {
if o == nil || IsNil(o.Address) {
var ret string
return ret
}
return *o.Address
}
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailAddress) GetAddressOk() (*string, bool) {
if o == nil || IsNil(o.Address) {
return nil, false
}
return o.Address, true
}
// HasAddress returns a boolean if a field has been set.
func (o *EmailAddress) HasAddress() bool {
if o != nil && !IsNil(o.Address) {
return true
}
return false
}
// SetAddress gets a reference to the given string and assigns it to the Address field.
func (o *EmailAddress) SetAddress(v string) {
o.Address = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EmailAddress) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailAddress) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *EmailAddress) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *EmailAddress) SetName(v string) {
o.Name = &v
}
func (o EmailAddress) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EmailAddress) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Address) {
toSerialize["address"] = o.Address
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
return toSerialize, nil
}
type NullableEmailAddress struct {
value *EmailAddress
isSet bool
}
func (v NullableEmailAddress) Get() *EmailAddress {
return v.value
}
func (v *NullableEmailAddress) Set(val *EmailAddress) {
v.value = val
v.isSet = true
}
func (v NullableEmailAddress) IsSet() bool {
return v.isSet
}
func (v *NullableEmailAddress) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailAddress(val *EmailAddress) *NullableEmailAddress {
return &NullableEmailAddress{value: val, isSet: true}
}
func (v NullableEmailAddress) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailAddress) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}