mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
8.8 KiB
Go
345 lines
8.8 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 TeamPlanInfo type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamPlanInfo{}
|
|
|
|
// TeamPlanInfo struct for TeamPlanInfo
|
|
type TeamPlanInfo struct {
|
|
// Active is whether that plan's entitlement is live.
|
|
Active *bool `json:"active,omitempty"`
|
|
// GuestLimit is the plan's team.guests cap, when the plan carries one.
|
|
GuestLimit *int64 `json:"guestLimit,omitempty"`
|
|
// Guests is how many of those seats are guests.
|
|
Guests *int64 `json:"guests,omitempty"`
|
|
// Plan is the licensed plan id, empty when it cannot be resolved here — an honest dash on the page, never a fabricated tier.
|
|
Plan *string `json:"plan,omitempty"`
|
|
// Seats is the org's distinct active human members.
|
|
Seats *int64 `json:"seats,omitempty"`
|
|
// UpgradeURL is where the page sends a caller who wants a bigger plan.
|
|
UpgradeUrl *string `json:"upgradeUrl,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamPlanInfo TeamPlanInfo
|
|
|
|
// NewTeamPlanInfo instantiates a new TeamPlanInfo 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 NewTeamPlanInfo() *TeamPlanInfo {
|
|
this := TeamPlanInfo{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamPlanInfoWithDefaults instantiates a new TeamPlanInfo 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 NewTeamPlanInfoWithDefaults() *TeamPlanInfo {
|
|
this := TeamPlanInfo{}
|
|
return &this
|
|
}
|
|
|
|
// GetActive returns the Active field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetActive() bool {
|
|
if o == nil || IsNil(o.Active) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Active
|
|
}
|
|
|
|
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetActiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Active) {
|
|
return nil, false
|
|
}
|
|
return o.Active, true
|
|
}
|
|
|
|
// HasActive returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasActive() bool {
|
|
if o != nil && !IsNil(o.Active) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActive gets a reference to the given bool and assigns it to the Active field.
|
|
func (o *TeamPlanInfo) SetActive(v bool) {
|
|
o.Active = &v
|
|
}
|
|
|
|
// GetGuestLimit returns the GuestLimit field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetGuestLimit() int64 {
|
|
if o == nil || IsNil(o.GuestLimit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.GuestLimit
|
|
}
|
|
|
|
// GetGuestLimitOk returns a tuple with the GuestLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetGuestLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.GuestLimit) {
|
|
return nil, false
|
|
}
|
|
return o.GuestLimit, true
|
|
}
|
|
|
|
// HasGuestLimit returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasGuestLimit() bool {
|
|
if o != nil && !IsNil(o.GuestLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGuestLimit gets a reference to the given int64 and assigns it to the GuestLimit field.
|
|
func (o *TeamPlanInfo) SetGuestLimit(v int64) {
|
|
o.GuestLimit = &v
|
|
}
|
|
|
|
// GetGuests returns the Guests field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetGuests() int64 {
|
|
if o == nil || IsNil(o.Guests) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Guests
|
|
}
|
|
|
|
// GetGuestsOk returns a tuple with the Guests field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetGuestsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Guests) {
|
|
return nil, false
|
|
}
|
|
return o.Guests, true
|
|
}
|
|
|
|
// HasGuests returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasGuests() bool {
|
|
if o != nil && !IsNil(o.Guests) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGuests gets a reference to the given int64 and assigns it to the Guests field.
|
|
func (o *TeamPlanInfo) SetGuests(v int64) {
|
|
o.Guests = &v
|
|
}
|
|
|
|
// GetPlan returns the Plan field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetPlan() string {
|
|
if o == nil || IsNil(o.Plan) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Plan
|
|
}
|
|
|
|
// GetPlanOk returns a tuple with the Plan field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetPlanOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Plan) {
|
|
return nil, false
|
|
}
|
|
return o.Plan, true
|
|
}
|
|
|
|
// HasPlan returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasPlan() bool {
|
|
if o != nil && !IsNil(o.Plan) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPlan gets a reference to the given string and assigns it to the Plan field.
|
|
func (o *TeamPlanInfo) SetPlan(v string) {
|
|
o.Plan = &v
|
|
}
|
|
|
|
// GetSeats returns the Seats field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetSeats() int64 {
|
|
if o == nil || IsNil(o.Seats) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Seats
|
|
}
|
|
|
|
// GetSeatsOk returns a tuple with the Seats field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetSeatsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Seats) {
|
|
return nil, false
|
|
}
|
|
return o.Seats, true
|
|
}
|
|
|
|
// HasSeats returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasSeats() bool {
|
|
if o != nil && !IsNil(o.Seats) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSeats gets a reference to the given int64 and assigns it to the Seats field.
|
|
func (o *TeamPlanInfo) SetSeats(v int64) {
|
|
o.Seats = &v
|
|
}
|
|
|
|
// GetUpgradeUrl returns the UpgradeUrl field value if set, zero value otherwise.
|
|
func (o *TeamPlanInfo) GetUpgradeUrl() string {
|
|
if o == nil || IsNil(o.UpgradeUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpgradeUrl
|
|
}
|
|
|
|
// GetUpgradeUrlOk returns a tuple with the UpgradeUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamPlanInfo) GetUpgradeUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpgradeUrl) {
|
|
return nil, false
|
|
}
|
|
return o.UpgradeUrl, true
|
|
}
|
|
|
|
// HasUpgradeUrl returns a boolean if a field has been set.
|
|
func (o *TeamPlanInfo) HasUpgradeUrl() bool {
|
|
if o != nil && !IsNil(o.UpgradeUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpgradeUrl gets a reference to the given string and assigns it to the UpgradeUrl field.
|
|
func (o *TeamPlanInfo) SetUpgradeUrl(v string) {
|
|
o.UpgradeUrl = &v
|
|
}
|
|
|
|
func (o TeamPlanInfo) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamPlanInfo) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Active) {
|
|
toSerialize["active"] = o.Active
|
|
}
|
|
if !IsNil(o.GuestLimit) {
|
|
toSerialize["guestLimit"] = o.GuestLimit
|
|
}
|
|
if !IsNil(o.Guests) {
|
|
toSerialize["guests"] = o.Guests
|
|
}
|
|
if !IsNil(o.Plan) {
|
|
toSerialize["plan"] = o.Plan
|
|
}
|
|
if !IsNil(o.Seats) {
|
|
toSerialize["seats"] = o.Seats
|
|
}
|
|
if !IsNil(o.UpgradeUrl) {
|
|
toSerialize["upgradeUrl"] = o.UpgradeUrl
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamPlanInfo) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamPlanInfo := _TeamPlanInfo{}
|
|
|
|
err = json.Unmarshal(data, &varTeamPlanInfo)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamPlanInfo(varTeamPlanInfo)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "active")
|
|
delete(additionalProperties, "guestLimit")
|
|
delete(additionalProperties, "guests")
|
|
delete(additionalProperties, "plan")
|
|
delete(additionalProperties, "seats")
|
|
delete(additionalProperties, "upgradeUrl")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamPlanInfo struct {
|
|
value *TeamPlanInfo
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamPlanInfo) Get() *TeamPlanInfo {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamPlanInfo) Set(val *TeamPlanInfo) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamPlanInfo) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamPlanInfo) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamPlanInfo(val *TeamPlanInfo) *NullableTeamPlanInfo {
|
|
return &NullableTeamPlanInfo{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamPlanInfo) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamPlanInfo) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|