mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
573 lines
15 KiB
Go
573 lines
15 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 ContentGenerateInput type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ContentGenerateInput{}
|
|
|
|
// ContentGenerateInput struct for ContentGenerateInput
|
|
type ContentGenerateInput struct {
|
|
// the brief/goal driving copy generation
|
|
Brief *string `json:"brief,omitempty"`
|
|
// target channels (SocialPost)
|
|
Channels *string `json:"channels,omitempty"`
|
|
// studio design slug (asset source)
|
|
Design *string `json:"design,omitempty"`
|
|
// marketing.Campaign | marketing.SocialPost | marketing.Asset
|
|
Doctype *string `json:"doctype,omitempty"`
|
|
// asset kind: ecom|product|lifestyle|hover|hero
|
|
Kind *string `json:"kind,omitempty"`
|
|
// optional zen model override (copy)
|
|
Model *string `json:"model,omitempty"`
|
|
// commerce product handle (copy context)
|
|
Product *string `json:"product,omitempty"`
|
|
// brand/site sub-scope (billing + tenancy axis)
|
|
Project *string `json:"project,omitempty"`
|
|
// asset source image (design CAD/photo)
|
|
SourceMedia *string `json:"source_media,omitempty"`
|
|
// optional explicit title
|
|
Title *string `json:"title,omitempty"`
|
|
// tone override for a single draft
|
|
Tone *string `json:"tone,omitempty"`
|
|
// brand-voice guidance for the copy director
|
|
Voice *string `json:"voice,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ContentGenerateInput ContentGenerateInput
|
|
|
|
// NewContentGenerateInput instantiates a new ContentGenerateInput 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 NewContentGenerateInput() *ContentGenerateInput {
|
|
this := ContentGenerateInput{}
|
|
return &this
|
|
}
|
|
|
|
// NewContentGenerateInputWithDefaults instantiates a new ContentGenerateInput 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 NewContentGenerateInputWithDefaults() *ContentGenerateInput {
|
|
this := ContentGenerateInput{}
|
|
return &this
|
|
}
|
|
|
|
// GetBrief returns the Brief field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) SetBrief(v string) {
|
|
o.Brief = &v
|
|
}
|
|
|
|
// GetChannels returns the Channels field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetChannels() string {
|
|
if o == nil || IsNil(o.Channels) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Channels
|
|
}
|
|
|
|
// GetChannelsOk returns a tuple with the Channels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetChannelsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Channels) {
|
|
return nil, false
|
|
}
|
|
return o.Channels, true
|
|
}
|
|
|
|
// HasChannels returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasChannels() bool {
|
|
if o != nil && !IsNil(o.Channels) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChannels gets a reference to the given string and assigns it to the Channels field.
|
|
func (o *ContentGenerateInput) SetChannels(v string) {
|
|
o.Channels = &v
|
|
}
|
|
|
|
// GetDesign returns the Design field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetDesign() string {
|
|
if o == nil || IsNil(o.Design) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Design
|
|
}
|
|
|
|
// GetDesignOk returns a tuple with the Design field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetDesignOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Design) {
|
|
return nil, false
|
|
}
|
|
return o.Design, true
|
|
}
|
|
|
|
// HasDesign returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasDesign() bool {
|
|
if o != nil && !IsNil(o.Design) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDesign gets a reference to the given string and assigns it to the Design field.
|
|
func (o *ContentGenerateInput) SetDesign(v string) {
|
|
o.Design = &v
|
|
}
|
|
|
|
// GetDoctype returns the Doctype field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetDoctype() string {
|
|
if o == nil || IsNil(o.Doctype) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Doctype
|
|
}
|
|
|
|
// GetDoctypeOk returns a tuple with the Doctype field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetDoctypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Doctype) {
|
|
return nil, false
|
|
}
|
|
return o.Doctype, true
|
|
}
|
|
|
|
// HasDoctype returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasDoctype() bool {
|
|
if o != nil && !IsNil(o.Doctype) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDoctype gets a reference to the given string and assigns it to the Doctype field.
|
|
func (o *ContentGenerateInput) SetDoctype(v string) {
|
|
o.Doctype = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *ContentGenerateInput) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetProduct returns the Product field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetProduct() string {
|
|
if o == nil || IsNil(o.Product) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Product
|
|
}
|
|
|
|
// GetProductOk returns a tuple with the Product field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetProductOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Product) {
|
|
return nil, false
|
|
}
|
|
return o.Product, true
|
|
}
|
|
|
|
// HasProduct returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasProduct() bool {
|
|
if o != nil && !IsNil(o.Product) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProduct gets a reference to the given string and assigns it to the Product field.
|
|
func (o *ContentGenerateInput) SetProduct(v string) {
|
|
o.Product = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetProject() string {
|
|
if o == nil || IsNil(o.Project) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Project
|
|
}
|
|
|
|
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetProjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Project) {
|
|
return nil, false
|
|
}
|
|
return o.Project, true
|
|
}
|
|
|
|
// HasProject returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasProject() bool {
|
|
if o != nil && !IsNil(o.Project) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProject gets a reference to the given string and assigns it to the Project field.
|
|
func (o *ContentGenerateInput) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetSourceMedia returns the SourceMedia field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetSourceMedia() string {
|
|
if o == nil || IsNil(o.SourceMedia) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SourceMedia
|
|
}
|
|
|
|
// GetSourceMediaOk returns a tuple with the SourceMedia field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetSourceMediaOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SourceMedia) {
|
|
return nil, false
|
|
}
|
|
return o.SourceMedia, true
|
|
}
|
|
|
|
// HasSourceMedia returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasSourceMedia() bool {
|
|
if o != nil && !IsNil(o.SourceMedia) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSourceMedia gets a reference to the given string and assigns it to the SourceMedia field.
|
|
func (o *ContentGenerateInput) SetSourceMedia(v string) {
|
|
o.SourceMedia = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) 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 *ContentGenerateInput) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetTone returns the Tone field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetTone() string {
|
|
if o == nil || IsNil(o.Tone) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tone
|
|
}
|
|
|
|
// GetToneOk returns a tuple with the Tone field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetToneOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tone) {
|
|
return nil, false
|
|
}
|
|
return o.Tone, true
|
|
}
|
|
|
|
// HasTone returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasTone() bool {
|
|
if o != nil && !IsNil(o.Tone) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTone gets a reference to the given string and assigns it to the Tone field.
|
|
func (o *ContentGenerateInput) SetTone(v string) {
|
|
o.Tone = &v
|
|
}
|
|
|
|
// GetVoice returns the Voice field value if set, zero value otherwise.
|
|
func (o *ContentGenerateInput) GetVoice() string {
|
|
if o == nil || IsNil(o.Voice) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Voice
|
|
}
|
|
|
|
// GetVoiceOk returns a tuple with the Voice field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentGenerateInput) GetVoiceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Voice) {
|
|
return nil, false
|
|
}
|
|
return o.Voice, true
|
|
}
|
|
|
|
// HasVoice returns a boolean if a field has been set.
|
|
func (o *ContentGenerateInput) HasVoice() bool {
|
|
if o != nil && !IsNil(o.Voice) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVoice gets a reference to the given string and assigns it to the Voice field.
|
|
func (o *ContentGenerateInput) SetVoice(v string) {
|
|
o.Voice = &v
|
|
}
|
|
|
|
func (o ContentGenerateInput) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ContentGenerateInput) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Brief) {
|
|
toSerialize["brief"] = o.Brief
|
|
}
|
|
if !IsNil(o.Channels) {
|
|
toSerialize["channels"] = o.Channels
|
|
}
|
|
if !IsNil(o.Design) {
|
|
toSerialize["design"] = o.Design
|
|
}
|
|
if !IsNil(o.Doctype) {
|
|
toSerialize["doctype"] = o.Doctype
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Product) {
|
|
toSerialize["product"] = o.Product
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
if !IsNil(o.SourceMedia) {
|
|
toSerialize["source_media"] = o.SourceMedia
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Tone) {
|
|
toSerialize["tone"] = o.Tone
|
|
}
|
|
if !IsNil(o.Voice) {
|
|
toSerialize["voice"] = o.Voice
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ContentGenerateInput) UnmarshalJSON(data []byte) (err error) {
|
|
varContentGenerateInput := _ContentGenerateInput{}
|
|
|
|
err = json.Unmarshal(data, &varContentGenerateInput)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ContentGenerateInput(varContentGenerateInput)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "brief")
|
|
delete(additionalProperties, "channels")
|
|
delete(additionalProperties, "design")
|
|
delete(additionalProperties, "doctype")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "product")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "source_media")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "tone")
|
|
delete(additionalProperties, "voice")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableContentGenerateInput struct {
|
|
value *ContentGenerateInput
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableContentGenerateInput) Get() *ContentGenerateInput {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableContentGenerateInput) Set(val *ContentGenerateInput) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableContentGenerateInput) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableContentGenerateInput) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableContentGenerateInput(val *ContentGenerateInput) *NullableContentGenerateInput {
|
|
return &NullableContentGenerateInput{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableContentGenerateInput) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableContentGenerateInput) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|