mirror of
https://github.com/LukeHagar/plexterraform.git
synced 2025-12-06 04:20:52 +00:00
146 lines
3.4 KiB
Go
146 lines
3.4 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
// QueryParamOnlyTransient - Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
type QueryParamOnlyTransient int64
|
|
|
|
const (
|
|
QueryParamOnlyTransientZero QueryParamOnlyTransient = 0
|
|
QueryParamOnlyTransientOne QueryParamOnlyTransient = 1
|
|
)
|
|
|
|
func (e QueryParamOnlyTransient) ToPointer() *QueryParamOnlyTransient {
|
|
return &e
|
|
}
|
|
|
|
func (e *QueryParamOnlyTransient) 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 = QueryParamOnlyTransient(v)
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("invalid value for QueryParamOnlyTransient: %v", v)
|
|
}
|
|
}
|
|
|
|
type GetLibraryHubsRequest struct {
|
|
// the Id of the library to query
|
|
SectionID float64 `pathParam:"style=simple,explode=false,name=sectionId"`
|
|
// The number of items to return with each hub.
|
|
Count *float64 `queryParam:"style=form,explode=true,name=count"`
|
|
// Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added).
|
|
OnlyTransient *QueryParamOnlyTransient `queryParam:"style=form,explode=true,name=onlyTransient"`
|
|
}
|
|
|
|
func (o *GetLibraryHubsRequest) GetSectionID() float64 {
|
|
if o == nil {
|
|
return 0.0
|
|
}
|
|
return o.SectionID
|
|
}
|
|
|
|
func (o *GetLibraryHubsRequest) GetCount() *float64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Count
|
|
}
|
|
|
|
func (o *GetLibraryHubsRequest) GetOnlyTransient() *QueryParamOnlyTransient {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.OnlyTransient
|
|
}
|
|
|
|
type GetLibraryHubsErrors struct {
|
|
Code *float64 `json:"code,omitempty"`
|
|
Message *string `json:"message,omitempty"`
|
|
Status *float64 `json:"status,omitempty"`
|
|
}
|
|
|
|
func (o *GetLibraryHubsErrors) GetCode() *float64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Code
|
|
}
|
|
|
|
func (o *GetLibraryHubsErrors) GetMessage() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Message
|
|
}
|
|
|
|
func (o *GetLibraryHubsErrors) GetStatus() *float64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Status
|
|
}
|
|
|
|
// GetLibraryHubsResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
type GetLibraryHubsResponseBody struct {
|
|
Errors []GetLibraryHubsErrors `json:"errors,omitempty"`
|
|
}
|
|
|
|
func (o *GetLibraryHubsResponseBody) GetErrors() []GetLibraryHubsErrors {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Errors
|
|
}
|
|
|
|
type GetLibraryHubsResponse 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
|
|
// Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
|
|
Object *GetLibraryHubsResponseBody
|
|
}
|
|
|
|
func (o *GetLibraryHubsResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *GetLibraryHubsResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *GetLibraryHubsResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|
|
|
|
func (o *GetLibraryHubsResponse) GetObject() *GetLibraryHubsResponseBody {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Object
|
|
}
|