Files
plexterraform/internal/sdk/models/operations/performvoicesearch.go

128 lines
2.9 KiB
Go

// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/terraform-provider-PlexAPI/internal/sdk/internal/utils"
"net/http"
)
type PerformVoiceSearchRequest struct {
// The query term
Query string `queryParam:"style=form,explode=true,name=query"`
// This gives context to the search, and can result in re-ordering of search result hubs
SectionID *float64 `queryParam:"style=form,explode=true,name=sectionId"`
// The number of items to return per hub
Limit *float64 `default:"3" queryParam:"style=form,explode=true,name=limit"`
}
func (p PerformVoiceSearchRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PerformVoiceSearchRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PerformVoiceSearchRequest) GetQuery() string {
if o == nil {
return ""
}
return o.Query
}
func (o *PerformVoiceSearchRequest) GetSectionID() *float64 {
if o == nil {
return nil
}
return o.SectionID
}
func (o *PerformVoiceSearchRequest) GetLimit() *float64 {
if o == nil {
return nil
}
return o.Limit
}
type PerformVoiceSearchErrors struct {
Code *float64 `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
Status *float64 `json:"status,omitempty"`
}
func (o *PerformVoiceSearchErrors) GetCode() *float64 {
if o == nil {
return nil
}
return o.Code
}
func (o *PerformVoiceSearchErrors) GetMessage() *string {
if o == nil {
return nil
}
return o.Message
}
func (o *PerformVoiceSearchErrors) GetStatus() *float64 {
if o == nil {
return nil
}
return o.Status
}
// PerformVoiceSearchResponseBody - Unauthorized - Returned if the X-Plex-Token is missing from the header or query.
type PerformVoiceSearchResponseBody struct {
Errors []PerformVoiceSearchErrors `json:"errors,omitempty"`
}
func (o *PerformVoiceSearchResponseBody) GetErrors() []PerformVoiceSearchErrors {
if o == nil {
return nil
}
return o.Errors
}
type PerformVoiceSearchResponse 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 *PerformVoiceSearchResponseBody
}
func (o *PerformVoiceSearchResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *PerformVoiceSearchResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *PerformVoiceSearchResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *PerformVoiceSearchResponse) GetObject() *PerformVoiceSearchResponseBody {
if o == nil {
return nil
}
return o.Object
}