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

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

func (v *VoiceSearchHubsGlobals) GetAccepts() *components.Accepts {
	if v == nil {
		return nil
	}
	return v.Accepts
}

func (v *VoiceSearchHubsGlobals) GetClientIdentifier() *string {
	if v == nil {
		return nil
	}
	return v.ClientIdentifier
}

func (v *VoiceSearchHubsGlobals) GetProduct() *string {
	if v == nil {
		return nil
	}
	return v.Product
}

func (v *VoiceSearchHubsGlobals) GetVersion() *string {
	if v == nil {
		return nil
	}
	return v.Version
}

func (v *VoiceSearchHubsGlobals) GetPlatform() *string {
	if v == nil {
		return nil
	}
	return v.Platform
}

func (v *VoiceSearchHubsGlobals) GetPlatformVersion() *string {
	if v == nil {
		return nil
	}
	return v.PlatformVersion
}

func (v *VoiceSearchHubsGlobals) GetDevice() *string {
	if v == nil {
		return nil
	}
	return v.Device
}

func (v *VoiceSearchHubsGlobals) GetModel() *string {
	if v == nil {
		return nil
	}
	return v.Model
}

func (v *VoiceSearchHubsGlobals) GetDeviceVendor() *string {
	if v == nil {
		return nil
	}
	return v.DeviceVendor
}

func (v *VoiceSearchHubsGlobals) GetDeviceName() *string {
	if v == nil {
		return nil
	}
	return v.DeviceName
}

func (v *VoiceSearchHubsGlobals) GetMarketplace() *string {
	if v == nil {
		return nil
	}
	return v.Marketplace
}

type VoiceSearchHubsRequest 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 query term
	Query string `queryParam:"style=form,explode=true,name=query"`
	// The type of media to retrieve or filter by.
	//
	// 1 = movie
	// 2 = show
	// 3 = season
	// 4 = episode
	// 5 = artist
	// 6 = album
	// 7 = track
	// 8 = photo_album
	// 9 = photo
	//
	// E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries
	//
	Type *components.MediaType `queryParam:"style=form,explode=true,name=type"`
	// The number of items to return per hub.  3 if not specified
	Limit *int64 `queryParam:"style=form,explode=true,name=limit"`
}

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

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

func (v *VoiceSearchHubsRequest) GetAccepts() *components.Accepts {
	if v == nil {
		return nil
	}
	return v.Accepts
}

func (v *VoiceSearchHubsRequest) GetClientIdentifier() *string {
	if v == nil {
		return nil
	}
	return v.ClientIdentifier
}

func (v *VoiceSearchHubsRequest) GetProduct() *string {
	if v == nil {
		return nil
	}
	return v.Product
}

func (v *VoiceSearchHubsRequest) GetVersion() *string {
	if v == nil {
		return nil
	}
	return v.Version
}

func (v *VoiceSearchHubsRequest) GetPlatform() *string {
	if v == nil {
		return nil
	}
	return v.Platform
}

func (v *VoiceSearchHubsRequest) GetPlatformVersion() *string {
	if v == nil {
		return nil
	}
	return v.PlatformVersion
}

func (v *VoiceSearchHubsRequest) GetDevice() *string {
	if v == nil {
		return nil
	}
	return v.Device
}

func (v *VoiceSearchHubsRequest) GetModel() *string {
	if v == nil {
		return nil
	}
	return v.Model
}

func (v *VoiceSearchHubsRequest) GetDeviceVendor() *string {
	if v == nil {
		return nil
	}
	return v.DeviceVendor
}

func (v *VoiceSearchHubsRequest) GetDeviceName() *string {
	if v == nil {
		return nil
	}
	return v.DeviceName
}

func (v *VoiceSearchHubsRequest) GetMarketplace() *string {
	if v == nil {
		return nil
	}
	return v.Marketplace
}

func (v *VoiceSearchHubsRequest) GetQuery() string {
	if v == nil {
		return ""
	}
	return v.Query
}

func (v *VoiceSearchHubsRequest) GetType() *components.MediaType {
	if v == nil {
		return nil
	}
	return v.Type
}

func (v *VoiceSearchHubsRequest) GetLimit() *int64 {
	if v == nil {
		return nil
	}
	return v.Limit
}

// VoiceSearchHubsMediaContainer - `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 VoiceSearchHubsMediaContainer 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"`
	Hub       []components.Hub `json:"Hub,omitempty"`
}

func (v *VoiceSearchHubsMediaContainer) GetIdentifier() *string {
	if v == nil {
		return nil
	}
	return v.Identifier
}

func (v *VoiceSearchHubsMediaContainer) GetOffset() *int64 {
	if v == nil {
		return nil
	}
	return v.Offset
}

func (v *VoiceSearchHubsMediaContainer) GetSize() *int64 {
	if v == nil {
		return nil
	}
	return v.Size
}

func (v *VoiceSearchHubsMediaContainer) GetTotalSize() *int64 {
	if v == nil {
		return nil
	}
	return v.TotalSize
}

func (v *VoiceSearchHubsMediaContainer) GetHub() []components.Hub {
	if v == nil {
		return nil
	}
	return v.Hub
}

// VoiceSearchHubsResponseBody - OK
type VoiceSearchHubsResponseBody struct {
	MediaContainer *VoiceSearchHubsMediaContainer `json:"MediaContainer,omitempty"`
}

func (v *VoiceSearchHubsResponseBody) GetMediaContainer() *VoiceSearchHubsMediaContainer {
	if v == nil {
		return nil
	}
	return v.MediaContainer
}

type VoiceSearchHubsResponse 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  *VoiceSearchHubsResponseBody
	Headers map[string][]string
}

func (v *VoiceSearchHubsResponse) GetContentType() string {
	if v == nil {
		return ""
	}
	return v.ContentType
}

func (v *VoiceSearchHubsResponse) GetStatusCode() int {
	if v == nil {
		return 0
	}
	return v.StatusCode
}

func (v *VoiceSearchHubsResponse) GetRawResponse() *http.Response {
	if v == nil {
		return nil
	}
	return v.RawResponse
}

func (v *VoiceSearchHubsResponse) GetObject() *VoiceSearchHubsResponseBody {
	if v == nil {
		return nil
	}
	return v.Object
}

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