mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.2 KiB
Go
231 lines
6.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 DataroomTrustDecision type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DataroomTrustDecision{}
|
|
|
|
// DataroomTrustDecision struct for DataroomTrustDecision
|
|
type DataroomTrustDecision struct {
|
|
// Days is how long the grant stays open, from now. Optional; 14 by default and 365 at most — a longer release is describing a customer relationship rather than a document.
|
|
Days *int64 `json:"days,omitempty"`
|
|
// ID is the request to answer, taken from the path.
|
|
Id *string `json:"id,omitempty"`
|
|
// Note is why. Recorded on the request either way, and it is what the record shows a year later.
|
|
Note *string `json:"note,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DataroomTrustDecision DataroomTrustDecision
|
|
|
|
// NewDataroomTrustDecision instantiates a new DataroomTrustDecision 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 NewDataroomTrustDecision() *DataroomTrustDecision {
|
|
this := DataroomTrustDecision{}
|
|
return &this
|
|
}
|
|
|
|
// NewDataroomTrustDecisionWithDefaults instantiates a new DataroomTrustDecision 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 NewDataroomTrustDecisionWithDefaults() *DataroomTrustDecision {
|
|
this := DataroomTrustDecision{}
|
|
return &this
|
|
}
|
|
|
|
// GetDays returns the Days field value if set, zero value otherwise.
|
|
func (o *DataroomTrustDecision) GetDays() int64 {
|
|
if o == nil || IsNil(o.Days) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Days
|
|
}
|
|
|
|
// GetDaysOk returns a tuple with the Days field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustDecision) GetDaysOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Days) {
|
|
return nil, false
|
|
}
|
|
return o.Days, true
|
|
}
|
|
|
|
// HasDays returns a boolean if a field has been set.
|
|
func (o *DataroomTrustDecision) HasDays() bool {
|
|
if o != nil && !IsNil(o.Days) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDays gets a reference to the given int64 and assigns it to the Days field.
|
|
func (o *DataroomTrustDecision) SetDays(v int64) {
|
|
o.Days = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *DataroomTrustDecision) 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 *DataroomTrustDecision) 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 *DataroomTrustDecision) 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 *DataroomTrustDecision) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *DataroomTrustDecision) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustDecision) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *DataroomTrustDecision) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *DataroomTrustDecision) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
func (o DataroomTrustDecision) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DataroomTrustDecision) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Days) {
|
|
toSerialize["days"] = o.Days
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DataroomTrustDecision) UnmarshalJSON(data []byte) (err error) {
|
|
varDataroomTrustDecision := _DataroomTrustDecision{}
|
|
|
|
err = json.Unmarshal(data, &varDataroomTrustDecision)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DataroomTrustDecision(varDataroomTrustDecision)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "days")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "note")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDataroomTrustDecision struct {
|
|
value *DataroomTrustDecision
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDataroomTrustDecision) Get() *DataroomTrustDecision {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDataroomTrustDecision) Set(val *DataroomTrustDecision) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDataroomTrustDecision) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDataroomTrustDecision) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDataroomTrustDecision(val *DataroomTrustDecision) *NullableDataroomTrustDecision {
|
|
return &NullableDataroomTrustDecision{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDataroomTrustDecision) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDataroomTrustDecision) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|