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

344 lines
12 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 GetUserOptOutSettings200Response type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetUserOptOutSettings200Response{}
// GetUserOptOutSettings200Response struct for GetUserOptOutSettings200Response
type GetUserOptOutSettings200Response struct {
TvPlexProviderPodcasts interface{} `json:"tv.plex.provider.podcasts,omitempty"`
TvPlexProviderNews interface{} `json:"tv.plex.provider.news,omitempty"`
TvPlexProviderWebshows interface{} `json:"tv.plex.provider.webshows,omitempty"`
TvPlexProviderMusic interface{} `json:"tv.plex.provider.music,omitempty"`
TvPlexProviderVod interface{} `json:"tv.plex.provider.vod,omitempty"`
Scrobbling interface{} `json:"scrobbling,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GetUserOptOutSettings200Response GetUserOptOutSettings200Response
// NewGetUserOptOutSettings200Response instantiates a new GetUserOptOutSettings200Response 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 NewGetUserOptOutSettings200Response() *GetUserOptOutSettings200Response {
this := GetUserOptOutSettings200Response{}
return &this
}
// NewGetUserOptOutSettings200ResponseWithDefaults instantiates a new GetUserOptOutSettings200Response 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 NewGetUserOptOutSettings200ResponseWithDefaults() *GetUserOptOutSettings200Response {
this := GetUserOptOutSettings200Response{}
return &this
}
// GetTvPlexProviderPodcasts returns the TvPlexProviderPodcasts field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetTvPlexProviderPodcasts() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TvPlexProviderPodcasts
}
// GetTvPlexProviderPodcastsOk returns a tuple with the TvPlexProviderPodcasts 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 *GetUserOptOutSettings200Response) GetTvPlexProviderPodcastsOk() (*interface{}, bool) {
if o == nil || isNil(o.TvPlexProviderPodcasts) {
return nil, false
}
return &o.TvPlexProviderPodcasts, true
}
// HasTvPlexProviderPodcasts returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasTvPlexProviderPodcasts() bool {
if o != nil && isNil(o.TvPlexProviderPodcasts) {
return true
}
return false
}
// SetTvPlexProviderPodcasts gets a reference to the given interface{} and assigns it to the TvPlexProviderPodcasts field.
func (o *GetUserOptOutSettings200Response) SetTvPlexProviderPodcasts(v interface{}) {
o.TvPlexProviderPodcasts = v
}
// GetTvPlexProviderNews returns the TvPlexProviderNews field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetTvPlexProviderNews() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TvPlexProviderNews
}
// GetTvPlexProviderNewsOk returns a tuple with the TvPlexProviderNews 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 *GetUserOptOutSettings200Response) GetTvPlexProviderNewsOk() (*interface{}, bool) {
if o == nil || isNil(o.TvPlexProviderNews) {
return nil, false
}
return &o.TvPlexProviderNews, true
}
// HasTvPlexProviderNews returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasTvPlexProviderNews() bool {
if o != nil && isNil(o.TvPlexProviderNews) {
return true
}
return false
}
// SetTvPlexProviderNews gets a reference to the given interface{} and assigns it to the TvPlexProviderNews field.
func (o *GetUserOptOutSettings200Response) SetTvPlexProviderNews(v interface{}) {
o.TvPlexProviderNews = v
}
// GetTvPlexProviderWebshows returns the TvPlexProviderWebshows field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetTvPlexProviderWebshows() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TvPlexProviderWebshows
}
// GetTvPlexProviderWebshowsOk returns a tuple with the TvPlexProviderWebshows 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 *GetUserOptOutSettings200Response) GetTvPlexProviderWebshowsOk() (*interface{}, bool) {
if o == nil || isNil(o.TvPlexProviderWebshows) {
return nil, false
}
return &o.TvPlexProviderWebshows, true
}
// HasTvPlexProviderWebshows returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasTvPlexProviderWebshows() bool {
if o != nil && isNil(o.TvPlexProviderWebshows) {
return true
}
return false
}
// SetTvPlexProviderWebshows gets a reference to the given interface{} and assigns it to the TvPlexProviderWebshows field.
func (o *GetUserOptOutSettings200Response) SetTvPlexProviderWebshows(v interface{}) {
o.TvPlexProviderWebshows = v
}
// GetTvPlexProviderMusic returns the TvPlexProviderMusic field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetTvPlexProviderMusic() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TvPlexProviderMusic
}
// GetTvPlexProviderMusicOk returns a tuple with the TvPlexProviderMusic 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 *GetUserOptOutSettings200Response) GetTvPlexProviderMusicOk() (*interface{}, bool) {
if o == nil || isNil(o.TvPlexProviderMusic) {
return nil, false
}
return &o.TvPlexProviderMusic, true
}
// HasTvPlexProviderMusic returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasTvPlexProviderMusic() bool {
if o != nil && isNil(o.TvPlexProviderMusic) {
return true
}
return false
}
// SetTvPlexProviderMusic gets a reference to the given interface{} and assigns it to the TvPlexProviderMusic field.
func (o *GetUserOptOutSettings200Response) SetTvPlexProviderMusic(v interface{}) {
o.TvPlexProviderMusic = v
}
// GetTvPlexProviderVod returns the TvPlexProviderVod field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetTvPlexProviderVod() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.TvPlexProviderVod
}
// GetTvPlexProviderVodOk returns a tuple with the TvPlexProviderVod 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 *GetUserOptOutSettings200Response) GetTvPlexProviderVodOk() (*interface{}, bool) {
if o == nil || isNil(o.TvPlexProviderVod) {
return nil, false
}
return &o.TvPlexProviderVod, true
}
// HasTvPlexProviderVod returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasTvPlexProviderVod() bool {
if o != nil && isNil(o.TvPlexProviderVod) {
return true
}
return false
}
// SetTvPlexProviderVod gets a reference to the given interface{} and assigns it to the TvPlexProviderVod field.
func (o *GetUserOptOutSettings200Response) SetTvPlexProviderVod(v interface{}) {
o.TvPlexProviderVod = v
}
// GetScrobbling returns the Scrobbling field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetUserOptOutSettings200Response) GetScrobbling() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Scrobbling
}
// GetScrobblingOk returns a tuple with the Scrobbling 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 *GetUserOptOutSettings200Response) GetScrobblingOk() (*interface{}, bool) {
if o == nil || isNil(o.Scrobbling) {
return nil, false
}
return &o.Scrobbling, true
}
// HasScrobbling returns a boolean if a field has been set.
func (o *GetUserOptOutSettings200Response) HasScrobbling() bool {
if o != nil && isNil(o.Scrobbling) {
return true
}
return false
}
// SetScrobbling gets a reference to the given interface{} and assigns it to the Scrobbling field.
func (o *GetUserOptOutSettings200Response) SetScrobbling(v interface{}) {
o.Scrobbling = v
}
func (o GetUserOptOutSettings200Response) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetUserOptOutSettings200Response) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.TvPlexProviderPodcasts != nil {
toSerialize["tv.plex.provider.podcasts"] = o.TvPlexProviderPodcasts
}
if o.TvPlexProviderNews != nil {
toSerialize["tv.plex.provider.news"] = o.TvPlexProviderNews
}
if o.TvPlexProviderWebshows != nil {
toSerialize["tv.plex.provider.webshows"] = o.TvPlexProviderWebshows
}
if o.TvPlexProviderMusic != nil {
toSerialize["tv.plex.provider.music"] = o.TvPlexProviderMusic
}
if o.TvPlexProviderVod != nil {
toSerialize["tv.plex.provider.vod"] = o.TvPlexProviderVod
}
if o.Scrobbling != nil {
toSerialize["scrobbling"] = o.Scrobbling
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GetUserOptOutSettings200Response) UnmarshalJSON(bytes []byte) (err error) {
varGetUserOptOutSettings200Response := _GetUserOptOutSettings200Response{}
if err = json.Unmarshal(bytes, &varGetUserOptOutSettings200Response); err == nil {
*o = GetUserOptOutSettings200Response(varGetUserOptOutSettings200Response)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "tv.plex.provider.podcasts")
delete(additionalProperties, "tv.plex.provider.news")
delete(additionalProperties, "tv.plex.provider.webshows")
delete(additionalProperties, "tv.plex.provider.music")
delete(additionalProperties, "tv.plex.provider.vod")
delete(additionalProperties, "scrobbling")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGetUserOptOutSettings200Response struct {
value *GetUserOptOutSettings200Response
isSet bool
}
func (v NullableGetUserOptOutSettings200Response) Get() *GetUserOptOutSettings200Response {
return v.value
}
func (v *NullableGetUserOptOutSettings200Response) Set(val *GetUserOptOutSettings200Response) {
v.value = val
v.isSet = true
}
func (v NullableGetUserOptOutSettings200Response) IsSet() bool {
return v.isSet
}
func (v *NullableGetUserOptOutSettings200Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetUserOptOutSettings200Response(val *GetUserOptOutSettings200Response) *NullableGetUserOptOutSettings200Response {
return &NullableGetUserOptOutSettings200Response{value: val, isSet: true}
}
func (v NullableGetUserOptOutSettings200Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetUserOptOutSettings200Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}