Files
sdk/model_content_publish_input.go

231 lines
6.4 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 ContentPublishInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ContentPublishInput{}
// ContentPublishInput struct for ContentPublishInput
type ContentPublishInput struct {
// DocType is the content type holding the item: Campaign, SocialPost or Asset. Any other name is refused as an unknown content type.
Doctype *string `json:"doctype,omitempty"`
// Name is the document within that type — the item to distribute. Its caption, media and channel list come off the stored document, so this names WHICH item and says nothing about what goes out.
Name *string `json:"name,omitempty"`
// ScheduleAt hands a future go-live to the channel's own scheduler, as an ISO-8601 time. Empty posts now.
ScheduleAt *string `json:"scheduleAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ContentPublishInput ContentPublishInput
// NewContentPublishInput instantiates a new ContentPublishInput 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 NewContentPublishInput() *ContentPublishInput {
this := ContentPublishInput{}
return &this
}
// NewContentPublishInputWithDefaults instantiates a new ContentPublishInput 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 NewContentPublishInputWithDefaults() *ContentPublishInput {
this := ContentPublishInput{}
return &this
}
// GetDoctype returns the Doctype field value if set, zero value otherwise.
func (o *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) SetDoctype(v string) {
o.Doctype = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) SetName(v string) {
o.Name = &v
}
// GetScheduleAt returns the ScheduleAt field value if set, zero value otherwise.
func (o *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) 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 *ContentPublishInput) SetScheduleAt(v string) {
o.ScheduleAt = &v
}
func (o ContentPublishInput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ContentPublishInput) 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
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ContentPublishInput) UnmarshalJSON(data []byte) (err error) {
varContentPublishInput := _ContentPublishInput{}
err = json.Unmarshal(data, &varContentPublishInput)
if err != nil {
return err
}
*o = ContentPublishInput(varContentPublishInput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "doctype")
delete(additionalProperties, "name")
delete(additionalProperties, "scheduleAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableContentPublishInput struct {
value *ContentPublishInput
isSet bool
}
func (v NullableContentPublishInput) Get() *ContentPublishInput {
return v.value
}
func (v *NullableContentPublishInput) Set(val *ContentPublishInput) {
v.value = val
v.isSet = true
}
func (v NullableContentPublishInput) IsSet() bool {
return v.isSet
}
func (v *NullableContentPublishInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableContentPublishInput(val *ContentPublishInput) *NullableContentPublishInput {
return &NullableContentPublishInput{value: val, isSet: true}
}
func (v NullableContentPublishInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableContentPublishInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}