mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.7 KiB
Go
307 lines
8.7 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 PlanPlanResolution type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlanPlanResolution{}
|
|
|
|
// PlanPlanResolution struct for PlanPlanResolution
|
|
type PlanPlanResolution struct {
|
|
Entitlements interface{} `json:"entitlements,omitempty"`
|
|
// ID is the plan's catalog id.
|
|
Id *string `json:"id,omitempty"`
|
|
// LicenseFeatures is the flat, sorted feature list a signed license carries, derived from the entitlements — \"ai.premium\", \"licensing.product:team\".
|
|
LicenseFeatures []string `json:"license_features,omitempty"`
|
|
PriceRef interface{} `json:"price_ref,omitempty"`
|
|
// TenantID is the catalog the record came from: \"hanzo\" for the canonical catalog, a reseller org for that reseller's override.
|
|
TenantId *string `json:"tenant_id,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlanPlanResolution PlanPlanResolution
|
|
|
|
// NewPlanPlanResolution instantiates a new PlanPlanResolution 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 NewPlanPlanResolution() *PlanPlanResolution {
|
|
this := PlanPlanResolution{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlanPlanResolutionWithDefaults instantiates a new PlanPlanResolution 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 NewPlanPlanResolutionWithDefaults() *PlanPlanResolution {
|
|
this := PlanPlanResolution{}
|
|
return &this
|
|
}
|
|
|
|
// GetEntitlements returns the Entitlements field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *PlanPlanResolution) GetEntitlements() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Entitlements
|
|
}
|
|
|
|
// GetEntitlementsOk returns a tuple with the Entitlements field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *PlanPlanResolution) GetEntitlementsOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Entitlements) {
|
|
return nil, false
|
|
}
|
|
return &o.Entitlements, true
|
|
}
|
|
|
|
// HasEntitlements returns a boolean if a field has been set.
|
|
func (o *PlanPlanResolution) HasEntitlements() bool {
|
|
if o != nil && !IsNil(o.Entitlements) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntitlements gets a reference to the given interface{} and assigns it to the Entitlements field.
|
|
func (o *PlanPlanResolution) SetEntitlements(v interface{}) {
|
|
o.Entitlements = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *PlanPlanResolution) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanPlanResolution) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *PlanPlanResolution) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *PlanPlanResolution) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLicenseFeatures returns the LicenseFeatures field value if set, zero value otherwise.
|
|
func (o *PlanPlanResolution) GetLicenseFeatures() []string {
|
|
if o == nil || IsNil(o.LicenseFeatures) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.LicenseFeatures
|
|
}
|
|
|
|
// GetLicenseFeaturesOk returns a tuple with the LicenseFeatures field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanPlanResolution) GetLicenseFeaturesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.LicenseFeatures) {
|
|
return nil, false
|
|
}
|
|
return o.LicenseFeatures, true
|
|
}
|
|
|
|
// HasLicenseFeatures returns a boolean if a field has been set.
|
|
func (o *PlanPlanResolution) HasLicenseFeatures() bool {
|
|
if o != nil && !IsNil(o.LicenseFeatures) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLicenseFeatures gets a reference to the given []string and assigns it to the LicenseFeatures field.
|
|
func (o *PlanPlanResolution) SetLicenseFeatures(v []string) {
|
|
o.LicenseFeatures = v
|
|
}
|
|
|
|
// GetPriceRef returns the PriceRef field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *PlanPlanResolution) GetPriceRef() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.PriceRef
|
|
}
|
|
|
|
// GetPriceRefOk returns a tuple with the PriceRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *PlanPlanResolution) GetPriceRefOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.PriceRef) {
|
|
return nil, false
|
|
}
|
|
return &o.PriceRef, true
|
|
}
|
|
|
|
// HasPriceRef returns a boolean if a field has been set.
|
|
func (o *PlanPlanResolution) HasPriceRef() bool {
|
|
if o != nil && !IsNil(o.PriceRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPriceRef gets a reference to the given interface{} and assigns it to the PriceRef field.
|
|
func (o *PlanPlanResolution) SetPriceRef(v interface{}) {
|
|
o.PriceRef = v
|
|
}
|
|
|
|
// GetTenantId returns the TenantId field value if set, zero value otherwise.
|
|
func (o *PlanPlanResolution) GetTenantId() string {
|
|
if o == nil || IsNil(o.TenantId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.TenantId
|
|
}
|
|
|
|
// GetTenantIdOk returns a tuple with the TenantId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanPlanResolution) GetTenantIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.TenantId) {
|
|
return nil, false
|
|
}
|
|
return o.TenantId, true
|
|
}
|
|
|
|
// HasTenantId returns a boolean if a field has been set.
|
|
func (o *PlanPlanResolution) HasTenantId() bool {
|
|
if o != nil && !IsNil(o.TenantId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTenantId gets a reference to the given string and assigns it to the TenantId field.
|
|
func (o *PlanPlanResolution) SetTenantId(v string) {
|
|
o.TenantId = &v
|
|
}
|
|
|
|
func (o PlanPlanResolution) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlanPlanResolution) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Entitlements != nil {
|
|
toSerialize["entitlements"] = o.Entitlements
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.LicenseFeatures) {
|
|
toSerialize["license_features"] = o.LicenseFeatures
|
|
}
|
|
if o.PriceRef != nil {
|
|
toSerialize["price_ref"] = o.PriceRef
|
|
}
|
|
if !IsNil(o.TenantId) {
|
|
toSerialize["tenant_id"] = o.TenantId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlanPlanResolution) UnmarshalJSON(data []byte) (err error) {
|
|
varPlanPlanResolution := _PlanPlanResolution{}
|
|
|
|
err = json.Unmarshal(data, &varPlanPlanResolution)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlanPlanResolution(varPlanPlanResolution)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "entitlements")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "license_features")
|
|
delete(additionalProperties, "price_ref")
|
|
delete(additionalProperties, "tenant_id")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlanPlanResolution struct {
|
|
value *PlanPlanResolution
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlanPlanResolution) Get() *PlanPlanResolution {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlanPlanResolution) Set(val *PlanPlanResolution) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlanPlanResolution) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlanPlanResolution) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlanPlanResolution(val *PlanPlanResolution) *NullablePlanPlanResolution {
|
|
return &NullablePlanPlanResolution{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlanPlanResolution) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlanPlanResolution) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|