Files
sdk/model_project_projects_site.go

307 lines
8.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 ProjectProjectsSite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsSite{}
// ProjectProjectsSite struct for ProjectProjectsSite
type ProjectProjectsSite struct {
// Name is the site's display name.
Name *string `json:"name,omitempty"`
// Slug is the site's handle — also the label of the host it serves at.
Slug *string `json:"slug,omitempty"`
// Status is the project's state behind the site — whether it is serving, still building, or failed its last build. A site that is listed is not necessarily one that answers.
Status *string `json:"status,omitempty"`
// UpdatedAt is when the project last changed, as Unix seconds.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// URL is the pretty address readers use, not the object-store path behind it.
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsSite ProjectProjectsSite
// NewProjectProjectsSite instantiates a new ProjectProjectsSite 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 NewProjectProjectsSite() *ProjectProjectsSite {
this := ProjectProjectsSite{}
return &this
}
// NewProjectProjectsSiteWithDefaults instantiates a new ProjectProjectsSite 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 NewProjectProjectsSiteWithDefaults() *ProjectProjectsSite {
this := ProjectProjectsSite{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) SetName(v string) {
o.Name = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) SetSlug(v string) {
o.Slug = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) SetStatus(v string) {
o.Status = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *ProjectProjectsSite) GetUpdatedAt() int64 {
if o == nil || IsNil(o.UpdatedAt) {
var ret int64
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsSite) GetUpdatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *ProjectProjectsSite) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field.
func (o *ProjectProjectsSite) SetUpdatedAt(v int64) {
o.UpdatedAt = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) 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 *ProjectProjectsSite) SetUrl(v string) {
o.Url = &v
}
func (o ProjectProjectsSite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsSite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsSite) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsSite := _ProjectProjectsSite{}
err = json.Unmarshal(data, &varProjectProjectsSite)
if err != nil {
return err
}
*o = ProjectProjectsSite(varProjectProjectsSite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "slug")
delete(additionalProperties, "status")
delete(additionalProperties, "updatedAt")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsSite struct {
value *ProjectProjectsSite
isSet bool
}
func (v NullableProjectProjectsSite) Get() *ProjectProjectsSite {
return v.value
}
func (v *NullableProjectProjectsSite) Set(val *ProjectProjectsSite) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsSite) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsSite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsSite(val *ProjectProjectsSite) *NullableProjectProjectsSite {
return &NullableProjectProjectsSite{value: val, isSet: true}
}
func (v NullableProjectProjectsSite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsSite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}