mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
547 lines
15 KiB
Go
547 lines
15 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the OrganizationExpanded type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &OrganizationExpanded{}
|
|
|
|
// OrganizationExpanded struct for OrganizationExpanded
|
|
type OrganizationExpanded struct {
|
|
// Organization name
|
|
Name string `json:"name"`
|
|
DefaultOrganizationAccess *Role `json:"defaultOrganizationAccess,omitempty"`
|
|
DefaultStackAccess *Role `json:"defaultStackAccess,omitempty"`
|
|
// Organization domain
|
|
Domain *string `json:"domain,omitempty"`
|
|
// 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"`
|
|
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
|
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
|
TotalStacks *int32 `json:"totalStacks,omitempty"`
|
|
TotalUsers *int32 `json:"totalUsers,omitempty"`
|
|
Owner *User `json:"owner,omitempty"`
|
|
}
|
|
|
|
// NewOrganizationExpanded instantiates a new OrganizationExpanded 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 NewOrganizationExpanded(name string, id string, ownerId string) *OrganizationExpanded {
|
|
this := OrganizationExpanded{}
|
|
this.Name = name
|
|
var defaultOrganizationAccess Role = EMPTY
|
|
this.DefaultOrganizationAccess = &defaultOrganizationAccess
|
|
var defaultStackAccess Role = EMPTY
|
|
this.DefaultStackAccess = &defaultStackAccess
|
|
this.Id = id
|
|
this.OwnerId = ownerId
|
|
return &this
|
|
}
|
|
|
|
// NewOrganizationExpandedWithDefaults instantiates a new OrganizationExpanded 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 NewOrganizationExpandedWithDefaults() *OrganizationExpanded {
|
|
this := OrganizationExpanded{}
|
|
var defaultOrganizationAccess Role = EMPTY
|
|
this.DefaultOrganizationAccess = &defaultOrganizationAccess
|
|
var defaultStackAccess Role = EMPTY
|
|
this.DefaultStackAccess = &defaultStackAccess
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *OrganizationExpanded) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *OrganizationExpanded) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetDefaultOrganizationAccess returns the DefaultOrganizationAccess field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetDefaultOrganizationAccess() Role {
|
|
if o == nil || IsNil(o.DefaultOrganizationAccess) {
|
|
var ret Role
|
|
return ret
|
|
}
|
|
return *o.DefaultOrganizationAccess
|
|
}
|
|
|
|
// GetDefaultOrganizationAccessOk returns a tuple with the DefaultOrganizationAccess field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetDefaultOrganizationAccessOk() (*Role, bool) {
|
|
if o == nil || IsNil(o.DefaultOrganizationAccess) {
|
|
return nil, false
|
|
}
|
|
return o.DefaultOrganizationAccess, true
|
|
}
|
|
|
|
// HasDefaultOrganizationAccess returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasDefaultOrganizationAccess() bool {
|
|
if o != nil && !IsNil(o.DefaultOrganizationAccess) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDefaultOrganizationAccess gets a reference to the given Role and assigns it to the DefaultOrganizationAccess field.
|
|
func (o *OrganizationExpanded) SetDefaultOrganizationAccess(v Role) {
|
|
o.DefaultOrganizationAccess = &v
|
|
}
|
|
|
|
// GetDefaultStackAccess returns the DefaultStackAccess field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetDefaultStackAccess() Role {
|
|
if o == nil || IsNil(o.DefaultStackAccess) {
|
|
var ret Role
|
|
return ret
|
|
}
|
|
return *o.DefaultStackAccess
|
|
}
|
|
|
|
// GetDefaultStackAccessOk returns a tuple with the DefaultStackAccess field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetDefaultStackAccessOk() (*Role, bool) {
|
|
if o == nil || IsNil(o.DefaultStackAccess) {
|
|
return nil, false
|
|
}
|
|
return o.DefaultStackAccess, true
|
|
}
|
|
|
|
// HasDefaultStackAccess returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasDefaultStackAccess() bool {
|
|
if o != nil && !IsNil(o.DefaultStackAccess) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDefaultStackAccess gets a reference to the given Role and assigns it to the DefaultStackAccess field.
|
|
func (o *OrganizationExpanded) SetDefaultStackAccess(v Role) {
|
|
o.DefaultStackAccess = &v
|
|
}
|
|
|
|
// GetDomain returns the Domain field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetDomain() string {
|
|
if o == nil || IsNil(o.Domain) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Domain
|
|
}
|
|
|
|
// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetDomainOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Domain) {
|
|
return nil, false
|
|
}
|
|
return o.Domain, true
|
|
}
|
|
|
|
// HasDomain returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasDomain() bool {
|
|
if o != nil && !IsNil(o.Domain) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDomain gets a reference to the given string and assigns it to the Domain field.
|
|
func (o *OrganizationExpanded) SetDomain(v string) {
|
|
o.Domain = &v
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *OrganizationExpanded) 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 *OrganizationExpanded) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *OrganizationExpanded) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetOwnerId returns the OwnerId field value
|
|
func (o *OrganizationExpanded) 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 *OrganizationExpanded) GetOwnerIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.OwnerId, true
|
|
}
|
|
|
|
// SetOwnerId sets field value
|
|
func (o *OrganizationExpanded) SetOwnerId(v string) {
|
|
o.OwnerId = v
|
|
}
|
|
|
|
// GetAvailableStacks returns the AvailableStacks field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) 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 *OrganizationExpanded) 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 *OrganizationExpanded) 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 *OrganizationExpanded) SetAvailableStacks(v int32) {
|
|
o.AvailableStacks = &v
|
|
}
|
|
|
|
// GetAvailableSandboxes returns the AvailableSandboxes field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) 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 *OrganizationExpanded) 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 *OrganizationExpanded) 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 *OrganizationExpanded) SetAvailableSandboxes(v int32) {
|
|
o.AvailableSandboxes = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetCreatedAt() time.Time {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
|
func (o *OrganizationExpanded) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetUpdatedAt() time.Time {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetUpdatedAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
|
func (o *OrganizationExpanded) SetUpdatedAt(v time.Time) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
// GetTotalStacks returns the TotalStacks field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetTotalStacks() int32 {
|
|
if o == nil || IsNil(o.TotalStacks) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TotalStacks
|
|
}
|
|
|
|
// GetTotalStacksOk returns a tuple with the TotalStacks field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetTotalStacksOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TotalStacks) {
|
|
return nil, false
|
|
}
|
|
return o.TotalStacks, true
|
|
}
|
|
|
|
// HasTotalStacks returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasTotalStacks() bool {
|
|
if o != nil && !IsNil(o.TotalStacks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalStacks gets a reference to the given int32 and assigns it to the TotalStacks field.
|
|
func (o *OrganizationExpanded) SetTotalStacks(v int32) {
|
|
o.TotalStacks = &v
|
|
}
|
|
|
|
// GetTotalUsers returns the TotalUsers field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetTotalUsers() int32 {
|
|
if o == nil || IsNil(o.TotalUsers) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TotalUsers
|
|
}
|
|
|
|
// GetTotalUsersOk returns a tuple with the TotalUsers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetTotalUsersOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TotalUsers) {
|
|
return nil, false
|
|
}
|
|
return o.TotalUsers, true
|
|
}
|
|
|
|
// HasTotalUsers returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasTotalUsers() bool {
|
|
if o != nil && !IsNil(o.TotalUsers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalUsers gets a reference to the given int32 and assigns it to the TotalUsers field.
|
|
func (o *OrganizationExpanded) SetTotalUsers(v int32) {
|
|
o.TotalUsers = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *OrganizationExpanded) GetOwner() User {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret User
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *OrganizationExpanded) GetOwnerOk() (*User, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *OrganizationExpanded) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given User and assigns it to the Owner field.
|
|
func (o *OrganizationExpanded) SetOwner(v User) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
func (o OrganizationExpanded) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o OrganizationExpanded) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["name"] = o.Name
|
|
if !IsNil(o.DefaultOrganizationAccess) {
|
|
toSerialize["defaultOrganizationAccess"] = o.DefaultOrganizationAccess
|
|
}
|
|
if !IsNil(o.DefaultStackAccess) {
|
|
toSerialize["defaultStackAccess"] = o.DefaultStackAccess
|
|
}
|
|
if !IsNil(o.Domain) {
|
|
toSerialize["domain"] = o.Domain
|
|
}
|
|
toSerialize["id"] = o.Id
|
|
toSerialize["ownerId"] = o.OwnerId
|
|
if !IsNil(o.AvailableStacks) {
|
|
toSerialize["availableStacks"] = o.AvailableStacks
|
|
}
|
|
if !IsNil(o.AvailableSandboxes) {
|
|
toSerialize["availableSandboxes"] = o.AvailableSandboxes
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
if !IsNil(o.TotalStacks) {
|
|
toSerialize["totalStacks"] = o.TotalStacks
|
|
}
|
|
if !IsNil(o.TotalUsers) {
|
|
toSerialize["totalUsers"] = o.TotalUsers
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableOrganizationExpanded struct {
|
|
value *OrganizationExpanded
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableOrganizationExpanded) Get() *OrganizationExpanded {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableOrganizationExpanded) Set(val *OrganizationExpanded) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableOrganizationExpanded) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableOrganizationExpanded) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableOrganizationExpanded(val *OrganizationExpanded) *NullableOrganizationExpanded {
|
|
return &NullableOrganizationExpanded{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableOrganizationExpanded) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableOrganizationExpanded) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|