mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
302 lines
7.4 KiB
Go
302 lines
7.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 BillingHolder type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingHolder{}
|
|
|
|
// BillingHolder struct for BillingHolder
|
|
type BillingHolder struct {
|
|
AddedAt *string `json:"addedAt,omitempty"`
|
|
Email *string `json:"email,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Role *string `json:"role,omitempty"`
|
|
UserId *string `json:"userId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingHolder BillingHolder
|
|
|
|
// NewBillingHolder instantiates a new BillingHolder 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 NewBillingHolder() *BillingHolder {
|
|
this := BillingHolder{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingHolderWithDefaults instantiates a new BillingHolder 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 NewBillingHolderWithDefaults() *BillingHolder {
|
|
this := BillingHolder{}
|
|
return &this
|
|
}
|
|
|
|
// GetAddedAt returns the AddedAt field value if set, zero value otherwise.
|
|
func (o *BillingHolder) GetAddedAt() string {
|
|
if o == nil || IsNil(o.AddedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AddedAt
|
|
}
|
|
|
|
// GetAddedAtOk returns a tuple with the AddedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingHolder) GetAddedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AddedAt) {
|
|
return nil, false
|
|
}
|
|
return o.AddedAt, true
|
|
}
|
|
|
|
// HasAddedAt returns a boolean if a field has been set.
|
|
func (o *BillingHolder) HasAddedAt() bool {
|
|
if o != nil && !IsNil(o.AddedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAddedAt gets a reference to the given string and assigns it to the AddedAt field.
|
|
func (o *BillingHolder) SetAddedAt(v string) {
|
|
o.AddedAt = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *BillingHolder) GetEmail() string {
|
|
if o == nil || IsNil(o.Email) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Email
|
|
}
|
|
|
|
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingHolder) GetEmailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Email) {
|
|
return nil, false
|
|
}
|
|
return o.Email, true
|
|
}
|
|
|
|
// HasEmail returns a boolean if a field has been set.
|
|
func (o *BillingHolder) HasEmail() bool {
|
|
if o != nil && !IsNil(o.Email) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmail gets a reference to the given string and assigns it to the Email field.
|
|
func (o *BillingHolder) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BillingHolder) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingHolder) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *BillingHolder) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *BillingHolder) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetRole returns the Role field value if set, zero value otherwise.
|
|
func (o *BillingHolder) GetRole() string {
|
|
if o == nil || IsNil(o.Role) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Role
|
|
}
|
|
|
|
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingHolder) GetRoleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Role) {
|
|
return nil, false
|
|
}
|
|
return o.Role, true
|
|
}
|
|
|
|
// HasRole returns a boolean if a field has been set.
|
|
func (o *BillingHolder) HasRole() bool {
|
|
if o != nil && !IsNil(o.Role) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRole gets a reference to the given string and assigns it to the Role field.
|
|
func (o *BillingHolder) SetRole(v string) {
|
|
o.Role = &v
|
|
}
|
|
|
|
// GetUserId returns the UserId field value if set, zero value otherwise.
|
|
func (o *BillingHolder) GetUserId() string {
|
|
if o == nil || IsNil(o.UserId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserId
|
|
}
|
|
|
|
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingHolder) GetUserIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserId) {
|
|
return nil, false
|
|
}
|
|
return o.UserId, true
|
|
}
|
|
|
|
// HasUserId returns a boolean if a field has been set.
|
|
func (o *BillingHolder) HasUserId() bool {
|
|
if o != nil && !IsNil(o.UserId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserId gets a reference to the given string and assigns it to the UserId field.
|
|
func (o *BillingHolder) SetUserId(v string) {
|
|
o.UserId = &v
|
|
}
|
|
|
|
func (o BillingHolder) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingHolder) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AddedAt) {
|
|
toSerialize["addedAt"] = o.AddedAt
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Role) {
|
|
toSerialize["role"] = o.Role
|
|
}
|
|
if !IsNil(o.UserId) {
|
|
toSerialize["userId"] = o.UserId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingHolder) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingHolder := _BillingHolder{}
|
|
|
|
err = json.Unmarshal(data, &varBillingHolder)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingHolder(varBillingHolder)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "addedAt")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "role")
|
|
delete(additionalProperties, "userId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingHolder struct {
|
|
value *BillingHolder
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingHolder) Get() *BillingHolder {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingHolder) Set(val *BillingHolder) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingHolder) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingHolder) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingHolder(val *BillingHolder) *NullableBillingHolder {
|
|
return &NullableBillingHolder{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingHolder) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingHolder) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|