Files
sdk/model_project_projects_bound_domains.go

269 lines
7.6 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 ProjectProjectsBoundDomains type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsBoundDomains{}
// ProjectProjectsBoundDomains struct for ProjectProjectsBoundDomains
type ProjectProjectsBoundDomains struct {
// Bound is the result of THIS call, one row per host in the request: live for an already-vouched host, pending with the DNS records to publish otherwise.
Bound []ProjectProjectsDomain `json:"bound,omitempty"`
// Domains are the hostnames that are VERIFIED and routing right now, after this bind.
Domains []string `json:"domains,omitempty"`
// Org is the organisation that owns the site.
Org *string `json:"org,omitempty"`
// Slug is the site the hosts were bound to.
Slug *string `json:"slug,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsBoundDomains ProjectProjectsBoundDomains
// NewProjectProjectsBoundDomains instantiates a new ProjectProjectsBoundDomains 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 NewProjectProjectsBoundDomains() *ProjectProjectsBoundDomains {
this := ProjectProjectsBoundDomains{}
return &this
}
// NewProjectProjectsBoundDomainsWithDefaults instantiates a new ProjectProjectsBoundDomains 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 NewProjectProjectsBoundDomainsWithDefaults() *ProjectProjectsBoundDomains {
this := ProjectProjectsBoundDomains{}
return &this
}
// GetBound returns the Bound field value if set, zero value otherwise.
func (o *ProjectProjectsBoundDomains) GetBound() []ProjectProjectsDomain {
if o == nil || IsNil(o.Bound) {
var ret []ProjectProjectsDomain
return ret
}
return o.Bound
}
// GetBoundOk returns a tuple with the Bound field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsBoundDomains) GetBoundOk() ([]ProjectProjectsDomain, bool) {
if o == nil || IsNil(o.Bound) {
return nil, false
}
return o.Bound, true
}
// HasBound returns a boolean if a field has been set.
func (o *ProjectProjectsBoundDomains) HasBound() bool {
if o != nil && !IsNil(o.Bound) {
return true
}
return false
}
// SetBound gets a reference to the given []ProjectProjectsDomain and assigns it to the Bound field.
func (o *ProjectProjectsBoundDomains) SetBound(v []ProjectProjectsDomain) {
o.Bound = v
}
// GetDomains returns the Domains field value if set, zero value otherwise.
func (o *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) SetDomains(v []string) {
o.Domains = v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *ProjectProjectsBoundDomains) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsBoundDomains) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *ProjectProjectsBoundDomains) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *ProjectProjectsBoundDomains) SetOrg(v string) {
o.Org = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) 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 *ProjectProjectsBoundDomains) SetSlug(v string) {
o.Slug = &v
}
func (o ProjectProjectsBoundDomains) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsBoundDomains) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Bound) {
toSerialize["bound"] = o.Bound
}
if !IsNil(o.Domains) {
toSerialize["domains"] = o.Domains
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsBoundDomains) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsBoundDomains := _ProjectProjectsBoundDomains{}
err = json.Unmarshal(data, &varProjectProjectsBoundDomains)
if err != nil {
return err
}
*o = ProjectProjectsBoundDomains(varProjectProjectsBoundDomains)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "bound")
delete(additionalProperties, "domains")
delete(additionalProperties, "org")
delete(additionalProperties, "slug")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsBoundDomains struct {
value *ProjectProjectsBoundDomains
isSet bool
}
func (v NullableProjectProjectsBoundDomains) Get() *ProjectProjectsBoundDomains {
return v.value
}
func (v *NullableProjectProjectsBoundDomains) Set(val *ProjectProjectsBoundDomains) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsBoundDomains) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsBoundDomains) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsBoundDomains(val *ProjectProjectsBoundDomains) *NullableProjectProjectsBoundDomains {
return &NullableProjectProjectsBoundDomains{value: val, isSet: true}
}
func (v NullableProjectProjectsBoundDomains) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsBoundDomains) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}