// 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 AutocompleteGlobals 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 AutocompleteGlobals) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(a, "", false) } func (a *AutocompleteGlobals) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &a, "", false, nil); err != nil { return err } return nil } func (a *AutocompleteGlobals) GetAccepts() *components.Accepts { if a == nil { return nil } return a.Accepts } func (a *AutocompleteGlobals) GetClientIdentifier() *string { if a == nil { return nil } return a.ClientIdentifier } func (a *AutocompleteGlobals) GetProduct() *string { if a == nil { return nil } return a.Product } func (a *AutocompleteGlobals) GetVersion() *string { if a == nil { return nil } return a.Version } func (a *AutocompleteGlobals) GetPlatform() *string { if a == nil { return nil } return a.Platform } func (a *AutocompleteGlobals) GetPlatformVersion() *string { if a == nil { return nil } return a.PlatformVersion } func (a *AutocompleteGlobals) GetDevice() *string { if a == nil { return nil } return a.Device } func (a *AutocompleteGlobals) GetModel() *string { if a == nil { return nil } return a.Model } func (a *AutocompleteGlobals) GetDeviceVendor() *string { if a == nil { return nil } return a.DeviceVendor } func (a *AutocompleteGlobals) GetDeviceName() *string { if a == nil { return nil } return a.DeviceName } func (a *AutocompleteGlobals) GetMarketplace() *string { if a == nil { return nil } return a.Marketplace } type AutocompleteRequest 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"` // Section identifier SectionID int64 `pathParam:"style=simple,explode=false,name=sectionId"` // Item type Type *int64 `queryParam:"style=form,explode=true,name=type"` // The "field" stands in for any field, the value is a partial string for matching FieldQuery *string `queryParam:"style=form,explode=true,name=field.query"` // A querystring-based filtering language used to select subsets of media. Can be provided as an object with typed properties for type safety, or as a string for complex queries with operators and boolean logic. // // The query supports: // - Fields: integer, boolean, tag, string, date, language // - Operators: =, !=, ==, !==, <=, >=, >>=, <<= (varies by field type) // - Boolean operators: & (AND), , (OR), push/pop (parentheses), or=1 (explicit OR) // - Sorting: sort parameter with :desc, :nullsLast modifiers // - Grouping: group parameter // - Limits: limit parameter // // Examples: // - Object format: `{type: 4, sourceType: 2, title: "24"}` → `type=4&sourceType=2&title=24` // - String format: `type=4&sourceType=2&title==24` - type = 4 AND sourceType = 2 AND title = "24" // - Complex: `push=1&index=1&or=1&rating=2&pop=1&duration=10` - (index = 1 OR rating = 2) AND duration = 10 // // See [API Info section](#section/API-Info/Media-Queries) for detailed information on building media queries. // MediaQuery *components.MediaQuery `queryParam:"style=form,explode=true,name=mediaQuery"` } func (a AutocompleteRequest) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(a, "", false) } func (a *AutocompleteRequest) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &a, "", false, []string{"sectionId"}); err != nil { return err } return nil } func (a *AutocompleteRequest) GetAccepts() *components.Accepts { if a == nil { return nil } return a.Accepts } func (a *AutocompleteRequest) GetClientIdentifier() *string { if a == nil { return nil } return a.ClientIdentifier } func (a *AutocompleteRequest) GetProduct() *string { if a == nil { return nil } return a.Product } func (a *AutocompleteRequest) GetVersion() *string { if a == nil { return nil } return a.Version } func (a *AutocompleteRequest) GetPlatform() *string { if a == nil { return nil } return a.Platform } func (a *AutocompleteRequest) GetPlatformVersion() *string { if a == nil { return nil } return a.PlatformVersion } func (a *AutocompleteRequest) GetDevice() *string { if a == nil { return nil } return a.Device } func (a *AutocompleteRequest) GetModel() *string { if a == nil { return nil } return a.Model } func (a *AutocompleteRequest) GetDeviceVendor() *string { if a == nil { return nil } return a.DeviceVendor } func (a *AutocompleteRequest) GetDeviceName() *string { if a == nil { return nil } return a.DeviceName } func (a *AutocompleteRequest) GetMarketplace() *string { if a == nil { return nil } return a.Marketplace } func (a *AutocompleteRequest) GetSectionID() int64 { if a == nil { return 0 } return a.SectionID } func (a *AutocompleteRequest) GetType() *int64 { if a == nil { return nil } return a.Type } func (a *AutocompleteRequest) GetFieldQuery() *string { if a == nil { return nil } return a.FieldQuery } func (a *AutocompleteRequest) GetMediaQuery() *components.MediaQuery { if a == nil { return nil } return a.MediaQuery } type AutocompleteResponse 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 MediaContainerWithMetadata *components.MediaContainerWithMetadata Headers map[string][]string } func (a *AutocompleteResponse) GetContentType() string { if a == nil { return "" } return a.ContentType } func (a *AutocompleteResponse) GetStatusCode() int { if a == nil { return 0 } return a.StatusCode } func (a *AutocompleteResponse) GetRawResponse() *http.Response { if a == nil { return nil } return a.RawResponse } func (a *AutocompleteResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata { if a == nil { return nil } return a.MediaContainerWithMetadata } func (a *AutocompleteResponse) GetHeaders() map[string][]string { if a == nil { return map[string][]string{} } return a.Headers }