// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. package operations import ( "encoding/json" "fmt" "github.com/LukeHagar/plexgo/internal/utils" "github.com/LukeHagar/plexgo/models/components" "net/http" ) type CreateMarkerGlobals 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 CreateMarkerGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(c, "", false) } func (c *CreateMarkerGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { return err } return nil } func (c *CreateMarkerGlobals) GetAccepts() *components.Accepts { if c == nil { return nil } return c.Accepts } func (c *CreateMarkerGlobals) GetClientIdentifier() *string { if c == nil { return nil } return c.ClientIdentifier } func (c *CreateMarkerGlobals) GetProduct() *string { if c == nil { return nil } return c.Product } func (c *CreateMarkerGlobals) GetVersion() *string { if c == nil { return nil } return c.Version } func (c *CreateMarkerGlobals) GetPlatform() *string { if c == nil { return nil } return c.Platform } func (c *CreateMarkerGlobals) GetPlatformVersion() *string { if c == nil { return nil } return c.PlatformVersion } func (c *CreateMarkerGlobals) GetDevice() *string { if c == nil { return nil } return c.Device } func (c *CreateMarkerGlobals) GetModel() *string { if c == nil { return nil } return c.Model } func (c *CreateMarkerGlobals) GetDeviceVendor() *string { if c == nil { return nil } return c.DeviceVendor } func (c *CreateMarkerGlobals) GetDeviceName() *string { if c == nil { return nil } return c.DeviceName } func (c *CreateMarkerGlobals) GetMarketplace() *string { if c == nil { return nil } return c.Marketplace } // Attributes - The attributes to assign to this marker type Attributes struct { } type CreateMarkerRequest 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"` // The type of marker to edit/create Type int64 `queryParam:"style=form,explode=true,name=type"` // The start time of the marker StartTimeOffset int64 `queryParam:"style=form,explode=true,name=startTimeOffset"` // The end time of the marker EndTimeOffset *int64 `queryParam:"style=form,explode=true,name=endTimeOffset"` // The attributes to assign to this marker Attributes *Attributes `queryParam:"style=deepObject,explode=true,name=attributes"` } func (c CreateMarkerRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(c, "", false) } func (c *CreateMarkerRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &c, "", false, []string{"ids", "type", "startTimeOffset"}); err != nil { return err } return nil } func (c *CreateMarkerRequest) GetAccepts() *components.Accepts { if c == nil { return nil } return c.Accepts } func (c *CreateMarkerRequest) GetClientIdentifier() *string { if c == nil { return nil } return c.ClientIdentifier } func (c *CreateMarkerRequest) GetProduct() *string { if c == nil { return nil } return c.Product } func (c *CreateMarkerRequest) GetVersion() *string { if c == nil { return nil } return c.Version } func (c *CreateMarkerRequest) GetPlatform() *string { if c == nil { return nil } return c.Platform } func (c *CreateMarkerRequest) GetPlatformVersion() *string { if c == nil { return nil } return c.PlatformVersion } func (c *CreateMarkerRequest) GetDevice() *string { if c == nil { return nil } return c.Device } func (c *CreateMarkerRequest) GetModel() *string { if c == nil { return nil } return c.Model } func (c *CreateMarkerRequest) GetDeviceVendor() *string { if c == nil { return nil } return c.DeviceVendor } func (c *CreateMarkerRequest) GetDeviceName() *string { if c == nil { return nil } return c.DeviceName } func (c *CreateMarkerRequest) GetMarketplace() *string { if c == nil { return nil } return c.Marketplace } func (c *CreateMarkerRequest) GetIds() string { if c == nil { return "" } return c.Ids } func (c *CreateMarkerRequest) GetType() int64 { if c == nil { return 0 } return c.Type } func (c *CreateMarkerRequest) GetStartTimeOffset() int64 { if c == nil { return 0 } return c.StartTimeOffset } func (c *CreateMarkerRequest) GetEndTimeOffset() *int64 { if c == nil { return nil } return c.EndTimeOffset } func (c *CreateMarkerRequest) GetAttributes() *Attributes { if c == nil { return nil } return c.Attributes } type CreateMarkerType string const ( CreateMarkerTypeIntro CreateMarkerType = "intro" CreateMarkerTypeCommercial CreateMarkerType = "commercial" CreateMarkerTypeBookmark CreateMarkerType = "bookmark" CreateMarkerTypeResume CreateMarkerType = "resume" CreateMarkerTypeCredit CreateMarkerType = "credit" ) func (e CreateMarkerType) ToPointer() *CreateMarkerType { return &e } func (e *CreateMarkerType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "intro": fallthrough case "commercial": fallthrough case "bookmark": fallthrough case "resume": fallthrough case "credit": *e = CreateMarkerType(v) return nil default: return fmt.Errorf("invalid value for CreateMarkerType: %v", v) } } // CreateMarkerMediaContainer - `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 CreateMarkerMediaContainer 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"` Color *string `json:"color,omitempty"` EndTimeOffset *int64 `json:"endTimeOffset,omitempty"` ID *int64 `json:"id,omitempty"` StartTimeOffset *int64 `json:"startTimeOffset,omitempty"` Title *string `json:"title,omitempty"` Type *CreateMarkerType `json:"type,omitempty"` AdditionalProperties map[string]any `additionalProperties:"true" json:"-"` } func (c CreateMarkerMediaContainer) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(c, "", false) } func (c *CreateMarkerMediaContainer) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &c, "", false, nil); err != nil { return err } return nil } func (c *CreateMarkerMediaContainer) GetIdentifier() *string { if c == nil { return nil } return c.Identifier } func (c *CreateMarkerMediaContainer) GetOffset() *int64 { if c == nil { return nil } return c.Offset } func (c *CreateMarkerMediaContainer) GetSize() *int64 { if c == nil { return nil } return c.Size } func (c *CreateMarkerMediaContainer) GetTotalSize() *int64 { if c == nil { return nil } return c.TotalSize } func (c *CreateMarkerMediaContainer) GetColor() *string { if c == nil { return nil } return c.Color } func (c *CreateMarkerMediaContainer) GetEndTimeOffset() *int64 { if c == nil { return nil } return c.EndTimeOffset } func (c *CreateMarkerMediaContainer) GetID() *int64 { if c == nil { return nil } return c.ID } func (c *CreateMarkerMediaContainer) GetStartTimeOffset() *int64 { if c == nil { return nil } return c.StartTimeOffset } func (c *CreateMarkerMediaContainer) GetTitle() *string { if c == nil { return nil } return c.Title } func (c *CreateMarkerMediaContainer) GetType() *CreateMarkerType { if c == nil { return nil } return c.Type } func (c *CreateMarkerMediaContainer) GetAdditionalProperties() map[string]any { if c == nil { return nil } return c.AdditionalProperties } // CreateMarkerResponseBody - OK type CreateMarkerResponseBody struct { MediaContainer *CreateMarkerMediaContainer `json:"MediaContainer,omitempty"` } func (c *CreateMarkerResponseBody) GetMediaContainer() *CreateMarkerMediaContainer { if c == nil { return nil } return c.MediaContainer } type CreateMarkerResponse 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 *CreateMarkerResponseBody } func (c *CreateMarkerResponse) GetContentType() string { if c == nil { return "" } return c.ContentType } func (c *CreateMarkerResponse) GetStatusCode() int { if c == nil { return 0 } return c.StatusCode } func (c *CreateMarkerResponse) GetRawResponse() *http.Response { if c == nil { return nil } return c.RawResponse } func (c *CreateMarkerResponse) GetObject() *CreateMarkerResponseBody { if c == nil { return nil } return c.Object }