mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
339 lines
9.1 KiB
Go
339 lines
9.1 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 DeploymentDetail type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeploymentDetail{}
|
|
|
|
// DeploymentDetail struct for DeploymentDetail
|
|
type DeploymentDetail struct {
|
|
Containers []ContainerDetail `json:"containers,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
|
|
Replicas *int32 `json:"replicas,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeploymentDetail DeploymentDetail
|
|
|
|
// NewDeploymentDetail instantiates a new DeploymentDetail 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 NewDeploymentDetail() *DeploymentDetail {
|
|
this := DeploymentDetail{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeploymentDetailWithDefaults instantiates a new DeploymentDetail 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 NewDeploymentDetailWithDefaults() *DeploymentDetail {
|
|
this := DeploymentDetail{}
|
|
return &this
|
|
}
|
|
|
|
// GetContainers returns the Containers field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) GetContainers() []ContainerDetail {
|
|
if o == nil || IsNil(o.Containers) {
|
|
var ret []ContainerDetail
|
|
return ret
|
|
}
|
|
return o.Containers
|
|
}
|
|
|
|
// GetContainersOk returns a tuple with the Containers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploymentDetail) GetContainersOk() ([]ContainerDetail, bool) {
|
|
if o == nil || IsNil(o.Containers) {
|
|
return nil, false
|
|
}
|
|
return o.Containers, true
|
|
}
|
|
|
|
// HasContainers returns a boolean if a field has been set.
|
|
func (o *DeploymentDetail) HasContainers() bool {
|
|
if o != nil && !IsNil(o.Containers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetContainers gets a reference to the given []ContainerDetail and assigns it to the Containers field.
|
|
func (o *DeploymentDetail) SetContainers(v []ContainerDetail) {
|
|
o.Containers = v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploymentDetail) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *DeploymentDetail) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *DeploymentDetail) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) 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 *DeploymentDetail) 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 *DeploymentDetail) 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 *DeploymentDetail) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetReadyReplicas returns the ReadyReplicas field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) GetReadyReplicas() int32 {
|
|
if o == nil || IsNil(o.ReadyReplicas) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.ReadyReplicas
|
|
}
|
|
|
|
// GetReadyReplicasOk returns a tuple with the ReadyReplicas field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploymentDetail) GetReadyReplicasOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.ReadyReplicas) {
|
|
return nil, false
|
|
}
|
|
return o.ReadyReplicas, true
|
|
}
|
|
|
|
// HasReadyReplicas returns a boolean if a field has been set.
|
|
func (o *DeploymentDetail) HasReadyReplicas() bool {
|
|
if o != nil && !IsNil(o.ReadyReplicas) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReadyReplicas gets a reference to the given int32 and assigns it to the ReadyReplicas field.
|
|
func (o *DeploymentDetail) SetReadyReplicas(v int32) {
|
|
o.ReadyReplicas = &v
|
|
}
|
|
|
|
// GetReplicas returns the Replicas field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) GetReplicas() int32 {
|
|
if o == nil || IsNil(o.Replicas) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Replicas
|
|
}
|
|
|
|
// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeploymentDetail) GetReplicasOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Replicas) {
|
|
return nil, false
|
|
}
|
|
return o.Replicas, true
|
|
}
|
|
|
|
// HasReplicas returns a boolean if a field has been set.
|
|
func (o *DeploymentDetail) HasReplicas() bool {
|
|
if o != nil && !IsNil(o.Replicas) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReplicas gets a reference to the given int32 and assigns it to the Replicas field.
|
|
func (o *DeploymentDetail) SetReplicas(v int32) {
|
|
o.Replicas = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *DeploymentDetail) 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 *DeploymentDetail) 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 *DeploymentDetail) 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 *DeploymentDetail) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o DeploymentDetail) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeploymentDetail) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Containers) {
|
|
toSerialize["containers"] = o.Containers
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.ReadyReplicas) {
|
|
toSerialize["readyReplicas"] = o.ReadyReplicas
|
|
}
|
|
if !IsNil(o.Replicas) {
|
|
toSerialize["replicas"] = o.Replicas
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeploymentDetail) UnmarshalJSON(data []byte) (err error) {
|
|
varDeploymentDetail := _DeploymentDetail{}
|
|
|
|
err = json.Unmarshal(data, &varDeploymentDetail)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeploymentDetail(varDeploymentDetail)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "containers")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "readyReplicas")
|
|
delete(additionalProperties, "replicas")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeploymentDetail struct {
|
|
value *DeploymentDetail
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeploymentDetail) Get() *DeploymentDetail {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeploymentDetail) Set(val *DeploymentDetail) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeploymentDetail) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeploymentDetail) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeploymentDetail(val *DeploymentDetail) *NullableDeploymentDetail {
|
|
return &NullableDeploymentDetail{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeploymentDetail) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeploymentDetail) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|