mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.5 KiB
Go
155 lines
4.5 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 DataroomDataroomDocuments type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DataroomDataroomDocuments{}
|
|
|
|
// DataroomDataroomDocuments struct for DataroomDataroomDocuments
|
|
type DataroomDataroomDocuments struct {
|
|
// Documents is every document in the caller's own store, newest first.
|
|
Documents []DataroomDataroomDocument `json:"documents,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DataroomDataroomDocuments DataroomDataroomDocuments
|
|
|
|
// NewDataroomDataroomDocuments instantiates a new DataroomDataroomDocuments 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 NewDataroomDataroomDocuments() *DataroomDataroomDocuments {
|
|
this := DataroomDataroomDocuments{}
|
|
return &this
|
|
}
|
|
|
|
// NewDataroomDataroomDocumentsWithDefaults instantiates a new DataroomDataroomDocuments 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 NewDataroomDataroomDocumentsWithDefaults() *DataroomDataroomDocuments {
|
|
this := DataroomDataroomDocuments{}
|
|
return &this
|
|
}
|
|
|
|
// GetDocuments returns the Documents field value if set, zero value otherwise.
|
|
func (o *DataroomDataroomDocuments) GetDocuments() []DataroomDataroomDocument {
|
|
if o == nil || IsNil(o.Documents) {
|
|
var ret []DataroomDataroomDocument
|
|
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 *DataroomDataroomDocuments) GetDocumentsOk() ([]DataroomDataroomDocument, 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 *DataroomDataroomDocuments) HasDocuments() bool {
|
|
if o != nil && !IsNil(o.Documents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocuments gets a reference to the given []DataroomDataroomDocument and assigns it to the Documents field.
|
|
func (o *DataroomDataroomDocuments) SetDocuments(v []DataroomDataroomDocument) {
|
|
o.Documents = v
|
|
}
|
|
|
|
func (o DataroomDataroomDocuments) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DataroomDataroomDocuments) 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 *DataroomDataroomDocuments) UnmarshalJSON(data []byte) (err error) {
|
|
varDataroomDataroomDocuments := _DataroomDataroomDocuments{}
|
|
|
|
err = json.Unmarshal(data, &varDataroomDataroomDocuments)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DataroomDataroomDocuments(varDataroomDataroomDocuments)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "documents")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDataroomDataroomDocuments struct {
|
|
value *DataroomDataroomDocuments
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDataroomDataroomDocuments) Get() *DataroomDataroomDocuments {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDataroomDataroomDocuments) Set(val *DataroomDataroomDocuments) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDataroomDataroomDocuments) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDataroomDataroomDocuments) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDataroomDataroomDocuments(val *DataroomDataroomDocuments) *NullableDataroomDataroomDocuments {
|
|
return &NullableDataroomDataroomDocuments{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDataroomDataroomDocuments) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDataroomDataroomDocuments) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|