Files
2024-01-09 09:24:38 +00:00

146 lines
2.9 KiB
Go

/*
Membership API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package membershipclient
import (
"encoding/json"
)
// checks if the User type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &User{}
// User struct for User
type User struct {
Email string `json:"email"`
// User ID
Id string `json:"id"`
}
// NewUser instantiates a new User 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 NewUser(email string, id string) *User {
this := User{}
this.Email = email
this.Id = id
return &this
}
// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User {
this := User{}
return &this
}
// GetEmail returns the Email field value
func (o *User) GetEmail() string {
if o == nil {
var ret string
return ret
}
return o.Email
}
// GetEmailOk returns a tuple with the Email field value
// and a boolean to check if the value has been set.
func (o *User) GetEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Email, true
}
// SetEmail sets field value
func (o *User) SetEmail(v string) {
o.Email = v
}
// GetId returns the Id field value
func (o *User) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *User) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *User) SetId(v string) {
o.Id = v
}
func (o User) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o User) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["email"] = o.Email
toSerialize["id"] = o.Id
return toSerialize, nil
}
type NullableUser struct {
value *User
isSet bool
}
func (v NullableUser) Get() *User {
return v.value
}
func (v *NullableUser) Set(val *User) {
v.value = val
v.isSet = true
}
func (v NullableUser) IsSet() bool {
return v.isSet
}
func (v *NullableUser) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUser(val *User) *NullableUser {
return &NullableUser{value: val, isSet: true}
}
func (v NullableUser) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUser) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}