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

197 lines
5.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 SchemaSiteWriteReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaSiteWriteReq{}
// SchemaSiteWriteReq struct for SchemaSiteWriteReq
type SchemaSiteWriteReq struct {
RecommendTags []string `json:"recommend_tags,omitempty"`
RequiredTag *bool `json:"required_tag,omitempty"`
ReservedTags []string `json:"reserved_tags,omitempty"`
}
// NewSchemaSiteWriteReq instantiates a new SchemaSiteWriteReq 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 NewSchemaSiteWriteReq() *SchemaSiteWriteReq {
this := SchemaSiteWriteReq{}
return &this
}
// NewSchemaSiteWriteReqWithDefaults instantiates a new SchemaSiteWriteReq 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 NewSchemaSiteWriteReqWithDefaults() *SchemaSiteWriteReq {
this := SchemaSiteWriteReq{}
return &this
}
// GetRecommendTags returns the RecommendTags field value if set, zero value otherwise.
func (o *SchemaSiteWriteReq) GetRecommendTags() []string {
if o == nil || IsNil(o.RecommendTags) {
var ret []string
return ret
}
return o.RecommendTags
}
// GetRecommendTagsOk returns a tuple with the RecommendTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteWriteReq) GetRecommendTagsOk() ([]string, bool) {
if o == nil || IsNil(o.RecommendTags) {
return nil, false
}
return o.RecommendTags, true
}
// HasRecommendTags returns a boolean if a field has been set.
func (o *SchemaSiteWriteReq) HasRecommendTags() bool {
if o != nil && !IsNil(o.RecommendTags) {
return true
}
return false
}
// SetRecommendTags gets a reference to the given []string and assigns it to the RecommendTags field.
func (o *SchemaSiteWriteReq) SetRecommendTags(v []string) {
o.RecommendTags = v
}
// GetRequiredTag returns the RequiredTag field value if set, zero value otherwise.
func (o *SchemaSiteWriteReq) GetRequiredTag() bool {
if o == nil || IsNil(o.RequiredTag) {
var ret bool
return ret
}
return *o.RequiredTag
}
// GetRequiredTagOk returns a tuple with the RequiredTag field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteWriteReq) GetRequiredTagOk() (*bool, bool) {
if o == nil || IsNil(o.RequiredTag) {
return nil, false
}
return o.RequiredTag, true
}
// HasRequiredTag returns a boolean if a field has been set.
func (o *SchemaSiteWriteReq) HasRequiredTag() bool {
if o != nil && !IsNil(o.RequiredTag) {
return true
}
return false
}
// SetRequiredTag gets a reference to the given bool and assigns it to the RequiredTag field.
func (o *SchemaSiteWriteReq) SetRequiredTag(v bool) {
o.RequiredTag = &v
}
// GetReservedTags returns the ReservedTags field value if set, zero value otherwise.
func (o *SchemaSiteWriteReq) GetReservedTags() []string {
if o == nil || IsNil(o.ReservedTags) {
var ret []string
return ret
}
return o.ReservedTags
}
// GetReservedTagsOk returns a tuple with the ReservedTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteWriteReq) GetReservedTagsOk() ([]string, bool) {
if o == nil || IsNil(o.ReservedTags) {
return nil, false
}
return o.ReservedTags, true
}
// HasReservedTags returns a boolean if a field has been set.
func (o *SchemaSiteWriteReq) HasReservedTags() bool {
if o != nil && !IsNil(o.ReservedTags) {
return true
}
return false
}
// SetReservedTags gets a reference to the given []string and assigns it to the ReservedTags field.
func (o *SchemaSiteWriteReq) SetReservedTags(v []string) {
o.ReservedTags = v
}
func (o SchemaSiteWriteReq) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaSiteWriteReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.RecommendTags) {
toSerialize["recommend_tags"] = o.RecommendTags
}
if !IsNil(o.RequiredTag) {
toSerialize["required_tag"] = o.RequiredTag
}
if !IsNil(o.ReservedTags) {
toSerialize["reserved_tags"] = o.ReservedTags
}
return toSerialize, nil
}
type NullableSchemaSiteWriteReq struct {
value *SchemaSiteWriteReq
isSet bool
}
func (v NullableSchemaSiteWriteReq) Get() *SchemaSiteWriteReq {
return v.value
}
func (v *NullableSchemaSiteWriteReq) Set(val *SchemaSiteWriteReq) {
v.value = val
v.isSet = true
}
func (v NullableSchemaSiteWriteReq) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaSiteWriteReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaSiteWriteReq(val *SchemaSiteWriteReq) *NullableSchemaSiteWriteReq {
return &NullableSchemaSiteWriteReq{value: val, isSet: true}
}
func (v NullableSchemaSiteWriteReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaSiteWriteReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}