mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
8.7 KiB
Go
269 lines
8.7 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 DeployArgoProjectSpec type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoProjectSpec{}
|
|
|
|
// DeployArgoProjectSpec struct for DeployArgoProjectSpec
|
|
type DeployArgoProjectSpec struct {
|
|
// ClusterResourceWhitelist are the cluster-scoped kinds it may create — [{group:\"*\", kind:\"*\"}] on a synthesized project.
|
|
ClusterResourceWhitelist []DeployArgoGroupKind `json:"clusterResourceWhitelist,omitempty"`
|
|
// Description is the project's human label: the IAM project's display name, or its description when it has no display name. Absent when IAM carries neither.
|
|
Description *string `json:"description,omitempty"`
|
|
// Destinations are the cluster/namespace pairs it may write to — a single {server:\"*\", namespace:\"*\"} on a synthesized project, for the same reason.
|
|
Destinations []DeployArgoDestination `json:"destinations,omitempty"`
|
|
// SourceRepos are the git repos applications in this project may pull from. [\"*\"] for every project this plane synthesizes or reflects from IAM: the boundary that actually holds on this platform is the IAM org, resolved before a row is ever projected, so the projected fence is deliberately permissive and is NOT an authorization statement.
|
|
SourceRepos []string `json:"sourceRepos,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployArgoProjectSpec DeployArgoProjectSpec
|
|
|
|
// NewDeployArgoProjectSpec instantiates a new DeployArgoProjectSpec 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 NewDeployArgoProjectSpec() *DeployArgoProjectSpec {
|
|
this := DeployArgoProjectSpec{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoProjectSpecWithDefaults instantiates a new DeployArgoProjectSpec 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 NewDeployArgoProjectSpecWithDefaults() *DeployArgoProjectSpec {
|
|
this := DeployArgoProjectSpec{}
|
|
return &this
|
|
}
|
|
|
|
// GetClusterResourceWhitelist returns the ClusterResourceWhitelist field value if set, zero value otherwise.
|
|
func (o *DeployArgoProjectSpec) GetClusterResourceWhitelist() []DeployArgoGroupKind {
|
|
if o == nil || IsNil(o.ClusterResourceWhitelist) {
|
|
var ret []DeployArgoGroupKind
|
|
return ret
|
|
}
|
|
return o.ClusterResourceWhitelist
|
|
}
|
|
|
|
// GetClusterResourceWhitelistOk returns a tuple with the ClusterResourceWhitelist field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoProjectSpec) GetClusterResourceWhitelistOk() ([]DeployArgoGroupKind, bool) {
|
|
if o == nil || IsNil(o.ClusterResourceWhitelist) {
|
|
return nil, false
|
|
}
|
|
return o.ClusterResourceWhitelist, true
|
|
}
|
|
|
|
// HasClusterResourceWhitelist returns a boolean if a field has been set.
|
|
func (o *DeployArgoProjectSpec) HasClusterResourceWhitelist() bool {
|
|
if o != nil && !IsNil(o.ClusterResourceWhitelist) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClusterResourceWhitelist gets a reference to the given []DeployArgoGroupKind and assigns it to the ClusterResourceWhitelist field.
|
|
func (o *DeployArgoProjectSpec) SetClusterResourceWhitelist(v []DeployArgoGroupKind) {
|
|
o.ClusterResourceWhitelist = v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *DeployArgoProjectSpec) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoProjectSpec) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *DeployArgoProjectSpec) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *DeployArgoProjectSpec) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetDestinations returns the Destinations field value if set, zero value otherwise.
|
|
func (o *DeployArgoProjectSpec) GetDestinations() []DeployArgoDestination {
|
|
if o == nil || IsNil(o.Destinations) {
|
|
var ret []DeployArgoDestination
|
|
return ret
|
|
}
|
|
return o.Destinations
|
|
}
|
|
|
|
// GetDestinationsOk returns a tuple with the Destinations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoProjectSpec) GetDestinationsOk() ([]DeployArgoDestination, bool) {
|
|
if o == nil || IsNil(o.Destinations) {
|
|
return nil, false
|
|
}
|
|
return o.Destinations, true
|
|
}
|
|
|
|
// HasDestinations returns a boolean if a field has been set.
|
|
func (o *DeployArgoProjectSpec) HasDestinations() bool {
|
|
if o != nil && !IsNil(o.Destinations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDestinations gets a reference to the given []DeployArgoDestination and assigns it to the Destinations field.
|
|
func (o *DeployArgoProjectSpec) SetDestinations(v []DeployArgoDestination) {
|
|
o.Destinations = v
|
|
}
|
|
|
|
// GetSourceRepos returns the SourceRepos field value if set, zero value otherwise.
|
|
func (o *DeployArgoProjectSpec) GetSourceRepos() []string {
|
|
if o == nil || IsNil(o.SourceRepos) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.SourceRepos
|
|
}
|
|
|
|
// GetSourceReposOk returns a tuple with the SourceRepos field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoProjectSpec) GetSourceReposOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.SourceRepos) {
|
|
return nil, false
|
|
}
|
|
return o.SourceRepos, true
|
|
}
|
|
|
|
// HasSourceRepos returns a boolean if a field has been set.
|
|
func (o *DeployArgoProjectSpec) HasSourceRepos() bool {
|
|
if o != nil && !IsNil(o.SourceRepos) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSourceRepos gets a reference to the given []string and assigns it to the SourceRepos field.
|
|
func (o *DeployArgoProjectSpec) SetSourceRepos(v []string) {
|
|
o.SourceRepos = v
|
|
}
|
|
|
|
func (o DeployArgoProjectSpec) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoProjectSpec) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ClusterResourceWhitelist) {
|
|
toSerialize["clusterResourceWhitelist"] = o.ClusterResourceWhitelist
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Destinations) {
|
|
toSerialize["destinations"] = o.Destinations
|
|
}
|
|
if !IsNil(o.SourceRepos) {
|
|
toSerialize["sourceRepos"] = o.SourceRepos
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeployArgoProjectSpec) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoProjectSpec := _DeployArgoProjectSpec{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoProjectSpec)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoProjectSpec(varDeployArgoProjectSpec)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "clusterResourceWhitelist")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "destinations")
|
|
delete(additionalProperties, "sourceRepos")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployArgoProjectSpec struct {
|
|
value *DeployArgoProjectSpec
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoProjectSpec) Get() *DeployArgoProjectSpec {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoProjectSpec) Set(val *DeployArgoProjectSpec) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoProjectSpec) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoProjectSpec) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoProjectSpec(val *DeployArgoProjectSpec) *NullableDeployArgoProjectSpec {
|
|
return &NullableDeployArgoProjectSpec{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoProjectSpec) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoProjectSpec) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|