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

233 lines
7.5 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 SchemaSiteLegalReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaSiteLegalReq{}
// SchemaSiteLegalReq struct for SchemaSiteLegalReq
type SchemaSiteLegalReq struct {
PrivacyPolicyOriginalText *string `json:"privacy_policy_original_text,omitempty"`
PrivacyPolicyParsedText *string `json:"privacy_policy_parsed_text,omitempty"`
TermsOfServiceOriginalText *string `json:"terms_of_service_original_text,omitempty"`
TermsOfServiceParsedText *string `json:"terms_of_service_parsed_text,omitempty"`
}
// NewSchemaSiteLegalReq instantiates a new SchemaSiteLegalReq 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 NewSchemaSiteLegalReq() *SchemaSiteLegalReq {
this := SchemaSiteLegalReq{}
return &this
}
// NewSchemaSiteLegalReqWithDefaults instantiates a new SchemaSiteLegalReq 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 NewSchemaSiteLegalReqWithDefaults() *SchemaSiteLegalReq {
this := SchemaSiteLegalReq{}
return &this
}
// GetPrivacyPolicyOriginalText returns the PrivacyPolicyOriginalText field value if set, zero value otherwise.
func (o *SchemaSiteLegalReq) GetPrivacyPolicyOriginalText() string {
if o == nil || IsNil(o.PrivacyPolicyOriginalText) {
var ret string
return ret
}
return *o.PrivacyPolicyOriginalText
}
// GetPrivacyPolicyOriginalTextOk returns a tuple with the PrivacyPolicyOriginalText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteLegalReq) GetPrivacyPolicyOriginalTextOk() (*string, bool) {
if o == nil || IsNil(o.PrivacyPolicyOriginalText) {
return nil, false
}
return o.PrivacyPolicyOriginalText, true
}
// HasPrivacyPolicyOriginalText returns a boolean if a field has been set.
func (o *SchemaSiteLegalReq) HasPrivacyPolicyOriginalText() bool {
if o != nil && !IsNil(o.PrivacyPolicyOriginalText) {
return true
}
return false
}
// SetPrivacyPolicyOriginalText gets a reference to the given string and assigns it to the PrivacyPolicyOriginalText field.
func (o *SchemaSiteLegalReq) SetPrivacyPolicyOriginalText(v string) {
o.PrivacyPolicyOriginalText = &v
}
// GetPrivacyPolicyParsedText returns the PrivacyPolicyParsedText field value if set, zero value otherwise.
func (o *SchemaSiteLegalReq) GetPrivacyPolicyParsedText() string {
if o == nil || IsNil(o.PrivacyPolicyParsedText) {
var ret string
return ret
}
return *o.PrivacyPolicyParsedText
}
// GetPrivacyPolicyParsedTextOk returns a tuple with the PrivacyPolicyParsedText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteLegalReq) GetPrivacyPolicyParsedTextOk() (*string, bool) {
if o == nil || IsNil(o.PrivacyPolicyParsedText) {
return nil, false
}
return o.PrivacyPolicyParsedText, true
}
// HasPrivacyPolicyParsedText returns a boolean if a field has been set.
func (o *SchemaSiteLegalReq) HasPrivacyPolicyParsedText() bool {
if o != nil && !IsNil(o.PrivacyPolicyParsedText) {
return true
}
return false
}
// SetPrivacyPolicyParsedText gets a reference to the given string and assigns it to the PrivacyPolicyParsedText field.
func (o *SchemaSiteLegalReq) SetPrivacyPolicyParsedText(v string) {
o.PrivacyPolicyParsedText = &v
}
// GetTermsOfServiceOriginalText returns the TermsOfServiceOriginalText field value if set, zero value otherwise.
func (o *SchemaSiteLegalReq) GetTermsOfServiceOriginalText() string {
if o == nil || IsNil(o.TermsOfServiceOriginalText) {
var ret string
return ret
}
return *o.TermsOfServiceOriginalText
}
// GetTermsOfServiceOriginalTextOk returns a tuple with the TermsOfServiceOriginalText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteLegalReq) GetTermsOfServiceOriginalTextOk() (*string, bool) {
if o == nil || IsNil(o.TermsOfServiceOriginalText) {
return nil, false
}
return o.TermsOfServiceOriginalText, true
}
// HasTermsOfServiceOriginalText returns a boolean if a field has been set.
func (o *SchemaSiteLegalReq) HasTermsOfServiceOriginalText() bool {
if o != nil && !IsNil(o.TermsOfServiceOriginalText) {
return true
}
return false
}
// SetTermsOfServiceOriginalText gets a reference to the given string and assigns it to the TermsOfServiceOriginalText field.
func (o *SchemaSiteLegalReq) SetTermsOfServiceOriginalText(v string) {
o.TermsOfServiceOriginalText = &v
}
// GetTermsOfServiceParsedText returns the TermsOfServiceParsedText field value if set, zero value otherwise.
func (o *SchemaSiteLegalReq) GetTermsOfServiceParsedText() string {
if o == nil || IsNil(o.TermsOfServiceParsedText) {
var ret string
return ret
}
return *o.TermsOfServiceParsedText
}
// GetTermsOfServiceParsedTextOk returns a tuple with the TermsOfServiceParsedText field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteLegalReq) GetTermsOfServiceParsedTextOk() (*string, bool) {
if o == nil || IsNil(o.TermsOfServiceParsedText) {
return nil, false
}
return o.TermsOfServiceParsedText, true
}
// HasTermsOfServiceParsedText returns a boolean if a field has been set.
func (o *SchemaSiteLegalReq) HasTermsOfServiceParsedText() bool {
if o != nil && !IsNil(o.TermsOfServiceParsedText) {
return true
}
return false
}
// SetTermsOfServiceParsedText gets a reference to the given string and assigns it to the TermsOfServiceParsedText field.
func (o *SchemaSiteLegalReq) SetTermsOfServiceParsedText(v string) {
o.TermsOfServiceParsedText = &v
}
func (o SchemaSiteLegalReq) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaSiteLegalReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.PrivacyPolicyOriginalText) {
toSerialize["privacy_policy_original_text"] = o.PrivacyPolicyOriginalText
}
if !IsNil(o.PrivacyPolicyParsedText) {
toSerialize["privacy_policy_parsed_text"] = o.PrivacyPolicyParsedText
}
if !IsNil(o.TermsOfServiceOriginalText) {
toSerialize["terms_of_service_original_text"] = o.TermsOfServiceOriginalText
}
if !IsNil(o.TermsOfServiceParsedText) {
toSerialize["terms_of_service_parsed_text"] = o.TermsOfServiceParsedText
}
return toSerialize, nil
}
type NullableSchemaSiteLegalReq struct {
value *SchemaSiteLegalReq
isSet bool
}
func (v NullableSchemaSiteLegalReq) Get() *SchemaSiteLegalReq {
return v.value
}
func (v *NullableSchemaSiteLegalReq) Set(val *SchemaSiteLegalReq) {
v.value = val
v.isSet = true
}
func (v NullableSchemaSiteLegalReq) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaSiteLegalReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaSiteLegalReq(val *SchemaSiteLegalReq) *NullableSchemaSiteLegalReq {
return &NullableSchemaSiteLegalReq{value: val, isSet: true}
}
func (v NullableSchemaSiteLegalReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaSiteLegalReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}