mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
5.0 KiB
Go
191 lines
5.0 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 IamMutationResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &IamMutationResult{}
|
|
|
|
// IamMutationResult struct for IamMutationResult
|
|
type IamMutationResult struct {
|
|
Affected *bool `json:"affected,omitempty"`
|
|
Provider *IamProvider `json:"provider,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _IamMutationResult IamMutationResult
|
|
|
|
// NewIamMutationResult instantiates a new IamMutationResult 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 NewIamMutationResult() *IamMutationResult {
|
|
this := IamMutationResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewIamMutationResultWithDefaults instantiates a new IamMutationResult 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 NewIamMutationResultWithDefaults() *IamMutationResult {
|
|
this := IamMutationResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetAffected returns the Affected field value if set, zero value otherwise.
|
|
func (o *IamMutationResult) GetAffected() bool {
|
|
if o == nil || IsNil(o.Affected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Affected
|
|
}
|
|
|
|
// GetAffectedOk returns a tuple with the Affected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IamMutationResult) GetAffectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Affected) {
|
|
return nil, false
|
|
}
|
|
return o.Affected, true
|
|
}
|
|
|
|
// HasAffected returns a boolean if a field has been set.
|
|
func (o *IamMutationResult) HasAffected() bool {
|
|
if o != nil && !IsNil(o.Affected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAffected gets a reference to the given bool and assigns it to the Affected field.
|
|
func (o *IamMutationResult) SetAffected(v bool) {
|
|
o.Affected = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *IamMutationResult) GetProvider() IamProvider {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret IamProvider
|
|
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 *IamMutationResult) GetProviderOk() (*IamProvider, 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 *IamMutationResult) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given IamProvider and assigns it to the Provider field.
|
|
func (o *IamMutationResult) SetProvider(v IamProvider) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
func (o IamMutationResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o IamMutationResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Affected) {
|
|
toSerialize["affected"] = o.Affected
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *IamMutationResult) UnmarshalJSON(data []byte) (err error) {
|
|
varIamMutationResult := _IamMutationResult{}
|
|
|
|
err = json.Unmarshal(data, &varIamMutationResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = IamMutationResult(varIamMutationResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "affected")
|
|
delete(additionalProperties, "provider")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableIamMutationResult struct {
|
|
value *IamMutationResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIamMutationResult) Get() *IamMutationResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIamMutationResult) Set(val *IamMutationResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIamMutationResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIamMutationResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIamMutationResult(val *IamMutationResult) *NullableIamMutationResult {
|
|
return &NullableIamMutationResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIamMutationResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIamMutationResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|