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

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

func (i *IngestTransientItemGlobals) GetAccepts() *components.Accepts {
	if i == nil {
		return nil
	}
	return i.Accepts
}

func (i *IngestTransientItemGlobals) GetClientIdentifier() *string {
	if i == nil {
		return nil
	}
	return i.ClientIdentifier
}

func (i *IngestTransientItemGlobals) GetProduct() *string {
	if i == nil {
		return nil
	}
	return i.Product
}

func (i *IngestTransientItemGlobals) GetVersion() *string {
	if i == nil {
		return nil
	}
	return i.Version
}

func (i *IngestTransientItemGlobals) GetPlatform() *string {
	if i == nil {
		return nil
	}
	return i.Platform
}

func (i *IngestTransientItemGlobals) GetPlatformVersion() *string {
	if i == nil {
		return nil
	}
	return i.PlatformVersion
}

func (i *IngestTransientItemGlobals) GetDevice() *string {
	if i == nil {
		return nil
	}
	return i.Device
}

func (i *IngestTransientItemGlobals) GetModel() *string {
	if i == nil {
		return nil
	}
	return i.Model
}

func (i *IngestTransientItemGlobals) GetDeviceVendor() *string {
	if i == nil {
		return nil
	}
	return i.DeviceVendor
}

func (i *IngestTransientItemGlobals) GetDeviceName() *string {
	if i == nil {
		return nil
	}
	return i.DeviceName
}

func (i *IngestTransientItemGlobals) GetMarketplace() *string {
	if i == nil {
		return nil
	}
	return i.Marketplace
}

type IngestTransientItemRequest 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 file of the file to ingest.
	URL *string `queryParam:"style=form,explode=true,name=url"`
	// A virtual path to use when the url is opaque.
	VirtualFilePath *string `queryParam:"style=form,explode=true,name=virtualFilePath"`
	// Whether or not to compute Plex and OpenSubtitle hashes for the file. Defaults to 0.
	ComputeHashes *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=computeHashes"`
	// Whether or not non matching media should be stored. Defaults to 0.
	IngestNonMatches *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=ingestNonMatches"`
}

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

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

func (i *IngestTransientItemRequest) GetAccepts() *components.Accepts {
	if i == nil {
		return nil
	}
	return i.Accepts
}

func (i *IngestTransientItemRequest) GetClientIdentifier() *string {
	if i == nil {
		return nil
	}
	return i.ClientIdentifier
}

func (i *IngestTransientItemRequest) GetProduct() *string {
	if i == nil {
		return nil
	}
	return i.Product
}

func (i *IngestTransientItemRequest) GetVersion() *string {
	if i == nil {
		return nil
	}
	return i.Version
}

func (i *IngestTransientItemRequest) GetPlatform() *string {
	if i == nil {
		return nil
	}
	return i.Platform
}

func (i *IngestTransientItemRequest) GetPlatformVersion() *string {
	if i == nil {
		return nil
	}
	return i.PlatformVersion
}

func (i *IngestTransientItemRequest) GetDevice() *string {
	if i == nil {
		return nil
	}
	return i.Device
}

func (i *IngestTransientItemRequest) GetModel() *string {
	if i == nil {
		return nil
	}
	return i.Model
}

func (i *IngestTransientItemRequest) GetDeviceVendor() *string {
	if i == nil {
		return nil
	}
	return i.DeviceVendor
}

func (i *IngestTransientItemRequest) GetDeviceName() *string {
	if i == nil {
		return nil
	}
	return i.DeviceName
}

func (i *IngestTransientItemRequest) GetMarketplace() *string {
	if i == nil {
		return nil
	}
	return i.Marketplace
}

func (i *IngestTransientItemRequest) GetURL() *string {
	if i == nil {
		return nil
	}
	return i.URL
}

func (i *IngestTransientItemRequest) GetVirtualFilePath() *string {
	if i == nil {
		return nil
	}
	return i.VirtualFilePath
}

func (i *IngestTransientItemRequest) GetComputeHashes() *components.BoolInt {
	if i == nil {
		return nil
	}
	return i.ComputeHashes
}

func (i *IngestTransientItemRequest) GetIngestNonMatches() *components.BoolInt {
	if i == nil {
		return nil
	}
	return i.IngestNonMatches
}

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

func (i *IngestTransientItemResponse) GetStatusCode() int {
	if i == nil {
		return 0
	}
	return i.StatusCode
}

func (i *IngestTransientItemResponse) GetRawResponse() *http.Response {
	if i == nil {
		return nil
	}
	return i.RawResponse
}

func (i *IngestTransientItemResponse) GetMediaContainerWithMetadata() *components.MediaContainerWithMetadata {
	if i == nil {
		return nil
	}
	return i.MediaContainerWithMetadata
}

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