mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
90 lines
1.8 KiB
Go
90 lines
1.8 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
// Force the refresh even if the library is already being refreshed.
|
|
type Force int64
|
|
|
|
const (
|
|
ForceZero Force = 0
|
|
ForceOne Force = 1
|
|
)
|
|
|
|
func (e Force) ToPointer() *Force {
|
|
return &e
|
|
}
|
|
func (e *Force) UnmarshalJSON(data []byte) error {
|
|
var v int64
|
|
if err := json.Unmarshal(data, &v); err != nil {
|
|
return err
|
|
}
|
|
switch v {
|
|
case 0:
|
|
fallthrough
|
|
case 1:
|
|
*e = Force(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for Force: %v", v)
|
|
}
|
|
}
|
|
|
|
type GetRefreshLibraryMetadataRequest struct {
|
|
// Force the refresh even if the library is already being refreshed.
|
|
Force *Force `queryParam:"style=form,explode=true,name=force"`
|
|
// The unique key of the Plex library.
|
|
// Note: This is unique in the context of the Plex server.
|
|
//
|
|
SectionKey int `pathParam:"style=simple,explode=false,name=sectionKey"`
|
|
}
|
|
|
|
func (g *GetRefreshLibraryMetadataRequest) GetForce() *Force {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Force
|
|
}
|
|
|
|
func (g *GetRefreshLibraryMetadataRequest) GetSectionKey() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.SectionKey
|
|
}
|
|
|
|
type GetRefreshLibraryMetadataResponse 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 (g *GetRefreshLibraryMetadataResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetRefreshLibraryMetadataResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetRefreshLibraryMetadataResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|