Files
sdk/model_studio_problem.go

302 lines
7.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 StudioProblem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StudioProblem{}
// StudioProblem struct for StudioProblem
type StudioProblem struct {
Code *string `json:"code,omitempty"`
Detail *string `json:"detail,omitempty"`
Status *int64 `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StudioProblem StudioProblem
// NewStudioProblem instantiates a new StudioProblem 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 NewStudioProblem() *StudioProblem {
this := StudioProblem{}
return &this
}
// NewStudioProblemWithDefaults instantiates a new StudioProblem 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 NewStudioProblemWithDefaults() *StudioProblem {
this := StudioProblem{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *StudioProblem) GetCode() string {
if o == nil || IsNil(o.Code) {
var ret string
return ret
}
return *o.Code
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioProblem) GetCodeOk() (*string, bool) {
if o == nil || IsNil(o.Code) {
return nil, false
}
return o.Code, true
}
// HasCode returns a boolean if a field has been set.
func (o *StudioProblem) HasCode() bool {
if o != nil && !IsNil(o.Code) {
return true
}
return false
}
// SetCode gets a reference to the given string and assigns it to the Code field.
func (o *StudioProblem) SetCode(v string) {
o.Code = &v
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *StudioProblem) GetDetail() string {
if o == nil || IsNil(o.Detail) {
var ret string
return ret
}
return *o.Detail
}
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioProblem) GetDetailOk() (*string, bool) {
if o == nil || IsNil(o.Detail) {
return nil, false
}
return o.Detail, true
}
// HasDetail returns a boolean if a field has been set.
func (o *StudioProblem) HasDetail() bool {
if o != nil && !IsNil(o.Detail) {
return true
}
return false
}
// SetDetail gets a reference to the given string and assigns it to the Detail field.
func (o *StudioProblem) SetDetail(v string) {
o.Detail = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *StudioProblem) GetStatus() int64 {
if o == nil || IsNil(o.Status) {
var ret int64
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 *StudioProblem) GetStatusOk() (*int64, 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 *StudioProblem) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given int64 and assigns it to the Status field.
func (o *StudioProblem) SetStatus(v int64) {
o.Status = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *StudioProblem) 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 *StudioProblem) 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 *StudioProblem) 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 *StudioProblem) SetTitle(v string) {
o.Title = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *StudioProblem) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioProblem) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *StudioProblem) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *StudioProblem) SetType(v string) {
o.Type = &v
}
func (o StudioProblem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StudioProblem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Code) {
toSerialize["code"] = o.Code
}
if !IsNil(o.Detail) {
toSerialize["detail"] = o.Detail
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StudioProblem) UnmarshalJSON(data []byte) (err error) {
varStudioProblem := _StudioProblem{}
err = json.Unmarshal(data, &varStudioProblem)
if err != nil {
return err
}
*o = StudioProblem(varStudioProblem)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "code")
delete(additionalProperties, "detail")
delete(additionalProperties, "status")
delete(additionalProperties, "title")
delete(additionalProperties, "type")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStudioProblem struct {
value *StudioProblem
isSet bool
}
func (v NullableStudioProblem) Get() *StudioProblem {
return v.value
}
func (v *NullableStudioProblem) Set(val *StudioProblem) {
v.value = val
v.isSet = true
}
func (v NullableStudioProblem) IsSet() bool {
return v.isSet
}
func (v *NullableStudioProblem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStudioProblem(val *StudioProblem) *NullableStudioProblem {
return &NullableStudioProblem{value: val, isSet: true}
}
func (v NullableStudioProblem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStudioProblem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}