mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.4 KiB
Go
307 lines
8.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 ProviderDeviceStartOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderDeviceStartOut{}
|
|
|
|
// ProviderDeviceStartOut struct for ProviderDeviceStartOut
|
|
type ProviderDeviceStartOut struct {
|
|
// ExpiresAt is when the flow dies, RFC 3339 UTC.
|
|
ExpiresAt *string `json:"expiresAt,omitempty"`
|
|
// Flow is the id to poll with.
|
|
Flow *string `json:"flow,omitempty"`
|
|
// Interval is the seconds to wait between polls.
|
|
Interval *int64 `json:"interval,omitempty"`
|
|
// UserCode is the short code the user types at VerifyURL.
|
|
UserCode *string `json:"userCode,omitempty"`
|
|
// VerifyURL is the page the user opens to enter UserCode.
|
|
VerifyUrl *string `json:"verifyUrl,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderDeviceStartOut ProviderDeviceStartOut
|
|
|
|
// NewProviderDeviceStartOut instantiates a new ProviderDeviceStartOut 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 NewProviderDeviceStartOut() *ProviderDeviceStartOut {
|
|
this := ProviderDeviceStartOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderDeviceStartOutWithDefaults instantiates a new ProviderDeviceStartOut 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 NewProviderDeviceStartOutWithDefaults() *ProviderDeviceStartOut {
|
|
this := ProviderDeviceStartOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise.
|
|
func (o *ProviderDeviceStartOut) GetExpiresAt() string {
|
|
if o == nil || IsNil(o.ExpiresAt) {
|
|
var ret string
|
|
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 *ProviderDeviceStartOut) GetExpiresAtOk() (*string, 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 *ProviderDeviceStartOut) HasExpiresAt() bool {
|
|
if o != nil && !IsNil(o.ExpiresAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field.
|
|
func (o *ProviderDeviceStartOut) SetExpiresAt(v string) {
|
|
o.ExpiresAt = &v
|
|
}
|
|
|
|
// GetFlow returns the Flow field value if set, zero value otherwise.
|
|
func (o *ProviderDeviceStartOut) GetFlow() string {
|
|
if o == nil || IsNil(o.Flow) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Flow
|
|
}
|
|
|
|
// GetFlowOk returns a tuple with the Flow field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDeviceStartOut) GetFlowOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Flow) {
|
|
return nil, false
|
|
}
|
|
return o.Flow, true
|
|
}
|
|
|
|
// HasFlow returns a boolean if a field has been set.
|
|
func (o *ProviderDeviceStartOut) HasFlow() bool {
|
|
if o != nil && !IsNil(o.Flow) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFlow gets a reference to the given string and assigns it to the Flow field.
|
|
func (o *ProviderDeviceStartOut) SetFlow(v string) {
|
|
o.Flow = &v
|
|
}
|
|
|
|
// GetInterval returns the Interval field value if set, zero value otherwise.
|
|
func (o *ProviderDeviceStartOut) GetInterval() int64 {
|
|
if o == nil || IsNil(o.Interval) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Interval
|
|
}
|
|
|
|
// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDeviceStartOut) GetIntervalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Interval) {
|
|
return nil, false
|
|
}
|
|
return o.Interval, true
|
|
}
|
|
|
|
// HasInterval returns a boolean if a field has been set.
|
|
func (o *ProviderDeviceStartOut) HasInterval() bool {
|
|
if o != nil && !IsNil(o.Interval) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInterval gets a reference to the given int64 and assigns it to the Interval field.
|
|
func (o *ProviderDeviceStartOut) SetInterval(v int64) {
|
|
o.Interval = &v
|
|
}
|
|
|
|
// GetUserCode returns the UserCode field value if set, zero value otherwise.
|
|
func (o *ProviderDeviceStartOut) GetUserCode() string {
|
|
if o == nil || IsNil(o.UserCode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserCode
|
|
}
|
|
|
|
// GetUserCodeOk returns a tuple with the UserCode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDeviceStartOut) GetUserCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserCode) {
|
|
return nil, false
|
|
}
|
|
return o.UserCode, true
|
|
}
|
|
|
|
// HasUserCode returns a boolean if a field has been set.
|
|
func (o *ProviderDeviceStartOut) HasUserCode() bool {
|
|
if o != nil && !IsNil(o.UserCode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserCode gets a reference to the given string and assigns it to the UserCode field.
|
|
func (o *ProviderDeviceStartOut) SetUserCode(v string) {
|
|
o.UserCode = &v
|
|
}
|
|
|
|
// GetVerifyUrl returns the VerifyUrl field value if set, zero value otherwise.
|
|
func (o *ProviderDeviceStartOut) GetVerifyUrl() string {
|
|
if o == nil || IsNil(o.VerifyUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.VerifyUrl
|
|
}
|
|
|
|
// GetVerifyUrlOk returns a tuple with the VerifyUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDeviceStartOut) GetVerifyUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.VerifyUrl) {
|
|
return nil, false
|
|
}
|
|
return o.VerifyUrl, true
|
|
}
|
|
|
|
// HasVerifyUrl returns a boolean if a field has been set.
|
|
func (o *ProviderDeviceStartOut) HasVerifyUrl() bool {
|
|
if o != nil && !IsNil(o.VerifyUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVerifyUrl gets a reference to the given string and assigns it to the VerifyUrl field.
|
|
func (o *ProviderDeviceStartOut) SetVerifyUrl(v string) {
|
|
o.VerifyUrl = &v
|
|
}
|
|
|
|
func (o ProviderDeviceStartOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderDeviceStartOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ExpiresAt) {
|
|
toSerialize["expiresAt"] = o.ExpiresAt
|
|
}
|
|
if !IsNil(o.Flow) {
|
|
toSerialize["flow"] = o.Flow
|
|
}
|
|
if !IsNil(o.Interval) {
|
|
toSerialize["interval"] = o.Interval
|
|
}
|
|
if !IsNil(o.UserCode) {
|
|
toSerialize["userCode"] = o.UserCode
|
|
}
|
|
if !IsNil(o.VerifyUrl) {
|
|
toSerialize["verifyUrl"] = o.VerifyUrl
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderDeviceStartOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderDeviceStartOut := _ProviderDeviceStartOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderDeviceStartOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderDeviceStartOut(varProviderDeviceStartOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "expiresAt")
|
|
delete(additionalProperties, "flow")
|
|
delete(additionalProperties, "interval")
|
|
delete(additionalProperties, "userCode")
|
|
delete(additionalProperties, "verifyUrl")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderDeviceStartOut struct {
|
|
value *ProviderDeviceStartOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderDeviceStartOut) Get() *ProviderDeviceStartOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderDeviceStartOut) Set(val *ProviderDeviceStartOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderDeviceStartOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderDeviceStartOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderDeviceStartOut(val *ProviderDeviceStartOut) *NullableProviderDeviceStartOut {
|
|
return &NullableProviderDeviceStartOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderDeviceStartOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderDeviceStartOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|