Files
sdk/model_project_projects_domain.go

383 lines
11 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 ProjectProjectsDomain type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsDomain{}
// ProjectProjectsDomain struct for ProjectProjectsDomain
type ProjectProjectsDomain struct {
// CreatedAt is when the host was claimed, as Unix seconds — not when it went live.
CreatedAt *int64 `json:"createdAt,omitempty"`
// Detail is what is holding the claim up, in words a person can act on.
Detail *string `json:"detail,omitempty"`
// Host is the custom hostname claimed for this site.
Host *string `json:"host,omitempty"`
// Records are EXACTLY the DNS records to publish to prove ownership and route the host. Present only while pending, because a live host has already proved it; absent is therefore \"nothing left to do\", not \"we cannot say what to do\".
Records []ProjectRecord `json:"records,omitempty"`
// Status is `live` when the edge answers for this host now, `pending` while the claim is waiting on DNS proof of ownership. A pending host is claimed but serves nothing.
Status *string `json:"status,omitempty"`
// URL is where the host will serve once it is live — present on a pending claim too, so a console can show the destination before it works.
Url *string `json:"url,omitempty"`
// Verified is the same fact as a boolean, for a caller that only needs the yes or no. It cannot disagree with status.
Verified *bool `json:"verified,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsDomain ProjectProjectsDomain
// NewProjectProjectsDomain instantiates a new ProjectProjectsDomain 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 NewProjectProjectsDomain() *ProjectProjectsDomain {
this := ProjectProjectsDomain{}
return &this
}
// NewProjectProjectsDomainWithDefaults instantiates a new ProjectProjectsDomain 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 NewProjectProjectsDomainWithDefaults() *ProjectProjectsDomain {
this := ProjectProjectsDomain{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetCreatedAt(v int64) {
o.CreatedAt = &v
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetDetail(v string) {
o.Detail = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetHost(v string) {
o.Host = &v
}
// GetRecords returns the Records field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) GetRecords() []ProjectRecord {
if o == nil || IsNil(o.Records) {
var ret []ProjectRecord
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 *ProjectProjectsDomain) GetRecordsOk() ([]ProjectRecord, 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 *ProjectProjectsDomain) HasRecords() bool {
if o != nil && !IsNil(o.Records) {
return true
}
return false
}
// SetRecords gets a reference to the given []ProjectRecord and assigns it to the Records field.
func (o *ProjectProjectsDomain) SetRecords(v []ProjectRecord) {
o.Records = v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetStatus(v string) {
o.Status = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetUrl(v string) {
o.Url = &v
}
// GetVerified returns the Verified field value if set, zero value otherwise.
func (o *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) 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 *ProjectProjectsDomain) SetVerified(v bool) {
o.Verified = &v
}
func (o ProjectProjectsDomain) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsDomain) 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.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 *ProjectProjectsDomain) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsDomain := _ProjectProjectsDomain{}
err = json.Unmarshal(data, &varProjectProjectsDomain)
if err != nil {
return err
}
*o = ProjectProjectsDomain(varProjectProjectsDomain)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "detail")
delete(additionalProperties, "host")
delete(additionalProperties, "records")
delete(additionalProperties, "status")
delete(additionalProperties, "url")
delete(additionalProperties, "verified")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsDomain struct {
value *ProjectProjectsDomain
isSet bool
}
func (v NullableProjectProjectsDomain) Get() *ProjectProjectsDomain {
return v.value
}
func (v *NullableProjectProjectsDomain) Set(val *ProjectProjectsDomain) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsDomain) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsDomain) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsDomain(val *ProjectProjectsDomain) *NullableProjectProjectsDomain {
return &NullableProjectProjectsDomain{value: val, isSet: true}
}
func (v NullableProjectProjectsDomain) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsDomain) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}