// 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, []string{"code", "continent_code", "country", "city", "time_zone", "postal_code", "subdivisions", "coordinates"}); err != nil { return err } return nil } func (g *GetGeoDataGeoData) GetCode() string { if g == nil { return "" } return g.Code } func (g *GetGeoDataGeoData) GetContinentCode() string { if g == nil { return "" } return g.ContinentCode } func (g *GetGeoDataGeoData) GetCountry() string { if g == nil { return "" } return g.Country } func (g *GetGeoDataGeoData) GetCity() string { if g == nil { return "" } return g.City } func (g *GetGeoDataGeoData) GetEuropeanUnionMember() *bool { if g == nil { return nil } return g.EuropeanUnionMember } func (g *GetGeoDataGeoData) GetTimeZone() string { if g == nil { return "" } return g.TimeZone } func (g *GetGeoDataGeoData) GetPostalCode() string { if g == nil { return "" } return g.PostalCode } func (g *GetGeoDataGeoData) GetInPrivacyRestrictedCountry() *bool { if g == nil { return nil } return g.InPrivacyRestrictedCountry } func (g *GetGeoDataGeoData) GetInPrivacyRestrictedRegion() *bool { if g == nil { return nil } return g.InPrivacyRestrictedRegion } func (g *GetGeoDataGeoData) GetSubdivisions() string { if g == nil { return "" } return g.Subdivisions } func (g *GetGeoDataGeoData) GetCoordinates() string { if g == nil { return "" } return g.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 (g *GetGeoDataResponse) GetContentType() string { if g == nil { return "" } return g.ContentType } func (g *GetGeoDataResponse) GetStatusCode() int { if g == nil { return 0 } return g.StatusCode } func (g *GetGeoDataResponse) GetRawResponse() *http.Response { if g == nil { return nil } return g.RawResponse } func (g *GetGeoDataResponse) GetGeoData() *GetGeoDataGeoData { if g == nil { return nil } return g.GeoData }