mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.5 KiB
Go
269 lines
7.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 ProjectProjectsBuildSite type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProjectProjectsBuildSite{}
|
|
|
|
// ProjectProjectsBuildSite struct for ProjectProjectsBuildSite
|
|
type ProjectProjectsBuildSite struct {
|
|
// Brief is what the site should be, in plain language. It is the whole input the model gets and it is size-bounded.
|
|
Brief *string `json:"brief,omitempty"`
|
|
// Model names which model writes the site. Absent takes the deployment's default — this route spends inference on the caller's org either way.
|
|
Model *string `json:"model,omitempty"`
|
|
// Name is the site's display name. Taken from what the model writes when omitted.
|
|
Name *string `json:"name,omitempty"`
|
|
// Slug is the handle and public host label to publish under. Derived from the name, or from the brief, when omitted.
|
|
Slug *string `json:"slug,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProjectProjectsBuildSite ProjectProjectsBuildSite
|
|
|
|
// NewProjectProjectsBuildSite instantiates a new ProjectProjectsBuildSite 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 NewProjectProjectsBuildSite() *ProjectProjectsBuildSite {
|
|
this := ProjectProjectsBuildSite{}
|
|
return &this
|
|
}
|
|
|
|
// NewProjectProjectsBuildSiteWithDefaults instantiates a new ProjectProjectsBuildSite 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 NewProjectProjectsBuildSiteWithDefaults() *ProjectProjectsBuildSite {
|
|
this := ProjectProjectsBuildSite{}
|
|
return &this
|
|
}
|
|
|
|
// GetBrief returns the Brief field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsBuildSite) GetBrief() string {
|
|
if o == nil || IsNil(o.Brief) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Brief
|
|
}
|
|
|
|
// GetBriefOk returns a tuple with the Brief field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsBuildSite) GetBriefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Brief) {
|
|
return nil, false
|
|
}
|
|
return o.Brief, true
|
|
}
|
|
|
|
// HasBrief returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsBuildSite) HasBrief() bool {
|
|
if o != nil && !IsNil(o.Brief) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBrief gets a reference to the given string and assigns it to the Brief field.
|
|
func (o *ProjectProjectsBuildSite) SetBrief(v string) {
|
|
o.Brief = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsBuildSite) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProjectProjectsBuildSite) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *ProjectProjectsBuildSite) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *ProjectProjectsBuildSite) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) 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 *ProjectProjectsBuildSite) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
func (o ProjectProjectsBuildSite) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProjectProjectsBuildSite) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Brief) {
|
|
toSerialize["brief"] = o.Brief
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
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 *ProjectProjectsBuildSite) UnmarshalJSON(data []byte) (err error) {
|
|
varProjectProjectsBuildSite := _ProjectProjectsBuildSite{}
|
|
|
|
err = json.Unmarshal(data, &varProjectProjectsBuildSite)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProjectProjectsBuildSite(varProjectProjectsBuildSite)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "brief")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "slug")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProjectProjectsBuildSite struct {
|
|
value *ProjectProjectsBuildSite
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProjectProjectsBuildSite) Get() *ProjectProjectsBuildSite {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProjectProjectsBuildSite) Set(val *ProjectProjectsBuildSite) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProjectProjectsBuildSite) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProjectProjectsBuildSite) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProjectProjectsBuildSite(val *ProjectProjectsBuildSite) *NullableProjectProjectsBuildSite {
|
|
return &NullableProjectProjectsBuildSite{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProjectProjectsBuildSite) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProjectProjectsBuildSite) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|