Files
openapi-go-answer/model_schema_site_branding_req.go
2023-09-26 16:20:01 +08:00

233 lines
6.2 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 SchemaSiteBrandingReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaSiteBrandingReq{}
// SchemaSiteBrandingReq struct for SchemaSiteBrandingReq
type SchemaSiteBrandingReq struct {
Favicon *string `json:"favicon,omitempty"`
Logo *string `json:"logo,omitempty"`
MobileLogo *string `json:"mobile_logo,omitempty"`
SquareIcon *string `json:"square_icon,omitempty"`
}
// NewSchemaSiteBrandingReq instantiates a new SchemaSiteBrandingReq 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 NewSchemaSiteBrandingReq() *SchemaSiteBrandingReq {
this := SchemaSiteBrandingReq{}
return &this
}
// NewSchemaSiteBrandingReqWithDefaults instantiates a new SchemaSiteBrandingReq 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 NewSchemaSiteBrandingReqWithDefaults() *SchemaSiteBrandingReq {
this := SchemaSiteBrandingReq{}
return &this
}
// GetFavicon returns the Favicon field value if set, zero value otherwise.
func (o *SchemaSiteBrandingReq) GetFavicon() string {
if o == nil || IsNil(o.Favicon) {
var ret string
return ret
}
return *o.Favicon
}
// GetFaviconOk returns a tuple with the Favicon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteBrandingReq) GetFaviconOk() (*string, bool) {
if o == nil || IsNil(o.Favicon) {
return nil, false
}
return o.Favicon, true
}
// HasFavicon returns a boolean if a field has been set.
func (o *SchemaSiteBrandingReq) HasFavicon() bool {
if o != nil && !IsNil(o.Favicon) {
return true
}
return false
}
// SetFavicon gets a reference to the given string and assigns it to the Favicon field.
func (o *SchemaSiteBrandingReq) SetFavicon(v string) {
o.Favicon = &v
}
// GetLogo returns the Logo field value if set, zero value otherwise.
func (o *SchemaSiteBrandingReq) GetLogo() string {
if o == nil || IsNil(o.Logo) {
var ret string
return ret
}
return *o.Logo
}
// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteBrandingReq) GetLogoOk() (*string, bool) {
if o == nil || IsNil(o.Logo) {
return nil, false
}
return o.Logo, true
}
// HasLogo returns a boolean if a field has been set.
func (o *SchemaSiteBrandingReq) HasLogo() bool {
if o != nil && !IsNil(o.Logo) {
return true
}
return false
}
// SetLogo gets a reference to the given string and assigns it to the Logo field.
func (o *SchemaSiteBrandingReq) SetLogo(v string) {
o.Logo = &v
}
// GetMobileLogo returns the MobileLogo field value if set, zero value otherwise.
func (o *SchemaSiteBrandingReq) GetMobileLogo() string {
if o == nil || IsNil(o.MobileLogo) {
var ret string
return ret
}
return *o.MobileLogo
}
// GetMobileLogoOk returns a tuple with the MobileLogo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteBrandingReq) GetMobileLogoOk() (*string, bool) {
if o == nil || IsNil(o.MobileLogo) {
return nil, false
}
return o.MobileLogo, true
}
// HasMobileLogo returns a boolean if a field has been set.
func (o *SchemaSiteBrandingReq) HasMobileLogo() bool {
if o != nil && !IsNil(o.MobileLogo) {
return true
}
return false
}
// SetMobileLogo gets a reference to the given string and assigns it to the MobileLogo field.
func (o *SchemaSiteBrandingReq) SetMobileLogo(v string) {
o.MobileLogo = &v
}
// GetSquareIcon returns the SquareIcon field value if set, zero value otherwise.
func (o *SchemaSiteBrandingReq) GetSquareIcon() string {
if o == nil || IsNil(o.SquareIcon) {
var ret string
return ret
}
return *o.SquareIcon
}
// GetSquareIconOk returns a tuple with the SquareIcon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteBrandingReq) GetSquareIconOk() (*string, bool) {
if o == nil || IsNil(o.SquareIcon) {
return nil, false
}
return o.SquareIcon, true
}
// HasSquareIcon returns a boolean if a field has been set.
func (o *SchemaSiteBrandingReq) HasSquareIcon() bool {
if o != nil && !IsNil(o.SquareIcon) {
return true
}
return false
}
// SetSquareIcon gets a reference to the given string and assigns it to the SquareIcon field.
func (o *SchemaSiteBrandingReq) SetSquareIcon(v string) {
o.SquareIcon = &v
}
func (o SchemaSiteBrandingReq) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaSiteBrandingReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Favicon) {
toSerialize["favicon"] = o.Favicon
}
if !IsNil(o.Logo) {
toSerialize["logo"] = o.Logo
}
if !IsNil(o.MobileLogo) {
toSerialize["mobile_logo"] = o.MobileLogo
}
if !IsNil(o.SquareIcon) {
toSerialize["square_icon"] = o.SquareIcon
}
return toSerialize, nil
}
type NullableSchemaSiteBrandingReq struct {
value *SchemaSiteBrandingReq
isSet bool
}
func (v NullableSchemaSiteBrandingReq) Get() *SchemaSiteBrandingReq {
return v.value
}
func (v *NullableSchemaSiteBrandingReq) Set(val *SchemaSiteBrandingReq) {
v.value = val
v.isSet = true
}
func (v NullableSchemaSiteBrandingReq) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaSiteBrandingReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaSiteBrandingReq(val *SchemaSiteBrandingReq) *NullableSchemaSiteBrandingReq {
return &NullableSchemaSiteBrandingReq{value: val, isSet: true}
}
func (v NullableSchemaSiteBrandingReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaSiteBrandingReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}