// 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 CreateSubscriptionGlobals 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 (c CreateSubscriptionGlobals) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(c, "", false)
}

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

func (c *CreateSubscriptionGlobals) GetAccepts() *components.Accepts {
	if c == nil {
		return nil
	}
	return c.Accepts
}

func (c *CreateSubscriptionGlobals) GetClientIdentifier() *string {
	if c == nil {
		return nil
	}
	return c.ClientIdentifier
}

func (c *CreateSubscriptionGlobals) GetProduct() *string {
	if c == nil {
		return nil
	}
	return c.Product
}

func (c *CreateSubscriptionGlobals) GetVersion() *string {
	if c == nil {
		return nil
	}
	return c.Version
}

func (c *CreateSubscriptionGlobals) GetPlatform() *string {
	if c == nil {
		return nil
	}
	return c.Platform
}

func (c *CreateSubscriptionGlobals) GetPlatformVersion() *string {
	if c == nil {
		return nil
	}
	return c.PlatformVersion
}

func (c *CreateSubscriptionGlobals) GetDevice() *string {
	if c == nil {
		return nil
	}
	return c.Device
}

func (c *CreateSubscriptionGlobals) GetModel() *string {
	if c == nil {
		return nil
	}
	return c.Model
}

func (c *CreateSubscriptionGlobals) GetDeviceVendor() *string {
	if c == nil {
		return nil
	}
	return c.DeviceVendor
}

func (c *CreateSubscriptionGlobals) GetDeviceName() *string {
	if c == nil {
		return nil
	}
	return c.DeviceName
}

func (c *CreateSubscriptionGlobals) GetMarketplace() *string {
	if c == nil {
		return nil
	}
	return c.Marketplace
}

// Hints describing what we're looking for.  Note: The hint `ratingKey` is required for downloading from a PMS remote.
type Hints struct {
}

// CreateSubscriptionQueryParamPrefs - Subscription preferences.
type CreateSubscriptionQueryParamPrefs struct {
}

// Params - Subscription parameters.
//   - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
//   - `source`: Required for downloads to indicate the source of the downloaded content.
type Params struct {
}

type CreateSubscriptionRequest 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"`
	// The library section into which we'll grab the media.  Not actually required when the subscription is to a playlist.
	TargetLibrarySectionID *int64 `queryParam:"style=form,explode=true,name=targetLibrarySectionID"`
	// The section location into which to grab.
	TargetSectionLocationID *int64 `queryParam:"style=form,explode=true,name=targetSectionLocationID"`
	// The type of the thing we're subscribing too (e.g. show, season).
	Type *int64 `queryParam:"style=form,explode=true,name=type"`
	// Hints describing what we're looking for.  Note: The hint `ratingKey` is required for downloading from a PMS remote.
	Hints *Hints `queryParam:"style=deepObject,explode=true,name=hints"`
	// Subscription preferences.
	Prefs *CreateSubscriptionQueryParamPrefs `queryParam:"style=deepObject,explode=true,name=prefs"`
	// Subscription parameters.
	//   - `mediaProviderID`: Required for downloads to indicate which MP the subscription will download into
	//   - `source`: Required for downloads to indicate the source of the downloaded content.
	//
	Params *Params `queryParam:"style=deepObject,explode=true,name=params"`
}

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

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

func (c *CreateSubscriptionRequest) GetAccepts() *components.Accepts {
	if c == nil {
		return nil
	}
	return c.Accepts
}

func (c *CreateSubscriptionRequest) GetClientIdentifier() *string {
	if c == nil {
		return nil
	}
	return c.ClientIdentifier
}

func (c *CreateSubscriptionRequest) GetProduct() *string {
	if c == nil {
		return nil
	}
	return c.Product
}

func (c *CreateSubscriptionRequest) GetVersion() *string {
	if c == nil {
		return nil
	}
	return c.Version
}

func (c *CreateSubscriptionRequest) GetPlatform() *string {
	if c == nil {
		return nil
	}
	return c.Platform
}

func (c *CreateSubscriptionRequest) GetPlatformVersion() *string {
	if c == nil {
		return nil
	}
	return c.PlatformVersion
}

func (c *CreateSubscriptionRequest) GetDevice() *string {
	if c == nil {
		return nil
	}
	return c.Device
}

func (c *CreateSubscriptionRequest) GetModel() *string {
	if c == nil {
		return nil
	}
	return c.Model
}

func (c *CreateSubscriptionRequest) GetDeviceVendor() *string {
	if c == nil {
		return nil
	}
	return c.DeviceVendor
}

func (c *CreateSubscriptionRequest) GetDeviceName() *string {
	if c == nil {
		return nil
	}
	return c.DeviceName
}

func (c *CreateSubscriptionRequest) GetMarketplace() *string {
	if c == nil {
		return nil
	}
	return c.Marketplace
}

func (c *CreateSubscriptionRequest) GetTargetLibrarySectionID() *int64 {
	if c == nil {
		return nil
	}
	return c.TargetLibrarySectionID
}

func (c *CreateSubscriptionRequest) GetTargetSectionLocationID() *int64 {
	if c == nil {
		return nil
	}
	return c.TargetSectionLocationID
}

func (c *CreateSubscriptionRequest) GetType() *int64 {
	if c == nil {
		return nil
	}
	return c.Type
}

func (c *CreateSubscriptionRequest) GetHints() *Hints {
	if c == nil {
		return nil
	}
	return c.Hints
}

func (c *CreateSubscriptionRequest) GetPrefs() *CreateSubscriptionQueryParamPrefs {
	if c == nil {
		return nil
	}
	return c.Prefs
}

func (c *CreateSubscriptionRequest) GetParams() *Params {
	if c == nil {
		return nil
	}
	return c.Params
}

// CreateSubscriptionMediaContainer - `MediaContainer` is the root element of most Plex API responses. It serves as a generic container for various types of content (Metadata, Hubs, Directories, etc.) and includes pagination information (offset, size, totalSize) when applicable.
// Common attributes: - identifier: Unique identifier for this container - size: Number of items in this response page - totalSize: Total number of items available (for pagination) - offset: Starting index of this page (for pagination)
// The container often "hoists" common attributes from its children. For example, if all tracks in a container share the same album title, the `parentTitle` attribute may appear on the MediaContainer rather than being repeated on each track.
type CreateSubscriptionMediaContainer struct {
	Identifier *string `json:"identifier,omitempty"`
	// The offset of where this container page starts among the total objects available. Also provided in the `X-Plex-Container-Start` header.
	//
	Offset *int64 `json:"offset,omitempty"`
	Size   *int64 `json:"size,omitempty"`
	// The total size of objects available. Also provided in the `X-Plex-Container-Total-Size` header.
	//
	TotalSize         *int64                         `json:"totalSize,omitempty"`
	MediaSubscription []components.MediaSubscription `json:"MediaSubscription,omitempty"`
}

func (c *CreateSubscriptionMediaContainer) GetIdentifier() *string {
	if c == nil {
		return nil
	}
	return c.Identifier
}

func (c *CreateSubscriptionMediaContainer) GetOffset() *int64 {
	if c == nil {
		return nil
	}
	return c.Offset
}

func (c *CreateSubscriptionMediaContainer) GetSize() *int64 {
	if c == nil {
		return nil
	}
	return c.Size
}

func (c *CreateSubscriptionMediaContainer) GetTotalSize() *int64 {
	if c == nil {
		return nil
	}
	return c.TotalSize
}

func (c *CreateSubscriptionMediaContainer) GetMediaSubscription() []components.MediaSubscription {
	if c == nil {
		return nil
	}
	return c.MediaSubscription
}

// CreateSubscriptionResponseBody - OK
type CreateSubscriptionResponseBody struct {
	MediaContainer *CreateSubscriptionMediaContainer `json:"MediaContainer,omitempty"`
}

func (c *CreateSubscriptionResponseBody) GetMediaContainer() *CreateSubscriptionMediaContainer {
	if c == nil {
		return nil
	}
	return c.MediaContainer
}

type CreateSubscriptionResponse 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
	Object  *CreateSubscriptionResponseBody
	Headers map[string][]string
}

func (c *CreateSubscriptionResponse) GetContentType() string {
	if c == nil {
		return ""
	}
	return c.ContentType
}

func (c *CreateSubscriptionResponse) GetStatusCode() int {
	if c == nil {
		return 0
	}
	return c.StatusCode
}

func (c *CreateSubscriptionResponse) GetRawResponse() *http.Response {
	if c == nil {
		return nil
	}
	return c.RawResponse
}

func (c *CreateSubscriptionResponse) GetObject() *CreateSubscriptionResponseBody {
	if c == nil {
		return nil
	}
	return c.Object
}

func (c *CreateSubscriptionResponse) GetHeaders() map[string][]string {
	if c == nil {
		return map[string][]string{}
	}
	return c.Headers
}
