Files
sdk/model_esign_esign_insertion.go

193 lines
5.2 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 EsignEsignInsertion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EsignEsignInsertion{}
// EsignEsignInsertion struct for EsignEsignInsertion
type EsignEsignInsertion struct {
// FieldID is the field that was filled.
FieldId *string `json:"fieldId,omitempty"`
// Inserted is true — the field now holds a value. Filling every field still leaves the document pending until the completion call.
Inserted *bool `json:"inserted,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EsignEsignInsertion EsignEsignInsertion
// NewEsignEsignInsertion instantiates a new EsignEsignInsertion 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 NewEsignEsignInsertion() *EsignEsignInsertion {
this := EsignEsignInsertion{}
return &this
}
// NewEsignEsignInsertionWithDefaults instantiates a new EsignEsignInsertion 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 NewEsignEsignInsertionWithDefaults() *EsignEsignInsertion {
this := EsignEsignInsertion{}
return &this
}
// GetFieldId returns the FieldId field value if set, zero value otherwise.
func (o *EsignEsignInsertion) GetFieldId() string {
if o == nil || IsNil(o.FieldId) {
var ret string
return ret
}
return *o.FieldId
}
// GetFieldIdOk returns a tuple with the FieldId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EsignEsignInsertion) GetFieldIdOk() (*string, bool) {
if o == nil || IsNil(o.FieldId) {
return nil, false
}
return o.FieldId, true
}
// HasFieldId returns a boolean if a field has been set.
func (o *EsignEsignInsertion) HasFieldId() bool {
if o != nil && !IsNil(o.FieldId) {
return true
}
return false
}
// SetFieldId gets a reference to the given string and assigns it to the FieldId field.
func (o *EsignEsignInsertion) SetFieldId(v string) {
o.FieldId = &v
}
// GetInserted returns the Inserted field value if set, zero value otherwise.
func (o *EsignEsignInsertion) GetInserted() bool {
if o == nil || IsNil(o.Inserted) {
var ret bool
return ret
}
return *o.Inserted
}
// GetInsertedOk returns a tuple with the Inserted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EsignEsignInsertion) GetInsertedOk() (*bool, bool) {
if o == nil || IsNil(o.Inserted) {
return nil, false
}
return o.Inserted, true
}
// HasInserted returns a boolean if a field has been set.
func (o *EsignEsignInsertion) HasInserted() bool {
if o != nil && !IsNil(o.Inserted) {
return true
}
return false
}
// SetInserted gets a reference to the given bool and assigns it to the Inserted field.
func (o *EsignEsignInsertion) SetInserted(v bool) {
o.Inserted = &v
}
func (o EsignEsignInsertion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EsignEsignInsertion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.FieldId) {
toSerialize["fieldId"] = o.FieldId
}
if !IsNil(o.Inserted) {
toSerialize["inserted"] = o.Inserted
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EsignEsignInsertion) UnmarshalJSON(data []byte) (err error) {
varEsignEsignInsertion := _EsignEsignInsertion{}
err = json.Unmarshal(data, &varEsignEsignInsertion)
if err != nil {
return err
}
*o = EsignEsignInsertion(varEsignEsignInsertion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "fieldId")
delete(additionalProperties, "inserted")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEsignEsignInsertion struct {
value *EsignEsignInsertion
isSet bool
}
func (v NullableEsignEsignInsertion) Get() *EsignEsignInsertion {
return v.value
}
func (v *NullableEsignEsignInsertion) Set(val *EsignEsignInsertion) {
v.value = val
v.isSet = true
}
func (v NullableEsignEsignInsertion) IsSet() bool {
return v.isSet
}
func (v *NullableEsignEsignInsertion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEsignEsignInsertion(val *EsignEsignInsertion) *NullableEsignEsignInsertion {
return &NullableEsignEsignInsertion{value: val, isSet: true}
}
func (v NullableEsignEsignInsertion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEsignEsignInsertion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}