Files
plexgo/models/operations/getgeodata.go

166 lines
3.6 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package operations
import (
"github.com/LukeHagar/plexgo/internal/utils"
"net/http"
)
var GetGeoDataServerList = []string{
"https://plex.tv/api/v2",
}
// GetGeoDataGeoData - Geo location data
type GetGeoDataGeoData struct {
// The ISO 3166-1 alpha-2 code of the country.
Code string `json:"code"`
// The continent code where the country is located.
ContinentCode string `json:"continent_code"`
// The official name of the country.
Country string `json:"country"`
// The name of the city.
City string `json:"city"`
// Indicates if the country is a member of the European Union.
EuropeanUnionMember *bool `default:"false" json:"european_union_member"`
// The time zone of the country.
TimeZone string `json:"time_zone"`
// The postal code of the location.
PostalCode string `json:"postal_code"`
// Indicates if the country has privacy restrictions.
InPrivacyRestrictedCountry *bool `default:"false" json:"in_privacy_restricted_country"`
// Indicates if the region has privacy restrictions.
InPrivacyRestrictedRegion *bool `default:"false" json:"in_privacy_restricted_region"`
// The name of the primary administrative subdivision.
Subdivisions string `json:"subdivisions"`
// The geographical coordinates (latitude, longitude) of the location.
Coordinates string `json:"coordinates"`
}
func (g GetGeoDataGeoData) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(g, "", false)
}
func (g *GetGeoDataGeoData) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
return err
}
return nil
}
func (o *GetGeoDataGeoData) GetCode() string {
if o == nil {
return ""
}
return o.Code
}
func (o *GetGeoDataGeoData) GetContinentCode() string {
if o == nil {
return ""
}
return o.ContinentCode
}
func (o *GetGeoDataGeoData) GetCountry() string {
if o == nil {
return ""
}
return o.Country
}
func (o *GetGeoDataGeoData) GetCity() string {
if o == nil {
return ""
}
return o.City
}
func (o *GetGeoDataGeoData) GetEuropeanUnionMember() *bool {
if o == nil {
return nil
}
return o.EuropeanUnionMember
}
func (o *GetGeoDataGeoData) GetTimeZone() string {
if o == nil {
return ""
}
return o.TimeZone
}
func (o *GetGeoDataGeoData) GetPostalCode() string {
if o == nil {
return ""
}
return o.PostalCode
}
func (o *GetGeoDataGeoData) GetInPrivacyRestrictedCountry() *bool {
if o == nil {
return nil
}
return o.InPrivacyRestrictedCountry
}
func (o *GetGeoDataGeoData) GetInPrivacyRestrictedRegion() *bool {
if o == nil {
return nil
}
return o.InPrivacyRestrictedRegion
}
func (o *GetGeoDataGeoData) GetSubdivisions() string {
if o == nil {
return ""
}
return o.Subdivisions
}
func (o *GetGeoDataGeoData) GetCoordinates() string {
if o == nil {
return ""
}
return o.Coordinates
}
type GetGeoDataResponse 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
// Gets the geo location data of the user
GeoData *GetGeoDataGeoData
}
func (o *GetGeoDataResponse) GetContentType() string {
if o == nil {
return ""
}
return o.ContentType
}
func (o *GetGeoDataResponse) GetStatusCode() int {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *GetGeoDataResponse) GetRawResponse() *http.Response {
if o == nil {
return nil
}
return o.RawResponse
}
func (o *GetGeoDataResponse) GetGeoData() *GetGeoDataGeoData {
if o == nil {
return nil
}
return o.GeoData
}