mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
497 lines
13 KiB
Go
497 lines
13 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 LinkBoardResp type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &LinkBoardResp{}
|
|
|
|
// LinkBoardResp struct for LinkBoardResp
|
|
type LinkBoardResp struct {
|
|
// Account is the account the series narrows to, when one was named.
|
|
Account *string `json:"account,omitempty"`
|
|
// Available reports whether the warehouse answered; false is an honest \"we have no data\", NOT zero usage.
|
|
Available *bool `json:"available,omitempty"`
|
|
// Current is the live state of each lane — the dash headline.
|
|
Current []LinkReadingView `json:"current,omitempty"`
|
|
// From is when the resolved window opens, RFC 3339 UTC.
|
|
From *string `json:"from,omitempty"`
|
|
// Provider is the provider whose meter answered.
|
|
Provider *string `json:"provider,omitempty"`
|
|
// Range is the resolved period label.
|
|
Range *string `json:"range,omitempty"`
|
|
// Scope is always \"user\": the caller's own linked accounts.
|
|
Scope *string `json:"scope,omitempty"`
|
|
// Source is always \"account\": the provider's own meter, not a Hanzo charge.
|
|
Source *string `json:"source,omitempty"`
|
|
// To is where it closes, EXCLUSIVE, RFC 3339 UTC — the instant the read was served, so the window walks forward with the clock and two reads a minute apart do not cover the same period.
|
|
To *string `json:"to,omitempty"`
|
|
// Windows is every window instance in range, newest first.
|
|
Windows []LinkReadingView `json:"windows,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _LinkBoardResp LinkBoardResp
|
|
|
|
// NewLinkBoardResp instantiates a new LinkBoardResp 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 NewLinkBoardResp() *LinkBoardResp {
|
|
this := LinkBoardResp{}
|
|
return &this
|
|
}
|
|
|
|
// NewLinkBoardRespWithDefaults instantiates a new LinkBoardResp 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 NewLinkBoardRespWithDefaults() *LinkBoardResp {
|
|
this := LinkBoardResp{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetAccount() string {
|
|
if o == nil || IsNil(o.Account) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Account
|
|
}
|
|
|
|
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetAccountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Account) {
|
|
return nil, false
|
|
}
|
|
return o.Account, true
|
|
}
|
|
|
|
// HasAccount returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasAccount() bool {
|
|
if o != nil && !IsNil(o.Account) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccount gets a reference to the given string and assigns it to the Account field.
|
|
func (o *LinkBoardResp) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetAvailable returns the Available field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetAvailable() bool {
|
|
if o == nil || IsNil(o.Available) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Available
|
|
}
|
|
|
|
// GetAvailableOk returns a tuple with the Available field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetAvailableOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Available) {
|
|
return nil, false
|
|
}
|
|
return o.Available, true
|
|
}
|
|
|
|
// HasAvailable returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasAvailable() bool {
|
|
if o != nil && !IsNil(o.Available) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAvailable gets a reference to the given bool and assigns it to the Available field.
|
|
func (o *LinkBoardResp) SetAvailable(v bool) {
|
|
o.Available = &v
|
|
}
|
|
|
|
// GetCurrent returns the Current field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetCurrent() []LinkReadingView {
|
|
if o == nil || IsNil(o.Current) {
|
|
var ret []LinkReadingView
|
|
return ret
|
|
}
|
|
return o.Current
|
|
}
|
|
|
|
// GetCurrentOk returns a tuple with the Current field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetCurrentOk() ([]LinkReadingView, bool) {
|
|
if o == nil || IsNil(o.Current) {
|
|
return nil, false
|
|
}
|
|
return o.Current, true
|
|
}
|
|
|
|
// HasCurrent returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasCurrent() bool {
|
|
if o != nil && !IsNil(o.Current) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrent gets a reference to the given []LinkReadingView and assigns it to the Current field.
|
|
func (o *LinkBoardResp) SetCurrent(v []LinkReadingView) {
|
|
o.Current = v
|
|
}
|
|
|
|
// GetFrom returns the From field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetFrom() string {
|
|
if o == nil || IsNil(o.From) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.From
|
|
}
|
|
|
|
// GetFromOk returns a tuple with the From field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetFromOk() (*string, bool) {
|
|
if o == nil || IsNil(o.From) {
|
|
return nil, false
|
|
}
|
|
return o.From, true
|
|
}
|
|
|
|
// HasFrom returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasFrom() bool {
|
|
if o != nil && !IsNil(o.From) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFrom gets a reference to the given string and assigns it to the From field.
|
|
func (o *LinkBoardResp) SetFrom(v string) {
|
|
o.From = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *LinkBoardResp) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetRange returns the Range field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetRange() string {
|
|
if o == nil || IsNil(o.Range) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Range
|
|
}
|
|
|
|
// GetRangeOk returns a tuple with the Range field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetRangeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Range) {
|
|
return nil, false
|
|
}
|
|
return o.Range, true
|
|
}
|
|
|
|
// HasRange returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasRange() bool {
|
|
if o != nil && !IsNil(o.Range) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRange gets a reference to the given string and assigns it to the Range field.
|
|
func (o *LinkBoardResp) SetRange(v string) {
|
|
o.Range = &v
|
|
}
|
|
|
|
// GetScope returns the Scope field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetScope() string {
|
|
if o == nil || IsNil(o.Scope) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Scope
|
|
}
|
|
|
|
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetScopeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Scope) {
|
|
return nil, false
|
|
}
|
|
return o.Scope, true
|
|
}
|
|
|
|
// HasScope returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasScope() bool {
|
|
if o != nil && !IsNil(o.Scope) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScope gets a reference to the given string and assigns it to the Scope field.
|
|
func (o *LinkBoardResp) SetScope(v string) {
|
|
o.Scope = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *LinkBoardResp) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetTo returns the To field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetTo() string {
|
|
if o == nil || IsNil(o.To) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.To
|
|
}
|
|
|
|
// GetToOk returns a tuple with the To field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetToOk() (*string, bool) {
|
|
if o == nil || IsNil(o.To) {
|
|
return nil, false
|
|
}
|
|
return o.To, true
|
|
}
|
|
|
|
// HasTo returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasTo() bool {
|
|
if o != nil && !IsNil(o.To) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTo gets a reference to the given string and assigns it to the To field.
|
|
func (o *LinkBoardResp) SetTo(v string) {
|
|
o.To = &v
|
|
}
|
|
|
|
// GetWindows returns the Windows field value if set, zero value otherwise.
|
|
func (o *LinkBoardResp) GetWindows() []LinkReadingView {
|
|
if o == nil || IsNil(o.Windows) {
|
|
var ret []LinkReadingView
|
|
return ret
|
|
}
|
|
return o.Windows
|
|
}
|
|
|
|
// GetWindowsOk returns a tuple with the Windows field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *LinkBoardResp) GetWindowsOk() ([]LinkReadingView, bool) {
|
|
if o == nil || IsNil(o.Windows) {
|
|
return nil, false
|
|
}
|
|
return o.Windows, true
|
|
}
|
|
|
|
// HasWindows returns a boolean if a field has been set.
|
|
func (o *LinkBoardResp) HasWindows() bool {
|
|
if o != nil && !IsNil(o.Windows) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWindows gets a reference to the given []LinkReadingView and assigns it to the Windows field.
|
|
func (o *LinkBoardResp) SetWindows(v []LinkReadingView) {
|
|
o.Windows = v
|
|
}
|
|
|
|
func (o LinkBoardResp) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o LinkBoardResp) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Available) {
|
|
toSerialize["available"] = o.Available
|
|
}
|
|
if !IsNil(o.Current) {
|
|
toSerialize["current"] = o.Current
|
|
}
|
|
if !IsNil(o.From) {
|
|
toSerialize["from"] = o.From
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.Range) {
|
|
toSerialize["range"] = o.Range
|
|
}
|
|
if !IsNil(o.Scope) {
|
|
toSerialize["scope"] = o.Scope
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.To) {
|
|
toSerialize["to"] = o.To
|
|
}
|
|
if !IsNil(o.Windows) {
|
|
toSerialize["windows"] = o.Windows
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *LinkBoardResp) UnmarshalJSON(data []byte) (err error) {
|
|
varLinkBoardResp := _LinkBoardResp{}
|
|
|
|
err = json.Unmarshal(data, &varLinkBoardResp)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = LinkBoardResp(varLinkBoardResp)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "available")
|
|
delete(additionalProperties, "current")
|
|
delete(additionalProperties, "from")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "range")
|
|
delete(additionalProperties, "scope")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "to")
|
|
delete(additionalProperties, "windows")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableLinkBoardResp struct {
|
|
value *LinkBoardResp
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableLinkBoardResp) Get() *LinkBoardResp {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableLinkBoardResp) Set(val *LinkBoardResp) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableLinkBoardResp) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableLinkBoardResp) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableLinkBoardResp(val *LinkBoardResp) *NullableLinkBoardResp {
|
|
return &NullableLinkBoardResp{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableLinkBoardResp) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableLinkBoardResp) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|