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

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

func (a *AddSubtitlesGlobals) GetAccepts() *components.Accepts {
	if a == nil {
		return nil
	}
	return a.Accepts
}

func (a *AddSubtitlesGlobals) GetClientIdentifier() *string {
	if a == nil {
		return nil
	}
	return a.ClientIdentifier
}

func (a *AddSubtitlesGlobals) GetProduct() *string {
	if a == nil {
		return nil
	}
	return a.Product
}

func (a *AddSubtitlesGlobals) GetVersion() *string {
	if a == nil {
		return nil
	}
	return a.Version
}

func (a *AddSubtitlesGlobals) GetPlatform() *string {
	if a == nil {
		return nil
	}
	return a.Platform
}

func (a *AddSubtitlesGlobals) GetPlatformVersion() *string {
	if a == nil {
		return nil
	}
	return a.PlatformVersion
}

func (a *AddSubtitlesGlobals) GetDevice() *string {
	if a == nil {
		return nil
	}
	return a.Device
}

func (a *AddSubtitlesGlobals) GetModel() *string {
	if a == nil {
		return nil
	}
	return a.Model
}

func (a *AddSubtitlesGlobals) GetDeviceVendor() *string {
	if a == nil {
		return nil
	}
	return a.DeviceVendor
}

func (a *AddSubtitlesGlobals) GetDeviceName() *string {
	if a == nil {
		return nil
	}
	return a.DeviceName
}

func (a *AddSubtitlesGlobals) GetMarketplace() *string {
	if a == nil {
		return nil
	}
	return a.Marketplace
}

type AddSubtitlesRequest 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"`
	Ids         string  `pathParam:"style=simple,explode=false,name=ids"`
	Title       *string `queryParam:"style=form,explode=true,name=title"`
	Language    *string `queryParam:"style=form,explode=true,name=language"`
	MediaItemID *int64  `queryParam:"style=form,explode=true,name=mediaItemID"`
	// The URL of the subtitle.  If not provided, the contents of the subtitle must be in the post body
	URL             *string             `queryParam:"style=form,explode=true,name=url"`
	Format          *string             `queryParam:"style=form,explode=true,name=format"`
	Forced          *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=forced"`
	HearingImpaired *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=hearingImpaired"`
}

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

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

func (a *AddSubtitlesRequest) GetAccepts() *components.Accepts {
	if a == nil {
		return nil
	}
	return a.Accepts
}

func (a *AddSubtitlesRequest) GetClientIdentifier() *string {
	if a == nil {
		return nil
	}
	return a.ClientIdentifier
}

func (a *AddSubtitlesRequest) GetProduct() *string {
	if a == nil {
		return nil
	}
	return a.Product
}

func (a *AddSubtitlesRequest) GetVersion() *string {
	if a == nil {
		return nil
	}
	return a.Version
}

func (a *AddSubtitlesRequest) GetPlatform() *string {
	if a == nil {
		return nil
	}
	return a.Platform
}

func (a *AddSubtitlesRequest) GetPlatformVersion() *string {
	if a == nil {
		return nil
	}
	return a.PlatformVersion
}

func (a *AddSubtitlesRequest) GetDevice() *string {
	if a == nil {
		return nil
	}
	return a.Device
}

func (a *AddSubtitlesRequest) GetModel() *string {
	if a == nil {
		return nil
	}
	return a.Model
}

func (a *AddSubtitlesRequest) GetDeviceVendor() *string {
	if a == nil {
		return nil
	}
	return a.DeviceVendor
}

func (a *AddSubtitlesRequest) GetDeviceName() *string {
	if a == nil {
		return nil
	}
	return a.DeviceName
}

func (a *AddSubtitlesRequest) GetMarketplace() *string {
	if a == nil {
		return nil
	}
	return a.Marketplace
}

func (a *AddSubtitlesRequest) GetIds() string {
	if a == nil {
		return ""
	}
	return a.Ids
}

func (a *AddSubtitlesRequest) GetTitle() *string {
	if a == nil {
		return nil
	}
	return a.Title
}

func (a *AddSubtitlesRequest) GetLanguage() *string {
	if a == nil {
		return nil
	}
	return a.Language
}

func (a *AddSubtitlesRequest) GetMediaItemID() *int64 {
	if a == nil {
		return nil
	}
	return a.MediaItemID
}

func (a *AddSubtitlesRequest) GetURL() *string {
	if a == nil {
		return nil
	}
	return a.URL
}

func (a *AddSubtitlesRequest) GetFormat() *string {
	if a == nil {
		return nil
	}
	return a.Format
}

func (a *AddSubtitlesRequest) GetForced() *components.BoolInt {
	if a == nil {
		return nil
	}
	return a.Forced
}

func (a *AddSubtitlesRequest) GetHearingImpaired() *components.BoolInt {
	if a == nil {
		return nil
	}
	return a.HearingImpaired
}

type AddSubtitlesResponse 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
}

func (a *AddSubtitlesResponse) GetContentType() string {
	if a == nil {
		return ""
	}
	return a.ContentType
}

func (a *AddSubtitlesResponse) GetStatusCode() int {
	if a == nil {
		return 0
	}
	return a.StatusCode
}

func (a *AddSubtitlesResponse) GetRawResponse() *http.Response {
	if a == nil {
		return nil
	}
	return a.RawResponse
}
