Files
sdk/model_form_import_in.go

231 lines
5.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 FormImportIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FormImportIn{}
// FormImportIn struct for FormImportIn
type FormImportIn struct {
// File also files each new response in the CRM, at the time it was made. Nothing is mailed and no webhook is told.
File *bool `json:"file,omitempty"`
// ID is the form's id or slug, from the path.
Id *string `json:"id,omitempty"`
// Responses are the responses, at most 500.
Responses []FormImported `json:"responses,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FormImportIn FormImportIn
// NewFormImportIn instantiates a new FormImportIn 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 NewFormImportIn() *FormImportIn {
this := FormImportIn{}
return &this
}
// NewFormImportInWithDefaults instantiates a new FormImportIn 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 NewFormImportInWithDefaults() *FormImportIn {
this := FormImportIn{}
return &this
}
// GetFile returns the File field value if set, zero value otherwise.
func (o *FormImportIn) GetFile() bool {
if o == nil || IsNil(o.File) {
var ret bool
return ret
}
return *o.File
}
// GetFileOk returns a tuple with the File field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormImportIn) GetFileOk() (*bool, bool) {
if o == nil || IsNil(o.File) {
return nil, false
}
return o.File, true
}
// HasFile returns a boolean if a field has been set.
func (o *FormImportIn) HasFile() bool {
if o != nil && !IsNil(o.File) {
return true
}
return false
}
// SetFile gets a reference to the given bool and assigns it to the File field.
func (o *FormImportIn) SetFile(v bool) {
o.File = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *FormImportIn) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormImportIn) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *FormImportIn) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *FormImportIn) SetId(v string) {
o.Id = &v
}
// GetResponses returns the Responses field value if set, zero value otherwise.
func (o *FormImportIn) GetResponses() []FormImported {
if o == nil || IsNil(o.Responses) {
var ret []FormImported
return ret
}
return o.Responses
}
// GetResponsesOk returns a tuple with the Responses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FormImportIn) GetResponsesOk() ([]FormImported, bool) {
if o == nil || IsNil(o.Responses) {
return nil, false
}
return o.Responses, true
}
// HasResponses returns a boolean if a field has been set.
func (o *FormImportIn) HasResponses() bool {
if o != nil && !IsNil(o.Responses) {
return true
}
return false
}
// SetResponses gets a reference to the given []FormImported and assigns it to the Responses field.
func (o *FormImportIn) SetResponses(v []FormImported) {
o.Responses = v
}
func (o FormImportIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FormImportIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.File) {
toSerialize["file"] = o.File
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Responses) {
toSerialize["responses"] = o.Responses
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FormImportIn) UnmarshalJSON(data []byte) (err error) {
varFormImportIn := _FormImportIn{}
err = json.Unmarshal(data, &varFormImportIn)
if err != nil {
return err
}
*o = FormImportIn(varFormImportIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "file")
delete(additionalProperties, "id")
delete(additionalProperties, "responses")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFormImportIn struct {
value *FormImportIn
isSet bool
}
func (v NullableFormImportIn) Get() *FormImportIn {
return v.value
}
func (v *NullableFormImportIn) Set(val *FormImportIn) {
v.value = val
v.isSet = true
}
func (v NullableFormImportIn) IsSet() bool {
return v.isSet
}
func (v *NullableFormImportIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFormImportIn(val *FormImportIn) *NullableFormImportIn {
return &NullableFormImportIn{value: val, isSet: true}
}
func (v NullableFormImportIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFormImportIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}