Files
plexgo/models/operations/getrefreshlibrarymetadata.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 (o *GetRefreshLibraryMetadataRequest) GetForce() *Force {
if o == nil {
return nil
}
return o.Force
}
func (o *GetRefreshLibraryMetadataRequest) GetSectionKey() int {
if o == nil {
return 0
}
return o.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 (o *GetRefreshLibraryMetadataResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetRefreshLibraryMetadataResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetRefreshLibraryMetadataResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}