mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.4 KiB
Go
155 lines
4.4 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 TransportPairingQueue type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TransportPairingQueue{}
|
|
|
|
// TransportPairingQueue struct for TransportPairingQueue
|
|
type TransportPairingQueue struct {
|
|
// Pending is every unexpired pairing request waiting on an org admin, each carrying the transport, the requesting sender and the code to approve it with.
|
|
Pending []TransportPairingView `json:"pending,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TransportPairingQueue TransportPairingQueue
|
|
|
|
// NewTransportPairingQueue instantiates a new TransportPairingQueue 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 NewTransportPairingQueue() *TransportPairingQueue {
|
|
this := TransportPairingQueue{}
|
|
return &this
|
|
}
|
|
|
|
// NewTransportPairingQueueWithDefaults instantiates a new TransportPairingQueue 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 NewTransportPairingQueueWithDefaults() *TransportPairingQueue {
|
|
this := TransportPairingQueue{}
|
|
return &this
|
|
}
|
|
|
|
// GetPending returns the Pending field value if set, zero value otherwise.
|
|
func (o *TransportPairingQueue) GetPending() []TransportPairingView {
|
|
if o == nil || IsNil(o.Pending) {
|
|
var ret []TransportPairingView
|
|
return ret
|
|
}
|
|
return o.Pending
|
|
}
|
|
|
|
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TransportPairingQueue) GetPendingOk() ([]TransportPairingView, bool) {
|
|
if o == nil || IsNil(o.Pending) {
|
|
return nil, false
|
|
}
|
|
return o.Pending, true
|
|
}
|
|
|
|
// HasPending returns a boolean if a field has been set.
|
|
func (o *TransportPairingQueue) HasPending() bool {
|
|
if o != nil && !IsNil(o.Pending) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPending gets a reference to the given []TransportPairingView and assigns it to the Pending field.
|
|
func (o *TransportPairingQueue) SetPending(v []TransportPairingView) {
|
|
o.Pending = v
|
|
}
|
|
|
|
func (o TransportPairingQueue) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TransportPairingQueue) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Pending) {
|
|
toSerialize["pending"] = o.Pending
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TransportPairingQueue) UnmarshalJSON(data []byte) (err error) {
|
|
varTransportPairingQueue := _TransportPairingQueue{}
|
|
|
|
err = json.Unmarshal(data, &varTransportPairingQueue)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TransportPairingQueue(varTransportPairingQueue)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "pending")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTransportPairingQueue struct {
|
|
value *TransportPairingQueue
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTransportPairingQueue) Get() *TransportPairingQueue {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTransportPairingQueue) Set(val *TransportPairingQueue) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTransportPairingQueue) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTransportPairingQueue) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTransportPairingQueue(val *TransportPairingQueue) *NullableTransportPairingQueue {
|
|
return &NullableTransportPairingQueue{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTransportPairingQueue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTransportPairingQueue) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|