Files
sdk/model_project_projects_deploy_site.go

231 lines
6.4 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 ProjectProjectsDeploySite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsDeploySite{}
// ProjectProjectsDeploySite struct for ProjectProjectsDeploySite
type ProjectProjectsDeploySite struct {
// Files is the whole site, inline — every file it consists of. It REPLACES what is there rather than merging, so an omitted file is a deleted one.
Files []ProjectProjectsFile `json:"files,omitempty"`
// Name is the site's display name.
Name *string `json:"name,omitempty"`
// Slug is the handle and public host label to publish under.
Slug *string `json:"slug,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsDeploySite ProjectProjectsDeploySite
// NewProjectProjectsDeploySite instantiates a new ProjectProjectsDeploySite 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 NewProjectProjectsDeploySite() *ProjectProjectsDeploySite {
this := ProjectProjectsDeploySite{}
return &this
}
// NewProjectProjectsDeploySiteWithDefaults instantiates a new ProjectProjectsDeploySite 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 NewProjectProjectsDeploySiteWithDefaults() *ProjectProjectsDeploySite {
this := ProjectProjectsDeploySite{}
return &this
}
// GetFiles returns the Files field value if set, zero value otherwise.
func (o *ProjectProjectsDeploySite) GetFiles() []ProjectProjectsFile {
if o == nil || IsNil(o.Files) {
var ret []ProjectProjectsFile
return ret
}
return o.Files
}
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsDeploySite) GetFilesOk() ([]ProjectProjectsFile, bool) {
if o == nil || IsNil(o.Files) {
return nil, false
}
return o.Files, true
}
// HasFiles returns a boolean if a field has been set.
func (o *ProjectProjectsDeploySite) HasFiles() bool {
if o != nil && !IsNil(o.Files) {
return true
}
return false
}
// SetFiles gets a reference to the given []ProjectProjectsFile and assigns it to the Files field.
func (o *ProjectProjectsDeploySite) SetFiles(v []ProjectProjectsFile) {
o.Files = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) SetName(v string) {
o.Name = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) 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 *ProjectProjectsDeploySite) SetSlug(v string) {
o.Slug = &v
}
func (o ProjectProjectsDeploySite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsDeploySite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Files) {
toSerialize["files"] = o.Files
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsDeploySite) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsDeploySite := _ProjectProjectsDeploySite{}
err = json.Unmarshal(data, &varProjectProjectsDeploySite)
if err != nil {
return err
}
*o = ProjectProjectsDeploySite(varProjectProjectsDeploySite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "files")
delete(additionalProperties, "name")
delete(additionalProperties, "slug")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsDeploySite struct {
value *ProjectProjectsDeploySite
isSet bool
}
func (v NullableProjectProjectsDeploySite) Get() *ProjectProjectsDeploySite {
return v.value
}
func (v *NullableProjectProjectsDeploySite) Set(val *ProjectProjectsDeploySite) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsDeploySite) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsDeploySite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsDeploySite(val *ProjectProjectsDeploySite) *NullableProjectProjectsDeploySite {
return &NullableProjectProjectsDeploySite{value: val, isSet: true}
}
func (v NullableProjectProjectsDeploySite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsDeploySite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}