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

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

func (o *OptimizeDatabaseGlobals) GetAccepts() *components.Accepts {
	if o == nil {
		return nil
	}
	return o.Accepts
}

func (o *OptimizeDatabaseGlobals) GetClientIdentifier() *string {
	if o == nil {
		return nil
	}
	return o.ClientIdentifier
}

func (o *OptimizeDatabaseGlobals) GetProduct() *string {
	if o == nil {
		return nil
	}
	return o.Product
}

func (o *OptimizeDatabaseGlobals) GetVersion() *string {
	if o == nil {
		return nil
	}
	return o.Version
}

func (o *OptimizeDatabaseGlobals) GetPlatform() *string {
	if o == nil {
		return nil
	}
	return o.Platform
}

func (o *OptimizeDatabaseGlobals) GetPlatformVersion() *string {
	if o == nil {
		return nil
	}
	return o.PlatformVersion
}

func (o *OptimizeDatabaseGlobals) GetDevice() *string {
	if o == nil {
		return nil
	}
	return o.Device
}

func (o *OptimizeDatabaseGlobals) GetModel() *string {
	if o == nil {
		return nil
	}
	return o.Model
}

func (o *OptimizeDatabaseGlobals) GetDeviceVendor() *string {
	if o == nil {
		return nil
	}
	return o.DeviceVendor
}

func (o *OptimizeDatabaseGlobals) GetDeviceName() *string {
	if o == nil {
		return nil
	}
	return o.DeviceName
}

func (o *OptimizeDatabaseGlobals) GetMarketplace() *string {
	if o == nil {
		return nil
	}
	return o.Marketplace
}

type OptimizeDatabaseRequest 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"`
	// If set, don't wait for completion but return an activity
	Async *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=async"`
}

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

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

func (o *OptimizeDatabaseRequest) GetAccepts() *components.Accepts {
	if o == nil {
		return nil
	}
	return o.Accepts
}

func (o *OptimizeDatabaseRequest) GetClientIdentifier() *string {
	if o == nil {
		return nil
	}
	return o.ClientIdentifier
}

func (o *OptimizeDatabaseRequest) GetProduct() *string {
	if o == nil {
		return nil
	}
	return o.Product
}

func (o *OptimizeDatabaseRequest) GetVersion() *string {
	if o == nil {
		return nil
	}
	return o.Version
}

func (o *OptimizeDatabaseRequest) GetPlatform() *string {
	if o == nil {
		return nil
	}
	return o.Platform
}

func (o *OptimizeDatabaseRequest) GetPlatformVersion() *string {
	if o == nil {
		return nil
	}
	return o.PlatformVersion
}

func (o *OptimizeDatabaseRequest) GetDevice() *string {
	if o == nil {
		return nil
	}
	return o.Device
}

func (o *OptimizeDatabaseRequest) GetModel() *string {
	if o == nil {
		return nil
	}
	return o.Model
}

func (o *OptimizeDatabaseRequest) GetDeviceVendor() *string {
	if o == nil {
		return nil
	}
	return o.DeviceVendor
}

func (o *OptimizeDatabaseRequest) GetDeviceName() *string {
	if o == nil {
		return nil
	}
	return o.DeviceName
}

func (o *OptimizeDatabaseRequest) GetMarketplace() *string {
	if o == nil {
		return nil
	}
	return o.Marketplace
}

func (o *OptimizeDatabaseRequest) GetAsync() *components.BoolInt {
	if o == nil {
		return nil
	}
	return o.Async
}

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

func (o *OptimizeDatabaseResponse) GetStatusCode() int {
	if o == nil {
		return 0
	}
	return o.StatusCode
}

func (o *OptimizeDatabaseResponse) GetRawResponse() *http.Response {
	if o == nil {
		return nil
	}
	return o.RawResponse
}
