// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package operations

import (
	"github.com/LukeHagar/plexgo/internal/utils"
	"github.com/LukeHagar/plexgo/models/components"
	"net/http"
)

type EditSubscriptionPreferencesGlobals struct {
	// Indicates the client accepts the indicated media types
	Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
	// An opaque identifier unique to the client
	ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
	// The name of the client product
	Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
	// The version of the client application
	Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
	// The platform of the client
	Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
	// The version of the platform
	PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
	// A relatively friendly name for the client device
	Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
	// A potentially less friendly identifier for the device model
	Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
	// The device vendor
	DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
	// A friendly name for the client
	DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
	// The marketplace on which the client application is distributed
	Marketplace *string `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
}

func (e EditSubscriptionPreferencesGlobals) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(e, "", false)
}

func (e *EditSubscriptionPreferencesGlobals) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil {
		return err
	}
	return nil
}

func (e *EditSubscriptionPreferencesGlobals) GetAccepts() *components.Accepts {
	if e == nil {
		return nil
	}
	return e.Accepts
}

func (e *EditSubscriptionPreferencesGlobals) GetClientIdentifier() *string {
	if e == nil {
		return nil
	}
	return e.ClientIdentifier
}

func (e *EditSubscriptionPreferencesGlobals) GetProduct() *string {
	if e == nil {
		return nil
	}
	return e.Product
}

func (e *EditSubscriptionPreferencesGlobals) GetVersion() *string {
	if e == nil {
		return nil
	}
	return e.Version
}

func (e *EditSubscriptionPreferencesGlobals) GetPlatform() *string {
	if e == nil {
		return nil
	}
	return e.Platform
}

func (e *EditSubscriptionPreferencesGlobals) GetPlatformVersion() *string {
	if e == nil {
		return nil
	}
	return e.PlatformVersion
}

func (e *EditSubscriptionPreferencesGlobals) GetDevice() *string {
	if e == nil {
		return nil
	}
	return e.Device
}

func (e *EditSubscriptionPreferencesGlobals) GetModel() *string {
	if e == nil {
		return nil
	}
	return e.Model
}

func (e *EditSubscriptionPreferencesGlobals) GetDeviceVendor() *string {
	if e == nil {
		return nil
	}
	return e.DeviceVendor
}

func (e *EditSubscriptionPreferencesGlobals) GetDeviceName() *string {
	if e == nil {
		return nil
	}
	return e.DeviceName
}

func (e *EditSubscriptionPreferencesGlobals) GetMarketplace() *string {
	if e == nil {
		return nil
	}
	return e.Marketplace
}

type EditSubscriptionPreferencesQueryParamPrefs struct {
}

type EditSubscriptionPreferencesRequest struct {
	// Indicates the client accepts the indicated media types
	Accepts *components.Accepts `default:"application/xml" header:"style=simple,explode=false,name=accepts"`
	// An opaque identifier unique to the client
	ClientIdentifier *string `header:"style=simple,explode=false,name=X-Plex-Client-Identifier"`
	// The name of the client product
	Product *string `header:"style=simple,explode=false,name=X-Plex-Product"`
	// The version of the client application
	Version *string `header:"style=simple,explode=false,name=X-Plex-Version"`
	// The platform of the client
	Platform *string `header:"style=simple,explode=false,name=X-Plex-Platform"`
	// The version of the platform
	PlatformVersion *string `header:"style=simple,explode=false,name=X-Plex-Platform-Version"`
	// A relatively friendly name for the client device
	Device *string `header:"style=simple,explode=false,name=X-Plex-Device"`
	// A potentially less friendly identifier for the device model
	Model *string `header:"style=simple,explode=false,name=X-Plex-Model"`
	// The device vendor
	DeviceVendor *string `header:"style=simple,explode=false,name=X-Plex-Device-Vendor"`
	// A friendly name for the client
	DeviceName *string `header:"style=simple,explode=false,name=X-Plex-Device-Name"`
	// The marketplace on which the client application is distributed
	Marketplace    *string                                     `header:"style=simple,explode=false,name=X-Plex-Marketplace"`
	SubscriptionID int64                                       `pathParam:"style=simple,explode=false,name=subscriptionId"`
	Prefs          *EditSubscriptionPreferencesQueryParamPrefs `queryParam:"style=deepObject,explode=true,name=prefs"`
}

func (e EditSubscriptionPreferencesRequest) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(e, "", false)
}

func (e *EditSubscriptionPreferencesRequest) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &e, "", false, []string{"subscriptionId"}); err != nil {
		return err
	}
	return nil
}

func (e *EditSubscriptionPreferencesRequest) GetAccepts() *components.Accepts {
	if e == nil {
		return nil
	}
	return e.Accepts
}

func (e *EditSubscriptionPreferencesRequest) GetClientIdentifier() *string {
	if e == nil {
		return nil
	}
	return e.ClientIdentifier
}

func (e *EditSubscriptionPreferencesRequest) GetProduct() *string {
	if e == nil {
		return nil
	}
	return e.Product
}

func (e *EditSubscriptionPreferencesRequest) GetVersion() *string {
	if e == nil {
		return nil
	}
	return e.Version
}

func (e *EditSubscriptionPreferencesRequest) GetPlatform() *string {
	if e == nil {
		return nil
	}
	return e.Platform
}

func (e *EditSubscriptionPreferencesRequest) GetPlatformVersion() *string {
	if e == nil {
		return nil
	}
	return e.PlatformVersion
}

func (e *EditSubscriptionPreferencesRequest) GetDevice() *string {
	if e == nil {
		return nil
	}
	return e.Device
}

func (e *EditSubscriptionPreferencesRequest) GetModel() *string {
	if e == nil {
		return nil
	}
	return e.Model
}

func (e *EditSubscriptionPreferencesRequest) GetDeviceVendor() *string {
	if e == nil {
		return nil
	}
	return e.DeviceVendor
}

func (e *EditSubscriptionPreferencesRequest) GetDeviceName() *string {
	if e == nil {
		return nil
	}
	return e.DeviceName
}

func (e *EditSubscriptionPreferencesRequest) GetMarketplace() *string {
	if e == nil {
		return nil
	}
	return e.Marketplace
}

func (e *EditSubscriptionPreferencesRequest) GetSubscriptionID() int64 {
	if e == nil {
		return 0
	}
	return e.SubscriptionID
}

func (e *EditSubscriptionPreferencesRequest) GetPrefs() *EditSubscriptionPreferencesQueryParamPrefs {
	if e == nil {
		return nil
	}
	return e.Prefs
}

type EditSubscriptionPreferencesResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
	// OK
	MediaContainerWithSubscription *components.MediaContainerWithSubscription
}

func (e *EditSubscriptionPreferencesResponse) GetContentType() string {
	if e == nil {
		return ""
	}
	return e.ContentType
}

func (e *EditSubscriptionPreferencesResponse) GetStatusCode() int {
	if e == nil {
		return 0
	}
	return e.StatusCode
}

func (e *EditSubscriptionPreferencesResponse) GetRawResponse() *http.Response {
	if e == nil {
		return nil
	}
	return e.RawResponse
}

func (e *EditSubscriptionPreferencesResponse) GetMediaContainerWithSubscription() *components.MediaContainerWithSubscription {
	if e == nil {
		return nil
	}
	return e.MediaContainerWithSubscription
}
