mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
306 lines
8.4 KiB
Go
306 lines
8.4 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 DeployArgoProject type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoProject{}
|
|
|
|
// DeployArgoProject struct for DeployArgoProject
|
|
type DeployArgoProject struct {
|
|
// APIVersion is the constant \"argoproj.io/v1alpha1\". A project here is an IAM resource wearing that shape; no argoproj.io object is stored behind it.
|
|
ApiVersion *string `json:"apiVersion,omitempty"`
|
|
// Kind is the constant \"AppProject\".
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Metadata is the project's identity: its name is the key an application's spec.project matches, and is the same string an App CR carries in its app.kubernetes.io/part-of label.
|
|
Metadata *DeployArgoMeta `json:"metadata,omitempty"`
|
|
// Spec is the fence the SPA displays — repos, destinations, admitted kinds.
|
|
Spec *DeployArgoProjectSpec `json:"spec,omitempty"`
|
|
Status map[string]interface{} `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployArgoProject DeployArgoProject
|
|
|
|
// NewDeployArgoProject instantiates a new DeployArgoProject 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 NewDeployArgoProject() *DeployArgoProject {
|
|
this := DeployArgoProject{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoProjectWithDefaults instantiates a new DeployArgoProject 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 NewDeployArgoProjectWithDefaults() *DeployArgoProject {
|
|
this := DeployArgoProject{}
|
|
return &this
|
|
}
|
|
|
|
// GetApiVersion returns the ApiVersion field value if set, zero value otherwise.
|
|
func (o *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) SetApiVersion(v string) {
|
|
o.ApiVersion = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise.
|
|
func (o *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) 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 *DeployArgoProject) SetMetadata(v DeployArgoMeta) {
|
|
o.Metadata = &v
|
|
}
|
|
|
|
// GetSpec returns the Spec field value if set, zero value otherwise.
|
|
func (o *DeployArgoProject) GetSpec() DeployArgoProjectSpec {
|
|
if o == nil || IsNil(o.Spec) {
|
|
var ret DeployArgoProjectSpec
|
|
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 *DeployArgoProject) GetSpecOk() (*DeployArgoProjectSpec, 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 *DeployArgoProject) HasSpec() bool {
|
|
if o != nil && !IsNil(o.Spec) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSpec gets a reference to the given DeployArgoProjectSpec and assigns it to the Spec field.
|
|
func (o *DeployArgoProject) SetSpec(v DeployArgoProjectSpec) {
|
|
o.Spec = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *DeployArgoProject) GetStatus() map[string]interface{} {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret map[string]interface{}
|
|
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 *DeployArgoProject) GetStatusOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *DeployArgoProject) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given map[string]interface{} and assigns it to the Status field.
|
|
func (o *DeployArgoProject) SetStatus(v map[string]interface{}) {
|
|
o.Status = v
|
|
}
|
|
|
|
func (o DeployArgoProject) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoProject) 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 *DeployArgoProject) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoProject := _DeployArgoProject{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoProject)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoProject(varDeployArgoProject)
|
|
|
|
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 NullableDeployArgoProject struct {
|
|
value *DeployArgoProject
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoProject) Get() *DeployArgoProject {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoProject) Set(val *DeployArgoProject) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoProject) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoProject) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoProject(val *DeployArgoProject) *NullableDeployArgoProject {
|
|
return &NullableDeployArgoProject{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoProject) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoProject) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|