mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
143 lines
3.3 KiB
Go
143 lines
3.3 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type GetResourcesStatisticsRequest struct {
|
|
// The timespan to retrieve statistics for
|
|
// the exact meaning of this parameter is not known
|
|
//
|
|
Timespan *int64 `queryParam:"style=form,explode=true,name=timespan"`
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsRequest) GetTimespan() *int64 {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Timespan
|
|
}
|
|
|
|
type StatisticsResources struct {
|
|
Timespan *int64 `json:"timespan,omitempty"`
|
|
At *int64 `json:"at,omitempty"`
|
|
HostCPUUtilization *float32 `json:"hostCpuUtilization,omitempty"`
|
|
ProcessCPUUtilization *float32 `json:"processCpuUtilization,omitempty"`
|
|
HostMemoryUtilization *float32 `json:"hostMemoryUtilization,omitempty"`
|
|
ProcessMemoryUtilization *float32 `json:"processMemoryUtilization,omitempty"`
|
|
}
|
|
|
|
func (s *StatisticsResources) GetTimespan() *int64 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.Timespan
|
|
}
|
|
|
|
func (s *StatisticsResources) GetAt() *int64 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.At
|
|
}
|
|
|
|
func (s *StatisticsResources) GetHostCPUUtilization() *float32 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.HostCPUUtilization
|
|
}
|
|
|
|
func (s *StatisticsResources) GetProcessCPUUtilization() *float32 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.ProcessCPUUtilization
|
|
}
|
|
|
|
func (s *StatisticsResources) GetHostMemoryUtilization() *float32 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.HostMemoryUtilization
|
|
}
|
|
|
|
func (s *StatisticsResources) GetProcessMemoryUtilization() *float32 {
|
|
if s == nil {
|
|
return nil
|
|
}
|
|
return s.ProcessMemoryUtilization
|
|
}
|
|
|
|
type GetResourcesStatisticsMediaContainer struct {
|
|
Size *int `json:"size,omitempty"`
|
|
StatisticsResources []StatisticsResources `json:"StatisticsResources,omitempty"`
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsMediaContainer) GetSize() *int {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Size
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsMediaContainer) GetStatisticsResources() []StatisticsResources {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.StatisticsResources
|
|
}
|
|
|
|
// GetResourcesStatisticsResponseBody - Resource Statistics
|
|
type GetResourcesStatisticsResponseBody struct {
|
|
MediaContainer *GetResourcesStatisticsMediaContainer `json:"MediaContainer,omitempty"`
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsResponseBody) GetMediaContainer() *GetResourcesStatisticsMediaContainer {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.MediaContainer
|
|
}
|
|
|
|
type GetResourcesStatisticsResponse 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
|
|
// Resource Statistics
|
|
Object *GetResourcesStatisticsResponseBody
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsResponse) GetContentType() string {
|
|
if g == nil {
|
|
return ""
|
|
}
|
|
return g.ContentType
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsResponse) GetStatusCode() int {
|
|
if g == nil {
|
|
return 0
|
|
}
|
|
return g.StatusCode
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsResponse) GetRawResponse() *http.Response {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.RawResponse
|
|
}
|
|
|
|
func (g *GetResourcesStatisticsResponse) GetObject() *GetResourcesStatisticsResponseBody {
|
|
if g == nil {
|
|
return nil
|
|
}
|
|
return g.Object
|
|
}
|