Files
stack/components/fctl/membershipclient/model_organization_all_of.go
2024-01-09 09:24:38 +00:00

221 lines
5.7 KiB
Go

/*
Membership API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package membershipclient
import (
"encoding/json"
)
// checks if the OrganizationAllOf type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OrganizationAllOf{}
// OrganizationAllOf struct for OrganizationAllOf
type OrganizationAllOf struct {
// Organization ID
Id string `json:"id"`
// Owner ID
OwnerId string `json:"ownerId"`
// Number of available stacks
AvailableStacks *int32 `json:"availableStacks,omitempty"`
// Number of available sandboxes
AvailableSandboxes *int32 `json:"availableSandboxes,omitempty"`
}
// NewOrganizationAllOf instantiates a new OrganizationAllOf 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 NewOrganizationAllOf(id string, ownerId string) *OrganizationAllOf {
this := OrganizationAllOf{}
this.Id = id
this.OwnerId = ownerId
return &this
}
// NewOrganizationAllOfWithDefaults instantiates a new OrganizationAllOf 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 NewOrganizationAllOfWithDefaults() *OrganizationAllOf {
this := OrganizationAllOf{}
return &this
}
// GetId returns the Id field value
func (o *OrganizationAllOf) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *OrganizationAllOf) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *OrganizationAllOf) SetId(v string) {
o.Id = v
}
// GetOwnerId returns the OwnerId field value
func (o *OrganizationAllOf) GetOwnerId() string {
if o == nil {
var ret string
return ret
}
return o.OwnerId
}
// GetOwnerIdOk returns a tuple with the OwnerId field value
// and a boolean to check if the value has been set.
func (o *OrganizationAllOf) GetOwnerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OwnerId, true
}
// SetOwnerId sets field value
func (o *OrganizationAllOf) SetOwnerId(v string) {
o.OwnerId = v
}
// GetAvailableStacks returns the AvailableStacks field value if set, zero value otherwise.
func (o *OrganizationAllOf) GetAvailableStacks() int32 {
if o == nil || IsNil(o.AvailableStacks) {
var ret int32
return ret
}
return *o.AvailableStacks
}
// GetAvailableStacksOk returns a tuple with the AvailableStacks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationAllOf) GetAvailableStacksOk() (*int32, bool) {
if o == nil || IsNil(o.AvailableStacks) {
return nil, false
}
return o.AvailableStacks, true
}
// HasAvailableStacks returns a boolean if a field has been set.
func (o *OrganizationAllOf) HasAvailableStacks() bool {
if o != nil && !IsNil(o.AvailableStacks) {
return true
}
return false
}
// SetAvailableStacks gets a reference to the given int32 and assigns it to the AvailableStacks field.
func (o *OrganizationAllOf) SetAvailableStacks(v int32) {
o.AvailableStacks = &v
}
// GetAvailableSandboxes returns the AvailableSandboxes field value if set, zero value otherwise.
func (o *OrganizationAllOf) GetAvailableSandboxes() int32 {
if o == nil || IsNil(o.AvailableSandboxes) {
var ret int32
return ret
}
return *o.AvailableSandboxes
}
// GetAvailableSandboxesOk returns a tuple with the AvailableSandboxes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrganizationAllOf) GetAvailableSandboxesOk() (*int32, bool) {
if o == nil || IsNil(o.AvailableSandboxes) {
return nil, false
}
return o.AvailableSandboxes, true
}
// HasAvailableSandboxes returns a boolean if a field has been set.
func (o *OrganizationAllOf) HasAvailableSandboxes() bool {
if o != nil && !IsNil(o.AvailableSandboxes) {
return true
}
return false
}
// SetAvailableSandboxes gets a reference to the given int32 and assigns it to the AvailableSandboxes field.
func (o *OrganizationAllOf) SetAvailableSandboxes(v int32) {
o.AvailableSandboxes = &v
}
func (o OrganizationAllOf) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OrganizationAllOf) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["ownerId"] = o.OwnerId
if !IsNil(o.AvailableStacks) {
toSerialize["availableStacks"] = o.AvailableStacks
}
if !IsNil(o.AvailableSandboxes) {
toSerialize["availableSandboxes"] = o.AvailableSandboxes
}
return toSerialize, nil
}
type NullableOrganizationAllOf struct {
value *OrganizationAllOf
isSet bool
}
func (v NullableOrganizationAllOf) Get() *OrganizationAllOf {
return v.value
}
func (v *NullableOrganizationAllOf) Set(val *OrganizationAllOf) {
v.value = val
v.isSet = true
}
func (v NullableOrganizationAllOf) IsSet() bool {
return v.isSet
}
func (v *NullableOrganizationAllOf) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOrganizationAllOf(val *OrganizationAllOf) *NullableOrganizationAllOf {
return &NullableOrganizationAllOf{value: val, isSet: true}
}
func (v NullableOrganizationAllOf) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOrganizationAllOf) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}