Files
sdk/model_content_board_item.go

345 lines
9.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 ContentBoardItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ContentBoardItem{}
// ContentBoardItem struct for ContentBoardItem
type ContentBoardItem struct {
// DocType is which content type the row came from: Campaign, SocialPost or Asset. The board spans all three at once, so this is what tells them apart.
Doctype *string `json:"doctype,omitempty"`
// Name is the document within that type. (doctype, name) is the pair every /v1/content write addresses an item by.
Name *string `json:"name,omitempty"`
// Project is the brand/site sub-scope within the org. Absent for an item held at org level rather than under one brand.
Project *string `json:"project,omitempty"`
// Status is the lifecycle state: draft, in_review, approved, queued, published or archived. It decides what a reader may see — the public site pulls exactly \"published\" and nothing else — so it is a visibility fact, not a workflow label.
Status *string `json:"status,omitempty"`
// Title is the item's headline, read from its type's own title field. Empty for a document that has none.
Title *string `json:"title,omitempty"`
// UpdatedAt is unix seconds of the document's last write, and the key the board sorts on, newest first.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ContentBoardItem ContentBoardItem
// NewContentBoardItem instantiates a new ContentBoardItem 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 NewContentBoardItem() *ContentBoardItem {
this := ContentBoardItem{}
return &this
}
// NewContentBoardItemWithDefaults instantiates a new ContentBoardItem 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 NewContentBoardItemWithDefaults() *ContentBoardItem {
this := ContentBoardItem{}
return &this
}
// GetDoctype returns the Doctype field value if set, zero value otherwise.
func (o *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) SetDoctype(v string) {
o.Doctype = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) SetName(v string) {
o.Name = &v
}
// GetProject returns the Project field value if set, zero value otherwise.
func (o *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) SetProject(v string) {
o.Project = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) SetStatus(v string) {
o.Status = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) 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 *ContentBoardItem) SetTitle(v string) {
o.Title = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *ContentBoardItem) GetUpdatedAt() int64 {
if o == nil || IsNil(o.UpdatedAt) {
var ret int64
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ContentBoardItem) GetUpdatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *ContentBoardItem) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field.
func (o *ContentBoardItem) SetUpdatedAt(v int64) {
o.UpdatedAt = &v
}
func (o ContentBoardItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ContentBoardItem) 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.Project) {
toSerialize["project"] = o.Project
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ContentBoardItem) UnmarshalJSON(data []byte) (err error) {
varContentBoardItem := _ContentBoardItem{}
err = json.Unmarshal(data, &varContentBoardItem)
if err != nil {
return err
}
*o = ContentBoardItem(varContentBoardItem)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "doctype")
delete(additionalProperties, "name")
delete(additionalProperties, "project")
delete(additionalProperties, "status")
delete(additionalProperties, "title")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableContentBoardItem struct {
value *ContentBoardItem
isSet bool
}
func (v NullableContentBoardItem) Get() *ContentBoardItem {
return v.value
}
func (v *NullableContentBoardItem) Set(val *ContentBoardItem) {
v.value = val
v.isSet = true
}
func (v NullableContentBoardItem) IsSet() bool {
return v.isSet
}
func (v *NullableContentBoardItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableContentBoardItem(val *ContentBoardItem) *NullableContentBoardItem {
return &NullableContentBoardItem{value: val, isSet: true}
}
func (v NullableContentBoardItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableContentBoardItem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}