Files
sdk/model_deploy_argo_source.go

231 lines
6.5 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 DeployArgoSource type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoSource{}
// DeployArgoSource struct for DeployArgoSource
type DeployArgoSource struct {
// Path is the directory within RepoURL. Display-only alongside a display-only RepoURL; CD's own value for a CD row.
Path *string `json:"path,omitempty"`
// RepoURL is the git repository the desired state comes from. For an application projected from an App CR it is the fleet manifest repo and is DISPLAY ONLY — an App CR pins an image, and nothing is rendered from this repo to produce it. For a CD row it is the repo CD actually polls.
RepoURL *string `json:"repoURL,omitempty"`
// TargetRevision is the git ref tracked there — a branch such as \"main\". Display-only for a projected App CR; the ref CD tracks for a CD row.
TargetRevision *string `json:"targetRevision,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoSource DeployArgoSource
// NewDeployArgoSource instantiates a new DeployArgoSource 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 NewDeployArgoSource() *DeployArgoSource {
this := DeployArgoSource{}
return &this
}
// NewDeployArgoSourceWithDefaults instantiates a new DeployArgoSource 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 NewDeployArgoSourceWithDefaults() *DeployArgoSource {
this := DeployArgoSource{}
return &this
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *DeployArgoSource) GetPath() string {
if o == nil || IsNil(o.Path) {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoSource) GetPathOk() (*string, bool) {
if o == nil || IsNil(o.Path) {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *DeployArgoSource) HasPath() bool {
if o != nil && !IsNil(o.Path) {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *DeployArgoSource) SetPath(v string) {
o.Path = &v
}
// GetRepoURL returns the RepoURL field value if set, zero value otherwise.
func (o *DeployArgoSource) 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 *DeployArgoSource) 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 *DeployArgoSource) 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 *DeployArgoSource) SetRepoURL(v string) {
o.RepoURL = &v
}
// GetTargetRevision returns the TargetRevision field value if set, zero value otherwise.
func (o *DeployArgoSource) GetTargetRevision() string {
if o == nil || IsNil(o.TargetRevision) {
var ret string
return ret
}
return *o.TargetRevision
}
// GetTargetRevisionOk returns a tuple with the TargetRevision field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoSource) GetTargetRevisionOk() (*string, bool) {
if o == nil || IsNil(o.TargetRevision) {
return nil, false
}
return o.TargetRevision, true
}
// HasTargetRevision returns a boolean if a field has been set.
func (o *DeployArgoSource) HasTargetRevision() bool {
if o != nil && !IsNil(o.TargetRevision) {
return true
}
return false
}
// SetTargetRevision gets a reference to the given string and assigns it to the TargetRevision field.
func (o *DeployArgoSource) SetTargetRevision(v string) {
o.TargetRevision = &v
}
func (o DeployArgoSource) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoSource) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Path) {
toSerialize["path"] = o.Path
}
if !IsNil(o.RepoURL) {
toSerialize["repoURL"] = o.RepoURL
}
if !IsNil(o.TargetRevision) {
toSerialize["targetRevision"] = o.TargetRevision
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoSource) UnmarshalJSON(data []byte) (err error) {
varDeployArgoSource := _DeployArgoSource{}
err = json.Unmarshal(data, &varDeployArgoSource)
if err != nil {
return err
}
*o = DeployArgoSource(varDeployArgoSource)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "path")
delete(additionalProperties, "repoURL")
delete(additionalProperties, "targetRevision")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoSource struct {
value *DeployArgoSource
isSet bool
}
func (v NullableDeployArgoSource) Get() *DeployArgoSource {
return v.value
}
func (v *NullableDeployArgoSource) Set(val *DeployArgoSource) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoSource) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoSource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoSource(val *DeployArgoSource) *NullableDeployArgoSource {
return &NullableDeployArgoSource{value: val, isSet: true}
}
func (v NullableDeployArgoSource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoSource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}