mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.5 KiB
Go
231 lines
6.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 ProviderDevicePollOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderDevicePollOut{}
|
|
|
|
// ProviderDevicePollOut struct for ProviderDevicePollOut
|
|
type ProviderDevicePollOut struct {
|
|
// Connection is the connected connector. Present only on \"connected\".
|
|
Connector *ProviderConnectionView `json:"connector,omitempty"`
|
|
// Interval is the seconds to wait before the next poll. Present only while pending, and it may rise when the provider asks the client to slow down.
|
|
Interval *int64 `json:"interval,omitempty"`
|
|
// Status is the flow's state. \"pending\" means poll again after Interval.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderDevicePollOut ProviderDevicePollOut
|
|
|
|
// NewProviderDevicePollOut instantiates a new ProviderDevicePollOut 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 NewProviderDevicePollOut() *ProviderDevicePollOut {
|
|
this := ProviderDevicePollOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderDevicePollOutWithDefaults instantiates a new ProviderDevicePollOut 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 NewProviderDevicePollOutWithDefaults() *ProviderDevicePollOut {
|
|
this := ProviderDevicePollOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetConnector returns the Connector field value if set, zero value otherwise.
|
|
func (o *ProviderDevicePollOut) GetConnector() ProviderConnectionView {
|
|
if o == nil || IsNil(o.Connector) {
|
|
var ret ProviderConnectionView
|
|
return ret
|
|
}
|
|
return *o.Connector
|
|
}
|
|
|
|
// GetConnectorOk returns a tuple with the Connector field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDevicePollOut) GetConnectorOk() (*ProviderConnectionView, bool) {
|
|
if o == nil || IsNil(o.Connector) {
|
|
return nil, false
|
|
}
|
|
return o.Connector, true
|
|
}
|
|
|
|
// HasConnector returns a boolean if a field has been set.
|
|
func (o *ProviderDevicePollOut) HasConnector() bool {
|
|
if o != nil && !IsNil(o.Connector) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnector gets a reference to the given ProviderConnectionView and assigns it to the Connector field.
|
|
func (o *ProviderDevicePollOut) SetConnector(v ProviderConnectionView) {
|
|
o.Connector = &v
|
|
}
|
|
|
|
// GetInterval returns the Interval field value if set, zero value otherwise.
|
|
func (o *ProviderDevicePollOut) 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 *ProviderDevicePollOut) 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 *ProviderDevicePollOut) 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 *ProviderDevicePollOut) SetInterval(v int64) {
|
|
o.Interval = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *ProviderDevicePollOut) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderDevicePollOut) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *ProviderDevicePollOut) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *ProviderDevicePollOut) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o ProviderDevicePollOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderDevicePollOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Connector) {
|
|
toSerialize["connector"] = o.Connector
|
|
}
|
|
if !IsNil(o.Interval) {
|
|
toSerialize["interval"] = o.Interval
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderDevicePollOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderDevicePollOut := _ProviderDevicePollOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderDevicePollOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderDevicePollOut(varProviderDevicePollOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "connector")
|
|
delete(additionalProperties, "interval")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderDevicePollOut struct {
|
|
value *ProviderDevicePollOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderDevicePollOut) Get() *ProviderDevicePollOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderDevicePollOut) Set(val *ProviderDevicePollOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderDevicePollOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderDevicePollOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderDevicePollOut(val *ProviderDevicePollOut) *NullableProviderDevicePollOut {
|
|
return &NullableProviderDevicePollOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderDevicePollOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderDevicePollOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|