mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.7 KiB
Go
269 lines
6.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 PlatformAppMove type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformAppMove{}
|
|
|
|
// PlatformAppMove struct for PlatformAppMove
|
|
type PlatformAppMove struct {
|
|
// App is the declaration's name, from the path.
|
|
App *string `json:"app,omitempty"`
|
|
// Mode is `branch` (the default) or `commit`.
|
|
Mode *string `json:"mode,omitempty"`
|
|
// Org is the values directory the app lives in, defaulting to the caller's own org.
|
|
Org *string `json:"org,omitempty"`
|
|
// PartOf is the project to move it to. A name nothing names yet creates it.
|
|
PartOf *string `json:"partOf,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformAppMove PlatformAppMove
|
|
|
|
// NewPlatformAppMove instantiates a new PlatformAppMove 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 NewPlatformAppMove() *PlatformAppMove {
|
|
this := PlatformAppMove{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformAppMoveWithDefaults instantiates a new PlatformAppMove 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 NewPlatformAppMoveWithDefaults() *PlatformAppMove {
|
|
this := PlatformAppMove{}
|
|
return &this
|
|
}
|
|
|
|
// GetApp returns the App field value if set, zero value otherwise.
|
|
func (o *PlatformAppMove) GetApp() string {
|
|
if o == nil || IsNil(o.App) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.App
|
|
}
|
|
|
|
// GetAppOk returns a tuple with the App field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformAppMove) GetAppOk() (*string, bool) {
|
|
if o == nil || IsNil(o.App) {
|
|
return nil, false
|
|
}
|
|
return o.App, true
|
|
}
|
|
|
|
// HasApp returns a boolean if a field has been set.
|
|
func (o *PlatformAppMove) HasApp() bool {
|
|
if o != nil && !IsNil(o.App) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetApp gets a reference to the given string and assigns it to the App field.
|
|
func (o *PlatformAppMove) SetApp(v string) {
|
|
o.App = &v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *PlatformAppMove) GetMode() string {
|
|
if o == nil || IsNil(o.Mode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mode
|
|
}
|
|
|
|
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformAppMove) GetModeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mode) {
|
|
return nil, false
|
|
}
|
|
return o.Mode, true
|
|
}
|
|
|
|
// HasMode returns a boolean if a field has been set.
|
|
func (o *PlatformAppMove) HasMode() bool {
|
|
if o != nil && !IsNil(o.Mode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMode gets a reference to the given string and assigns it to the Mode field.
|
|
func (o *PlatformAppMove) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *PlatformAppMove) GetOrg() string {
|
|
if o == nil || IsNil(o.Org) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Org
|
|
}
|
|
|
|
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformAppMove) GetOrgOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Org) {
|
|
return nil, false
|
|
}
|
|
return o.Org, true
|
|
}
|
|
|
|
// HasOrg returns a boolean if a field has been set.
|
|
func (o *PlatformAppMove) HasOrg() bool {
|
|
if o != nil && !IsNil(o.Org) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
|
func (o *PlatformAppMove) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetPartOf returns the PartOf field value if set, zero value otherwise.
|
|
func (o *PlatformAppMove) GetPartOf() string {
|
|
if o == nil || IsNil(o.PartOf) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PartOf
|
|
}
|
|
|
|
// GetPartOfOk returns a tuple with the PartOf field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformAppMove) GetPartOfOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PartOf) {
|
|
return nil, false
|
|
}
|
|
return o.PartOf, true
|
|
}
|
|
|
|
// HasPartOf returns a boolean if a field has been set.
|
|
func (o *PlatformAppMove) HasPartOf() bool {
|
|
if o != nil && !IsNil(o.PartOf) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPartOf gets a reference to the given string and assigns it to the PartOf field.
|
|
func (o *PlatformAppMove) SetPartOf(v string) {
|
|
o.PartOf = &v
|
|
}
|
|
|
|
func (o PlatformAppMove) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformAppMove) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.App) {
|
|
toSerialize["app"] = o.App
|
|
}
|
|
if !IsNil(o.Mode) {
|
|
toSerialize["mode"] = o.Mode
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.PartOf) {
|
|
toSerialize["partOf"] = o.PartOf
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformAppMove) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformAppMove := _PlatformAppMove{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformAppMove)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformAppMove(varPlatformAppMove)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "app")
|
|
delete(additionalProperties, "mode")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "partOf")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformAppMove struct {
|
|
value *PlatformAppMove
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformAppMove) Get() *PlatformAppMove {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformAppMove) Set(val *PlatformAppMove) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformAppMove) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformAppMove) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformAppMove(val *PlatformAppMove) *NullablePlatformAppMove {
|
|
return &NullablePlatformAppMove{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformAppMove) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformAppMove) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|