mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.7 KiB
Go
228 lines
5.7 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 IamBulk type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamBulk{}
|
|
|
|
// IamBulk struct for IamBulk
|
|
type IamBulk struct {
|
|
MaxOperations *int64 `json:"maxOperations,omitempty"`
|
|
MaxPayloadSize *int64 `json:"maxPayloadSize,omitempty"`
|
|
Supported *bool `json:"supported,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamBulk IamBulk
|
|
|
|
// NewIamBulk instantiates a new IamBulk 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 NewIamBulk() *IamBulk {
|
|
this := IamBulk{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamBulkWithDefaults instantiates a new IamBulk 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 NewIamBulkWithDefaults() *IamBulk {
|
|
this := IamBulk{}
|
|
return &this
|
|
}
|
|
|
|
// GetMaxOperations returns the MaxOperations field value if set, zero value otherwise.
|
|
func (o *IamBulk) GetMaxOperations() int64 {
|
|
if o == nil || IsNil(o.MaxOperations) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MaxOperations
|
|
}
|
|
|
|
// GetMaxOperationsOk returns a tuple with the MaxOperations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamBulk) GetMaxOperationsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MaxOperations) {
|
|
return nil, false
|
|
}
|
|
return o.MaxOperations, true
|
|
}
|
|
|
|
// HasMaxOperations returns a boolean if a field has been set.
|
|
func (o *IamBulk) HasMaxOperations() bool {
|
|
if o != nil && !IsNil(o.MaxOperations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxOperations gets a reference to the given int64 and assigns it to the MaxOperations field.
|
|
func (o *IamBulk) SetMaxOperations(v int64) {
|
|
o.MaxOperations = &v
|
|
}
|
|
|
|
// GetMaxPayloadSize returns the MaxPayloadSize field value if set, zero value otherwise.
|
|
func (o *IamBulk) GetMaxPayloadSize() int64 {
|
|
if o == nil || IsNil(o.MaxPayloadSize) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MaxPayloadSize
|
|
}
|
|
|
|
// GetMaxPayloadSizeOk returns a tuple with the MaxPayloadSize field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamBulk) GetMaxPayloadSizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MaxPayloadSize) {
|
|
return nil, false
|
|
}
|
|
return o.MaxPayloadSize, true
|
|
}
|
|
|
|
// HasMaxPayloadSize returns a boolean if a field has been set.
|
|
func (o *IamBulk) HasMaxPayloadSize() bool {
|
|
if o != nil && !IsNil(o.MaxPayloadSize) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxPayloadSize gets a reference to the given int64 and assigns it to the MaxPayloadSize field.
|
|
func (o *IamBulk) SetMaxPayloadSize(v int64) {
|
|
o.MaxPayloadSize = &v
|
|
}
|
|
|
|
// GetSupported returns the Supported field value if set, zero value otherwise.
|
|
func (o *IamBulk) GetSupported() bool {
|
|
if o == nil || IsNil(o.Supported) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Supported
|
|
}
|
|
|
|
// GetSupportedOk returns a tuple with the Supported field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamBulk) GetSupportedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Supported) {
|
|
return nil, false
|
|
}
|
|
return o.Supported, true
|
|
}
|
|
|
|
// HasSupported returns a boolean if a field has been set.
|
|
func (o *IamBulk) HasSupported() bool {
|
|
if o != nil && !IsNil(o.Supported) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSupported gets a reference to the given bool and assigns it to the Supported field.
|
|
func (o *IamBulk) SetSupported(v bool) {
|
|
o.Supported = &v
|
|
}
|
|
|
|
func (o IamBulk) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamBulk) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.MaxOperations) {
|
|
toSerialize["maxOperations"] = o.MaxOperations
|
|
}
|
|
if !IsNil(o.MaxPayloadSize) {
|
|
toSerialize["maxPayloadSize"] = o.MaxPayloadSize
|
|
}
|
|
if !IsNil(o.Supported) {
|
|
toSerialize["supported"] = o.Supported
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamBulk) UnmarshalJSON(data []byte) (err error) {
|
|
varIamBulk := _IamBulk{}
|
|
|
|
err = json.Unmarshal(data, &varIamBulk)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamBulk(varIamBulk)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "maxOperations")
|
|
delete(additionalProperties, "maxPayloadSize")
|
|
delete(additionalProperties, "supported")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamBulk struct {
|
|
value *IamBulk
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamBulk) Get() *IamBulk {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamBulk) Set(val *IamBulk) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamBulk) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamBulk) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamBulk(val *IamBulk) *NullableIamBulk {
|
|
return &NullableIamBulk{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamBulk) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamBulk) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|