// 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 AddDeviceToDVRGlobals 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 AddDeviceToDVRGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(a, "", false) } func (a *AddDeviceToDVRGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { return err } return nil } func (a *AddDeviceToDVRGlobals) GetAccepts() *components.Accepts { if a == nil { return nil } return a.Accepts } func (a *AddDeviceToDVRGlobals) GetClientIdentifier() *string { if a == nil { return nil } return a.ClientIdentifier } func (a *AddDeviceToDVRGlobals) GetProduct() *string { if a == nil { return nil } return a.Product } func (a *AddDeviceToDVRGlobals) GetVersion() *string { if a == nil { return nil } return a.Version } func (a *AddDeviceToDVRGlobals) GetPlatform() *string { if a == nil { return nil } return a.Platform } func (a *AddDeviceToDVRGlobals) GetPlatformVersion() *string { if a == nil { return nil } return a.PlatformVersion } func (a *AddDeviceToDVRGlobals) GetDevice() *string { if a == nil { return nil } return a.Device } func (a *AddDeviceToDVRGlobals) GetModel() *string { if a == nil { return nil } return a.Model } func (a *AddDeviceToDVRGlobals) GetDeviceVendor() *string { if a == nil { return nil } return a.DeviceVendor } func (a *AddDeviceToDVRGlobals) GetDeviceName() *string { if a == nil { return nil } return a.DeviceName } func (a *AddDeviceToDVRGlobals) GetMarketplace() *string { if a == nil { return nil } return a.Marketplace } type AddDeviceToDVRRequest 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 ID of the DVR. DvrID int64 `pathParam:"style=simple,explode=false,name=dvrId"` // The ID of the device to add. DeviceID int64 `pathParam:"style=simple,explode=false,name=deviceId"` } func (a AddDeviceToDVRRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(a, "", false) } func (a *AddDeviceToDVRRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &a, "", false, []string{"dvrId", "deviceId"}); err != nil { return err } return nil } func (a *AddDeviceToDVRRequest) GetAccepts() *components.Accepts { if a == nil { return nil } return a.Accepts } func (a *AddDeviceToDVRRequest) GetClientIdentifier() *string { if a == nil { return nil } return a.ClientIdentifier } func (a *AddDeviceToDVRRequest) GetProduct() *string { if a == nil { return nil } return a.Product } func (a *AddDeviceToDVRRequest) GetVersion() *string { if a == nil { return nil } return a.Version } func (a *AddDeviceToDVRRequest) GetPlatform() *string { if a == nil { return nil } return a.Platform } func (a *AddDeviceToDVRRequest) GetPlatformVersion() *string { if a == nil { return nil } return a.PlatformVersion } func (a *AddDeviceToDVRRequest) GetDevice() *string { if a == nil { return nil } return a.Device } func (a *AddDeviceToDVRRequest) GetModel() *string { if a == nil { return nil } return a.Model } func (a *AddDeviceToDVRRequest) GetDeviceVendor() *string { if a == nil { return nil } return a.DeviceVendor } func (a *AddDeviceToDVRRequest) GetDeviceName() *string { if a == nil { return nil } return a.DeviceName } func (a *AddDeviceToDVRRequest) GetMarketplace() *string { if a == nil { return nil } return a.Marketplace } func (a *AddDeviceToDVRRequest) GetDvrID() int64 { if a == nil { return 0 } return a.DvrID } func (a *AddDeviceToDVRRequest) GetDeviceID() int64 { if a == nil { return 0 } return a.DeviceID } // AddDeviceToDVRDVRsMediaContainer - `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 AddDeviceToDVRDVRsMediaContainer 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"` // A status indicator. If present and non-zero, indicates an error Status *int64 `json:"status,omitempty"` } func (a *AddDeviceToDVRDVRsMediaContainer) GetIdentifier() *string { if a == nil { return nil } return a.Identifier } func (a *AddDeviceToDVRDVRsMediaContainer) GetOffset() *int64 { if a == nil { return nil } return a.Offset } func (a *AddDeviceToDVRDVRsMediaContainer) GetSize() *int64 { if a == nil { return nil } return a.Size } func (a *AddDeviceToDVRDVRsMediaContainer) GetTotalSize() *int64 { if a == nil { return nil } return a.TotalSize } func (a *AddDeviceToDVRDVRsMediaContainer) GetStatus() *int64 { if a == nil { return nil } return a.Status } type AddDeviceToDVRDVR struct { Device []components.Device `json:"Device,omitempty"` Key *string `json:"key,omitempty"` Language *string `json:"language,omitempty"` Lineup *string `json:"lineup,omitempty"` UUID *string `json:"uuid,omitempty"` } func (a *AddDeviceToDVRDVR) GetDevice() []components.Device { if a == nil { return nil } return a.Device } func (a *AddDeviceToDVRDVR) GetKey() *string { if a == nil { return nil } return a.Key } func (a *AddDeviceToDVRDVR) GetLanguage() *string { if a == nil { return nil } return a.Language } func (a *AddDeviceToDVRDVR) GetLineup() *string { if a == nil { return nil } return a.Lineup } func (a *AddDeviceToDVRDVR) GetUUID() *string { if a == nil { return nil } return a.UUID } type AddDeviceToDVRMediaContainer struct { MediaContainer *AddDeviceToDVRDVRsMediaContainer `json:"MediaContainer,omitempty"` Dvr []AddDeviceToDVRDVR `json:"DVR,omitempty"` } func (a *AddDeviceToDVRMediaContainer) GetMediaContainer() *AddDeviceToDVRDVRsMediaContainer { if a == nil { return nil } return a.MediaContainer } func (a *AddDeviceToDVRMediaContainer) GetDvr() []AddDeviceToDVRDVR { if a == nil { return nil } return a.Dvr } // AddDeviceToDVRResponseBody - OK type AddDeviceToDVRResponseBody struct { MediaContainer *AddDeviceToDVRMediaContainer `json:"MediaContainer,omitempty"` } func (a *AddDeviceToDVRResponseBody) GetMediaContainer() *AddDeviceToDVRMediaContainer { if a == nil { return nil } return a.MediaContainer } type AddDeviceToDVRResponse 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 *AddDeviceToDVRResponseBody Headers map[string][]string } func (a *AddDeviceToDVRResponse) GetContentType() string { if a == nil { return "" } return a.ContentType } func (a *AddDeviceToDVRResponse) GetStatusCode() int { if a == nil { return 0 } return a.StatusCode } func (a *AddDeviceToDVRResponse) GetRawResponse() *http.Response { if a == nil { return nil } return a.RawResponse } func (a *AddDeviceToDVRResponse) GetObject() *AddDeviceToDVRResponseBody { if a == nil { return nil } return a.Object } func (a *AddDeviceToDVRResponse) GetHeaders() map[string][]string { if a == nil { return map[string][]string{} } return a.Headers }