mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
11 KiB
Go
383 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 ProvisioningProvisionedSummary type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProvisioningProvisionedSummary{}
|
|
|
|
// ProvisioningProvisionedSummary struct for ProvisioningProvisionedSummary
|
|
type ProvisioningProvisionedSummary struct {
|
|
// CreatedAt is when the resource was provisioned, in unix seconds.
|
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
|
// Host is the address that actually routes to this resource — a dedicated instance's own in-cluster Service, or the public gateway for a shared one. Never the internal admin address of a shared backend.
|
|
Host *string `json:"host,omitempty"`
|
|
// ID is the resource's server-minted handle, \"rs_\"-prefixed.
|
|
Id *string `json:"id,omitempty"`
|
|
// Kind is the product: sql, vector, datastore, kv, search, s3 or docdb.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name is the org-unique slug the caller provisioned the resource under.
|
|
Name *string `json:"name,omitempty"`
|
|
// Port is the port a client connects to on Host.
|
|
Port *int64 `json:"port,omitempty"`
|
|
// Status is \"ready\", or \"provisioning\" while a dedicated instance is still being materialized by the operator.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProvisioningProvisionedSummary ProvisioningProvisionedSummary
|
|
|
|
// NewProvisioningProvisionedSummary instantiates a new ProvisioningProvisionedSummary 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 NewProvisioningProvisionedSummary() *ProvisioningProvisionedSummary {
|
|
this := ProvisioningProvisionedSummary{}
|
|
return &this
|
|
}
|
|
|
|
// NewProvisioningProvisionedSummaryWithDefaults instantiates a new ProvisioningProvisionedSummary 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 NewProvisioningProvisionedSummaryWithDefaults() *ProvisioningProvisionedSummary {
|
|
this := ProvisioningProvisionedSummary{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
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 *ProvisioningProvisionedSummary) GetCreatedAtOk() (*int64, 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 *ProvisioningProvisionedSummary) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *ProvisioningProvisionedSummary) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetHost returns the Host field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) GetHost() string {
|
|
if o == nil || IsNil(o.Host) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Host
|
|
}
|
|
|
|
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProvisioningProvisionedSummary) GetHostOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Host) {
|
|
return nil, false
|
|
}
|
|
return o.Host, true
|
|
}
|
|
|
|
// HasHost returns a boolean if a field has been set.
|
|
func (o *ProvisioningProvisionedSummary) HasHost() bool {
|
|
if o != nil && !IsNil(o.Host) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHost gets a reference to the given string and assigns it to the Host field.
|
|
func (o *ProvisioningProvisionedSummary) SetHost(v string) {
|
|
o.Host = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProvisioningProvisionedSummary) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *ProvisioningProvisionedSummary) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *ProvisioningProvisionedSummary) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) 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 *ProvisioningProvisionedSummary) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPort returns the Port field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) GetPort() int64 {
|
|
if o == nil || IsNil(o.Port) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Port
|
|
}
|
|
|
|
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProvisioningProvisionedSummary) GetPortOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Port) {
|
|
return nil, false
|
|
}
|
|
return o.Port, true
|
|
}
|
|
|
|
// HasPort returns a boolean if a field has been set.
|
|
func (o *ProvisioningProvisionedSummary) HasPort() bool {
|
|
if o != nil && !IsNil(o.Port) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPort gets a reference to the given int64 and assigns it to the Port field.
|
|
func (o *ProvisioningProvisionedSummary) SetPort(v int64) {
|
|
o.Port = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *ProvisioningProvisionedSummary) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProvisioningProvisionedSummary) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *ProvisioningProvisionedSummary) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *ProvisioningProvisionedSummary) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o ProvisioningProvisionedSummary) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProvisioningProvisionedSummary) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Host) {
|
|
toSerialize["host"] = o.Host
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Port) {
|
|
toSerialize["port"] = o.Port
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProvisioningProvisionedSummary) UnmarshalJSON(data []byte) (err error) {
|
|
varProvisioningProvisionedSummary := _ProvisioningProvisionedSummary{}
|
|
|
|
err = json.Unmarshal(data, &varProvisioningProvisionedSummary)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProvisioningProvisionedSummary(varProvisioningProvisionedSummary)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "host")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "port")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProvisioningProvisionedSummary struct {
|
|
value *ProvisioningProvisionedSummary
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProvisioningProvisionedSummary) Get() *ProvisioningProvisionedSummary {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProvisioningProvisionedSummary) Set(val *ProvisioningProvisionedSummary) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProvisioningProvisionedSummary) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProvisioningProvisionedSummary) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProvisioningProvisionedSummary(val *ProvisioningProvisionedSummary) *NullableProvisioningProvisionedSummary {
|
|
return &NullableProvisioningProvisionedSummary{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProvisioningProvisionedSummary) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProvisioningProvisionedSummary) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|