mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.7 KiB
Go
269 lines
7.7 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 HelpHelpTicketIntake type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &HelpHelpTicketIntake{}
|
|
|
|
// HelpHelpTicketIntake struct for HelpHelpTicketIntake
|
|
type HelpHelpTicketIntake struct {
|
|
// Description is the customer's message. Optional; it becomes the ticket's description AND the opening entry of its conversation thread. Clipped at 16 KiB.
|
|
Description *string `json:"description,omitempty"`
|
|
// Email is how the support team replies. Required; clipped at 320 characters (the RFC 5321 maximum). It is recorded as the ticket's customer, and it is not verified.
|
|
Email *string `json:"email,omitempty"`
|
|
// Priority is Low, Medium, High or Urgent, case-insensitively. Anything else — including omitting it — is recorded as Medium rather than refused.
|
|
Priority *string `json:"priority,omitempty"`
|
|
// Subject is the one-line summary of the problem. Required; longer than 300 characters is clipped rather than refused.
|
|
Subject *string `json:"subject,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _HelpHelpTicketIntake HelpHelpTicketIntake
|
|
|
|
// NewHelpHelpTicketIntake instantiates a new HelpHelpTicketIntake 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 NewHelpHelpTicketIntake() *HelpHelpTicketIntake {
|
|
this := HelpHelpTicketIntake{}
|
|
return &this
|
|
}
|
|
|
|
// NewHelpHelpTicketIntakeWithDefaults instantiates a new HelpHelpTicketIntake 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 NewHelpHelpTicketIntakeWithDefaults() *HelpHelpTicketIntake {
|
|
this := HelpHelpTicketIntake{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *HelpHelpTicketIntake) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *HelpHelpTicketIntake) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *HelpHelpTicketIntake) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *HelpHelpTicketIntake) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetEmail returns the Email field value if set, zero value otherwise.
|
|
func (o *HelpHelpTicketIntake) GetEmail() string {
|
|
if o == nil || IsNil(o.Email) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Email
|
|
}
|
|
|
|
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *HelpHelpTicketIntake) GetEmailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Email) {
|
|
return nil, false
|
|
}
|
|
return o.Email, true
|
|
}
|
|
|
|
// HasEmail returns a boolean if a field has been set.
|
|
func (o *HelpHelpTicketIntake) HasEmail() bool {
|
|
if o != nil && !IsNil(o.Email) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmail gets a reference to the given string and assigns it to the Email field.
|
|
func (o *HelpHelpTicketIntake) SetEmail(v string) {
|
|
o.Email = &v
|
|
}
|
|
|
|
// GetPriority returns the Priority field value if set, zero value otherwise.
|
|
func (o *HelpHelpTicketIntake) GetPriority() string {
|
|
if o == nil || IsNil(o.Priority) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Priority
|
|
}
|
|
|
|
// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *HelpHelpTicketIntake) GetPriorityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Priority) {
|
|
return nil, false
|
|
}
|
|
return o.Priority, true
|
|
}
|
|
|
|
// HasPriority returns a boolean if a field has been set.
|
|
func (o *HelpHelpTicketIntake) HasPriority() bool {
|
|
if o != nil && !IsNil(o.Priority) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPriority gets a reference to the given string and assigns it to the Priority field.
|
|
func (o *HelpHelpTicketIntake) SetPriority(v string) {
|
|
o.Priority = &v
|
|
}
|
|
|
|
// GetSubject returns the Subject field value if set, zero value otherwise.
|
|
func (o *HelpHelpTicketIntake) GetSubject() string {
|
|
if o == nil || IsNil(o.Subject) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Subject
|
|
}
|
|
|
|
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *HelpHelpTicketIntake) GetSubjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Subject) {
|
|
return nil, false
|
|
}
|
|
return o.Subject, true
|
|
}
|
|
|
|
// HasSubject returns a boolean if a field has been set.
|
|
func (o *HelpHelpTicketIntake) HasSubject() bool {
|
|
if o != nil && !IsNil(o.Subject) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubject gets a reference to the given string and assigns it to the Subject field.
|
|
func (o *HelpHelpTicketIntake) SetSubject(v string) {
|
|
o.Subject = &v
|
|
}
|
|
|
|
func (o HelpHelpTicketIntake) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o HelpHelpTicketIntake) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Email) {
|
|
toSerialize["email"] = o.Email
|
|
}
|
|
if !IsNil(o.Priority) {
|
|
toSerialize["priority"] = o.Priority
|
|
}
|
|
if !IsNil(o.Subject) {
|
|
toSerialize["subject"] = o.Subject
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *HelpHelpTicketIntake) UnmarshalJSON(data []byte) (err error) {
|
|
varHelpHelpTicketIntake := _HelpHelpTicketIntake{}
|
|
|
|
err = json.Unmarshal(data, &varHelpHelpTicketIntake)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = HelpHelpTicketIntake(varHelpHelpTicketIntake)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "email")
|
|
delete(additionalProperties, "priority")
|
|
delete(additionalProperties, "subject")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableHelpHelpTicketIntake struct {
|
|
value *HelpHelpTicketIntake
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableHelpHelpTicketIntake) Get() *HelpHelpTicketIntake {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableHelpHelpTicketIntake) Set(val *HelpHelpTicketIntake) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableHelpHelpTicketIntake) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableHelpHelpTicketIntake) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableHelpHelpTicketIntake(val *HelpHelpTicketIntake) *NullableHelpHelpTicketIntake {
|
|
return &NullableHelpHelpTicketIntake{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableHelpHelpTicketIntake) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableHelpHelpTicketIntake) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|