mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.0 KiB
Go
345 lines
9.0 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 HelpHelpArticle type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &HelpHelpArticle{}
|
|
|
|
// HelpHelpArticle struct for HelpHelpArticle
|
|
type HelpHelpArticle struct {
|
|
// Body is the article's rich-text content as the author saved it.
|
|
Body *string `json:"body,omitempty"`
|
|
// 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 — the path segment it was addressed 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.
|
|
UpdatedAt *int64 `json:"updatedAt,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _HelpHelpArticle HelpHelpArticle
|
|
|
|
// NewHelpHelpArticle instantiates a new HelpHelpArticle 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 NewHelpHelpArticle() *HelpHelpArticle {
|
|
this := HelpHelpArticle{}
|
|
return &this
|
|
}
|
|
|
|
// NewHelpHelpArticleWithDefaults instantiates a new HelpHelpArticle 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 NewHelpHelpArticleWithDefaults() *HelpHelpArticle {
|
|
this := HelpHelpArticle{}
|
|
return &this
|
|
}
|
|
|
|
// GetBody returns the Body field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) GetBody() string {
|
|
if o == nil || IsNil(o.Body) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Body
|
|
}
|
|
|
|
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *HelpHelpArticle) GetBodyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Body) {
|
|
return nil, false
|
|
}
|
|
return o.Body, true
|
|
}
|
|
|
|
// HasBody returns a boolean if a field has been set.
|
|
func (o *HelpHelpArticle) HasBody() bool {
|
|
if o != nil && !IsNil(o.Body) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBody gets a reference to the given string and assigns it to the Body field.
|
|
func (o *HelpHelpArticle) SetBody(v string) {
|
|
o.Body = &v
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetExcerpt returns the Excerpt field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) SetExcerpt(v string) {
|
|
o.Excerpt = &v
|
|
}
|
|
|
|
// GetSlug returns the Slug field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) SetSlug(v string) {
|
|
o.Slug = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) 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 *HelpHelpArticle) SetUpdatedAt(v int64) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
func (o HelpHelpArticle) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o HelpHelpArticle) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Body) {
|
|
toSerialize["body"] = o.Body
|
|
}
|
|
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 *HelpHelpArticle) UnmarshalJSON(data []byte) (err error) {
|
|
varHelpHelpArticle := _HelpHelpArticle{}
|
|
|
|
err = json.Unmarshal(data, &varHelpHelpArticle)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = HelpHelpArticle(varHelpHelpArticle)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "body")
|
|
delete(additionalProperties, "category")
|
|
delete(additionalProperties, "excerpt")
|
|
delete(additionalProperties, "slug")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "updatedAt")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableHelpHelpArticle struct {
|
|
value *HelpHelpArticle
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableHelpHelpArticle) Get() *HelpHelpArticle {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableHelpHelpArticle) Set(val *HelpHelpArticle) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableHelpHelpArticle) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableHelpHelpArticle) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableHelpHelpArticle(val *HelpHelpArticle) *NullableHelpHelpArticle {
|
|
return &NullableHelpHelpArticle{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableHelpHelpArticle) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableHelpHelpArticle) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|