Files
sdk/model_deploy_running.go

421 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 DeployRunning type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployRunning{}
// DeployRunning struct for DeployRunning
type DeployRunning struct {
// Health is CD's verdict on the objects it manages: Healthy, Progressing, Degraded, Suspended, Missing or Unknown.
Health *string `json:"health,omitempty"`
// Images are the images the service's pods are running now, as CD collected them from the live pods. Two of one repository is a rollout in progress.
Images []DeployImage `json:"images,omitempty"`
// Name is the CD Application's name, which the fleet mints as <namespace>-<app>.
Name *string `json:"name,omitempty"`
// Namespace is where the service's workloads run (spec.destination.namespace).
Namespace *string `json:"namespace,omitempty"`
// RepoURL is the git repository CD applies this service from, usually universe.
RepoURL *string `json:"repoURL,omitempty"`
// Revision is the commit of that repository CD last applied. Empty means it has applied none.
Revision *string `json:"revision,omitempty"`
// Sync is CD's verdict on git against the cluster: Synced, OutOfSync or Unknown.
Sync *string `json:"sync,omitempty"`
// SyncedAt is when CD last finished applying a revision, RFC 3339. Empty when it never has.
SyncedAt *string `json:"syncedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployRunning DeployRunning
// NewDeployRunning instantiates a new DeployRunning 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 NewDeployRunning() *DeployRunning {
this := DeployRunning{}
return &this
}
// NewDeployRunningWithDefaults instantiates a new DeployRunning 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 NewDeployRunningWithDefaults() *DeployRunning {
this := DeployRunning{}
return &this
}
// GetHealth returns the Health field value if set, zero value otherwise.
func (o *DeployRunning) GetHealth() string {
if o == nil || IsNil(o.Health) {
var ret string
return ret
}
return *o.Health
}
// GetHealthOk returns a tuple with the Health field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetHealthOk() (*string, bool) {
if o == nil || IsNil(o.Health) {
return nil, false
}
return o.Health, true
}
// HasHealth returns a boolean if a field has been set.
func (o *DeployRunning) HasHealth() bool {
if o != nil && !IsNil(o.Health) {
return true
}
return false
}
// SetHealth gets a reference to the given string and assigns it to the Health field.
func (o *DeployRunning) SetHealth(v string) {
o.Health = &v
}
// GetImages returns the Images field value if set, zero value otherwise.
func (o *DeployRunning) GetImages() []DeployImage {
if o == nil || IsNil(o.Images) {
var ret []DeployImage
return ret
}
return o.Images
}
// GetImagesOk returns a tuple with the Images field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetImagesOk() ([]DeployImage, bool) {
if o == nil || IsNil(o.Images) {
return nil, false
}
return o.Images, true
}
// HasImages returns a boolean if a field has been set.
func (o *DeployRunning) HasImages() bool {
if o != nil && !IsNil(o.Images) {
return true
}
return false
}
// SetImages gets a reference to the given []DeployImage and assigns it to the Images field.
func (o *DeployRunning) SetImages(v []DeployImage) {
o.Images = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DeployRunning) 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 *DeployRunning) 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 *DeployRunning) 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 *DeployRunning) SetName(v string) {
o.Name = &v
}
// GetNamespace returns the Namespace field value if set, zero value otherwise.
func (o *DeployRunning) GetNamespace() string {
if o == nil || IsNil(o.Namespace) {
var ret string
return ret
}
return *o.Namespace
}
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetNamespaceOk() (*string, bool) {
if o == nil || IsNil(o.Namespace) {
return nil, false
}
return o.Namespace, true
}
// HasNamespace returns a boolean if a field has been set.
func (o *DeployRunning) HasNamespace() bool {
if o != nil && !IsNil(o.Namespace) {
return true
}
return false
}
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
func (o *DeployRunning) SetNamespace(v string) {
o.Namespace = &v
}
// GetRepoURL returns the RepoURL field value if set, zero value otherwise.
func (o *DeployRunning) GetRepoURL() string {
if o == nil || IsNil(o.RepoURL) {
var ret string
return ret
}
return *o.RepoURL
}
// GetRepoURLOk returns a tuple with the RepoURL field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetRepoURLOk() (*string, bool) {
if o == nil || IsNil(o.RepoURL) {
return nil, false
}
return o.RepoURL, true
}
// HasRepoURL returns a boolean if a field has been set.
func (o *DeployRunning) HasRepoURL() bool {
if o != nil && !IsNil(o.RepoURL) {
return true
}
return false
}
// SetRepoURL gets a reference to the given string and assigns it to the RepoURL field.
func (o *DeployRunning) SetRepoURL(v string) {
o.RepoURL = &v
}
// GetRevision returns the Revision field value if set, zero value otherwise.
func (o *DeployRunning) GetRevision() string {
if o == nil || IsNil(o.Revision) {
var ret string
return ret
}
return *o.Revision
}
// GetRevisionOk returns a tuple with the Revision field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetRevisionOk() (*string, bool) {
if o == nil || IsNil(o.Revision) {
return nil, false
}
return o.Revision, true
}
// HasRevision returns a boolean if a field has been set.
func (o *DeployRunning) HasRevision() bool {
if o != nil && !IsNil(o.Revision) {
return true
}
return false
}
// SetRevision gets a reference to the given string and assigns it to the Revision field.
func (o *DeployRunning) SetRevision(v string) {
o.Revision = &v
}
// GetSync returns the Sync field value if set, zero value otherwise.
func (o *DeployRunning) GetSync() string {
if o == nil || IsNil(o.Sync) {
var ret string
return ret
}
return *o.Sync
}
// GetSyncOk returns a tuple with the Sync field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetSyncOk() (*string, bool) {
if o == nil || IsNil(o.Sync) {
return nil, false
}
return o.Sync, true
}
// HasSync returns a boolean if a field has been set.
func (o *DeployRunning) HasSync() bool {
if o != nil && !IsNil(o.Sync) {
return true
}
return false
}
// SetSync gets a reference to the given string and assigns it to the Sync field.
func (o *DeployRunning) SetSync(v string) {
o.Sync = &v
}
// GetSyncedAt returns the SyncedAt field value if set, zero value otherwise.
func (o *DeployRunning) GetSyncedAt() string {
if o == nil || IsNil(o.SyncedAt) {
var ret string
return ret
}
return *o.SyncedAt
}
// GetSyncedAtOk returns a tuple with the SyncedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployRunning) GetSyncedAtOk() (*string, bool) {
if o == nil || IsNil(o.SyncedAt) {
return nil, false
}
return o.SyncedAt, true
}
// HasSyncedAt returns a boolean if a field has been set.
func (o *DeployRunning) HasSyncedAt() bool {
if o != nil && !IsNil(o.SyncedAt) {
return true
}
return false
}
// SetSyncedAt gets a reference to the given string and assigns it to the SyncedAt field.
func (o *DeployRunning) SetSyncedAt(v string) {
o.SyncedAt = &v
}
func (o DeployRunning) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployRunning) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Health) {
toSerialize["health"] = o.Health
}
if !IsNil(o.Images) {
toSerialize["images"] = o.Images
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Namespace) {
toSerialize["namespace"] = o.Namespace
}
if !IsNil(o.RepoURL) {
toSerialize["repoURL"] = o.RepoURL
}
if !IsNil(o.Revision) {
toSerialize["revision"] = o.Revision
}
if !IsNil(o.Sync) {
toSerialize["sync"] = o.Sync
}
if !IsNil(o.SyncedAt) {
toSerialize["syncedAt"] = o.SyncedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployRunning) UnmarshalJSON(data []byte) (err error) {
varDeployRunning := _DeployRunning{}
err = json.Unmarshal(data, &varDeployRunning)
if err != nil {
return err
}
*o = DeployRunning(varDeployRunning)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "health")
delete(additionalProperties, "images")
delete(additionalProperties, "name")
delete(additionalProperties, "namespace")
delete(additionalProperties, "repoURL")
delete(additionalProperties, "revision")
delete(additionalProperties, "sync")
delete(additionalProperties, "syncedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployRunning struct {
value *DeployRunning
isSet bool
}
func (v NullableDeployRunning) Get() *DeployRunning {
return v.value
}
func (v *NullableDeployRunning) Set(val *DeployRunning) {
v.value = val
v.isSet = true
}
func (v NullableDeployRunning) IsSet() bool {
return v.isSet
}
func (v *NullableDeployRunning) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployRunning(val *DeployRunning) *NullableDeployRunning {
return &NullableDeployRunning{value: val, isSet: true}
}
func (v NullableDeployRunning) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployRunning) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}