Files
sdk/model_help_help_article_card.go

307 lines
8.3 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 HelpHelpArticleCard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HelpHelpArticleCard{}
// HelpHelpArticleCard struct for HelpHelpArticleCard
type HelpHelpArticleCard struct {
// Category is the name of the knowledge-base section the article sits in, or empty when it is filed under none.
Category *string `json:"category,omitempty"`
// Excerpt is the short summary the author wrote for listings, or empty.
Excerpt *string `json:"excerpt,omitempty"`
// Slug is the article's stable public identifier and the path segment /v1/help/articles/{slug} addresses it by.
Slug *string `json:"slug,omitempty"`
// Title is the article's headline.
Title *string `json:"title,omitempty"`
// UpdatedAt is the unix second the article was last written, in the help center's own store.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _HelpHelpArticleCard HelpHelpArticleCard
// NewHelpHelpArticleCard instantiates a new HelpHelpArticleCard 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 NewHelpHelpArticleCard() *HelpHelpArticleCard {
this := HelpHelpArticleCard{}
return &this
}
// NewHelpHelpArticleCardWithDefaults instantiates a new HelpHelpArticleCard 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 NewHelpHelpArticleCardWithDefaults() *HelpHelpArticleCard {
this := HelpHelpArticleCard{}
return &this
}
// GetCategory returns the Category field value if set, zero value otherwise.
func (o *HelpHelpArticleCard) GetCategory() string {
if o == nil || IsNil(o.Category) {
var ret string
return ret
}
return *o.Category
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HelpHelpArticleCard) GetCategoryOk() (*string, bool) {
if o == nil || IsNil(o.Category) {
return nil, false
}
return o.Category, true
}
// HasCategory returns a boolean if a field has been set.
func (o *HelpHelpArticleCard) HasCategory() bool {
if o != nil && !IsNil(o.Category) {
return true
}
return false
}
// SetCategory gets a reference to the given string and assigns it to the Category field.
func (o *HelpHelpArticleCard) SetCategory(v string) {
o.Category = &v
}
// GetExcerpt returns the Excerpt field value if set, zero value otherwise.
func (o *HelpHelpArticleCard) GetExcerpt() string {
if o == nil || IsNil(o.Excerpt) {
var ret string
return ret
}
return *o.Excerpt
}
// GetExcerptOk returns a tuple with the Excerpt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HelpHelpArticleCard) GetExcerptOk() (*string, bool) {
if o == nil || IsNil(o.Excerpt) {
return nil, false
}
return o.Excerpt, true
}
// HasExcerpt returns a boolean if a field has been set.
func (o *HelpHelpArticleCard) HasExcerpt() bool {
if o != nil && !IsNil(o.Excerpt) {
return true
}
return false
}
// SetExcerpt gets a reference to the given string and assigns it to the Excerpt field.
func (o *HelpHelpArticleCard) SetExcerpt(v string) {
o.Excerpt = &v
}
// GetSlug returns the Slug field value if set, zero value otherwise.
func (o *HelpHelpArticleCard) GetSlug() string {
if o == nil || IsNil(o.Slug) {
var ret string
return ret
}
return *o.Slug
}
// GetSlugOk returns a tuple with the Slug field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HelpHelpArticleCard) GetSlugOk() (*string, bool) {
if o == nil || IsNil(o.Slug) {
return nil, false
}
return o.Slug, true
}
// HasSlug returns a boolean if a field has been set.
func (o *HelpHelpArticleCard) HasSlug() bool {
if o != nil && !IsNil(o.Slug) {
return true
}
return false
}
// SetSlug gets a reference to the given string and assigns it to the Slug field.
func (o *HelpHelpArticleCard) SetSlug(v string) {
o.Slug = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *HelpHelpArticleCard) 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 *HelpHelpArticleCard) 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 *HelpHelpArticleCard) 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 *HelpHelpArticleCard) SetTitle(v string) {
o.Title = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *HelpHelpArticleCard) 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 *HelpHelpArticleCard) 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 *HelpHelpArticleCard) 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 *HelpHelpArticleCard) SetUpdatedAt(v int64) {
o.UpdatedAt = &v
}
func (o HelpHelpArticleCard) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o HelpHelpArticleCard) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Category) {
toSerialize["category"] = o.Category
}
if !IsNil(o.Excerpt) {
toSerialize["excerpt"] = o.Excerpt
}
if !IsNil(o.Slug) {
toSerialize["slug"] = o.Slug
}
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 *HelpHelpArticleCard) UnmarshalJSON(data []byte) (err error) {
varHelpHelpArticleCard := _HelpHelpArticleCard{}
err = json.Unmarshal(data, &varHelpHelpArticleCard)
if err != nil {
return err
}
*o = HelpHelpArticleCard(varHelpHelpArticleCard)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "category")
delete(additionalProperties, "excerpt")
delete(additionalProperties, "slug")
delete(additionalProperties, "title")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableHelpHelpArticleCard struct {
value *HelpHelpArticleCard
isSet bool
}
func (v NullableHelpHelpArticleCard) Get() *HelpHelpArticleCard {
return v.value
}
func (v *NullableHelpHelpArticleCard) Set(val *HelpHelpArticleCard) {
v.value = val
v.isSet = true
}
func (v NullableHelpHelpArticleCard) IsSet() bool {
return v.isSet
}
func (v *NullableHelpHelpArticleCard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHelpHelpArticleCard(val *HelpHelpArticleCard) *NullableHelpHelpArticleCard {
return &NullableHelpHelpArticleCard{value: val, isSet: true}
}
func (v NullableHelpHelpArticleCard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHelpHelpArticleCard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}