Files
sdk/model_form_welcome.go

193 lines
4.7 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the FormWelcome type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormWelcome{}
// FormWelcome struct for FormWelcome
type FormWelcome struct {
// Body is the mail's text: plain text, a blank line a new paragraph. At most 10000 characters.
Body *string `json:"body,omitempty"`
// Subject is the mail's subject. At most 200 characters.
Subject *string `json:"subject,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormWelcome FormWelcome
// NewFormWelcome instantiates a new FormWelcome 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 NewFormWelcome() *FormWelcome {
this := FormWelcome{}
return &this
}
// NewFormWelcomeWithDefaults instantiates a new FormWelcome 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 NewFormWelcomeWithDefaults() *FormWelcome {
this := FormWelcome{}
return &this
}
// GetBody returns the Body field value if set, zero value otherwise.
func (o *FormWelcome) GetBody() string {
if o == nil || IsNil(o.Body) {
var ret string
return ret
}
return *o.Body
}
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormWelcome) GetBodyOk() (*string, bool) {
if o == nil || IsNil(o.Body) {
return nil, false
}
return o.Body, true
}
// HasBody returns a boolean if a field has been set.
func (o *FormWelcome) HasBody() bool {
if o != nil && !IsNil(o.Body) {
return true
}
return false
}
// SetBody gets a reference to the given string and assigns it to the Body field.
func (o *FormWelcome) SetBody(v string) {
o.Body = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *FormWelcome) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormWelcome) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *FormWelcome) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *FormWelcome) SetSubject(v string) {
o.Subject = &v
}
func (o FormWelcome) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormWelcome) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Body) {
toSerialize["body"] = o.Body
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormWelcome) UnmarshalJSON(data []byte) (err error) {
varFormWelcome := _FormWelcome{}
err = json.Unmarshal(data, &varFormWelcome)
if err != nil {
return err
}
*o = FormWelcome(varFormWelcome)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "body")
delete(additionalProperties, "subject")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormWelcome struct {
value *FormWelcome
isSet bool
}
func (v NullableFormWelcome) Get() *FormWelcome {
return v.value
}
func (v *NullableFormWelcome) Set(val *FormWelcome) {
v.value = val
v.isSet = true
}
func (v NullableFormWelcome) IsSet() bool {
return v.isSet
}
func (v *NullableFormWelcome) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormWelcome(val *FormWelcome) *NullableFormWelcome {
return &NullableFormWelcome{value: val, isSet: true}
}
func (v NullableFormWelcome) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormWelcome) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}