242 lines
6.4 KiB
Go
242 lines
6.4 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 SchemaSiteGeneralReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaSiteGeneralReq{}
|
|
|
|
// SchemaSiteGeneralReq struct for SchemaSiteGeneralReq
|
|
type SchemaSiteGeneralReq struct {
|
|
ContactEmail string `json:"contact_email"`
|
|
Description *string `json:"description,omitempty"`
|
|
Name string `json:"name"`
|
|
ShortDescription *string `json:"short_description,omitempty"`
|
|
SiteUrl string `json:"site_url"`
|
|
}
|
|
|
|
// NewSchemaSiteGeneralReq instantiates a new SchemaSiteGeneralReq 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 NewSchemaSiteGeneralReq(contactEmail string, name string, siteUrl string) *SchemaSiteGeneralReq {
|
|
this := SchemaSiteGeneralReq{}
|
|
this.ContactEmail = contactEmail
|
|
this.Name = name
|
|
this.SiteUrl = siteUrl
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaSiteGeneralReqWithDefaults instantiates a new SchemaSiteGeneralReq 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 NewSchemaSiteGeneralReqWithDefaults() *SchemaSiteGeneralReq {
|
|
this := SchemaSiteGeneralReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetContactEmail returns the ContactEmail field value
|
|
func (o *SchemaSiteGeneralReq) GetContactEmail() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.ContactEmail
|
|
}
|
|
|
|
// GetContactEmailOk returns a tuple with the ContactEmail field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteGeneralReq) GetContactEmailOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ContactEmail, true
|
|
}
|
|
|
|
// SetContactEmail sets field value
|
|
func (o *SchemaSiteGeneralReq) SetContactEmail(v string) {
|
|
o.ContactEmail = v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *SchemaSiteGeneralReq) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteGeneralReq) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *SchemaSiteGeneralReq) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *SchemaSiteGeneralReq) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *SchemaSiteGeneralReq) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteGeneralReq) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *SchemaSiteGeneralReq) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetShortDescription returns the ShortDescription field value if set, zero value otherwise.
|
|
func (o *SchemaSiteGeneralReq) GetShortDescription() string {
|
|
if o == nil || IsNil(o.ShortDescription) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ShortDescription
|
|
}
|
|
|
|
// GetShortDescriptionOk returns a tuple with the ShortDescription field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteGeneralReq) GetShortDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ShortDescription) {
|
|
return nil, false
|
|
}
|
|
return o.ShortDescription, true
|
|
}
|
|
|
|
// HasShortDescription returns a boolean if a field has been set.
|
|
func (o *SchemaSiteGeneralReq) HasShortDescription() bool {
|
|
if o != nil && !IsNil(o.ShortDescription) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShortDescription gets a reference to the given string and assigns it to the ShortDescription field.
|
|
func (o *SchemaSiteGeneralReq) SetShortDescription(v string) {
|
|
o.ShortDescription = &v
|
|
}
|
|
|
|
// GetSiteUrl returns the SiteUrl field value
|
|
func (o *SchemaSiteGeneralReq) GetSiteUrl() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.SiteUrl
|
|
}
|
|
|
|
// GetSiteUrlOk returns a tuple with the SiteUrl field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaSiteGeneralReq) GetSiteUrlOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.SiteUrl, true
|
|
}
|
|
|
|
// SetSiteUrl sets field value
|
|
func (o *SchemaSiteGeneralReq) SetSiteUrl(v string) {
|
|
o.SiteUrl = v
|
|
}
|
|
|
|
func (o SchemaSiteGeneralReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaSiteGeneralReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["contact_email"] = o.ContactEmail
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
toSerialize["name"] = o.Name
|
|
if !IsNil(o.ShortDescription) {
|
|
toSerialize["short_description"] = o.ShortDescription
|
|
}
|
|
toSerialize["site_url"] = o.SiteUrl
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaSiteGeneralReq struct {
|
|
value *SchemaSiteGeneralReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaSiteGeneralReq) Get() *SchemaSiteGeneralReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaSiteGeneralReq) Set(val *SchemaSiteGeneralReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaSiteGeneralReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaSiteGeneralReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaSiteGeneralReq(val *SchemaSiteGeneralReq) *NullableSchemaSiteGeneralReq {
|
|
return &NullableSchemaSiteGeneralReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaSiteGeneralReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaSiteGeneralReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|