mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
12 KiB
Go
459 lines
12 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 PlatformDomainView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlatformDomainView{}
|
|
|
|
// PlatformDomainView struct for PlatformDomainView
|
|
type PlatformDomainView struct {
|
|
// CreatedAt is the unix second the custom claim was made.
|
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
|
// Detail says why a claim is still pending, in the resolver's own words.
|
|
Detail *string `json:"detail,omitempty"`
|
|
// Host is the hostname itself.
|
|
Host *string `json:"host,omitempty"`
|
|
// Kind is `default` (the app's own name) or `custom` — how the org came to own it.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Primary marks the app's permanent default host.
|
|
Primary *bool `json:"primary,omitempty"`
|
|
// Records are the DNS records to publish while a custom claim is pending.
|
|
Records []PlatformRecord `json:"records,omitempty"`
|
|
// Status is `live`, `provisioning`, `pending_deploy` or `pending`, derived from the operator CR and never fabricated.
|
|
Status *string `json:"status,omitempty"`
|
|
// URL is the host as an HTTPS address.
|
|
Url *string `json:"url,omitempty"`
|
|
// Verified is whether ownership is settled — always true for a host the org structurally owns.
|
|
Verified *bool `json:"verified,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlatformDomainView PlatformDomainView
|
|
|
|
// NewPlatformDomainView instantiates a new PlatformDomainView 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 NewPlatformDomainView() *PlatformDomainView {
|
|
this := PlatformDomainView{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlatformDomainViewWithDefaults instantiates a new PlatformDomainView 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 NewPlatformDomainViewWithDefaults() *PlatformDomainView {
|
|
this := PlatformDomainView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetCreatedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *PlatformDomainView) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDetail returns the Detail field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetDetail() string {
|
|
if o == nil || IsNil(o.Detail) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Detail
|
|
}
|
|
|
|
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetDetailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Detail) {
|
|
return nil, false
|
|
}
|
|
return o.Detail, true
|
|
}
|
|
|
|
// HasDetail returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasDetail() bool {
|
|
if o != nil && !IsNil(o.Detail) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDetail gets a reference to the given string and assigns it to the Detail field.
|
|
func (o *PlatformDomainView) SetDetail(v string) {
|
|
o.Detail = &v
|
|
}
|
|
|
|
// GetHost returns the Host field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) 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 *PlatformDomainView) 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 *PlatformDomainView) 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 *PlatformDomainView) SetHost(v string) {
|
|
o.Host = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *PlatformDomainView) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetPrimary returns the Primary field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetPrimary() bool {
|
|
if o == nil || IsNil(o.Primary) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Primary
|
|
}
|
|
|
|
// GetPrimaryOk returns a tuple with the Primary field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetPrimaryOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Primary) {
|
|
return nil, false
|
|
}
|
|
return o.Primary, true
|
|
}
|
|
|
|
// HasPrimary returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasPrimary() bool {
|
|
if o != nil && !IsNil(o.Primary) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrimary gets a reference to the given bool and assigns it to the Primary field.
|
|
func (o *PlatformDomainView) SetPrimary(v bool) {
|
|
o.Primary = &v
|
|
}
|
|
|
|
// GetRecords returns the Records field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetRecords() []PlatformRecord {
|
|
if o == nil || IsNil(o.Records) {
|
|
var ret []PlatformRecord
|
|
return ret
|
|
}
|
|
return o.Records
|
|
}
|
|
|
|
// GetRecordsOk returns a tuple with the Records field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetRecordsOk() ([]PlatformRecord, bool) {
|
|
if o == nil || IsNil(o.Records) {
|
|
return nil, false
|
|
}
|
|
return o.Records, true
|
|
}
|
|
|
|
// HasRecords returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasRecords() bool {
|
|
if o != nil && !IsNil(o.Records) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecords gets a reference to the given []PlatformRecord and assigns it to the Records field.
|
|
func (o *PlatformDomainView) SetRecords(v []PlatformRecord) {
|
|
o.Records = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *PlatformDomainView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *PlatformDomainView) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
// GetVerified returns the Verified field value if set, zero value otherwise.
|
|
func (o *PlatformDomainView) GetVerified() bool {
|
|
if o == nil || IsNil(o.Verified) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Verified
|
|
}
|
|
|
|
// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlatformDomainView) GetVerifiedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Verified) {
|
|
return nil, false
|
|
}
|
|
return o.Verified, true
|
|
}
|
|
|
|
// HasVerified returns a boolean if a field has been set.
|
|
func (o *PlatformDomainView) HasVerified() bool {
|
|
if o != nil && !IsNil(o.Verified) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVerified gets a reference to the given bool and assigns it to the Verified field.
|
|
func (o *PlatformDomainView) SetVerified(v bool) {
|
|
o.Verified = &v
|
|
}
|
|
|
|
func (o PlatformDomainView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlatformDomainView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Detail) {
|
|
toSerialize["detail"] = o.Detail
|
|
}
|
|
if !IsNil(o.Host) {
|
|
toSerialize["host"] = o.Host
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Primary) {
|
|
toSerialize["primary"] = o.Primary
|
|
}
|
|
if !IsNil(o.Records) {
|
|
toSerialize["records"] = o.Records
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
if !IsNil(o.Verified) {
|
|
toSerialize["verified"] = o.Verified
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlatformDomainView) UnmarshalJSON(data []byte) (err error) {
|
|
varPlatformDomainView := _PlatformDomainView{}
|
|
|
|
err = json.Unmarshal(data, &varPlatformDomainView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlatformDomainView(varPlatformDomainView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "detail")
|
|
delete(additionalProperties, "host")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "primary")
|
|
delete(additionalProperties, "records")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "url")
|
|
delete(additionalProperties, "verified")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlatformDomainView struct {
|
|
value *PlatformDomainView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlatformDomainView) Get() *PlatformDomainView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlatformDomainView) Set(val *PlatformDomainView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlatformDomainView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlatformDomainView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlatformDomainView(val *PlatformDomainView) *NullablePlatformDomainView {
|
|
return &NullablePlatformDomainView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlatformDomainView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlatformDomainView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|