mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.2 KiB
Go
231 lines
6.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 PlatformRollbackReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformRollbackReq{}
|
|
|
|
// PlatformRollbackReq struct for PlatformRollbackReq
|
|
type PlatformRollbackReq struct {
|
|
// App is the application's slug, from the path.
|
|
App *string `json:"app,omitempty"`
|
|
// DeploymentID is the deployment to redeploy. Omit it to return to the previous release.
|
|
DeploymentId *string `json:"deploymentId,omitempty"`
|
|
// Project is the project the application lives under, from the path.
|
|
Project *string `json:"project,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformRollbackReq PlatformRollbackReq
|
|
|
|
// NewPlatformRollbackReq instantiates a new PlatformRollbackReq 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 NewPlatformRollbackReq() *PlatformRollbackReq {
|
|
this := PlatformRollbackReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformRollbackReqWithDefaults instantiates a new PlatformRollbackReq 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 NewPlatformRollbackReqWithDefaults() *PlatformRollbackReq {
|
|
this := PlatformRollbackReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetApp returns the App field value if set, zero value otherwise.
|
|
func (o *PlatformRollbackReq) 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 *PlatformRollbackReq) 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 *PlatformRollbackReq) 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 *PlatformRollbackReq) SetApp(v string) {
|
|
o.App = &v
|
|
}
|
|
|
|
// GetDeploymentId returns the DeploymentId field value if set, zero value otherwise.
|
|
func (o *PlatformRollbackReq) GetDeploymentId() string {
|
|
if o == nil || IsNil(o.DeploymentId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DeploymentId
|
|
}
|
|
|
|
// GetDeploymentIdOk returns a tuple with the DeploymentId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformRollbackReq) GetDeploymentIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DeploymentId) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentId, true
|
|
}
|
|
|
|
// HasDeploymentId returns a boolean if a field has been set.
|
|
func (o *PlatformRollbackReq) HasDeploymentId() bool {
|
|
if o != nil && !IsNil(o.DeploymentId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentId gets a reference to the given string and assigns it to the DeploymentId field.
|
|
func (o *PlatformRollbackReq) SetDeploymentId(v string) {
|
|
o.DeploymentId = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *PlatformRollbackReq) GetProject() string {
|
|
if o == nil || IsNil(o.Project) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Project
|
|
}
|
|
|
|
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformRollbackReq) GetProjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Project) {
|
|
return nil, false
|
|
}
|
|
return o.Project, true
|
|
}
|
|
|
|
// HasProject returns a boolean if a field has been set.
|
|
func (o *PlatformRollbackReq) HasProject() bool {
|
|
if o != nil && !IsNil(o.Project) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProject gets a reference to the given string and assigns it to the Project field.
|
|
func (o *PlatformRollbackReq) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
func (o PlatformRollbackReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformRollbackReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.App) {
|
|
toSerialize["app"] = o.App
|
|
}
|
|
if !IsNil(o.DeploymentId) {
|
|
toSerialize["deploymentId"] = o.DeploymentId
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformRollbackReq) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformRollbackReq := _PlatformRollbackReq{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformRollbackReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformRollbackReq(varPlatformRollbackReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "app")
|
|
delete(additionalProperties, "deploymentId")
|
|
delete(additionalProperties, "project")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformRollbackReq struct {
|
|
value *PlatformRollbackReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformRollbackReq) Get() *PlatformRollbackReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformRollbackReq) Set(val *PlatformRollbackReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformRollbackReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformRollbackReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformRollbackReq(val *PlatformRollbackReq) *NullablePlatformRollbackReq {
|
|
return &NullablePlatformRollbackReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformRollbackReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformRollbackReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|