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

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

func (m *MatchItemGlobals) GetAccepts() *components.Accepts {
	if m == nil {
		return nil
	}
	return m.Accepts
}

func (m *MatchItemGlobals) GetClientIdentifier() *string {
	if m == nil {
		return nil
	}
	return m.ClientIdentifier
}

func (m *MatchItemGlobals) GetProduct() *string {
	if m == nil {
		return nil
	}
	return m.Product
}

func (m *MatchItemGlobals) GetVersion() *string {
	if m == nil {
		return nil
	}
	return m.Version
}

func (m *MatchItemGlobals) GetPlatform() *string {
	if m == nil {
		return nil
	}
	return m.Platform
}

func (m *MatchItemGlobals) GetPlatformVersion() *string {
	if m == nil {
		return nil
	}
	return m.PlatformVersion
}

func (m *MatchItemGlobals) GetDevice() *string {
	if m == nil {
		return nil
	}
	return m.Device
}

func (m *MatchItemGlobals) GetModel() *string {
	if m == nil {
		return nil
	}
	return m.Model
}

func (m *MatchItemGlobals) GetDeviceVendor() *string {
	if m == nil {
		return nil
	}
	return m.DeviceVendor
}

func (m *MatchItemGlobals) GetDeviceName() *string {
	if m == nil {
		return nil
	}
	return m.DeviceName
}

func (m *MatchItemGlobals) GetMarketplace() *string {
	if m == nil {
		return nil
	}
	return m.Marketplace
}

type MatchItemRequest 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"`
	GUID        *string `queryParam:"style=form,explode=true,name=guid"`
	Name        *string `queryParam:"style=form,explode=true,name=name"`
	Year        *int64  `queryParam:"style=form,explode=true,name=year"`
}

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

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

func (m *MatchItemRequest) GetAccepts() *components.Accepts {
	if m == nil {
		return nil
	}
	return m.Accepts
}

func (m *MatchItemRequest) GetClientIdentifier() *string {
	if m == nil {
		return nil
	}
	return m.ClientIdentifier
}

func (m *MatchItemRequest) GetProduct() *string {
	if m == nil {
		return nil
	}
	return m.Product
}

func (m *MatchItemRequest) GetVersion() *string {
	if m == nil {
		return nil
	}
	return m.Version
}

func (m *MatchItemRequest) GetPlatform() *string {
	if m == nil {
		return nil
	}
	return m.Platform
}

func (m *MatchItemRequest) GetPlatformVersion() *string {
	if m == nil {
		return nil
	}
	return m.PlatformVersion
}

func (m *MatchItemRequest) GetDevice() *string {
	if m == nil {
		return nil
	}
	return m.Device
}

func (m *MatchItemRequest) GetModel() *string {
	if m == nil {
		return nil
	}
	return m.Model
}

func (m *MatchItemRequest) GetDeviceVendor() *string {
	if m == nil {
		return nil
	}
	return m.DeviceVendor
}

func (m *MatchItemRequest) GetDeviceName() *string {
	if m == nil {
		return nil
	}
	return m.DeviceName
}

func (m *MatchItemRequest) GetMarketplace() *string {
	if m == nil {
		return nil
	}
	return m.Marketplace
}

func (m *MatchItemRequest) GetIds() string {
	if m == nil {
		return ""
	}
	return m.Ids
}

func (m *MatchItemRequest) GetGUID() *string {
	if m == nil {
		return nil
	}
	return m.GUID
}

func (m *MatchItemRequest) GetName() *string {
	if m == nil {
		return nil
	}
	return m.Name
}

func (m *MatchItemRequest) GetYear() *int64 {
	if m == nil {
		return nil
	}
	return m.Year
}

type MatchItemResponse 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 (m *MatchItemResponse) GetContentType() string {
	if m == nil {
		return ""
	}
	return m.ContentType
}

func (m *MatchItemResponse) GetStatusCode() int {
	if m == nil {
		return 0
	}
	return m.StatusCode
}

func (m *MatchItemResponse) GetRawResponse() *http.Response {
	if m == nil {
		return nil
	}
	return m.RawResponse
}
