mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.5 KiB
Go
265 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 BillingMode type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingMode{}
|
|
|
|
// BillingMode struct for BillingMode
|
|
type BillingMode struct {
|
|
Live *bool `json:"live,omitempty"`
|
|
OrgId *string `json:"orgId,omitempty"`
|
|
OrgName *string `json:"orgName,omitempty"`
|
|
TestMode *bool `json:"testMode,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingMode BillingMode
|
|
|
|
// NewBillingMode instantiates a new BillingMode 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 NewBillingMode() *BillingMode {
|
|
this := BillingMode{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingModeWithDefaults instantiates a new BillingMode 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 NewBillingModeWithDefaults() *BillingMode {
|
|
this := BillingMode{}
|
|
return &this
|
|
}
|
|
|
|
// GetLive returns the Live field value if set, zero value otherwise.
|
|
func (o *BillingMode) GetLive() bool {
|
|
if o == nil || IsNil(o.Live) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Live
|
|
}
|
|
|
|
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingMode) GetLiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Live) {
|
|
return nil, false
|
|
}
|
|
return o.Live, true
|
|
}
|
|
|
|
// HasLive returns a boolean if a field has been set.
|
|
func (o *BillingMode) HasLive() bool {
|
|
if o != nil && !IsNil(o.Live) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLive gets a reference to the given bool and assigns it to the Live field.
|
|
func (o *BillingMode) SetLive(v bool) {
|
|
o.Live = &v
|
|
}
|
|
|
|
// GetOrgId returns the OrgId field value if set, zero value otherwise.
|
|
func (o *BillingMode) GetOrgId() string {
|
|
if o == nil || IsNil(o.OrgId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.OrgId
|
|
}
|
|
|
|
// GetOrgIdOk returns a tuple with the OrgId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingMode) GetOrgIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.OrgId) {
|
|
return nil, false
|
|
}
|
|
return o.OrgId, true
|
|
}
|
|
|
|
// HasOrgId returns a boolean if a field has been set.
|
|
func (o *BillingMode) HasOrgId() bool {
|
|
if o != nil && !IsNil(o.OrgId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrgId gets a reference to the given string and assigns it to the OrgId field.
|
|
func (o *BillingMode) SetOrgId(v string) {
|
|
o.OrgId = &v
|
|
}
|
|
|
|
// GetOrgName returns the OrgName field value if set, zero value otherwise.
|
|
func (o *BillingMode) GetOrgName() string {
|
|
if o == nil || IsNil(o.OrgName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.OrgName
|
|
}
|
|
|
|
// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingMode) GetOrgNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.OrgName) {
|
|
return nil, false
|
|
}
|
|
return o.OrgName, true
|
|
}
|
|
|
|
// HasOrgName returns a boolean if a field has been set.
|
|
func (o *BillingMode) HasOrgName() bool {
|
|
if o != nil && !IsNil(o.OrgName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrgName gets a reference to the given string and assigns it to the OrgName field.
|
|
func (o *BillingMode) SetOrgName(v string) {
|
|
o.OrgName = &v
|
|
}
|
|
|
|
// GetTestMode returns the TestMode field value if set, zero value otherwise.
|
|
func (o *BillingMode) GetTestMode() bool {
|
|
if o == nil || IsNil(o.TestMode) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.TestMode
|
|
}
|
|
|
|
// GetTestModeOk returns a tuple with the TestMode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingMode) GetTestModeOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.TestMode) {
|
|
return nil, false
|
|
}
|
|
return o.TestMode, true
|
|
}
|
|
|
|
// HasTestMode returns a boolean if a field has been set.
|
|
func (o *BillingMode) HasTestMode() bool {
|
|
if o != nil && !IsNil(o.TestMode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTestMode gets a reference to the given bool and assigns it to the TestMode field.
|
|
func (o *BillingMode) SetTestMode(v bool) {
|
|
o.TestMode = &v
|
|
}
|
|
|
|
func (o BillingMode) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingMode) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Live) {
|
|
toSerialize["live"] = o.Live
|
|
}
|
|
if !IsNil(o.OrgId) {
|
|
toSerialize["orgId"] = o.OrgId
|
|
}
|
|
if !IsNil(o.OrgName) {
|
|
toSerialize["orgName"] = o.OrgName
|
|
}
|
|
if !IsNil(o.TestMode) {
|
|
toSerialize["testMode"] = o.TestMode
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingMode) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingMode := _BillingMode{}
|
|
|
|
err = json.Unmarshal(data, &varBillingMode)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingMode(varBillingMode)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "live")
|
|
delete(additionalProperties, "orgId")
|
|
delete(additionalProperties, "orgName")
|
|
delete(additionalProperties, "testMode")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingMode struct {
|
|
value *BillingMode
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingMode) Get() *BillingMode {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingMode) Set(val *BillingMode) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingMode) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingMode) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingMode(val *BillingMode) *NullableBillingMode {
|
|
return &NullableBillingMode{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingMode) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingMode) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|