Files
sdk/model_deploy_argo_app.go

307 lines
8.2 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 DeployArgoApp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoApp{}
// DeployArgoApp struct for DeployArgoApp
type DeployArgoApp struct {
// APIVersion is the constant \"argoproj.io/v1alpha1\" — the shape, not the source. These are projections of operator App CRs and Hanzo CD Applications; no argoproj.io object is stored anywhere behind this plane.
ApiVersion *string `json:"apiVersion,omitempty"`
// Kind is the constant \"Application\".
Kind *string `json:"kind,omitempty"`
// Metadata is the projected object's identity.
Metadata *DeployArgoMeta `json:"metadata,omitempty"`
// Spec is the desired state: where it comes from, where it lands, what project it belongs to.
Spec *DeployArgoSpec `json:"spec,omitempty"`
// Status is what was observed: the sync verdict, the health, and the owned objects when this is a detail read.
Status *DeployArgoStatus `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoApp DeployArgoApp
// NewDeployArgoApp instantiates a new DeployArgoApp 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 NewDeployArgoApp() *DeployArgoApp {
this := DeployArgoApp{}
return &this
}
// NewDeployArgoAppWithDefaults instantiates a new DeployArgoApp 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 NewDeployArgoAppWithDefaults() *DeployArgoApp {
this := DeployArgoApp{}
return &this
}
// GetApiVersion returns the ApiVersion field value if set, zero value otherwise.
func (o *DeployArgoApp) GetApiVersion() string {
if o == nil || IsNil(o.ApiVersion) {
var ret string
return ret
}
return *o.ApiVersion
}
// GetApiVersionOk returns a tuple with the ApiVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoApp) GetApiVersionOk() (*string, bool) {
if o == nil || IsNil(o.ApiVersion) {
return nil, false
}
return o.ApiVersion, true
}
// HasApiVersion returns a boolean if a field has been set.
func (o *DeployArgoApp) HasApiVersion() bool {
if o != nil && !IsNil(o.ApiVersion) {
return true
}
return false
}
// SetApiVersion gets a reference to the given string and assigns it to the ApiVersion field.
func (o *DeployArgoApp) SetApiVersion(v string) {
o.ApiVersion = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *DeployArgoApp) 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 *DeployArgoApp) 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 *DeployArgoApp) 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 *DeployArgoApp) SetKind(v string) {
o.Kind = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *DeployArgoApp) GetMetadata() DeployArgoMeta {
if o == nil || IsNil(o.Metadata) {
var ret DeployArgoMeta
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoApp) GetMetadataOk() (*DeployArgoMeta, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *DeployArgoApp) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given DeployArgoMeta and assigns it to the Metadata field.
func (o *DeployArgoApp) SetMetadata(v DeployArgoMeta) {
o.Metadata = &v
}
// GetSpec returns the Spec field value if set, zero value otherwise.
func (o *DeployArgoApp) GetSpec() DeployArgoSpec {
if o == nil || IsNil(o.Spec) {
var ret DeployArgoSpec
return ret
}
return *o.Spec
}
// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoApp) GetSpecOk() (*DeployArgoSpec, bool) {
if o == nil || IsNil(o.Spec) {
return nil, false
}
return o.Spec, true
}
// HasSpec returns a boolean if a field has been set.
func (o *DeployArgoApp) HasSpec() bool {
if o != nil && !IsNil(o.Spec) {
return true
}
return false
}
// SetSpec gets a reference to the given DeployArgoSpec and assigns it to the Spec field.
func (o *DeployArgoApp) SetSpec(v DeployArgoSpec) {
o.Spec = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DeployArgoApp) GetStatus() DeployArgoStatus {
if o == nil || IsNil(o.Status) {
var ret DeployArgoStatus
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 *DeployArgoApp) GetStatusOk() (*DeployArgoStatus, 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 *DeployArgoApp) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given DeployArgoStatus and assigns it to the Status field.
func (o *DeployArgoApp) SetStatus(v DeployArgoStatus) {
o.Status = &v
}
func (o DeployArgoApp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoApp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ApiVersion) {
toSerialize["apiVersion"] = o.ApiVersion
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
if !IsNil(o.Spec) {
toSerialize["spec"] = o.Spec
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoApp) UnmarshalJSON(data []byte) (err error) {
varDeployArgoApp := _DeployArgoApp{}
err = json.Unmarshal(data, &varDeployArgoApp)
if err != nil {
return err
}
*o = DeployArgoApp(varDeployArgoApp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apiVersion")
delete(additionalProperties, "kind")
delete(additionalProperties, "metadata")
delete(additionalProperties, "spec")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoApp struct {
value *DeployArgoApp
isSet bool
}
func (v NullableDeployArgoApp) Get() *DeployArgoApp {
return v.value
}
func (v *NullableDeployArgoApp) Set(val *DeployArgoApp) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoApp) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoApp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoApp(val *DeployArgoApp) *NullableDeployArgoApp {
return &NullableDeployArgoApp{value: val, isSet: true}
}
func (v NullableDeployArgoApp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoApp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}