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

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

func (u *UnscrobbleGlobals) GetAccepts() *components.Accepts {
	if u == nil {
		return nil
	}
	return u.Accepts
}

func (u *UnscrobbleGlobals) GetClientIdentifier() *string {
	if u == nil {
		return nil
	}
	return u.ClientIdentifier
}

func (u *UnscrobbleGlobals) GetProduct() *string {
	if u == nil {
		return nil
	}
	return u.Product
}

func (u *UnscrobbleGlobals) GetVersion() *string {
	if u == nil {
		return nil
	}
	return u.Version
}

func (u *UnscrobbleGlobals) GetPlatform() *string {
	if u == nil {
		return nil
	}
	return u.Platform
}

func (u *UnscrobbleGlobals) GetPlatformVersion() *string {
	if u == nil {
		return nil
	}
	return u.PlatformVersion
}

func (u *UnscrobbleGlobals) GetDevice() *string {
	if u == nil {
		return nil
	}
	return u.Device
}

func (u *UnscrobbleGlobals) GetModel() *string {
	if u == nil {
		return nil
	}
	return u.Model
}

func (u *UnscrobbleGlobals) GetDeviceVendor() *string {
	if u == nil {
		return nil
	}
	return u.DeviceVendor
}

func (u *UnscrobbleGlobals) GetDeviceName() *string {
	if u == nil {
		return nil
	}
	return u.DeviceName
}

func (u *UnscrobbleGlobals) GetMarketplace() *string {
	if u == nil {
		return nil
	}
	return u.Marketplace
}

type UnscrobbleRequest 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 identifier of the media provider containing the media to rate.  Typically `com.plexapp.plugins.library`
	Identifier string `queryParam:"style=form,explode=true,name=identifier"`
	// The key of the item to rate.  This is the `ratingKey` found in metadata items
	Key *string `queryParam:"style=form,explode=true,name=key"`
	// The URI of the item to mark as played.  See intro for description of the URIs
	URI *string `queryParam:"style=form,explode=true,name=uri"`
}

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

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

func (u *UnscrobbleRequest) GetAccepts() *components.Accepts {
	if u == nil {
		return nil
	}
	return u.Accepts
}

func (u *UnscrobbleRequest) GetClientIdentifier() *string {
	if u == nil {
		return nil
	}
	return u.ClientIdentifier
}

func (u *UnscrobbleRequest) GetProduct() *string {
	if u == nil {
		return nil
	}
	return u.Product
}

func (u *UnscrobbleRequest) GetVersion() *string {
	if u == nil {
		return nil
	}
	return u.Version
}

func (u *UnscrobbleRequest) GetPlatform() *string {
	if u == nil {
		return nil
	}
	return u.Platform
}

func (u *UnscrobbleRequest) GetPlatformVersion() *string {
	if u == nil {
		return nil
	}
	return u.PlatformVersion
}

func (u *UnscrobbleRequest) GetDevice() *string {
	if u == nil {
		return nil
	}
	return u.Device
}

func (u *UnscrobbleRequest) GetModel() *string {
	if u == nil {
		return nil
	}
	return u.Model
}

func (u *UnscrobbleRequest) GetDeviceVendor() *string {
	if u == nil {
		return nil
	}
	return u.DeviceVendor
}

func (u *UnscrobbleRequest) GetDeviceName() *string {
	if u == nil {
		return nil
	}
	return u.DeviceName
}

func (u *UnscrobbleRequest) GetMarketplace() *string {
	if u == nil {
		return nil
	}
	return u.Marketplace
}

func (u *UnscrobbleRequest) GetIdentifier() string {
	if u == nil {
		return ""
	}
	return u.Identifier
}

func (u *UnscrobbleRequest) GetKey() *string {
	if u == nil {
		return nil
	}
	return u.Key
}

func (u *UnscrobbleRequest) GetURI() *string {
	if u == nil {
		return nil
	}
	return u.URI
}

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

func (u *UnscrobbleResponse) GetStatusCode() int {
	if u == nil {
		return 0
	}
	return u.StatusCode
}

func (u *UnscrobbleResponse) GetRawResponse() *http.Response {
	if u == nil {
		return nil
	}
	return u.RawResponse
}
