mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
* `PlexApi.LibraryPlaylists.AddPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetMetadataHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.MoveCollectionItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.DeleteCollectionItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryCollections.AddCollectionItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetSonicallySimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StopTask()`: `request.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Butler.StartTask()`: `request.Request` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetSonicPath()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.DownloadQueue.GetItemDecision()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetAllHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetContinueWatching()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetPromotedHubs()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetAllLeaves()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetPostplayHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetRelatedHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Hubs.GetSectionHubs()`: * `request.Request.OnlyTransient` **Changed** * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.ListContent()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetAlbums()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.SearchHubs()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Search.VoiceSearchHubs()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryItems()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.IngestTransientItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryMatches()`: * `request.Request` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetMetadataItem()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetSections()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.AddSection()`: * `request.Request` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetTags()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `PlexApi.Content.GetCollectionItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetAllItemLeaves()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Status.ListSessions()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.MovePlayQueueItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetExtras()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.DeletePlayQueueItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.Unshuffle()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListMatches()`: * `request.Request.Manual` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSonicallySimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ResetPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetRelatedItems()`: `response.MediaContainer.Hub.[].Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListSimilar()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.ClearPlayQueue()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetItemTree()`: `response.MediaContainer.MetadataItem.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.AddToPlayQueue()`: * `request.Request.Next` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.GetPlayQueue()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.MovePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetPerson()`: `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.ListPersonMedia()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.GetPlaylistGeneratorItems()`: `response.MediaContainer.Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetLibraryDetails()`: * `request.Request.IncludeDetails` **Changed** * `response.MediaContainer.Directory.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ModifyPlaylistGenerator()`: * `request.Request.Item` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.Autocomplete()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCollections()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.GetCommon()`: * `request.Request.MediaQuery` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.DeletePlaylistItem()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.ClearPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.PlayQueue.Shuffle()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LibraryPlaylists.CreatePlaylist()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.GetPlaylistItems()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.GetPlaylist()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Collections.CreateCollection()`: * `request.Request.Type` **Changed** **Breaking** ⚠️ * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.DvRs.TuneChannel()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LiveTv.GetSessions()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.LiveTv.GetLiveTvSession()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Playlist.ListPlaylists()`: `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetAllSubscriptions()`: * `request.Request` **Changed** * `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.CreateSubscription()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetScheduledRecordings()`: `response.MediaContainer.MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetTemplate()`: `response.MediaContainer.SubscriptionTemplate.[].MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.GetSubscription()`: * `request.Request` **Changed** * `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.EditSubscriptionPreferences()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Subscriptions.ReorderSubscription()`: `response.MediaContainer.MediaSubscription.[].MediaGrabOperation.[].Metadata` **Changed** **Breaking** ⚠️ * `PlexApi.Transcoder.MakeDecision()`: * `request.Request` **Changed** * `response.MediaContainer.Metadata.[]` **Changed** **Breaking** ⚠️ * `PlexApi.Library.RefreshItemsMetadata()`: * `request.Request.MarkUpdated` **Changed** * `PlexApi.Authentication.Post-Users-Sign-In-Data()`: **Added** * `PlexApi.Transcoder.StartTranscodeSession()`: `request.Request` **Changed** * `PlexApi.Devices.ModifyDevice()`: * `request.Request.Enabled` **Changed** * `PlexApi.Library.GetMediaPart()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DetectIntros()`: * `request.Request.Force` **Changed** * `PlexApi.Library.RefreshSection()`: * `request.Request.Force` **Changed** * `PlexApi.LibraryPlaylists.UploadPlaylist()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DeleteMediaItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Authentication.GetTokenDetails()`: **Added** * `PlexApi.Library.GetFirstCharacters()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.Library.UpdateItems()`: * `request.Request.Field.locked` **Changed** * `PlexApi.Library.DeleteLibrarySection()`: * `request.Request.Async` **Changed** * `PlexApi.Library.SetStreamSelection()`: * `request.Request.AllParts` **Changed** * `PlexApi.PlayQueue.CreatePlayQueue()`: `request.Request` **Changed** * `PlexApi.Library.GetAugmentationStatus()`: * `request.Request.Wait` **Changed** * `PlexApi.Library.DetectVoiceActivity()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeImage()`: `request.Request` **Changed** * `PlexApi.Transcoder.TranscodeSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.AddSubtitles()`: `request.Request` **Changed** * `PlexApi.Library.GetStream()`: * `request.Request.AutoAdjustSubtitle` **Changed** * `PlexApi.Library.StartBifGeneration()`: * `request.Request.Force` **Changed** * `PlexApi.Library.DetectCredits()`: `request.Request` **Changed** * `PlexApi.UltraBlur.GetImage()`: * `request.Request.Noise` **Changed** * `PlexApi.Library.GenerateThumbs()`: * `request.Request.Force` **Changed** * `PlexApi.Updater.ApplyUpdates()`: `request.Request` **Changed** * `PlexApi.Updater.CheckUpdates()`: * `request.Request.Download` **Changed** * `PlexApi.Library.DeleteMetadataItem()`: * `request.Request.Proxy` **Changed** * `PlexApi.Library.OptimizeDatabase()`: * `request.Request.Async` **Changed** * `PlexApi.Hubs.UpdateHubVisibility()`: `request.Request` **Changed** * `PlexApi.Hubs.CreateCustomHub()`: `request.Request` **Changed** * `PlexApi.Library.GetSectionImage()`: * `request.Request.MediaQuery` **Changed** * `PlexApi.DownloadQueue.AddDownloadQueueItems()`: `request.Request` **Changed** * `PlexApi.Timeline.Report()`: `request.Request` **Changed** * `PlexApi.General.GetSourceConnectionInformation()`: * `request.Request.Refresh` **Changed** * `PlexApi.Plex.Get-Server-Resources()`: **Added** * `PlexApi.Users.Get-Users()`: **Added**
502 lines
13 KiB
Go
502 lines
13 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/LukeHagar/plexgo/internal/utils"
|
|
"github.com/LukeHagar/plexgo/models/components"
|
|
"io"
|
|
"net/http"
|
|
)
|
|
|
|
type TranscodeImageGlobals 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 (t TranscodeImageGlobals) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(t, "", false)
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetAccepts() *components.Accepts {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Accepts
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetClientIdentifier() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.ClientIdentifier
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetProduct() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Product
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetVersion() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Version
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetPlatform() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Platform
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetPlatformVersion() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.PlatformVersion
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetDevice() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Device
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetModel() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Model
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetDeviceVendor() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.DeviceVendor
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetDeviceName() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.DeviceName
|
|
}
|
|
|
|
func (t *TranscodeImageGlobals) GetMarketplace() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Marketplace
|
|
}
|
|
|
|
// Format - The output format for the image; defaults to jpg
|
|
type Format string
|
|
|
|
const (
|
|
FormatJpg Format = "jpg"
|
|
FormatJpeg Format = "jpeg"
|
|
FormatPng Format = "png"
|
|
FormatPpm Format = "ppm"
|
|
)
|
|
|
|
func (e Format) ToPointer() *Format {
|
|
return &e
|
|
}
|
|
func (e *Format) UnmarshalJSON(data []byte) error {
|
|
var v string
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case "jpg":
|
|
fallthrough
|
|
case "jpeg":
|
|
fallthrough
|
|
case "png":
|
|
fallthrough
|
|
case "ppm":
|
|
*e = Format(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for Format: %v", v)
|
|
}
|
|
}
|
|
|
|
// ChromaSubsampling - Use the specified chroma subsambling.
|
|
// - 0: 411
|
|
// - 1: 420
|
|
// - 2: 422
|
|
// - 3: 444
|
|
//
|
|
// Defaults to 3 (444)
|
|
type ChromaSubsampling int64
|
|
|
|
const (
|
|
ChromaSubsamplingZero ChromaSubsampling = 0
|
|
ChromaSubsamplingOne ChromaSubsampling = 1
|
|
ChromaSubsamplingTwo ChromaSubsampling = 2
|
|
ChromaSubsamplingThree ChromaSubsampling = 3
|
|
)
|
|
|
|
func (e ChromaSubsampling) ToPointer() *ChromaSubsampling {
|
|
return &e
|
|
}
|
|
func (e *ChromaSubsampling) UnmarshalJSON(data []byte) error {
|
|
var v int64
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case 0:
|
|
fallthrough
|
|
case 1:
|
|
fallthrough
|
|
case 2:
|
|
fallthrough
|
|
case 3:
|
|
*e = ChromaSubsampling(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for ChromaSubsampling: %v", v)
|
|
}
|
|
}
|
|
|
|
type TranscodeImageRequest 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 source URL for the image to transcode. Note, if this URL requires a token such as `X-Plex-Token`, it should be given as a query parameter to this url.
|
|
URL *string `queryParam:"style=form,explode=true,name=url"`
|
|
// The output format for the image; defaults to jpg
|
|
Format *Format `queryParam:"style=form,explode=true,name=format"`
|
|
// The desired width of the output image
|
|
Width *int64 `queryParam:"style=form,explode=true,name=width"`
|
|
// The desired height of the output image
|
|
Height *int64 `queryParam:"style=form,explode=true,name=height"`
|
|
// The desired quality of the output. -1 means the highest quality. Defaults to -1
|
|
Quality *int64 `queryParam:"style=form,explode=true,name=quality"`
|
|
// The background color to apply before painting the image. Only really applicable if image has transparency. Defaults to none
|
|
Background *string `queryParam:"style=form,explode=true,name=background"`
|
|
// Indicates if image should be upscaled to the desired width/height. Defaults to false
|
|
Upscale *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=upscale"`
|
|
// Indicates if image should be scaled to fit the smaller dimension. By default (false) the image is scaled to fit within the width/height specified but if this parameter is true, it will allow overflowing one dimension to fit the other. Essentially it is making the width/height minimum sizes of the image or sizing the image to fill the entire width/height even if it overflows one dimension.
|
|
MinSize *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=minSize"`
|
|
// Obey the rotation values specified in EXIF data. Defaults to true.
|
|
Rotate *components.BoolInt `default:"0" queryParam:"style=form,explode=true,name=rotate"`
|
|
// Apply a blur to the image, Defaults to 0 (none)
|
|
Blur *int64 `queryParam:"style=form,explode=true,name=blur"`
|
|
// Scale the image saturation by the specified percentage. Defaults to 100
|
|
Saturation *int64 `queryParam:"style=form,explode=true,name=saturation"`
|
|
// Render the image at the specified opacity percentage. Defaults to 100
|
|
Opacity *int64 `queryParam:"style=form,explode=true,name=opacity"`
|
|
// Use the specified chroma subsambling.
|
|
// - 0: 411
|
|
// - 1: 420
|
|
// - 2: 422
|
|
// - 3: 444
|
|
// Defaults to 3 (444)
|
|
ChromaSubsampling *ChromaSubsampling `queryParam:"style=form,explode=true,name=chromaSubsampling"`
|
|
// The color to blend with the image. Defaults to none
|
|
BlendColor *string `queryParam:"style=form,explode=true,name=blendColor"`
|
|
}
|
|
|
|
func (t TranscodeImageRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(t, "", false)
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &t, "", false, nil); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetAccepts() *components.Accepts {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Accepts
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetClientIdentifier() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.ClientIdentifier
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetProduct() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Product
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetVersion() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Version
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetPlatform() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Platform
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetPlatformVersion() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.PlatformVersion
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetDevice() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Device
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetModel() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Model
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetDeviceVendor() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.DeviceVendor
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetDeviceName() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.DeviceName
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetMarketplace() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Marketplace
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetURL() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.URL
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetFormat() *Format {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Format
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetWidth() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Width
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetHeight() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Height
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetQuality() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Quality
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetBackground() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Background
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetUpscale() *components.BoolInt {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Upscale
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetMinSize() *components.BoolInt {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.MinSize
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetRotate() *components.BoolInt {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Rotate
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetBlur() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Blur
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetSaturation() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Saturation
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetOpacity() *int64 {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.Opacity
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetChromaSubsampling() *ChromaSubsampling {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.ChromaSubsampling
|
|
}
|
|
|
|
func (t *TranscodeImageRequest) GetBlendColor() *string {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.BlendColor
|
|
}
|
|
|
|
type TranscodeImageResponse 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
|
|
// The resulting image
|
|
// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
|
|
TwoHundredImageJpegResponseStream io.ReadCloser
|
|
// The resulting image
|
|
// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
|
|
TwoHundredImagePngResponseStream io.ReadCloser
|
|
// The resulting image
|
|
// The Close method must be called on this field, even if it is not used, to prevent resource leaks.
|
|
TwoHundredImageXPortablePixmapResponseStream io.ReadCloser
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetContentType() string {
|
|
if t == nil {
|
|
return ""
|
|
}
|
|
return t.ContentType
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetStatusCode() int {
|
|
if t == nil {
|
|
return 0
|
|
}
|
|
return t.StatusCode
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetRawResponse() *http.Response {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.RawResponse
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetTwoHundredImageJpegResponseStream() io.ReadCloser {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.TwoHundredImageJpegResponseStream
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetTwoHundredImagePngResponseStream() io.ReadCloser {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.TwoHundredImagePngResponseStream
|
|
}
|
|
|
|
func (t *TranscodeImageResponse) GetTwoHundredImageXPortablePixmapResponseStream() io.ReadCloser {
|
|
if t == nil {
|
|
return nil
|
|
}
|
|
return t.TwoHundredImageXPortablePixmapResponseStream
|
|
}
|