Files
sdk/model_template_starter_kit.go

649 lines
17 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 TemplateStarterKit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TemplateStarterKit{}
// TemplateStarterKit struct for TemplateStarterKit
type TemplateStarterKit struct {
// groups the kit in the gallery browser (\"Portfolio\", \"SaaS\")
Category *string `json:"category,omitempty"`
// live demo (<slug>.hanzo.app), when deployed
Demo *string `json:"demo,omitempty"`
// the browse-card blurb
Description *string `json:"description,omitempty"`
// the highlights the card lists, at most 32
Features []string `json:"features,omitempty"`
// the stack the kit is built on (\"Next.js 14.2 + TS\")
Framework *string `json:"framework,omitempty"`
// owner of a PRIVATE template; empty in the public catalog
Org *string `json:"org,omitempty"`
// the still image the browse card renders
Preview *string `json:"preview,omitempty"`
// Rating is public-gallery curation, on the same terms as Tier: catalog-only, never accepted from a request, absent on a customer's own kit.
Rating *float64 `json:"rating,omitempty"`
// the kit's identity — lowercase alphanumeric with dashes, max 40
Slug *string `json:"slug,omitempty"`
// the repository the kit is forked from
Source *string `json:"source,omitempty"`
// Tier is public-gallery curation, carried verbatim from the embedded catalog. No request can set it — neither write body has the field and neither builds a kit carrying one — so it is absent on every customer-published kit.
Tier *int64 `json:"tier,omitempty"`
// display name
Title *string `json:"title,omitempty"`
// what the kit is for, in a phrase
UseCase *string `json:"useCase,omitempty"`
// the shapes this template ships in
Variants []TemplateVariant `json:"variants,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TemplateStarterKit TemplateStarterKit
// NewTemplateStarterKit instantiates a new TemplateStarterKit 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 NewTemplateStarterKit() *TemplateStarterKit {
this := TemplateStarterKit{}
return &this
}
// NewTemplateStarterKitWithDefaults instantiates a new TemplateStarterKit 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 NewTemplateStarterKitWithDefaults() *TemplateStarterKit {
this := TemplateStarterKit{}
return &this
}
// GetCategory returns the Category field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetCategory() string {
if o == nil || IsNil(o.Category) {
var ret string
return ret
}
return *o.Category
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetCategoryOk() (*string, bool) {
if o == nil || IsNil(o.Category) {
return nil, false
}
return o.Category, true
}
// HasCategory returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasCategory() bool {
if o != nil && !IsNil(o.Category) {
return true
}
return false
}
// SetCategory gets a reference to the given string and assigns it to the Category field.
func (o *TemplateStarterKit) SetCategory(v string) {
o.Category = &v
}
// GetDemo returns the Demo field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetDemo() string {
if o == nil || IsNil(o.Demo) {
var ret string
return ret
}
return *o.Demo
}
// GetDemoOk returns a tuple with the Demo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetDemoOk() (*string, bool) {
if o == nil || IsNil(o.Demo) {
return nil, false
}
return o.Demo, true
}
// HasDemo returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasDemo() bool {
if o != nil && !IsNil(o.Demo) {
return true
}
return false
}
// SetDemo gets a reference to the given string and assigns it to the Demo field.
func (o *TemplateStarterKit) SetDemo(v string) {
o.Demo = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *TemplateStarterKit) SetDescription(v string) {
o.Description = &v
}
// GetFeatures returns the Features field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetFeatures() []string {
if o == nil || IsNil(o.Features) {
var ret []string
return ret
}
return o.Features
}
// GetFeaturesOk returns a tuple with the Features field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetFeaturesOk() ([]string, bool) {
if o == nil || IsNil(o.Features) {
return nil, false
}
return o.Features, true
}
// HasFeatures returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasFeatures() bool {
if o != nil && !IsNil(o.Features) {
return true
}
return false
}
// SetFeatures gets a reference to the given []string and assigns it to the Features field.
func (o *TemplateStarterKit) SetFeatures(v []string) {
o.Features = v
}
// GetFramework returns the Framework field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetFramework() string {
if o == nil || IsNil(o.Framework) {
var ret string
return ret
}
return *o.Framework
}
// GetFrameworkOk returns a tuple with the Framework field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetFrameworkOk() (*string, bool) {
if o == nil || IsNil(o.Framework) {
return nil, false
}
return o.Framework, true
}
// HasFramework returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasFramework() bool {
if o != nil && !IsNil(o.Framework) {
return true
}
return false
}
// SetFramework gets a reference to the given string and assigns it to the Framework field.
func (o *TemplateStarterKit) SetFramework(v string) {
o.Framework = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *TemplateStarterKit) 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 *TemplateStarterKit) 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 *TemplateStarterKit) 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 *TemplateStarterKit) SetOrg(v string) {
o.Org = &v
}
// GetPreview returns the Preview field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetPreview() string {
if o == nil || IsNil(o.Preview) {
var ret string
return ret
}
return *o.Preview
}
// GetPreviewOk returns a tuple with the Preview field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetPreviewOk() (*string, bool) {
if o == nil || IsNil(o.Preview) {
return nil, false
}
return o.Preview, true
}
// HasPreview returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasPreview() bool {
if o != nil && !IsNil(o.Preview) {
return true
}
return false
}
// SetPreview gets a reference to the given string and assigns it to the Preview field.
func (o *TemplateStarterKit) SetPreview(v string) {
o.Preview = &v
}
// GetRating returns the Rating field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetRating() float64 {
if o == nil || IsNil(o.Rating) {
var ret float64
return ret
}
return *o.Rating
}
// GetRatingOk returns a tuple with the Rating field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetRatingOk() (*float64, bool) {
if o == nil || IsNil(o.Rating) {
return nil, false
}
return o.Rating, true
}
// HasRating returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasRating() bool {
if o != nil && !IsNil(o.Rating) {
return true
}
return false
}
// SetRating gets a reference to the given float64 and assigns it to the Rating field.
func (o *TemplateStarterKit) SetRating(v float64) {
o.Rating = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *TemplateStarterKit) 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 *TemplateStarterKit) 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 *TemplateStarterKit) 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 *TemplateStarterKit) SetSlug(v string) {
o.Slug = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *TemplateStarterKit) SetSource(v string) {
o.Source = &v
}
// GetTier returns the Tier field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetTier() int64 {
if o == nil || IsNil(o.Tier) {
var ret int64
return ret
}
return *o.Tier
}
// GetTierOk returns a tuple with the Tier field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetTierOk() (*int64, bool) {
if o == nil || IsNil(o.Tier) {
return nil, false
}
return o.Tier, true
}
// HasTier returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasTier() bool {
if o != nil && !IsNil(o.Tier) {
return true
}
return false
}
// SetTier gets a reference to the given int64 and assigns it to the Tier field.
func (o *TemplateStarterKit) SetTier(v int64) {
o.Tier = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *TemplateStarterKit) SetTitle(v string) {
o.Title = &v
}
// GetUseCase returns the UseCase field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetUseCase() string {
if o == nil || IsNil(o.UseCase) {
var ret string
return ret
}
return *o.UseCase
}
// GetUseCaseOk returns a tuple with the UseCase field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetUseCaseOk() (*string, bool) {
if o == nil || IsNil(o.UseCase) {
return nil, false
}
return o.UseCase, true
}
// HasUseCase returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasUseCase() bool {
if o != nil && !IsNil(o.UseCase) {
return true
}
return false
}
// SetUseCase gets a reference to the given string and assigns it to the UseCase field.
func (o *TemplateStarterKit) SetUseCase(v string) {
o.UseCase = &v
}
// GetVariants returns the Variants field value if set, zero value otherwise.
func (o *TemplateStarterKit) GetVariants() []TemplateVariant {
if o == nil || IsNil(o.Variants) {
var ret []TemplateVariant
return ret
}
return o.Variants
}
// GetVariantsOk returns a tuple with the Variants field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateStarterKit) GetVariantsOk() ([]TemplateVariant, bool) {
if o == nil || IsNil(o.Variants) {
return nil, false
}
return o.Variants, true
}
// HasVariants returns a boolean if a field has been set.
func (o *TemplateStarterKit) HasVariants() bool {
if o != nil && !IsNil(o.Variants) {
return true
}
return false
}
// SetVariants gets a reference to the given []TemplateVariant and assigns it to the Variants field.
func (o *TemplateStarterKit) SetVariants(v []TemplateVariant) {
o.Variants = v
}
func (o TemplateStarterKit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TemplateStarterKit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Category) {
toSerialize["category"] = o.Category
}
if !IsNil(o.Demo) {
toSerialize["demo"] = o.Demo
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Features) {
toSerialize["features"] = o.Features
}
if !IsNil(o.Framework) {
toSerialize["framework"] = o.Framework
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Preview) {
toSerialize["preview"] = o.Preview
}
if !IsNil(o.Rating) {
toSerialize["rating"] = o.Rating
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Tier) {
toSerialize["tier"] = o.Tier
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.UseCase) {
toSerialize["useCase"] = o.UseCase
}
if !IsNil(o.Variants) {
toSerialize["variants"] = o.Variants
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TemplateStarterKit) UnmarshalJSON(data []byte) (err error) {
varTemplateStarterKit := _TemplateStarterKit{}
err = json.Unmarshal(data, &varTemplateStarterKit)
if err != nil {
return err
}
*o = TemplateStarterKit(varTemplateStarterKit)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "category")
delete(additionalProperties, "demo")
delete(additionalProperties, "description")
delete(additionalProperties, "features")
delete(additionalProperties, "framework")
delete(additionalProperties, "org")
delete(additionalProperties, "preview")
delete(additionalProperties, "rating")
delete(additionalProperties, "slug")
delete(additionalProperties, "source")
delete(additionalProperties, "tier")
delete(additionalProperties, "title")
delete(additionalProperties, "useCase")
delete(additionalProperties, "variants")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTemplateStarterKit struct {
value *TemplateStarterKit
isSet bool
}
func (v NullableTemplateStarterKit) Get() *TemplateStarterKit {
return v.value
}
func (v *NullableTemplateStarterKit) Set(val *TemplateStarterKit) {
v.value = val
v.isSet = true
}
func (v NullableTemplateStarterKit) IsSet() bool {
return v.isSet
}
func (v *NullableTemplateStarterKit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTemplateStarterKit(val *TemplateStarterKit) *NullableTemplateStarterKit {
return &NullableTemplateStarterKit{value: val, isSet: true}
}
func (v NullableTemplateStarterKit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTemplateStarterKit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}