mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.2 KiB
Go
269 lines
7.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 ContentTransitionIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ContentTransitionIn{}
|
|
|
|
// ContentTransitionIn struct for ContentTransitionIn
|
|
type ContentTransitionIn struct {
|
|
// DocType is the content type to act on, from the path.
|
|
Doctype *string `json:"doctype,omitempty"`
|
|
// Name is the document to act on, from the path.
|
|
Name *string `json:"name,omitempty"`
|
|
// ScheduleAt is an ISO-8601 go-live time handed to the channel's own scheduler; \"\" distributes now.
|
|
ScheduleAt *string `json:"scheduleAt,omitempty"`
|
|
// To is the lifecycle state to move to. Required, and the move must be a legal edge from the item's current state.
|
|
To *string `json:"to,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ContentTransitionIn ContentTransitionIn
|
|
|
|
// NewContentTransitionIn instantiates a new ContentTransitionIn 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 NewContentTransitionIn() *ContentTransitionIn {
|
|
this := ContentTransitionIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewContentTransitionInWithDefaults instantiates a new ContentTransitionIn 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 NewContentTransitionInWithDefaults() *ContentTransitionIn {
|
|
this := ContentTransitionIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetDoctype returns the Doctype field value if set, zero value otherwise.
|
|
func (o *ContentTransitionIn) 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 *ContentTransitionIn) 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 *ContentTransitionIn) 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 *ContentTransitionIn) SetDoctype(v string) {
|
|
o.Doctype = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ContentTransitionIn) 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 *ContentTransitionIn) 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 *ContentTransitionIn) 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 *ContentTransitionIn) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetScheduleAt returns the ScheduleAt field value if set, zero value otherwise.
|
|
func (o *ContentTransitionIn) GetScheduleAt() string {
|
|
if o == nil || IsNil(o.ScheduleAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ScheduleAt
|
|
}
|
|
|
|
// GetScheduleAtOk returns a tuple with the ScheduleAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentTransitionIn) GetScheduleAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ScheduleAt) {
|
|
return nil, false
|
|
}
|
|
return o.ScheduleAt, true
|
|
}
|
|
|
|
// HasScheduleAt returns a boolean if a field has been set.
|
|
func (o *ContentTransitionIn) HasScheduleAt() bool {
|
|
if o != nil && !IsNil(o.ScheduleAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScheduleAt gets a reference to the given string and assigns it to the ScheduleAt field.
|
|
func (o *ContentTransitionIn) SetScheduleAt(v string) {
|
|
o.ScheduleAt = &v
|
|
}
|
|
|
|
// GetTo returns the To field value if set, zero value otherwise.
|
|
func (o *ContentTransitionIn) GetTo() string {
|
|
if o == nil || IsNil(o.To) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.To
|
|
}
|
|
|
|
// GetToOk returns a tuple with the To field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ContentTransitionIn) GetToOk() (*string, bool) {
|
|
if o == nil || IsNil(o.To) {
|
|
return nil, false
|
|
}
|
|
return o.To, true
|
|
}
|
|
|
|
// HasTo returns a boolean if a field has been set.
|
|
func (o *ContentTransitionIn) HasTo() bool {
|
|
if o != nil && !IsNil(o.To) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTo gets a reference to the given string and assigns it to the To field.
|
|
func (o *ContentTransitionIn) SetTo(v string) {
|
|
o.To = &v
|
|
}
|
|
|
|
func (o ContentTransitionIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ContentTransitionIn) 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.ScheduleAt) {
|
|
toSerialize["scheduleAt"] = o.ScheduleAt
|
|
}
|
|
if !IsNil(o.To) {
|
|
toSerialize["to"] = o.To
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ContentTransitionIn) UnmarshalJSON(data []byte) (err error) {
|
|
varContentTransitionIn := _ContentTransitionIn{}
|
|
|
|
err = json.Unmarshal(data, &varContentTransitionIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ContentTransitionIn(varContentTransitionIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "doctype")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "scheduleAt")
|
|
delete(additionalProperties, "to")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableContentTransitionIn struct {
|
|
value *ContentTransitionIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableContentTransitionIn) Get() *ContentTransitionIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableContentTransitionIn) Set(val *ContentTransitionIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableContentTransitionIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableContentTransitionIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableContentTransitionIn(val *ContentTransitionIn) *NullableContentTransitionIn {
|
|
return &NullableContentTransitionIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableContentTransitionIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableContentTransitionIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|