Files
plexgo/plextv/model_get_pin_400_response.go
2023-08-10 21:24:37 -05:00

154 lines
3.9 KiB
Go

/*
Plex-API
An Open API Spec for interacting with Plex.tv
API version: 0.0.3
Contact: Lukeslakemail@gmail.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package plextv
import (
"encoding/json"
)
// checks if the GetPin400Response type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetPin400Response{}
// GetPin400Response struct for GetPin400Response
type GetPin400Response struct {
Errors interface{} `json:"errors,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GetPin400Response GetPin400Response
// NewGetPin400Response instantiates a new GetPin400Response 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 NewGetPin400Response() *GetPin400Response {
this := GetPin400Response{}
return &this
}
// NewGetPin400ResponseWithDefaults instantiates a new GetPin400Response 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 NewGetPin400ResponseWithDefaults() *GetPin400Response {
this := GetPin400Response{}
return &this
}
// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin400Response) GetErrors() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Errors
}
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *GetPin400Response) GetErrorsOk() (*interface{}, bool) {
if o == nil || isNil(o.Errors) {
return nil, false
}
return &o.Errors, true
}
// HasErrors returns a boolean if a field has been set.
func (o *GetPin400Response) HasErrors() bool {
if o != nil && isNil(o.Errors) {
return true
}
return false
}
// SetErrors gets a reference to the given interface{} and assigns it to the Errors field.
func (o *GetPin400Response) SetErrors(v interface{}) {
o.Errors = v
}
func (o GetPin400Response) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetPin400Response) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Errors != nil {
toSerialize["errors"] = o.Errors
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GetPin400Response) UnmarshalJSON(bytes []byte) (err error) {
varGetPin400Response := _GetPin400Response{}
if err = json.Unmarshal(bytes, &varGetPin400Response); err == nil {
*o = GetPin400Response(varGetPin400Response)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "errors")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGetPin400Response struct {
value *GetPin400Response
isSet bool
}
func (v NullableGetPin400Response) Get() *GetPin400Response {
return v.value
}
func (v *NullableGetPin400Response) Set(val *GetPin400Response) {
v.value = val
v.isSet = true
}
func (v NullableGetPin400Response) IsSet() bool {
return v.isSet
}
func (v *NullableGetPin400Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetPin400Response(val *GetPin400Response) *NullableGetPin400Response {
return &NullableGetPin400Response{value: val, isSet: true}
}
func (v NullableGetPin400Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetPin400Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}