368 lines
11 KiB
Go
368 lines
11 KiB
Go
/*
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
|
|
API version: 1.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package answer_sdk
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the SchemaSiteUsersReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaSiteUsersReq{}
|
|
|
|
// SchemaSiteUsersReq struct for SchemaSiteUsersReq
|
|
type SchemaSiteUsersReq struct {
|
|
AllowUpdateAvatar *bool `json:"allow_update_avatar,omitempty"`
|
|
AllowUpdateBio *bool `json:"allow_update_bio,omitempty"`
|
|
AllowUpdateDisplayName *bool `json:"allow_update_display_name,omitempty"`
|
|
AllowUpdateLocation *bool `json:"allow_update_location,omitempty"`
|
|
AllowUpdateUsername *bool `json:"allow_update_username,omitempty"`
|
|
AllowUpdateWebsite *bool `json:"allow_update_website,omitempty"`
|
|
DefaultAvatar string `json:"default_avatar"`
|
|
GravatarBaseUrl *string `json:"gravatar_base_url,omitempty"`
|
|
}
|
|
|
|
// NewSchemaSiteUsersReq instantiates a new SchemaSiteUsersReq 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 NewSchemaSiteUsersReq(defaultAvatar string) *SchemaSiteUsersReq {
|
|
this := SchemaSiteUsersReq{}
|
|
this.DefaultAvatar = defaultAvatar
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaSiteUsersReqWithDefaults instantiates a new SchemaSiteUsersReq 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 NewSchemaSiteUsersReqWithDefaults() *SchemaSiteUsersReq {
|
|
this := SchemaSiteUsersReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetAllowUpdateAvatar returns the AllowUpdateAvatar field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateAvatar() bool {
|
|
if o == nil || IsNil(o.AllowUpdateAvatar) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateAvatar
|
|
}
|
|
|
|
// GetAllowUpdateAvatarOk returns a tuple with the AllowUpdateAvatar field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateAvatarOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateAvatar) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateAvatar, true
|
|
}
|
|
|
|
// HasAllowUpdateAvatar returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateAvatar() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateAvatar) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateAvatar gets a reference to the given bool and assigns it to the AllowUpdateAvatar field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateAvatar(v bool) {
|
|
o.AllowUpdateAvatar = &v
|
|
}
|
|
|
|
// GetAllowUpdateBio returns the AllowUpdateBio field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateBio() bool {
|
|
if o == nil || IsNil(o.AllowUpdateBio) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateBio
|
|
}
|
|
|
|
// GetAllowUpdateBioOk returns a tuple with the AllowUpdateBio field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateBioOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateBio) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateBio, true
|
|
}
|
|
|
|
// HasAllowUpdateBio returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateBio() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateBio) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateBio gets a reference to the given bool and assigns it to the AllowUpdateBio field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateBio(v bool) {
|
|
o.AllowUpdateBio = &v
|
|
}
|
|
|
|
// GetAllowUpdateDisplayName returns the AllowUpdateDisplayName field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateDisplayName() bool {
|
|
if o == nil || IsNil(o.AllowUpdateDisplayName) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateDisplayName
|
|
}
|
|
|
|
// GetAllowUpdateDisplayNameOk returns a tuple with the AllowUpdateDisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateDisplayNameOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateDisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateDisplayName, true
|
|
}
|
|
|
|
// HasAllowUpdateDisplayName returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateDisplayName() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateDisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateDisplayName gets a reference to the given bool and assigns it to the AllowUpdateDisplayName field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateDisplayName(v bool) {
|
|
o.AllowUpdateDisplayName = &v
|
|
}
|
|
|
|
// GetAllowUpdateLocation returns the AllowUpdateLocation field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateLocation() bool {
|
|
if o == nil || IsNil(o.AllowUpdateLocation) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateLocation
|
|
}
|
|
|
|
// GetAllowUpdateLocationOk returns a tuple with the AllowUpdateLocation field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateLocationOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateLocation) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateLocation, true
|
|
}
|
|
|
|
// HasAllowUpdateLocation returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateLocation() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateLocation) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateLocation gets a reference to the given bool and assigns it to the AllowUpdateLocation field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateLocation(v bool) {
|
|
o.AllowUpdateLocation = &v
|
|
}
|
|
|
|
// GetAllowUpdateUsername returns the AllowUpdateUsername field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateUsername() bool {
|
|
if o == nil || IsNil(o.AllowUpdateUsername) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateUsername
|
|
}
|
|
|
|
// GetAllowUpdateUsernameOk returns a tuple with the AllowUpdateUsername field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateUsernameOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateUsername) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateUsername, true
|
|
}
|
|
|
|
// HasAllowUpdateUsername returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateUsername() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateUsername) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateUsername gets a reference to the given bool and assigns it to the AllowUpdateUsername field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateUsername(v bool) {
|
|
o.AllowUpdateUsername = &v
|
|
}
|
|
|
|
// GetAllowUpdateWebsite returns the AllowUpdateWebsite field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateWebsite() bool {
|
|
if o == nil || IsNil(o.AllowUpdateWebsite) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.AllowUpdateWebsite
|
|
}
|
|
|
|
// GetAllowUpdateWebsiteOk returns a tuple with the AllowUpdateWebsite field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetAllowUpdateWebsiteOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.AllowUpdateWebsite) {
|
|
return nil, false
|
|
}
|
|
return o.AllowUpdateWebsite, true
|
|
}
|
|
|
|
// HasAllowUpdateWebsite returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasAllowUpdateWebsite() bool {
|
|
if o != nil && !IsNil(o.AllowUpdateWebsite) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllowUpdateWebsite gets a reference to the given bool and assigns it to the AllowUpdateWebsite field.
|
|
func (o *SchemaSiteUsersReq) SetAllowUpdateWebsite(v bool) {
|
|
o.AllowUpdateWebsite = &v
|
|
}
|
|
|
|
// GetDefaultAvatar returns the DefaultAvatar field value
|
|
func (o *SchemaSiteUsersReq) GetDefaultAvatar() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.DefaultAvatar
|
|
}
|
|
|
|
// GetDefaultAvatarOk returns a tuple with the DefaultAvatar field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetDefaultAvatarOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.DefaultAvatar, true
|
|
}
|
|
|
|
// SetDefaultAvatar sets field value
|
|
func (o *SchemaSiteUsersReq) SetDefaultAvatar(v string) {
|
|
o.DefaultAvatar = v
|
|
}
|
|
|
|
// GetGravatarBaseUrl returns the GravatarBaseUrl field value if set, zero value otherwise.
|
|
func (o *SchemaSiteUsersReq) GetGravatarBaseUrl() string {
|
|
if o == nil || IsNil(o.GravatarBaseUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.GravatarBaseUrl
|
|
}
|
|
|
|
// GetGravatarBaseUrlOk returns a tuple with the GravatarBaseUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteUsersReq) GetGravatarBaseUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.GravatarBaseUrl) {
|
|
return nil, false
|
|
}
|
|
return o.GravatarBaseUrl, true
|
|
}
|
|
|
|
// HasGravatarBaseUrl returns a boolean if a field has been set.
|
|
func (o *SchemaSiteUsersReq) HasGravatarBaseUrl() bool {
|
|
if o != nil && !IsNil(o.GravatarBaseUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGravatarBaseUrl gets a reference to the given string and assigns it to the GravatarBaseUrl field.
|
|
func (o *SchemaSiteUsersReq) SetGravatarBaseUrl(v string) {
|
|
o.GravatarBaseUrl = &v
|
|
}
|
|
|
|
func (o SchemaSiteUsersReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaSiteUsersReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AllowUpdateAvatar) {
|
|
toSerialize["allow_update_avatar"] = o.AllowUpdateAvatar
|
|
}
|
|
if !IsNil(o.AllowUpdateBio) {
|
|
toSerialize["allow_update_bio"] = o.AllowUpdateBio
|
|
}
|
|
if !IsNil(o.AllowUpdateDisplayName) {
|
|
toSerialize["allow_update_display_name"] = o.AllowUpdateDisplayName
|
|
}
|
|
if !IsNil(o.AllowUpdateLocation) {
|
|
toSerialize["allow_update_location"] = o.AllowUpdateLocation
|
|
}
|
|
if !IsNil(o.AllowUpdateUsername) {
|
|
toSerialize["allow_update_username"] = o.AllowUpdateUsername
|
|
}
|
|
if !IsNil(o.AllowUpdateWebsite) {
|
|
toSerialize["allow_update_website"] = o.AllowUpdateWebsite
|
|
}
|
|
toSerialize["default_avatar"] = o.DefaultAvatar
|
|
if !IsNil(o.GravatarBaseUrl) {
|
|
toSerialize["gravatar_base_url"] = o.GravatarBaseUrl
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaSiteUsersReq struct {
|
|
value *SchemaSiteUsersReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaSiteUsersReq) Get() *SchemaSiteUsersReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaSiteUsersReq) Set(val *SchemaSiteUsersReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaSiteUsersReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaSiteUsersReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaSiteUsersReq(val *SchemaSiteUsersReq) *NullableSchemaSiteUsersReq {
|
|
return &NullableSchemaSiteUsersReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaSiteUsersReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaSiteUsersReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|