Files
sdk/model_project_projects_site_deploy.go

345 lines
9.5 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 ProjectProjectsSiteDeploy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProjectProjectsSiteDeploy{}
// ProjectProjectsSiteDeploy struct for ProjectProjectsSiteDeploy
type ProjectProjectsSiteDeploy struct {
// DeploymentID is the deployment this publish recorded, for the history.
DeploymentId *string `json:"deploymentId,omitempty"`
// Files are the site-relative paths that were uploaded, sorted.
Files []string `json:"files,omitempty"`
// Name is the project's display name.
Name *string `json:"name,omitempty"`
// Slug is the project the site was published into, created on the fly when the slug was free.
Slug *string `json:"slug,omitempty"`
// Status is the deployment status, \"live\" on success.
Status *string `json:"status,omitempty"`
// URL is the canonical live URL, https://<slug>.<apex> — empty when the subdomain belongs to another tenant and this site has none.
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProjectProjectsSiteDeploy ProjectProjectsSiteDeploy
// NewProjectProjectsSiteDeploy instantiates a new ProjectProjectsSiteDeploy 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 NewProjectProjectsSiteDeploy() *ProjectProjectsSiteDeploy {
this := ProjectProjectsSiteDeploy{}
return &this
}
// NewProjectProjectsSiteDeployWithDefaults instantiates a new ProjectProjectsSiteDeploy 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 NewProjectProjectsSiteDeployWithDefaults() *ProjectProjectsSiteDeploy {
this := ProjectProjectsSiteDeploy{}
return &this
}
// GetDeploymentId returns the DeploymentId field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) GetDeploymentId() string {
if o == nil || IsNil(o.DeploymentId) {
var ret string
return ret
}
return *o.DeploymentId
}
// GetDeploymentIdOk returns a tuple with the DeploymentId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProjectProjectsSiteDeploy) GetDeploymentIdOk() (*string, bool) {
if o == nil || IsNil(o.DeploymentId) {
return nil, false
}
return o.DeploymentId, true
}
// HasDeploymentId returns a boolean if a field has been set.
func (o *ProjectProjectsSiteDeploy) HasDeploymentId() bool {
if o != nil && !IsNil(o.DeploymentId) {
return true
}
return false
}
// SetDeploymentId gets a reference to the given string and assigns it to the DeploymentId field.
func (o *ProjectProjectsSiteDeploy) SetDeploymentId(v string) {
o.DeploymentId = &v
}
// GetFiles returns the Files field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) GetFiles() []string {
if o == nil || IsNil(o.Files) {
var ret []string
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 *ProjectProjectsSiteDeploy) GetFilesOk() ([]string, 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 *ProjectProjectsSiteDeploy) HasFiles() bool {
if o != nil && !IsNil(o.Files) {
return true
}
return false
}
// SetFiles gets a reference to the given []string and assigns it to the Files field.
func (o *ProjectProjectsSiteDeploy) SetFiles(v []string) {
o.Files = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) SetName(v string) {
o.Name = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) SetSlug(v string) {
o.Slug = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) SetStatus(v string) {
o.Status = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) 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 *ProjectProjectsSiteDeploy) SetUrl(v string) {
o.Url = &v
}
func (o ProjectProjectsSiteDeploy) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProjectProjectsSiteDeploy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.DeploymentId) {
toSerialize["deploymentId"] = o.DeploymentId
}
if !IsNil(o.Files) {
toSerialize["files"] = o.Files
}
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.Url) {
toSerialize["url"] = o.Url
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProjectProjectsSiteDeploy) UnmarshalJSON(data []byte) (err error) {
varProjectProjectsSiteDeploy := _ProjectProjectsSiteDeploy{}
err = json.Unmarshal(data, &varProjectProjectsSiteDeploy)
if err != nil {
return err
}
*o = ProjectProjectsSiteDeploy(varProjectProjectsSiteDeploy)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "deploymentId")
delete(additionalProperties, "files")
delete(additionalProperties, "name")
delete(additionalProperties, "slug")
delete(additionalProperties, "status")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProjectProjectsSiteDeploy struct {
value *ProjectProjectsSiteDeploy
isSet bool
}
func (v NullableProjectProjectsSiteDeploy) Get() *ProjectProjectsSiteDeploy {
return v.value
}
func (v *NullableProjectProjectsSiteDeploy) Set(val *ProjectProjectsSiteDeploy) {
v.value = val
v.isSet = true
}
func (v NullableProjectProjectsSiteDeploy) IsSet() bool {
return v.isSet
}
func (v *NullableProjectProjectsSiteDeploy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProjectProjectsSiteDeploy(val *ProjectProjectsSiteDeploy) *NullableProjectProjectsSiteDeploy {
return &NullableProjectProjectsSiteDeploy{value: val, isSet: true}
}
func (v NullableProjectProjectsSiteDeploy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProjectProjectsSiteDeploy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}