Files
plexgo/models/operations/getuserfriends.go

189 lines
3.3 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"net/http"
)
var GetUserFriendsServerList = []string{
"https://plex.tv/api/v2",
}
type SharedServers struct {
}
type SharedSources struct {
}
// Status - Current friend request status
type Status string
const (
StatusAccepted Status = "accepted"
)
func (e Status) ToPointer() *Status {
return &e
}
type Friend struct {
// The account email address
Email string `json:"email"`
// The account full name
FriendlyName *string `json:"friendlyName"`
// If the account is a Plex Home user
Home bool `json:"home"`
// The Plex account ID
ID int `json:"id"`
// If the account is a Plex Home managed user
Restricted *bool `default:"false" json:"restricted"`
SharedServers []SharedServers `json:"sharedServers"`
SharedSources []SharedSources `json:"sharedSources"`
// Current friend request status
Status Status `json:"status"`
// URL of the account thumbnail
Thumb string `json:"thumb"`
// The title of the account (username or friendly name)
Title string `json:"title"`
// The account username
Username string `json:"username"`
// The account Universally Unique Identifier (UUID)
UUID string `json:"uuid"`
}
func (f Friend) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(f, "", false)
}
func (f *Friend) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &f, "", false, false); err != nil {
return err
}
return nil
}
func (o *Friend) GetEmail() string {
if o == nil {
return ""
}
return o.Email
}
func (o *Friend) GetFriendlyName() *string {
if o == nil {
return nil
}
return o.FriendlyName
}
func (o *Friend) GetHome() bool {
if o == nil {
return false
}
return o.Home
}
func (o *Friend) GetID() int {
if o == nil {
return 0
}
return o.ID
}
func (o *Friend) GetRestricted() *bool {
if o == nil {
return nil
}
return o.Restricted
}
func (o *Friend) GetSharedServers() []SharedServers {
if o == nil {
return []SharedServers{}
}
return o.SharedServers
}
func (o *Friend) GetSharedSources() []SharedSources {
if o == nil {
return []SharedSources{}
}
return o.SharedSources
}
func (o *Friend) GetStatus() Status {
if o == nil {
return Status("")
}
return o.Status
}
func (o *Friend) GetThumb() string {
if o == nil {
return ""
}
return o.Thumb
}
func (o *Friend) GetTitle() string {
if o == nil {
return ""
}
return o.Title
}
func (o *Friend) GetUsername() string {
if o == nil {
return ""
}
return o.Username
}
func (o *Friend) GetUUID() string {
if o == nil {
return ""
}
return o.UUID
}
type GetUserFriendsResponse 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
// Friends Data
Friends []Friend
}
func (o *GetUserFriendsResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetUserFriendsResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetUserFriendsResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetUserFriendsResponse) GetFriends() []Friend {
if o == nil {
return nil
}
return o.Friends
}