mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
14 KiB
Go
535 lines
14 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 TemplateReplaceKitIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TemplateReplaceKitIn{}
|
|
|
|
// TemplateReplaceKitIn struct for TemplateReplaceKitIn
|
|
type TemplateReplaceKitIn struct {
|
|
// Category groups the kit in the gallery browser.
|
|
Category *string `json:"category,omitempty"`
|
|
// Demo is the deployed site itself, when there is one.
|
|
Demo *string `json:"demo,omitempty"`
|
|
// Description is the browse-card blurb, max 4096 characters.
|
|
Description *string `json:"description,omitempty"`
|
|
// Features are the highlights the card lists, at most 32.
|
|
Features []string `json:"features,omitempty"`
|
|
// Framework is the stack the kit is built on (\"Next.js 14\").
|
|
Framework *string `json:"framework,omitempty"`
|
|
// Preview is the still image the browse card renders, max 4096 characters.
|
|
Preview *string `json:"preview,omitempty"`
|
|
// Slug is the kit to replace, from the path.
|
|
Slug *string `json:"slug,omitempty"`
|
|
// Source is the repository the kit is forked from, max 4096 characters.
|
|
Source *string `json:"source,omitempty"`
|
|
// Title is the display name. Required, max 200 characters.
|
|
Title *string `json:"title,omitempty"`
|
|
// UseCase is what the kit is for, in a phrase.
|
|
UseCase *string `json:"useCase,omitempty"`
|
|
// Variants are the shapes this kit ships in, at most 32; the fork picks one.
|
|
Variants []TemplateVariant `json:"variants,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TemplateReplaceKitIn TemplateReplaceKitIn
|
|
|
|
// NewTemplateReplaceKitIn instantiates a new TemplateReplaceKitIn 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 NewTemplateReplaceKitIn() *TemplateReplaceKitIn {
|
|
this := TemplateReplaceKitIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewTemplateReplaceKitInWithDefaults instantiates a new TemplateReplaceKitIn 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 NewTemplateReplaceKitInWithDefaults() *TemplateReplaceKitIn {
|
|
this := TemplateReplaceKitIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetDemo returns the Demo field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetDemo(v string) {
|
|
o.Demo = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetFeatures returns the Features field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetFeatures(v []string) {
|
|
o.Features = v
|
|
}
|
|
|
|
// GetFramework returns the Framework field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetFramework(v string) {
|
|
o.Framework = &v
|
|
}
|
|
|
|
// GetPreview returns the Preview field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetPreview(v string) {
|
|
o.Preview = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUseCase returns the UseCase field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetUseCase(v string) {
|
|
o.UseCase = &v
|
|
}
|
|
|
|
// GetVariants returns the Variants field value if set, zero value otherwise.
|
|
func (o *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) 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 *TemplateReplaceKitIn) SetVariants(v []TemplateVariant) {
|
|
o.Variants = v
|
|
}
|
|
|
|
func (o TemplateReplaceKitIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TemplateReplaceKitIn) 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.Preview) {
|
|
toSerialize["preview"] = o.Preview
|
|
}
|
|
if !IsNil(o.Slug) {
|
|
toSerialize["slug"] = o.Slug
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
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 *TemplateReplaceKitIn) UnmarshalJSON(data []byte) (err error) {
|
|
varTemplateReplaceKitIn := _TemplateReplaceKitIn{}
|
|
|
|
err = json.Unmarshal(data, &varTemplateReplaceKitIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TemplateReplaceKitIn(varTemplateReplaceKitIn)
|
|
|
|
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, "preview")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "useCase")
|
|
delete(additionalProperties, "variants")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTemplateReplaceKitIn struct {
|
|
value *TemplateReplaceKitIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTemplateReplaceKitIn) Get() *TemplateReplaceKitIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTemplateReplaceKitIn) Set(val *TemplateReplaceKitIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTemplateReplaceKitIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTemplateReplaceKitIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTemplateReplaceKitIn(val *TemplateReplaceKitIn) *NullableTemplateReplaceKitIn {
|
|
return &NullableTemplateReplaceKitIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTemplateReplaceKitIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTemplateReplaceKitIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|