mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.8 KiB
Go
269 lines
6.8 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 FormSinks type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormSinks{}
|
|
|
|
// FormSinks struct for FormSinks
|
|
type FormSinks struct {
|
|
// CRM files the response on the timeline of the person it is from, or on the org's own timeline when it names nobody. Absent, nothing is filed.
|
|
Crm *FormCRM `json:"crm,omitempty"`
|
|
// Events states form_viewed, form_started and form_submitted on the deployment's event stream: the form's ids and the refs of the fields answered, never an answer's text.
|
|
Events *bool `json:"events,omitempty"`
|
|
// Forward mails every completed response to one address.
|
|
Forward *FormForward `json:"forward,omitempty"`
|
|
// Welcome mails the respondent once, the first time their address answers.
|
|
Welcome *FormWelcome `json:"welcome,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormSinks FormSinks
|
|
|
|
// NewFormSinks instantiates a new FormSinks 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 NewFormSinks() *FormSinks {
|
|
this := FormSinks{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormSinksWithDefaults instantiates a new FormSinks 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 NewFormSinksWithDefaults() *FormSinks {
|
|
this := FormSinks{}
|
|
return &this
|
|
}
|
|
|
|
// GetCrm returns the Crm field value if set, zero value otherwise.
|
|
func (o *FormSinks) GetCrm() FormCRM {
|
|
if o == nil || IsNil(o.Crm) {
|
|
var ret FormCRM
|
|
return ret
|
|
}
|
|
return *o.Crm
|
|
}
|
|
|
|
// GetCrmOk returns a tuple with the Crm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormSinks) GetCrmOk() (*FormCRM, bool) {
|
|
if o == nil || IsNil(o.Crm) {
|
|
return nil, false
|
|
}
|
|
return o.Crm, true
|
|
}
|
|
|
|
// HasCrm returns a boolean if a field has been set.
|
|
func (o *FormSinks) HasCrm() bool {
|
|
if o != nil && !IsNil(o.Crm) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCrm gets a reference to the given FormCRM and assigns it to the Crm field.
|
|
func (o *FormSinks) SetCrm(v FormCRM) {
|
|
o.Crm = &v
|
|
}
|
|
|
|
// GetEvents returns the Events field value if set, zero value otherwise.
|
|
func (o *FormSinks) GetEvents() bool {
|
|
if o == nil || IsNil(o.Events) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Events
|
|
}
|
|
|
|
// GetEventsOk returns a tuple with the Events field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormSinks) GetEventsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Events) {
|
|
return nil, false
|
|
}
|
|
return o.Events, true
|
|
}
|
|
|
|
// HasEvents returns a boolean if a field has been set.
|
|
func (o *FormSinks) HasEvents() bool {
|
|
if o != nil && !IsNil(o.Events) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvents gets a reference to the given bool and assigns it to the Events field.
|
|
func (o *FormSinks) SetEvents(v bool) {
|
|
o.Events = &v
|
|
}
|
|
|
|
// GetForward returns the Forward field value if set, zero value otherwise.
|
|
func (o *FormSinks) GetForward() FormForward {
|
|
if o == nil || IsNil(o.Forward) {
|
|
var ret FormForward
|
|
return ret
|
|
}
|
|
return *o.Forward
|
|
}
|
|
|
|
// GetForwardOk returns a tuple with the Forward field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormSinks) GetForwardOk() (*FormForward, bool) {
|
|
if o == nil || IsNil(o.Forward) {
|
|
return nil, false
|
|
}
|
|
return o.Forward, true
|
|
}
|
|
|
|
// HasForward returns a boolean if a field has been set.
|
|
func (o *FormSinks) HasForward() bool {
|
|
if o != nil && !IsNil(o.Forward) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetForward gets a reference to the given FormForward and assigns it to the Forward field.
|
|
func (o *FormSinks) SetForward(v FormForward) {
|
|
o.Forward = &v
|
|
}
|
|
|
|
// GetWelcome returns the Welcome field value if set, zero value otherwise.
|
|
func (o *FormSinks) GetWelcome() FormWelcome {
|
|
if o == nil || IsNil(o.Welcome) {
|
|
var ret FormWelcome
|
|
return ret
|
|
}
|
|
return *o.Welcome
|
|
}
|
|
|
|
// GetWelcomeOk returns a tuple with the Welcome field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormSinks) GetWelcomeOk() (*FormWelcome, bool) {
|
|
if o == nil || IsNil(o.Welcome) {
|
|
return nil, false
|
|
}
|
|
return o.Welcome, true
|
|
}
|
|
|
|
// HasWelcome returns a boolean if a field has been set.
|
|
func (o *FormSinks) HasWelcome() bool {
|
|
if o != nil && !IsNil(o.Welcome) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWelcome gets a reference to the given FormWelcome and assigns it to the Welcome field.
|
|
func (o *FormSinks) SetWelcome(v FormWelcome) {
|
|
o.Welcome = &v
|
|
}
|
|
|
|
func (o FormSinks) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormSinks) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Crm) {
|
|
toSerialize["crm"] = o.Crm
|
|
}
|
|
if !IsNil(o.Events) {
|
|
toSerialize["events"] = o.Events
|
|
}
|
|
if !IsNil(o.Forward) {
|
|
toSerialize["forward"] = o.Forward
|
|
}
|
|
if !IsNil(o.Welcome) {
|
|
toSerialize["welcome"] = o.Welcome
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormSinks) UnmarshalJSON(data []byte) (err error) {
|
|
varFormSinks := _FormSinks{}
|
|
|
|
err = json.Unmarshal(data, &varFormSinks)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormSinks(varFormSinks)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "crm")
|
|
delete(additionalProperties, "events")
|
|
delete(additionalProperties, "forward")
|
|
delete(additionalProperties, "welcome")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormSinks struct {
|
|
value *FormSinks
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormSinks) Get() *FormSinks {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormSinks) Set(val *FormSinks) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormSinks) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormSinks) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormSinks(val *FormSinks) *NullableFormSinks {
|
|
return &NullableFormSinks{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormSinks) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormSinks) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|