mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
687 lines
19 KiB
Go
687 lines
19 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 PlatformCreateAppReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformCreateAppReq{}
|
|
|
|
// PlatformCreateAppReq struct for PlatformCreateAppReq
|
|
type PlatformCreateAppReq struct {
|
|
// BuildType is `pack` — the zero-config default that detects any project — or `dockerfile`, the explicit escape hatch. An image app never builds.
|
|
BuildType *string `json:"buildType,omitempty"`
|
|
// Description is free text about what the application is.
|
|
Description *string `json:"description,omitempty"`
|
|
// Dockerfile is the path to build from, for buildType `dockerfile`.
|
|
Dockerfile *string `json:"dockerfile,omitempty"`
|
|
// Domains are extra ingress hosts. The canonical default host is always attached; a bare custom host is refused here and must go through add-domain → verify first.
|
|
Domains []string `json:"domains,omitempty"`
|
|
// Env is the application's environment. Keys must match `^[A-Za-z_][A-Za-z0-9_]*$`; a variable marked `secret: true` is sealed into KMS and its plaintext is never written to the database.
|
|
Env []PlatformEnvVarJSON `json:"env,omitempty"`
|
|
// Environment is the deploy target this app names (\"production\" by default).
|
|
Environment *string `json:"environment,omitempty"`
|
|
// Image is the container image to run, for source `image`.
|
|
Image *PlatformImageOrigin `json:"image,omitempty"`
|
|
// Name is the application's display name. Required; the slug is derived from it when none is given.
|
|
Name *string `json:"name,omitempty"`
|
|
// Port is the container port the app listens on.
|
|
Port *int64 `json:"port,omitempty"`
|
|
// Project is the project to create the application under, from the path.
|
|
Project *string `json:"project,omitempty"`
|
|
// Replicas is how many copies to run; clamped to the deployment's limit rather than refused.
|
|
Replicas *int64 `json:"replicas,omitempty"`
|
|
// Repo is the git source to build from, for source `git`.
|
|
Repo *PlatformGitOrigin `json:"repo,omitempty"`
|
|
// Slug is the app's identity in the cluster — its CR name and part of its host. Given or derived from Name, it must match `^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$`, and one already used in this project is 409.
|
|
Slug *string `json:"slug,omitempty"`
|
|
// Source is `git`, which requires repo.url, or `image`, which requires image.repository. Anything else is 400.
|
|
Source *string `json:"source,omitempty"`
|
|
// StorageGB is the persistent volume size in GiB; absent means stateless. Clamped to the deployment's limit rather than refused.
|
|
StorageGb *int64 `json:"storageGb,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformCreateAppReq PlatformCreateAppReq
|
|
|
|
// NewPlatformCreateAppReq instantiates a new PlatformCreateAppReq 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 NewPlatformCreateAppReq() *PlatformCreateAppReq {
|
|
this := PlatformCreateAppReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformCreateAppReqWithDefaults instantiates a new PlatformCreateAppReq 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 NewPlatformCreateAppReqWithDefaults() *PlatformCreateAppReq {
|
|
this := PlatformCreateAppReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetBuildType returns the BuildType field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetBuildType() string {
|
|
if o == nil || IsNil(o.BuildType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.BuildType
|
|
}
|
|
|
|
// GetBuildTypeOk returns a tuple with the BuildType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetBuildTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.BuildType) {
|
|
return nil, false
|
|
}
|
|
return o.BuildType, true
|
|
}
|
|
|
|
// HasBuildType returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasBuildType() bool {
|
|
if o != nil && !IsNil(o.BuildType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBuildType gets a reference to the given string and assigns it to the BuildType field.
|
|
func (o *PlatformCreateAppReq) SetBuildType(v string) {
|
|
o.BuildType = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) 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 *PlatformCreateAppReq) 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 *PlatformCreateAppReq) 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 *PlatformCreateAppReq) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetDockerfile returns the Dockerfile field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetDockerfile() string {
|
|
if o == nil || IsNil(o.Dockerfile) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Dockerfile
|
|
}
|
|
|
|
// GetDockerfileOk returns a tuple with the Dockerfile field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetDockerfileOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Dockerfile) {
|
|
return nil, false
|
|
}
|
|
return o.Dockerfile, true
|
|
}
|
|
|
|
// HasDockerfile returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasDockerfile() bool {
|
|
if o != nil && !IsNil(o.Dockerfile) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDockerfile gets a reference to the given string and assigns it to the Dockerfile field.
|
|
func (o *PlatformCreateAppReq) SetDockerfile(v string) {
|
|
o.Dockerfile = &v
|
|
}
|
|
|
|
// GetDomains returns the Domains field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetDomains() []string {
|
|
if o == nil || IsNil(o.Domains) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Domains
|
|
}
|
|
|
|
// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetDomainsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Domains) {
|
|
return nil, false
|
|
}
|
|
return o.Domains, true
|
|
}
|
|
|
|
// HasDomains returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasDomains() bool {
|
|
if o != nil && !IsNil(o.Domains) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDomains gets a reference to the given []string and assigns it to the Domains field.
|
|
func (o *PlatformCreateAppReq) SetDomains(v []string) {
|
|
o.Domains = v
|
|
}
|
|
|
|
// GetEnv returns the Env field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetEnv() []PlatformEnvVarJSON {
|
|
if o == nil || IsNil(o.Env) {
|
|
var ret []PlatformEnvVarJSON
|
|
return ret
|
|
}
|
|
return o.Env
|
|
}
|
|
|
|
// GetEnvOk returns a tuple with the Env field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetEnvOk() ([]PlatformEnvVarJSON, bool) {
|
|
if o == nil || IsNil(o.Env) {
|
|
return nil, false
|
|
}
|
|
return o.Env, true
|
|
}
|
|
|
|
// HasEnv returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasEnv() bool {
|
|
if o != nil && !IsNil(o.Env) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnv gets a reference to the given []PlatformEnvVarJSON and assigns it to the Env field.
|
|
func (o *PlatformCreateAppReq) SetEnv(v []PlatformEnvVarJSON) {
|
|
o.Env = v
|
|
}
|
|
|
|
// GetEnvironment returns the Environment field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetEnvironment() string {
|
|
if o == nil || IsNil(o.Environment) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Environment
|
|
}
|
|
|
|
// GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetEnvironmentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Environment) {
|
|
return nil, false
|
|
}
|
|
return o.Environment, true
|
|
}
|
|
|
|
// HasEnvironment returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasEnvironment() bool {
|
|
if o != nil && !IsNil(o.Environment) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
|
|
func (o *PlatformCreateAppReq) SetEnvironment(v string) {
|
|
o.Environment = &v
|
|
}
|
|
|
|
// GetImage returns the Image field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetImage() PlatformImageOrigin {
|
|
if o == nil || IsNil(o.Image) {
|
|
var ret PlatformImageOrigin
|
|
return ret
|
|
}
|
|
return *o.Image
|
|
}
|
|
|
|
// GetImageOk returns a tuple with the Image field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetImageOk() (*PlatformImageOrigin, bool) {
|
|
if o == nil || IsNil(o.Image) {
|
|
return nil, false
|
|
}
|
|
return o.Image, true
|
|
}
|
|
|
|
// HasImage returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasImage() bool {
|
|
if o != nil && !IsNil(o.Image) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetImage gets a reference to the given PlatformImageOrigin and assigns it to the Image field.
|
|
func (o *PlatformCreateAppReq) SetImage(v PlatformImageOrigin) {
|
|
o.Image = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PlatformCreateAppReq) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPort returns the Port field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetPort() int64 {
|
|
if o == nil || IsNil(o.Port) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Port
|
|
}
|
|
|
|
// GetPortOk returns a tuple with the Port field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetPortOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Port) {
|
|
return nil, false
|
|
}
|
|
return o.Port, true
|
|
}
|
|
|
|
// HasPort returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasPort() bool {
|
|
if o != nil && !IsNil(o.Port) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPort gets a reference to the given int64 and assigns it to the Port field.
|
|
func (o *PlatformCreateAppReq) SetPort(v int64) {
|
|
o.Port = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) 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 *PlatformCreateAppReq) 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 *PlatformCreateAppReq) 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 *PlatformCreateAppReq) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetReplicas returns the Replicas field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetReplicas() int64 {
|
|
if o == nil || IsNil(o.Replicas) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Replicas
|
|
}
|
|
|
|
// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetReplicasOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Replicas) {
|
|
return nil, false
|
|
}
|
|
return o.Replicas, true
|
|
}
|
|
|
|
// HasReplicas returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasReplicas() bool {
|
|
if o != nil && !IsNil(o.Replicas) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field.
|
|
func (o *PlatformCreateAppReq) SetReplicas(v int64) {
|
|
o.Replicas = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetRepo() PlatformGitOrigin {
|
|
if o == nil || IsNil(o.Repo) {
|
|
var ret PlatformGitOrigin
|
|
return ret
|
|
}
|
|
return *o.Repo
|
|
}
|
|
|
|
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetRepoOk() (*PlatformGitOrigin, bool) {
|
|
if o == nil || IsNil(o.Repo) {
|
|
return nil, false
|
|
}
|
|
return o.Repo, true
|
|
}
|
|
|
|
// HasRepo returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasRepo() bool {
|
|
if o != nil && !IsNil(o.Repo) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepo gets a reference to the given PlatformGitOrigin and assigns it to the Repo field.
|
|
func (o *PlatformCreateAppReq) SetRepo(v PlatformGitOrigin) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetSlug() string {
|
|
if o == nil || IsNil(o.Slug) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Slug
|
|
}
|
|
|
|
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetSlugOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Slug) {
|
|
return nil, false
|
|
}
|
|
return o.Slug, true
|
|
}
|
|
|
|
// HasSlug returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasSlug() bool {
|
|
if o != nil && !IsNil(o.Slug) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSlug gets a reference to the given string and assigns it to the Slug field.
|
|
func (o *PlatformCreateAppReq) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *PlatformCreateAppReq) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStorageGb returns the StorageGb field value if set, zero value otherwise.
|
|
func (o *PlatformCreateAppReq) GetStorageGb() int64 {
|
|
if o == nil || IsNil(o.StorageGb) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.StorageGb
|
|
}
|
|
|
|
// GetStorageGbOk returns a tuple with the StorageGb field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformCreateAppReq) GetStorageGbOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.StorageGb) {
|
|
return nil, false
|
|
}
|
|
return o.StorageGb, true
|
|
}
|
|
|
|
// HasStorageGb returns a boolean if a field has been set.
|
|
func (o *PlatformCreateAppReq) HasStorageGb() bool {
|
|
if o != nil && !IsNil(o.StorageGb) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStorageGb gets a reference to the given int64 and assigns it to the StorageGb field.
|
|
func (o *PlatformCreateAppReq) SetStorageGb(v int64) {
|
|
o.StorageGb = &v
|
|
}
|
|
|
|
func (o PlatformCreateAppReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformCreateAppReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.BuildType) {
|
|
toSerialize["buildType"] = o.BuildType
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Dockerfile) {
|
|
toSerialize["dockerfile"] = o.Dockerfile
|
|
}
|
|
if !IsNil(o.Domains) {
|
|
toSerialize["domains"] = o.Domains
|
|
}
|
|
if !IsNil(o.Env) {
|
|
toSerialize["env"] = o.Env
|
|
}
|
|
if !IsNil(o.Environment) {
|
|
toSerialize["environment"] = o.Environment
|
|
}
|
|
if !IsNil(o.Image) {
|
|
toSerialize["image"] = o.Image
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Port) {
|
|
toSerialize["port"] = o.Port
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
if !IsNil(o.Replicas) {
|
|
toSerialize["replicas"] = o.Replicas
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.Slug) {
|
|
toSerialize["slug"] = o.Slug
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.StorageGb) {
|
|
toSerialize["storageGb"] = o.StorageGb
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformCreateAppReq) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformCreateAppReq := _PlatformCreateAppReq{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformCreateAppReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformCreateAppReq(varPlatformCreateAppReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "buildType")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "dockerfile")
|
|
delete(additionalProperties, "domains")
|
|
delete(additionalProperties, "env")
|
|
delete(additionalProperties, "environment")
|
|
delete(additionalProperties, "image")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "port")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "replicas")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "storageGb")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformCreateAppReq struct {
|
|
value *PlatformCreateAppReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformCreateAppReq) Get() *PlatformCreateAppReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformCreateAppReq) Set(val *PlatformCreateAppReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformCreateAppReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformCreateAppReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformCreateAppReq(val *PlatformCreateAppReq) *NullablePlatformCreateAppReq {
|
|
return &NullablePlatformCreateAppReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformCreateAppReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformCreateAppReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|