Files
sdk/model_content_generate_result.go

231 lines
6.2 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 ContentGenerateResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ContentGenerateResult{}
// ContentGenerateResult struct for ContentGenerateResult
type ContentGenerateResult struct {
// the marketing type the draft was filed as
Doctype *string `json:"doctype,omitempty"`
// the new document's name — its address for every later call
Name *string `json:"name,omitempty"`
// always \"draft\"; the lifecycle owns the initial state
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ContentGenerateResult ContentGenerateResult
// NewContentGenerateResult instantiates a new ContentGenerateResult 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 NewContentGenerateResult() *ContentGenerateResult {
this := ContentGenerateResult{}
return &this
}
// NewContentGenerateResultWithDefaults instantiates a new ContentGenerateResult 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 NewContentGenerateResultWithDefaults() *ContentGenerateResult {
this := ContentGenerateResult{}
return &this
}
// GetDoctype returns the Doctype field value if set, zero value otherwise.
func (o *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) SetDoctype(v string) {
o.Doctype = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) SetName(v string) {
o.Name = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) 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 *ContentGenerateResult) SetStatus(v string) {
o.Status = &v
}
func (o ContentGenerateResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ContentGenerateResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Doctype) {
toSerialize["doctype"] = o.Doctype
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ContentGenerateResult) UnmarshalJSON(data []byte) (err error) {
varContentGenerateResult := _ContentGenerateResult{}
err = json.Unmarshal(data, &varContentGenerateResult)
if err != nil {
return err
}
*o = ContentGenerateResult(varContentGenerateResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "doctype")
delete(additionalProperties, "name")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableContentGenerateResult struct {
value *ContentGenerateResult
isSet bool
}
func (v NullableContentGenerateResult) Get() *ContentGenerateResult {
return v.value
}
func (v *NullableContentGenerateResult) Set(val *ContentGenerateResult) {
v.value = val
v.isSet = true
}
func (v NullableContentGenerateResult) IsSet() bool {
return v.isSet
}
func (v *NullableContentGenerateResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableContentGenerateResult(val *ContentGenerateResult) *NullableContentGenerateResult {
return &NullableContentGenerateResult{value: val, isSet: true}
}
func (v NullableContentGenerateResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableContentGenerateResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}