Files
sdk/model_iam_teams_input.go

414 lines
11 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 IamTeamsInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamTeamsInput{}
// IamTeamsInput struct for IamTeamsInput
type IamTeamsInput struct {
CreatedTime *string `json:"createdTime,omitempty"`
Description *string `json:"description,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
// Name addresses the team on update and names it on create; every other field is content and binds from the BODY, never the URL.
Name *string `json:"name,omitempty"`
Organization *string `json:"organization,omitempty"`
Parent *string `json:"parent,omitempty"`
Users []string `json:"users,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamTeamsInput IamTeamsInput
// NewIamTeamsInput instantiates a new IamTeamsInput 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 NewIamTeamsInput() *IamTeamsInput {
this := IamTeamsInput{}
return &this
}
// NewIamTeamsInputWithDefaults instantiates a new IamTeamsInput 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 NewIamTeamsInputWithDefaults() *IamTeamsInput {
this := IamTeamsInput{}
return &this
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *IamTeamsInput) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *IamTeamsInput) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *IamTeamsInput) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *IamTeamsInput) 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 *IamTeamsInput) 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 *IamTeamsInput) 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 *IamTeamsInput) SetDescription(v string) {
o.Description = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *IamTeamsInput) 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 *IamTeamsInput) 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 *IamTeamsInput) 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 *IamTeamsInput) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise.
func (o *IamTeamsInput) GetIsEnabled() bool {
if o == nil || IsNil(o.IsEnabled) {
var ret bool
return ret
}
return *o.IsEnabled
}
// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetIsEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.IsEnabled) {
return nil, false
}
return o.IsEnabled, true
}
// HasIsEnabled returns a boolean if a field has been set.
func (o *IamTeamsInput) HasIsEnabled() bool {
if o != nil && !IsNil(o.IsEnabled) {
return true
}
return false
}
// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field.
func (o *IamTeamsInput) SetIsEnabled(v bool) {
o.IsEnabled = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *IamTeamsInput) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *IamTeamsInput) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *IamTeamsInput) SetName(v string) {
o.Name = &v
}
// GetOrganization returns the Organization field value if set, zero value otherwise.
func (o *IamTeamsInput) GetOrganization() string {
if o == nil || IsNil(o.Organization) {
var ret string
return ret
}
return *o.Organization
}
// GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetOrganizationOk() (*string, bool) {
if o == nil || IsNil(o.Organization) {
return nil, false
}
return o.Organization, true
}
// HasOrganization returns a boolean if a field has been set.
func (o *IamTeamsInput) HasOrganization() bool {
if o != nil && !IsNil(o.Organization) {
return true
}
return false
}
// SetOrganization gets a reference to the given string and assigns it to the Organization field.
func (o *IamTeamsInput) SetOrganization(v string) {
o.Organization = &v
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *IamTeamsInput) GetParent() string {
if o == nil || IsNil(o.Parent) {
var ret string
return ret
}
return *o.Parent
}
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetParentOk() (*string, bool) {
if o == nil || IsNil(o.Parent) {
return nil, false
}
return o.Parent, true
}
// HasParent returns a boolean if a field has been set.
func (o *IamTeamsInput) HasParent() bool {
if o != nil && !IsNil(o.Parent) {
return true
}
return false
}
// SetParent gets a reference to the given string and assigns it to the Parent field.
func (o *IamTeamsInput) SetParent(v string) {
o.Parent = &v
}
// GetUsers returns the Users field value if set, zero value otherwise.
func (o *IamTeamsInput) GetUsers() []string {
if o == nil || IsNil(o.Users) {
var ret []string
return ret
}
return o.Users
}
// GetUsersOk returns a tuple with the Users field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamTeamsInput) GetUsersOk() ([]string, bool) {
if o == nil || IsNil(o.Users) {
return nil, false
}
return o.Users, true
}
// HasUsers returns a boolean if a field has been set.
func (o *IamTeamsInput) HasUsers() bool {
if o != nil && !IsNil(o.Users) {
return true
}
return false
}
// SetUsers gets a reference to the given []string and assigns it to the Users field.
func (o *IamTeamsInput) SetUsers(v []string) {
o.Users = v
}
func (o IamTeamsInput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamTeamsInput) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.IsEnabled) {
toSerialize["isEnabled"] = o.IsEnabled
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Organization) {
toSerialize["organization"] = o.Organization
}
if !IsNil(o.Parent) {
toSerialize["parent"] = o.Parent
}
if !IsNil(o.Users) {
toSerialize["users"] = o.Users
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamTeamsInput) UnmarshalJSON(data []byte) (err error) {
varIamTeamsInput := _IamTeamsInput{}
err = json.Unmarshal(data, &varIamTeamsInput)
if err != nil {
return err
}
*o = IamTeamsInput(varIamTeamsInput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdTime")
delete(additionalProperties, "description")
delete(additionalProperties, "displayName")
delete(additionalProperties, "isEnabled")
delete(additionalProperties, "name")
delete(additionalProperties, "organization")
delete(additionalProperties, "parent")
delete(additionalProperties, "users")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamTeamsInput struct {
value *IamTeamsInput
isSet bool
}
func (v NullableIamTeamsInput) Get() *IamTeamsInput {
return v.value
}
func (v *NullableIamTeamsInput) Set(val *IamTeamsInput) {
v.value = val
v.isSet = true
}
func (v NullableIamTeamsInput) IsSet() bool {
return v.isSet
}
func (v *NullableIamTeamsInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamTeamsInput(val *IamTeamsInput) *NullableIamTeamsInput {
return &NullableIamTeamsInput{value: val, isSet: true}
}
func (v NullableIamTeamsInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamTeamsInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}