mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.1 KiB
Go
231 lines
6.1 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 PlatformAddDomainReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformAddDomainReq{}
|
|
|
|
// PlatformAddDomainReq struct for PlatformAddDomainReq
|
|
type PlatformAddDomainReq struct {
|
|
// App is the application's slug, from the path.
|
|
App *string `json:"app,omitempty"`
|
|
// Host is the hostname to attach. Required, and must be a valid DNS hostname.
|
|
Host *string `json:"host,omitempty"`
|
|
// Project is the project the application lives under, from the path.
|
|
Project *string `json:"project,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformAddDomainReq PlatformAddDomainReq
|
|
|
|
// NewPlatformAddDomainReq instantiates a new PlatformAddDomainReq 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 NewPlatformAddDomainReq() *PlatformAddDomainReq {
|
|
this := PlatformAddDomainReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformAddDomainReqWithDefaults instantiates a new PlatformAddDomainReq 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 NewPlatformAddDomainReqWithDefaults() *PlatformAddDomainReq {
|
|
this := PlatformAddDomainReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetApp returns the App field value if set, zero value otherwise.
|
|
func (o *PlatformAddDomainReq) 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 *PlatformAddDomainReq) 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 *PlatformAddDomainReq) 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 *PlatformAddDomainReq) SetApp(v string) {
|
|
o.App = &v
|
|
}
|
|
|
|
// GetHost returns the Host field value if set, zero value otherwise.
|
|
func (o *PlatformAddDomainReq) GetHost() string {
|
|
if o == nil || IsNil(o.Host) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Host
|
|
}
|
|
|
|
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformAddDomainReq) GetHostOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Host) {
|
|
return nil, false
|
|
}
|
|
return o.Host, true
|
|
}
|
|
|
|
// HasHost returns a boolean if a field has been set.
|
|
func (o *PlatformAddDomainReq) HasHost() bool {
|
|
if o != nil && !IsNil(o.Host) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHost gets a reference to the given string and assigns it to the Host field.
|
|
func (o *PlatformAddDomainReq) SetHost(v string) {
|
|
o.Host = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *PlatformAddDomainReq) 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 *PlatformAddDomainReq) 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 *PlatformAddDomainReq) 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 *PlatformAddDomainReq) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
func (o PlatformAddDomainReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformAddDomainReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.App) {
|
|
toSerialize["app"] = o.App
|
|
}
|
|
if !IsNil(o.Host) {
|
|
toSerialize["host"] = o.Host
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformAddDomainReq) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformAddDomainReq := _PlatformAddDomainReq{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformAddDomainReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformAddDomainReq(varPlatformAddDomainReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "app")
|
|
delete(additionalProperties, "host")
|
|
delete(additionalProperties, "project")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformAddDomainReq struct {
|
|
value *PlatformAddDomainReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformAddDomainReq) Get() *PlatformAddDomainReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformAddDomainReq) Set(val *PlatformAddDomainReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformAddDomainReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformAddDomainReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformAddDomainReq(val *PlatformAddDomainReq) *NullablePlatformAddDomainReq {
|
|
return &NullablePlatformAddDomainReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformAddDomainReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformAddDomainReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|