Files
sdk/model_trust_trust_documents.go

155 lines
4.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 TrustTrustDocuments type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustTrustDocuments{}
// TrustTrustDocuments struct for TrustTrustDocuments
type TrustTrustDocuments struct {
// Documents is the list; a gated entry carries no address.
Documents []TrustDocRow `json:"documents,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustTrustDocuments TrustTrustDocuments
// NewTrustTrustDocuments instantiates a new TrustTrustDocuments 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 NewTrustTrustDocuments() *TrustTrustDocuments {
this := TrustTrustDocuments{}
return &this
}
// NewTrustTrustDocumentsWithDefaults instantiates a new TrustTrustDocuments 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 NewTrustTrustDocumentsWithDefaults() *TrustTrustDocuments {
this := TrustTrustDocuments{}
return &this
}
// GetDocuments returns the Documents field value if set, zero value otherwise.
func (o *TrustTrustDocuments) GetDocuments() []TrustDocRow {
if o == nil || IsNil(o.Documents) {
var ret []TrustDocRow
return ret
}
return o.Documents
}
// GetDocumentsOk returns a tuple with the Documents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustTrustDocuments) GetDocumentsOk() ([]TrustDocRow, bool) {
if o == nil || IsNil(o.Documents) {
return nil, false
}
return o.Documents, true
}
// HasDocuments returns a boolean if a field has been set.
func (o *TrustTrustDocuments) HasDocuments() bool {
if o != nil && !IsNil(o.Documents) {
return true
}
return false
}
// SetDocuments gets a reference to the given []TrustDocRow and assigns it to the Documents field.
func (o *TrustTrustDocuments) SetDocuments(v []TrustDocRow) {
o.Documents = v
}
func (o TrustTrustDocuments) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustTrustDocuments) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Documents) {
toSerialize["documents"] = o.Documents
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustTrustDocuments) UnmarshalJSON(data []byte) (err error) {
varTrustTrustDocuments := _TrustTrustDocuments{}
err = json.Unmarshal(data, &varTrustTrustDocuments)
if err != nil {
return err
}
*o = TrustTrustDocuments(varTrustTrustDocuments)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "documents")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustTrustDocuments struct {
value *TrustTrustDocuments
isSet bool
}
func (v NullableTrustTrustDocuments) Get() *TrustTrustDocuments {
return v.value
}
func (v *NullableTrustTrustDocuments) Set(val *TrustTrustDocuments) {
v.value = val
v.isSet = true
}
func (v NullableTrustTrustDocuments) IsSet() bool {
return v.isSet
}
func (v *NullableTrustTrustDocuments) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustTrustDocuments(val *TrustTrustDocuments) *NullableTrustTrustDocuments {
return &NullableTrustTrustDocuments{value: val, isSet: true}
}
func (v NullableTrustTrustDocuments) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustTrustDocuments) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}