Files
sdk/model_iam_scope_description.go

228 lines
6.1 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 IamScopeDescription type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamScopeDescription{}
// IamScopeDescription struct for IamScopeDescription
type IamScopeDescription struct {
Description *string `json:"description,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Scope *string `json:"scope,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamScopeDescription IamScopeDescription
// NewIamScopeDescription instantiates a new IamScopeDescription 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 NewIamScopeDescription() *IamScopeDescription {
this := IamScopeDescription{}
return &this
}
// NewIamScopeDescriptionWithDefaults instantiates a new IamScopeDescription 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 NewIamScopeDescriptionWithDefaults() *IamScopeDescription {
this := IamScopeDescription{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *IamScopeDescription) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamScopeDescription) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *IamScopeDescription) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *IamScopeDescription) SetDescription(v string) {
o.Description = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *IamScopeDescription) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamScopeDescription) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *IamScopeDescription) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *IamScopeDescription) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *IamScopeDescription) 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 *IamScopeDescription) 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 *IamScopeDescription) 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 *IamScopeDescription) SetScope(v string) {
o.Scope = &v
}
func (o IamScopeDescription) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamScopeDescription) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.Scope) {
toSerialize["scope"] = o.Scope
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamScopeDescription) UnmarshalJSON(data []byte) (err error) {
varIamScopeDescription := _IamScopeDescription{}
err = json.Unmarshal(data, &varIamScopeDescription)
if err != nil {
return err
}
*o = IamScopeDescription(varIamScopeDescription)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "description")
delete(additionalProperties, "displayName")
delete(additionalProperties, "scope")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamScopeDescription struct {
value *IamScopeDescription
isSet bool
}
func (v NullableIamScopeDescription) Get() *IamScopeDescription {
return v.value
}
func (v *NullableIamScopeDescription) Set(val *IamScopeDescription) {
v.value = val
v.isSet = true
}
func (v NullableIamScopeDescription) IsSet() bool {
return v.isSet
}
func (v *NullableIamScopeDescription) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamScopeDescription(val *IamScopeDescription) *NullableIamScopeDescription {
return &NullableIamScopeDescription{value: val, isSet: true}
}
func (v NullableIamScopeDescription) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamScopeDescription) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}