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

496 lines
15 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 GetPin200ResponseLocation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetPin200ResponseLocation{}
// GetPin200ResponseLocation struct for GetPin200ResponseLocation
type GetPin200ResponseLocation struct {
Code interface{} `json:"code,omitempty"`
EuropeanUnionMember interface{} `json:"european_union_member,omitempty"`
ContinentCode interface{} `json:"continent_code,omitempty"`
Country interface{} `json:"country,omitempty"`
City interface{} `json:"city,omitempty"`
TimeZone interface{} `json:"time_zone,omitempty"`
PostalCode interface{} `json:"postal_code,omitempty"`
InPrivacyRestrictedCountry interface{} `json:"in_privacy_restricted_country,omitempty"`
Subdivisions interface{} `json:"subdivisions,omitempty"`
Coordinates interface{} `json:"coordinates,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GetPin200ResponseLocation GetPin200ResponseLocation
// NewGetPin200ResponseLocation instantiates a new GetPin200ResponseLocation 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 NewGetPin200ResponseLocation() *GetPin200ResponseLocation {
this := GetPin200ResponseLocation{}
return &this
}
// NewGetPin200ResponseLocationWithDefaults instantiates a new GetPin200ResponseLocation 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 NewGetPin200ResponseLocationWithDefaults() *GetPin200ResponseLocation {
this := GetPin200ResponseLocation{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetCode() interface{} {
if o == nil {
var ret interface{}
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *GetPin200ResponseLocation) GetCodeOk() (*interface{}, 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 *GetPin200ResponseLocation) HasCode() bool {
if o != nil && isNil(o.Code) {
return true
}
return false
}
// SetCode gets a reference to the given interface{} and assigns it to the Code field.
func (o *GetPin200ResponseLocation) SetCode(v interface{}) {
o.Code = v
}
// GetEuropeanUnionMember returns the EuropeanUnionMember field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetEuropeanUnionMember() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.EuropeanUnionMember
}
// GetEuropeanUnionMemberOk returns a tuple with the EuropeanUnionMember 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 *GetPin200ResponseLocation) GetEuropeanUnionMemberOk() (*interface{}, bool) {
if o == nil || isNil(o.EuropeanUnionMember) {
return nil, false
}
return &o.EuropeanUnionMember, true
}
// HasEuropeanUnionMember returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasEuropeanUnionMember() bool {
if o != nil && isNil(o.EuropeanUnionMember) {
return true
}
return false
}
// SetEuropeanUnionMember gets a reference to the given interface{} and assigns it to the EuropeanUnionMember field.
func (o *GetPin200ResponseLocation) SetEuropeanUnionMember(v interface{}) {
o.EuropeanUnionMember = v
}
// GetContinentCode returns the ContinentCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetContinentCode() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.ContinentCode
}
// GetContinentCodeOk returns a tuple with the ContinentCode 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 *GetPin200ResponseLocation) GetContinentCodeOk() (*interface{}, bool) {
if o == nil || isNil(o.ContinentCode) {
return nil, false
}
return &o.ContinentCode, true
}
// HasContinentCode returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasContinentCode() bool {
if o != nil && isNil(o.ContinentCode) {
return true
}
return false
}
// SetContinentCode gets a reference to the given interface{} and assigns it to the ContinentCode field.
func (o *GetPin200ResponseLocation) SetContinentCode(v interface{}) {
o.ContinentCode = v
}
// GetCountry returns the Country field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetCountry() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Country
}
// GetCountryOk returns a tuple with the Country 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 *GetPin200ResponseLocation) GetCountryOk() (*interface{}, bool) {
if o == nil || isNil(o.Country) {
return nil, false
}
return &o.Country, true
}
// HasCountry returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasCountry() bool {
if o != nil && isNil(o.Country) {
return true
}
return false
}
// SetCountry gets a reference to the given interface{} and assigns it to the Country field.
func (o *GetPin200ResponseLocation) SetCountry(v interface{}) {
o.Country = v
}
// GetCity returns the City field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetCity() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.City
}
// GetCityOk returns a tuple with the City 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 *GetPin200ResponseLocation) GetCityOk() (*interface{}, bool) {
if o == nil || isNil(o.City) {
return nil, false
}
return &o.City, true
}
// HasCity returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasCity() bool {
if o != nil && isNil(o.City) {
return true
}
return false
}
// SetCity gets a reference to the given interface{} and assigns it to the City field.
func (o *GetPin200ResponseLocation) SetCity(v interface{}) {
o.City = v
}
// GetTimeZone returns the TimeZone field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetTimeZone() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TimeZone
}
// GetTimeZoneOk returns a tuple with the TimeZone 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 *GetPin200ResponseLocation) GetTimeZoneOk() (*interface{}, bool) {
if o == nil || isNil(o.TimeZone) {
return nil, false
}
return &o.TimeZone, true
}
// HasTimeZone returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasTimeZone() bool {
if o != nil && isNil(o.TimeZone) {
return true
}
return false
}
// SetTimeZone gets a reference to the given interface{} and assigns it to the TimeZone field.
func (o *GetPin200ResponseLocation) SetTimeZone(v interface{}) {
o.TimeZone = v
}
// GetPostalCode returns the PostalCode field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetPostalCode() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.PostalCode
}
// GetPostalCodeOk returns a tuple with the PostalCode 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 *GetPin200ResponseLocation) GetPostalCodeOk() (*interface{}, bool) {
if o == nil || isNil(o.PostalCode) {
return nil, false
}
return &o.PostalCode, true
}
// HasPostalCode returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasPostalCode() bool {
if o != nil && isNil(o.PostalCode) {
return true
}
return false
}
// SetPostalCode gets a reference to the given interface{} and assigns it to the PostalCode field.
func (o *GetPin200ResponseLocation) SetPostalCode(v interface{}) {
o.PostalCode = v
}
// GetInPrivacyRestrictedCountry returns the InPrivacyRestrictedCountry field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetInPrivacyRestrictedCountry() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.InPrivacyRestrictedCountry
}
// GetInPrivacyRestrictedCountryOk returns a tuple with the InPrivacyRestrictedCountry 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 *GetPin200ResponseLocation) GetInPrivacyRestrictedCountryOk() (*interface{}, bool) {
if o == nil || isNil(o.InPrivacyRestrictedCountry) {
return nil, false
}
return &o.InPrivacyRestrictedCountry, true
}
// HasInPrivacyRestrictedCountry returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasInPrivacyRestrictedCountry() bool {
if o != nil && isNil(o.InPrivacyRestrictedCountry) {
return true
}
return false
}
// SetInPrivacyRestrictedCountry gets a reference to the given interface{} and assigns it to the InPrivacyRestrictedCountry field.
func (o *GetPin200ResponseLocation) SetInPrivacyRestrictedCountry(v interface{}) {
o.InPrivacyRestrictedCountry = v
}
// GetSubdivisions returns the Subdivisions field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetSubdivisions() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Subdivisions
}
// GetSubdivisionsOk returns a tuple with the Subdivisions 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 *GetPin200ResponseLocation) GetSubdivisionsOk() (*interface{}, bool) {
if o == nil || isNil(o.Subdivisions) {
return nil, false
}
return &o.Subdivisions, true
}
// HasSubdivisions returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasSubdivisions() bool {
if o != nil && isNil(o.Subdivisions) {
return true
}
return false
}
// SetSubdivisions gets a reference to the given interface{} and assigns it to the Subdivisions field.
func (o *GetPin200ResponseLocation) SetSubdivisions(v interface{}) {
o.Subdivisions = v
}
// GetCoordinates returns the Coordinates field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetPin200ResponseLocation) GetCoordinates() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Coordinates
}
// GetCoordinatesOk returns a tuple with the Coordinates 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 *GetPin200ResponseLocation) GetCoordinatesOk() (*interface{}, bool) {
if o == nil || isNil(o.Coordinates) {
return nil, false
}
return &o.Coordinates, true
}
// HasCoordinates returns a boolean if a field has been set.
func (o *GetPin200ResponseLocation) HasCoordinates() bool {
if o != nil && isNil(o.Coordinates) {
return true
}
return false
}
// SetCoordinates gets a reference to the given interface{} and assigns it to the Coordinates field.
func (o *GetPin200ResponseLocation) SetCoordinates(v interface{}) {
o.Coordinates = v
}
func (o GetPin200ResponseLocation) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetPin200ResponseLocation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Code != nil {
toSerialize["code"] = o.Code
}
if o.EuropeanUnionMember != nil {
toSerialize["european_union_member"] = o.EuropeanUnionMember
}
if o.ContinentCode != nil {
toSerialize["continent_code"] = o.ContinentCode
}
if o.Country != nil {
toSerialize["country"] = o.Country
}
if o.City != nil {
toSerialize["city"] = o.City
}
if o.TimeZone != nil {
toSerialize["time_zone"] = o.TimeZone
}
if o.PostalCode != nil {
toSerialize["postal_code"] = o.PostalCode
}
if o.InPrivacyRestrictedCountry != nil {
toSerialize["in_privacy_restricted_country"] = o.InPrivacyRestrictedCountry
}
if o.Subdivisions != nil {
toSerialize["subdivisions"] = o.Subdivisions
}
if o.Coordinates != nil {
toSerialize["coordinates"] = o.Coordinates
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GetPin200ResponseLocation) UnmarshalJSON(bytes []byte) (err error) {
varGetPin200ResponseLocation := _GetPin200ResponseLocation{}
if err = json.Unmarshal(bytes, &varGetPin200ResponseLocation); err == nil {
*o = GetPin200ResponseLocation(varGetPin200ResponseLocation)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "code")
delete(additionalProperties, "european_union_member")
delete(additionalProperties, "continent_code")
delete(additionalProperties, "country")
delete(additionalProperties, "city")
delete(additionalProperties, "time_zone")
delete(additionalProperties, "postal_code")
delete(additionalProperties, "in_privacy_restricted_country")
delete(additionalProperties, "subdivisions")
delete(additionalProperties, "coordinates")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGetPin200ResponseLocation struct {
value *GetPin200ResponseLocation
isSet bool
}
func (v NullableGetPin200ResponseLocation) Get() *GetPin200ResponseLocation {
return v.value
}
func (v *NullableGetPin200ResponseLocation) Set(val *GetPin200ResponseLocation) {
v.value = val
v.isSet = true
}
func (v NullableGetPin200ResponseLocation) IsSet() bool {
return v.isSet
}
func (v *NullableGetPin200ResponseLocation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetPin200ResponseLocation(val *GetPin200ResponseLocation) *NullableGetPin200ResponseLocation {
return &NullableGetPin200ResponseLocation{value: val, isSet: true}
}
func (v NullableGetPin200ResponseLocation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetPin200ResponseLocation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}