mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
154 lines
4.3 KiB
Go
154 lines
4.3 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 GetCompanionsData401Response type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GetCompanionsData401Response{}
|
|
|
|
// GetCompanionsData401Response struct for GetCompanionsData401Response
|
|
type GetCompanionsData401Response struct {
|
|
Errors interface{} `json:"errors,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GetCompanionsData401Response GetCompanionsData401Response
|
|
|
|
// NewGetCompanionsData401Response instantiates a new GetCompanionsData401Response 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 NewGetCompanionsData401Response() *GetCompanionsData401Response {
|
|
this := GetCompanionsData401Response{}
|
|
return &this
|
|
}
|
|
|
|
// NewGetCompanionsData401ResponseWithDefaults instantiates a new GetCompanionsData401Response 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 NewGetCompanionsData401ResponseWithDefaults() *GetCompanionsData401Response {
|
|
this := GetCompanionsData401Response{}
|
|
return &this
|
|
}
|
|
|
|
// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *GetCompanionsData401Response) 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 *GetCompanionsData401Response) 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 *GetCompanionsData401Response) 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 *GetCompanionsData401Response) SetErrors(v interface{}) {
|
|
o.Errors = v
|
|
}
|
|
|
|
func (o GetCompanionsData401Response) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GetCompanionsData401Response) 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 *GetCompanionsData401Response) UnmarshalJSON(bytes []byte) (err error) {
|
|
varGetCompanionsData401Response := _GetCompanionsData401Response{}
|
|
|
|
if err = json.Unmarshal(bytes, &varGetCompanionsData401Response); err == nil {
|
|
*o = GetCompanionsData401Response(varGetCompanionsData401Response)
|
|
}
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "errors")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGetCompanionsData401Response struct {
|
|
value *GetCompanionsData401Response
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGetCompanionsData401Response) Get() *GetCompanionsData401Response {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGetCompanionsData401Response) Set(val *GetCompanionsData401Response) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGetCompanionsData401Response) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGetCompanionsData401Response) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGetCompanionsData401Response(val *GetCompanionsData401Response) *NullableGetCompanionsData401Response {
|
|
return &NullableGetCompanionsData401Response{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGetCompanionsData401Response) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGetCompanionsData401Response) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|