mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.3 KiB
Go
269 lines
7.3 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 DataroomTrustGranted type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DataroomTrustGranted{}
|
|
|
|
// DataroomTrustGranted struct for DataroomTrustGranted
|
|
type DataroomTrustGranted struct {
|
|
// Delivery is empty when the asker was mailed, and otherwise says what happened instead — so an approver is never left believing a mail went out that did not.
|
|
Delivery *string `json:"delivery,omitempty"`
|
|
// ExpiresAt is when the grant closes, in unix milliseconds.
|
|
ExpiresAt *int64 `json:"expiresAt,omitempty"`
|
|
// Link is the share link's id. The link admits only the address that asked.
|
|
Link *string `json:"link,omitempty"`
|
|
// State is \"granted\".
|
|
State *string `json:"state,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DataroomTrustGranted DataroomTrustGranted
|
|
|
|
// NewDataroomTrustGranted instantiates a new DataroomTrustGranted 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 NewDataroomTrustGranted() *DataroomTrustGranted {
|
|
this := DataroomTrustGranted{}
|
|
return &this
|
|
}
|
|
|
|
// NewDataroomTrustGrantedWithDefaults instantiates a new DataroomTrustGranted 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 NewDataroomTrustGrantedWithDefaults() *DataroomTrustGranted {
|
|
this := DataroomTrustGranted{}
|
|
return &this
|
|
}
|
|
|
|
// GetDelivery returns the Delivery field value if set, zero value otherwise.
|
|
func (o *DataroomTrustGranted) GetDelivery() string {
|
|
if o == nil || IsNil(o.Delivery) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Delivery
|
|
}
|
|
|
|
// GetDeliveryOk returns a tuple with the Delivery field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustGranted) GetDeliveryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Delivery) {
|
|
return nil, false
|
|
}
|
|
return o.Delivery, true
|
|
}
|
|
|
|
// HasDelivery returns a boolean if a field has been set.
|
|
func (o *DataroomTrustGranted) HasDelivery() bool {
|
|
if o != nil && !IsNil(o.Delivery) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDelivery gets a reference to the given string and assigns it to the Delivery field.
|
|
func (o *DataroomTrustGranted) SetDelivery(v string) {
|
|
o.Delivery = &v
|
|
}
|
|
|
|
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
|
|
func (o *DataroomTrustGranted) GetExpiresAt() int64 {
|
|
if o == nil || IsNil(o.ExpiresAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ExpiresAt
|
|
}
|
|
|
|
// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustGranted) GetExpiresAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ExpiresAt) {
|
|
return nil, false
|
|
}
|
|
return o.ExpiresAt, true
|
|
}
|
|
|
|
// HasExpiresAt returns a boolean if a field has been set.
|
|
func (o *DataroomTrustGranted) HasExpiresAt() bool {
|
|
if o != nil && !IsNil(o.ExpiresAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpiresAt gets a reference to the given int64 and assigns it to the ExpiresAt field.
|
|
func (o *DataroomTrustGranted) SetExpiresAt(v int64) {
|
|
o.ExpiresAt = &v
|
|
}
|
|
|
|
// GetLink returns the Link field value if set, zero value otherwise.
|
|
func (o *DataroomTrustGranted) GetLink() string {
|
|
if o == nil || IsNil(o.Link) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Link
|
|
}
|
|
|
|
// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustGranted) GetLinkOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Link) {
|
|
return nil, false
|
|
}
|
|
return o.Link, true
|
|
}
|
|
|
|
// HasLink returns a boolean if a field has been set.
|
|
func (o *DataroomTrustGranted) HasLink() bool {
|
|
if o != nil && !IsNil(o.Link) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLink gets a reference to the given string and assigns it to the Link field.
|
|
func (o *DataroomTrustGranted) SetLink(v string) {
|
|
o.Link = &v
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *DataroomTrustGranted) GetState() string {
|
|
if o == nil || IsNil(o.State) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.State
|
|
}
|
|
|
|
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DataroomTrustGranted) GetStateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.State) {
|
|
return nil, false
|
|
}
|
|
return o.State, true
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *DataroomTrustGranted) HasState() bool {
|
|
if o != nil && !IsNil(o.State) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *DataroomTrustGranted) SetState(v string) {
|
|
o.State = &v
|
|
}
|
|
|
|
func (o DataroomTrustGranted) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DataroomTrustGranted) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Delivery) {
|
|
toSerialize["delivery"] = o.Delivery
|
|
}
|
|
if !IsNil(o.ExpiresAt) {
|
|
toSerialize["expiresAt"] = o.ExpiresAt
|
|
}
|
|
if !IsNil(o.Link) {
|
|
toSerialize["link"] = o.Link
|
|
}
|
|
if !IsNil(o.State) {
|
|
toSerialize["state"] = o.State
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DataroomTrustGranted) UnmarshalJSON(data []byte) (err error) {
|
|
varDataroomTrustGranted := _DataroomTrustGranted{}
|
|
|
|
err = json.Unmarshal(data, &varDataroomTrustGranted)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DataroomTrustGranted(varDataroomTrustGranted)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "delivery")
|
|
delete(additionalProperties, "expiresAt")
|
|
delete(additionalProperties, "link")
|
|
delete(additionalProperties, "state")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDataroomTrustGranted struct {
|
|
value *DataroomTrustGranted
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDataroomTrustGranted) Get() *DataroomTrustGranted {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDataroomTrustGranted) Set(val *DataroomTrustGranted) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDataroomTrustGranted) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDataroomTrustGranted) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDataroomTrustGranted(val *DataroomTrustGranted) *NullableDataroomTrustGranted {
|
|
return &NullableDataroomTrustGranted{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDataroomTrustGranted) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDataroomTrustGranted) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|