| 1 | // Copyright 2026 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | // Code generated file. DO NOT EDIT. |
| 6 | |
| 7 | // Package places provides access to the Places API (New). |
| 8 | // |
| 9 | // For product documentation, see: https://mapsplatform.google.com/maps-products/#places-section |
| 10 | // |
| 11 | // # Library status |
| 12 | // |
| 13 | // These client libraries are officially supported by Google. However, this |
| 14 | // library is considered complete and is in maintenance mode. This means |
| 15 | // that we will address critical bugs and security issues but will not add |
| 16 | // any new features. |
| 17 | // |
| 18 | // When possible, we recommend using our newer |
| 19 | // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) |
| 20 | // that are still actively being worked and iterated on. |
| 21 | // |
| 22 | // # Creating a client |
| 23 | // |
| 24 | // Usage example: |
| 25 | // |
| 26 | // import "google.golang.org/api/places/v1" |
| 27 | // ... |
| 28 | // ctx := context.Background() |
| 29 | // placesService, err := places.NewService(ctx) |
| 30 | // |
| 31 | // In this example, Google Application Default Credentials are used for |
| 32 | // authentication. For information on how to create and obtain Application |
| 33 | // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. |
| 34 | // |
| 35 | // # Other authentication options |
| 36 | // |
| 37 | // By default, all available scopes (see "Constants") are used to authenticate. |
| 38 | // To restrict scopes, use [google.golang.org/api/option.WithScopes]: |
| 39 | // |
| 40 | // placesService, err := places.NewService(ctx, option.WithScopes(places.MapsPlatformPlacesTextsearchScope)) |
| 41 | // |
| 42 | // To use an API key for authentication (note: some APIs do not support API |
| 43 | // keys), use [google.golang.org/api/option.WithAPIKey]: |
| 44 | // |
| 45 | // placesService, err := places.NewService(ctx, option.WithAPIKey("AIza...")) |
| 46 | // |
| 47 | // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth |
| 48 | // flow, use [google.golang.org/api/option.WithTokenSource]: |
| 49 | // |
| 50 | // config := &oauth2.Config{...} |
| 51 | // // ... |
| 52 | // token, err := config.Exchange(ctx, ...) |
| 53 | // placesService, err := places.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) |
| 54 | // |
| 55 | // See [google.golang.org/api/option.ClientOption] for details on options. |
| 56 | package places // import "google.golang.org/api/places/v1" |
| 57 | |
| 58 | import ( |
| 59 | "bytes" |
| 60 | "context" |
| 61 | "encoding/json" |
| 62 | "errors" |
| 63 | "fmt" |
| 64 | "io" |
| 65 | "log/slog" |
| 66 | "net/http" |
| 67 | "net/url" |
| 68 | "strconv" |
| 69 | "strings" |
| 70 | |
| 71 | "github.com/googleapis/gax-go/v2/internallog" |
| 72 | googleapi "google.golang.org/api/googleapi" |
| 73 | internal "google.golang.org/api/internal" |
| 74 | gensupport "google.golang.org/api/internal/gensupport" |
| 75 | option "google.golang.org/api/option" |
| 76 | internaloption "google.golang.org/api/option/internaloption" |
| 77 | htransport "google.golang.org/api/transport/http" |
| 78 | ) |
| 79 | |
| 80 | // Always reference these packages, just in case the auto-generated code |
| 81 | // below doesn't. |
| 82 | var _ = bytes.NewBuffer |
| 83 | var _ = strconv.Itoa |
| 84 | var _ = fmt.Sprintf |
| 85 | var _ = json.NewDecoder |
| 86 | var _ = io.Copy |
| 87 | var _ = url.Parse |
| 88 | var _ = gensupport.MarshalJSON |
| 89 | var _ = googleapi.Version |
| 90 | var _ = errors.New |
| 91 | var _ = strings.Replace |
| 92 | var _ = context.Canceled |
| 93 | var _ = internaloption.WithDefaultEndpoint |
| 94 | var _ = internal.Version |
| 95 | var _ = internallog.New |
| 96 | |
| 97 | const apiId = "places:v1" |
| 98 | const apiName = "places" |
| 99 | const apiVersion = "v1" |
| 100 | const basePath = "https://places.googleapis.com/" |
| 101 | const basePathTemplate = "https://places.UNIVERSE_DOMAIN/" |
| 102 | const mtlsBasePath = "https://places.mtls.googleapis.com/" |
| 103 | |
| 104 | // OAuth2 scopes used by this API. |
| 105 | const ( |
| 106 | // See, edit, configure, and delete your Google Cloud data and see the email |
| 107 | // address for your Google Account. |
| 108 | CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" |
| 109 | |
| 110 | // Private Service: https://www.googleapis.com/auth/maps-platform.places |
| 111 | MapsPlatformPlacesScope = "https://www.googleapis.com/auth/maps-platform.places" |
| 112 | |
| 113 | // Private Service: |
| 114 | // https://www.googleapis.com/auth/maps-platform.places.autocomplete |
| 115 | MapsPlatformPlacesAutocompleteScope = "https://www.googleapis.com/auth/maps-platform.places.autocomplete" |
| 116 | |
| 117 | // Private Service: |
| 118 | // https://www.googleapis.com/auth/maps-platform.places.details |
| 119 | MapsPlatformPlacesDetailsScope = "https://www.googleapis.com/auth/maps-platform.places.details" |
| 120 | |
| 121 | // Private Service: |
| 122 | // https://www.googleapis.com/auth/maps-platform.places.getphotomedia |
| 123 | MapsPlatformPlacesGetphotomediaScope = "https://www.googleapis.com/auth/maps-platform.places.getphotomedia" |
| 124 | |
| 125 | // Private Service: |
| 126 | // https://www.googleapis.com/auth/maps-platform.places.nearbysearch |
| 127 | MapsPlatformPlacesNearbysearchScope = "https://www.googleapis.com/auth/maps-platform.places.nearbysearch" |
| 128 | |
| 129 | // Private Service: |
| 130 | // https://www.googleapis.com/auth/maps-platform.places.textsearch |
| 131 | MapsPlatformPlacesTextsearchScope = "https://www.googleapis.com/auth/maps-platform.places.textsearch" |
| 132 | ) |
| 133 | |
| 134 | // NewService creates a new Service. |
| 135 | func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { |
| 136 | scopesOption := internaloption.WithDefaultScopes( |
| 137 | "https://www.googleapis.com/auth/cloud-platform", |
| 138 | "https://www.googleapis.com/auth/maps-platform.places", |
| 139 | "https://www.googleapis.com/auth/maps-platform.places.autocomplete", |
| 140 | "https://www.googleapis.com/auth/maps-platform.places.details", |
| 141 | "https://www.googleapis.com/auth/maps-platform.places.getphotomedia", |
| 142 | "https://www.googleapis.com/auth/maps-platform.places.nearbysearch", |
| 143 | "https://www.googleapis.com/auth/maps-platform.places.textsearch", |
| 144 | ) |
| 145 | // NOTE: prepend, so we don't override user-specified scopes. |
| 146 | opts = append([]option.ClientOption{scopesOption}, opts...) |
| 147 | opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) |
| 148 | opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) |
| 149 | opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) |
| 150 | opts = append(opts, internaloption.EnableNewAuthLibrary()) |
| 151 | client, endpoint, err := htransport.NewClient(ctx, opts...) |
| 152 | if err != nil { |
| 153 | return nil, err |
| 154 | } |
| 155 | s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} |
| 156 | s.Places = NewPlacesService(s) |
| 157 | if endpoint != "" { |
| 158 | s.BasePath = endpoint |
| 159 | } |
| 160 | return s, nil |
| 161 | } |
| 162 | |
| 163 | // New creates a new Service. It uses the provided http.Client for requests. |
| 164 | // |
| 165 | // Deprecated: please use NewService instead. |
| 166 | // To provide a custom HTTP client, use option.WithHTTPClient. |
| 167 | // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. |
| 168 | func New(client *http.Client) (*Service, error) { |
| 169 | if client == nil { |
| 170 | return nil, errors.New("client is nil") |
| 171 | } |
| 172 | return NewService(context.TODO(), option.WithHTTPClient(client)) |
| 173 | } |
| 174 | |
| 175 | type Service struct { |
| 176 | client *http.Client |
| 177 | logger *slog.Logger |
| 178 | BasePath string // API endpoint base URL |
| 179 | UserAgent string // optional additional User-Agent fragment |
| 180 | |
| 181 | Places *PlacesService |
| 182 | } |
| 183 | |
| 184 | func (s *Service) userAgent() string { |
| 185 | if s.UserAgent == "" { |
| 186 | return googleapi.UserAgent |
| 187 | } |
| 188 | return googleapi.UserAgent + " " + s.UserAgent |
| 189 | } |
| 190 | |
| 191 | func NewPlacesService(s *Service) *PlacesService { |
| 192 | rs := &PlacesService{s: s} |
| 193 | rs.Photos = NewPlacesPhotosService(s) |
| 194 | return rs |
| 195 | } |
| 196 | |
| 197 | type PlacesService struct { |
| 198 | s *Service |
| 199 | |
| 200 | Photos *PlacesPhotosService |
| 201 | } |
| 202 | |
| 203 | func NewPlacesPhotosService(s *Service) *PlacesPhotosService { |
| 204 | rs := &PlacesPhotosService{s: s} |
| 205 | return rs |
| 206 | } |
| 207 | |
| 208 | type PlacesPhotosService struct { |
| 209 | s *Service |
| 210 | } |
| 211 | |
| 212 | // GoogleGeoTypeViewport: A latitude-longitude viewport, represented as two |
| 213 | // diagonally opposite `low` and `high` points. A viewport is considered a |
| 214 | // closed region, i.e. it includes its boundary. The latitude bounds must range |
| 215 | // between -90 to 90 degrees inclusive, and the longitude bounds must range |
| 216 | // between -180 to 180 degrees inclusive. Various cases include: - If `low` = |
| 217 | // `high`, the viewport consists of that single point. - If `low.longitude` > |
| 218 | // `high.longitude`, the longitude range is inverted (the viewport crosses the |
| 219 | // 180 degree longitude line). - If `low.longitude` = -180 degrees and |
| 220 | // `high.longitude` = 180 degrees, the viewport includes all longitudes. - If |
| 221 | // `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, the |
| 222 | // longitude range is empty. - If `low.latitude` > `high.latitude`, the |
| 223 | // latitude range is empty. Both `low` and `high` must be populated, and the |
| 224 | // represented box cannot be empty (as specified by the definitions above). An |
| 225 | // empty viewport will result in an error. For example, this viewport fully |
| 226 | // encloses New York City: { "low": { "latitude": 40.477398, "longitude": |
| 227 | // -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } } |
| 228 | type GoogleGeoTypeViewport struct { |
| 229 | // High: Required. The high point of the viewport. |
| 230 | High *GoogleTypeLatLng `json:"high,omitempty"` |
| 231 | // Low: Required. The low point of the viewport. |
| 232 | Low *GoogleTypeLatLng `json:"low,omitempty"` |
| 233 | // ForceSendFields is a list of field names (e.g. "High") to unconditionally |
| 234 | // include in API requests. By default, fields with empty or default values are |
| 235 | // omitted from API requests. See |
| 236 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 237 | // details. |
| 238 | ForceSendFields []string `json:"-"` |
| 239 | // NullFields is a list of field names (e.g. "High") to include in API requests |
| 240 | // with the JSON null value. By default, fields with empty values are omitted |
| 241 | // from API requests. See |
| 242 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 243 | NullFields []string `json:"-"` |
| 244 | } |
| 245 | |
| 246 | func (s GoogleGeoTypeViewport) MarshalJSON() ([]byte, error) { |
| 247 | type NoMethod GoogleGeoTypeViewport |
| 248 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 249 | } |
| 250 | |
| 251 | // GoogleMapsPlacesV1AddressDescriptor: A relational description of a location. |
| 252 | // Includes a ranked set of nearby landmarks and precise containing areas and |
| 253 | // their relationship to the target location. |
| 254 | type GoogleMapsPlacesV1AddressDescriptor struct { |
| 255 | // Areas: A ranked list of containing or adjacent areas. The most recognizable |
| 256 | // and precise areas are ranked first. |
| 257 | Areas []*GoogleMapsPlacesV1AddressDescriptorArea `json:"areas,omitempty"` |
| 258 | // Landmarks: A ranked list of nearby landmarks. The most recognizable and |
| 259 | // nearby landmarks are ranked first. |
| 260 | Landmarks []*GoogleMapsPlacesV1AddressDescriptorLandmark `json:"landmarks,omitempty"` |
| 261 | // ForceSendFields is a list of field names (e.g. "Areas") to unconditionally |
| 262 | // include in API requests. By default, fields with empty or default values are |
| 263 | // omitted from API requests. See |
| 264 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 265 | // details. |
| 266 | ForceSendFields []string `json:"-"` |
| 267 | // NullFields is a list of field names (e.g. "Areas") to include in API |
| 268 | // requests with the JSON null value. By default, fields with empty values are |
| 269 | // omitted from API requests. See |
| 270 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 271 | NullFields []string `json:"-"` |
| 272 | } |
| 273 | |
| 274 | func (s GoogleMapsPlacesV1AddressDescriptor) MarshalJSON() ([]byte, error) { |
| 275 | type NoMethod GoogleMapsPlacesV1AddressDescriptor |
| 276 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 277 | } |
| 278 | |
| 279 | // GoogleMapsPlacesV1AddressDescriptorArea: Area information and the area's |
| 280 | // relationship with the target location. Areas includes precise sublocality, |
| 281 | // neighborhoods, and large compounds that are useful for describing a |
| 282 | // location. |
| 283 | type GoogleMapsPlacesV1AddressDescriptorArea struct { |
| 284 | // Containment: Defines the spatial relationship between the target location |
| 285 | // and the area. |
| 286 | // |
| 287 | // Possible values: |
| 288 | // "CONTAINMENT_UNSPECIFIED" - The containment is unspecified. |
| 289 | // "WITHIN" - The target location is within the area region, close to the |
| 290 | // center. |
| 291 | // "OUTSKIRTS" - The target location is within the area region, close to the |
| 292 | // edge. |
| 293 | // "NEAR" - The target location is outside the area region, but close by. |
| 294 | Containment string `json:"containment,omitempty"` |
| 295 | // DisplayName: The area's display name. |
| 296 | DisplayName *GoogleTypeLocalizedText `json:"displayName,omitempty"` |
| 297 | // Name: The area's resource name. |
| 298 | Name string `json:"name,omitempty"` |
| 299 | // PlaceId: The area's place id. |
| 300 | PlaceId string `json:"placeId,omitempty"` |
| 301 | // ForceSendFields is a list of field names (e.g. "Containment") to |
| 302 | // unconditionally include in API requests. By default, fields with empty or |
| 303 | // default values are omitted from API requests. See |
| 304 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 305 | // details. |
| 306 | ForceSendFields []string `json:"-"` |
| 307 | // NullFields is a list of field names (e.g. "Containment") to include in API |
| 308 | // requests with the JSON null value. By default, fields with empty values are |
| 309 | // omitted from API requests. See |
| 310 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 311 | NullFields []string `json:"-"` |
| 312 | } |
| 313 | |
| 314 | func (s GoogleMapsPlacesV1AddressDescriptorArea) MarshalJSON() ([]byte, error) { |
| 315 | type NoMethod GoogleMapsPlacesV1AddressDescriptorArea |
| 316 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 317 | } |
| 318 | |
| 319 | // GoogleMapsPlacesV1AddressDescriptorLandmark: Basic landmark information and |
| 320 | // the landmark's relationship with the target location. Landmarks are |
| 321 | // prominent places that can be used to describe a location. |
| 322 | type GoogleMapsPlacesV1AddressDescriptorLandmark struct { |
| 323 | // DisplayName: The landmark's display name. |
| 324 | DisplayName *GoogleTypeLocalizedText `json:"displayName,omitempty"` |
| 325 | // Name: The landmark's resource name. |
| 326 | Name string `json:"name,omitempty"` |
| 327 | // PlaceId: The landmark's place id. |
| 328 | PlaceId string `json:"placeId,omitempty"` |
| 329 | // SpatialRelationship: Defines the spatial relationship between the target |
| 330 | // location and the landmark. |
| 331 | // |
| 332 | // Possible values: |
| 333 | // "NEAR" - This is the default relationship when nothing more specific below |
| 334 | // applies. |
| 335 | // "WITHIN" - The landmark has a spatial geometry and the target is within |
| 336 | // its bounds. |
| 337 | // "BESIDE" - The target is directly adjacent to the landmark. |
| 338 | // "ACROSS_THE_ROAD" - The target is directly opposite the landmark on the |
| 339 | // other side of the road. |
| 340 | // "DOWN_THE_ROAD" - On the same route as the landmark but not besides or |
| 341 | // across. |
| 342 | // "AROUND_THE_CORNER" - Not on the same route as the landmark but a single |
| 343 | // turn away. |
| 344 | // "BEHIND" - Close to the landmark's structure but further away from its |
| 345 | // street entrances. |
| 346 | SpatialRelationship string `json:"spatialRelationship,omitempty"` |
| 347 | // StraightLineDistanceMeters: The straight line distance, in meters, between |
| 348 | // the center point of the target and the center point of the landmark. In some |
| 349 | // situations, this value can be longer than `travel_distance_meters`. |
| 350 | StraightLineDistanceMeters float64 `json:"straightLineDistanceMeters,omitempty"` |
| 351 | // TravelDistanceMeters: The travel distance, in meters, along the road network |
| 352 | // from the target to the landmark, if known. This value does not take into |
| 353 | // account the mode of transportation, such as walking, driving, or biking. |
| 354 | TravelDistanceMeters float64 `json:"travelDistanceMeters,omitempty"` |
| 355 | // Types: A set of type tags for this landmark. For a complete list of possible |
| 356 | // values, see |
| 357 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 358 | Types []string `json:"types,omitempty"` |
| 359 | // ForceSendFields is a list of field names (e.g. "DisplayName") to |
| 360 | // unconditionally include in API requests. By default, fields with empty or |
| 361 | // default values are omitted from API requests. See |
| 362 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 363 | // details. |
| 364 | ForceSendFields []string `json:"-"` |
| 365 | // NullFields is a list of field names (e.g. "DisplayName") to include in API |
| 366 | // requests with the JSON null value. By default, fields with empty values are |
| 367 | // omitted from API requests. See |
| 368 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 369 | NullFields []string `json:"-"` |
| 370 | } |
| 371 | |
| 372 | func (s GoogleMapsPlacesV1AddressDescriptorLandmark) MarshalJSON() ([]byte, error) { |
| 373 | type NoMethod GoogleMapsPlacesV1AddressDescriptorLandmark |
| 374 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 375 | } |
| 376 | |
| 377 | func (s *GoogleMapsPlacesV1AddressDescriptorLandmark) UnmarshalJSON(data []byte) error { |
| 378 | type NoMethod GoogleMapsPlacesV1AddressDescriptorLandmark |
| 379 | var s1 struct { |
| 380 | StraightLineDistanceMeters gensupport.JSONFloat64 `json:"straightLineDistanceMeters"` |
| 381 | TravelDistanceMeters gensupport.JSONFloat64 `json:"travelDistanceMeters"` |
| 382 | *NoMethod |
| 383 | } |
| 384 | s1.NoMethod = (*NoMethod)(s) |
| 385 | if err := json.Unmarshal(data, &s1); err != nil { |
| 386 | return err |
| 387 | } |
| 388 | s.StraightLineDistanceMeters = float64(s1.StraightLineDistanceMeters) |
| 389 | s.TravelDistanceMeters = float64(s1.TravelDistanceMeters) |
| 390 | return nil |
| 391 | } |
| 392 | |
| 393 | // GoogleMapsPlacesV1AuthorAttribution: Information about the author of the UGC |
| 394 | // data. Used in Photo, and Review. |
| 395 | type GoogleMapsPlacesV1AuthorAttribution struct { |
| 396 | // DisplayName: Name of the author of the Photo or Review. |
| 397 | DisplayName string `json:"displayName,omitempty"` |
| 398 | // PhotoUri: Profile photo URI of the author of the Photo or Review. |
| 399 | PhotoUri string `json:"photoUri,omitempty"` |
| 400 | // Uri: URI of the author of the Photo or Review. |
| 401 | Uri string `json:"uri,omitempty"` |
| 402 | // ForceSendFields is a list of field names (e.g. "DisplayName") to |
| 403 | // unconditionally include in API requests. By default, fields with empty or |
| 404 | // default values are omitted from API requests. See |
| 405 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 406 | // details. |
| 407 | ForceSendFields []string `json:"-"` |
| 408 | // NullFields is a list of field names (e.g. "DisplayName") to include in API |
| 409 | // requests with the JSON null value. By default, fields with empty values are |
| 410 | // omitted from API requests. See |
| 411 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 412 | NullFields []string `json:"-"` |
| 413 | } |
| 414 | |
| 415 | func (s GoogleMapsPlacesV1AuthorAttribution) MarshalJSON() ([]byte, error) { |
| 416 | type NoMethod GoogleMapsPlacesV1AuthorAttribution |
| 417 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 418 | } |
| 419 | |
| 420 | // GoogleMapsPlacesV1AutocompletePlacesRequest: Request proto for |
| 421 | // AutocompletePlaces. |
| 422 | type GoogleMapsPlacesV1AutocompletePlacesRequest struct { |
| 423 | // IncludeFutureOpeningBusinesses: Optional. If true, include businesses that |
| 424 | // are not yet open but will open in the future. |
| 425 | IncludeFutureOpeningBusinesses bool `json:"includeFutureOpeningBusinesses,omitempty"` |
| 426 | // IncludePureServiceAreaBusinesses: Optional. Include pure service area |
| 427 | // businesses if the field is set to true. Pure service area business is a |
| 428 | // business that visits or delivers to customers directly but does not serve |
| 429 | // customers at their business address. For example, businesses like cleaning |
| 430 | // services or plumbers. Those businesses do not have a physical address or |
| 431 | // location on Google Maps. Places will not return fields including `location`, |
| 432 | // `plus_code`, and other location related fields for these businesses. |
| 433 | IncludePureServiceAreaBusinesses bool `json:"includePureServiceAreaBusinesses,omitempty"` |
| 434 | // IncludeQueryPredictions: Optional. If true, the response will include both |
| 435 | // Place and query predictions. Otherwise the response will only return Place |
| 436 | // predictions. |
| 437 | IncludeQueryPredictions bool `json:"includeQueryPredictions,omitempty"` |
| 438 | // IncludedPrimaryTypes: Optional. Included primary Place type (for example, |
| 439 | // "restaurant" or "gas_station") in Place Types |
| 440 | // (https://developers.google.com/maps/documentation/places/web-service/place-types), |
| 441 | // or only `(regions)`, or only `(cities)`. A Place is only returned if its |
| 442 | // primary type is included in this list. Up to 5 values can be specified. If |
| 443 | // no types are specified, all Place types are returned. |
| 444 | IncludedPrimaryTypes []string `json:"includedPrimaryTypes,omitempty"` |
| 445 | // IncludedRegionCodes: Optional. Only include results in the specified |
| 446 | // regions, specified as up to 15 CLDR two-character region codes. An empty set |
| 447 | // will not restrict the results. If both `location_restriction` and |
| 448 | // `included_region_codes` are set, the results will be located in the area of |
| 449 | // intersection. |
| 450 | IncludedRegionCodes []string `json:"includedRegionCodes,omitempty"` |
| 451 | // Input: Required. The text string on which to search. |
| 452 | Input string `json:"input,omitempty"` |
| 453 | // InputOffset: Optional. A zero-based Unicode character offset of `input` |
| 454 | // indicating the cursor position in `input`. The cursor position may influence |
| 455 | // what predictions are returned. If empty, defaults to the length of `input`. |
| 456 | InputOffset int64 `json:"inputOffset,omitempty"` |
| 457 | // LanguageCode: Optional. The language in which to return results. Defaults to |
| 458 | // en-US. The results may be in mixed languages if the language used in `input` |
| 459 | // is different from `language_code` or if the returned Place does not have a |
| 460 | // translation from the local language to `language_code`. |
| 461 | LanguageCode string `json:"languageCode,omitempty"` |
| 462 | // LocationBias: Optional. Bias results to a specified location. At most one of |
| 463 | // `location_bias` or `location_restriction` should be set. If neither are set, |
| 464 | // the results will be biased by IP address, meaning the IP address will be |
| 465 | // mapped to an imprecise location and used as a biasing signal. |
| 466 | LocationBias *GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias `json:"locationBias,omitempty"` |
| 467 | // LocationRestriction: Optional. Restrict results to a specified location. At |
| 468 | // most one of `location_bias` or `location_restriction` should be set. If |
| 469 | // neither are set, the results will be biased by IP address, meaning the IP |
| 470 | // address will be mapped to an imprecise location and used as a biasing |
| 471 | // signal. |
| 472 | LocationRestriction *GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction `json:"locationRestriction,omitempty"` |
| 473 | // Origin: Optional. The origin point from which to calculate geodesic distance |
| 474 | // to the destination (returned as `distance_meters`). If this value is |
| 475 | // omitted, geodesic distance will not be returned. |
| 476 | Origin *GoogleTypeLatLng `json:"origin,omitempty"` |
| 477 | // RegionCode: Optional. The region code, specified as a CLDR two-character |
| 478 | // region code. This affects address formatting, result ranking, and may |
| 479 | // influence what results are returned. This does not restrict results to the |
| 480 | // specified region. To restrict results to a region, use |
| 481 | // `region_code_restriction`. |
| 482 | RegionCode string `json:"regionCode,omitempty"` |
| 483 | // SessionToken: Optional. A string which identifies an Autocomplete session |
| 484 | // for billing purposes. Must be a URL and filename safe base64 string with at |
| 485 | // most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is |
| 486 | // returned. The session begins when the user starts typing a query, and |
| 487 | // concludes when they select a place and a call to Place Details or Address |
| 488 | // Validation is made. Each session can have multiple queries, followed by one |
| 489 | // Place Details or Address Validation request. The credentials used for each |
| 490 | // request within a session must belong to the same Google Cloud Console |
| 491 | // project. Once a session has concluded, the token is no longer valid; your |
| 492 | // app must generate a fresh token for each session. If the `session_token` |
| 493 | // parameter is omitted, or if you reuse a session token, the session is |
| 494 | // charged as if no session token was provided (each request is billed |
| 495 | // separately). We recommend the following guidelines: * Use session tokens for |
| 496 | // all Place Autocomplete calls. * Generate a fresh token for each session. |
| 497 | // Using a version 4 UUID is recommended. * Ensure that the credentials used |
| 498 | // for all Place Autocomplete, Place Details, and Address Validation requests |
| 499 | // within a session belong to the same Cloud Console project. * Be sure to pass |
| 500 | // a unique session token for each new session. Using the same token for more |
| 501 | // than one session will result in each request being billed individually. |
| 502 | SessionToken string `json:"sessionToken,omitempty"` |
| 503 | // ForceSendFields is a list of field names (e.g. |
| 504 | // "IncludeFutureOpeningBusinesses") to unconditionally include in API |
| 505 | // requests. By default, fields with empty or default values are omitted from |
| 506 | // API requests. See |
| 507 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 508 | // details. |
| 509 | ForceSendFields []string `json:"-"` |
| 510 | // NullFields is a list of field names (e.g. "IncludeFutureOpeningBusinesses") |
| 511 | // to include in API requests with the JSON null value. By default, fields with |
| 512 | // empty values are omitted from API requests. See |
| 513 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 514 | NullFields []string `json:"-"` |
| 515 | } |
| 516 | |
| 517 | func (s GoogleMapsPlacesV1AutocompletePlacesRequest) MarshalJSON() ([]byte, error) { |
| 518 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequest |
| 519 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 520 | } |
| 521 | |
| 522 | // GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias: The region to |
| 523 | // search. The results may be biased around the specified region. |
| 524 | type GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias struct { |
| 525 | // Circle: A circle defined by a center point and radius. |
| 526 | Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` |
| 527 | // Rectangle: A viewport defined by a northeast and a southwest corner. |
| 528 | Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` |
| 529 | // ForceSendFields is a list of field names (e.g. "Circle") to unconditionally |
| 530 | // include in API requests. By default, fields with empty or default values are |
| 531 | // omitted from API requests. See |
| 532 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 533 | // details. |
| 534 | ForceSendFields []string `json:"-"` |
| 535 | // NullFields is a list of field names (e.g. "Circle") to include in API |
| 536 | // requests with the JSON null value. By default, fields with empty values are |
| 537 | // omitted from API requests. See |
| 538 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 539 | NullFields []string `json:"-"` |
| 540 | } |
| 541 | |
| 542 | func (s GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias) MarshalJSON() ([]byte, error) { |
| 543 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias |
| 544 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 545 | } |
| 546 | |
| 547 | // GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction: The region |
| 548 | // to search. The results will be restricted to the specified region. |
| 549 | type GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction struct { |
| 550 | // Circle: A circle defined by a center point and radius. |
| 551 | Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` |
| 552 | // Rectangle: A viewport defined by a northeast and a southwest corner. |
| 553 | Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` |
| 554 | // ForceSendFields is a list of field names (e.g. "Circle") to unconditionally |
| 555 | // include in API requests. By default, fields with empty or default values are |
| 556 | // omitted from API requests. See |
| 557 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 558 | // details. |
| 559 | ForceSendFields []string `json:"-"` |
| 560 | // NullFields is a list of field names (e.g. "Circle") to include in API |
| 561 | // requests with the JSON null value. By default, fields with empty values are |
| 562 | // omitted from API requests. See |
| 563 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 564 | NullFields []string `json:"-"` |
| 565 | } |
| 566 | |
| 567 | func (s GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction) MarshalJSON() ([]byte, error) { |
| 568 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction |
| 569 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 570 | } |
| 571 | |
| 572 | // GoogleMapsPlacesV1AutocompletePlacesResponse: Response proto for |
| 573 | // AutocompletePlaces. |
| 574 | type GoogleMapsPlacesV1AutocompletePlacesResponse struct { |
| 575 | // Suggestions: Contains a list of suggestions, ordered in descending order of |
| 576 | // relevance. |
| 577 | Suggestions []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion `json:"suggestions,omitempty"` |
| 578 | |
| 579 | // ServerResponse contains the HTTP response code and headers from the server. |
| 580 | googleapi.ServerResponse `json:"-"` |
| 581 | // ForceSendFields is a list of field names (e.g. "Suggestions") to |
| 582 | // unconditionally include in API requests. By default, fields with empty or |
| 583 | // default values are omitted from API requests. See |
| 584 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 585 | // details. |
| 586 | ForceSendFields []string `json:"-"` |
| 587 | // NullFields is a list of field names (e.g. "Suggestions") to include in API |
| 588 | // requests with the JSON null value. By default, fields with empty values are |
| 589 | // omitted from API requests. See |
| 590 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 591 | NullFields []string `json:"-"` |
| 592 | } |
| 593 | |
| 594 | func (s GoogleMapsPlacesV1AutocompletePlacesResponse) MarshalJSON() ([]byte, error) { |
| 595 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponse |
| 596 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 597 | } |
| 598 | |
| 599 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion: An Autocomplete |
| 600 | // suggestion result. |
| 601 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion struct { |
| 602 | // PlacePrediction: A prediction for a Place. |
| 603 | PlacePrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction `json:"placePrediction,omitempty"` |
| 604 | // QueryPrediction: A prediction for a query. |
| 605 | QueryPrediction *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction `json:"queryPrediction,omitempty"` |
| 606 | // ForceSendFields is a list of field names (e.g. "PlacePrediction") to |
| 607 | // unconditionally include in API requests. By default, fields with empty or |
| 608 | // default values are omitted from API requests. See |
| 609 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 610 | // details. |
| 611 | ForceSendFields []string `json:"-"` |
| 612 | // NullFields is a list of field names (e.g. "PlacePrediction") to include in |
| 613 | // API requests with the JSON null value. By default, fields with empty values |
| 614 | // are omitted from API requests. See |
| 615 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 616 | NullFields []string `json:"-"` |
| 617 | } |
| 618 | |
| 619 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion) MarshalJSON() ([]byte, error) { |
| 620 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion |
| 621 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 622 | } |
| 623 | |
| 624 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText: Text |
| 625 | // representing a Place or query prediction. The text may be used as is or |
| 626 | // formatted. |
| 627 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText struct { |
| 628 | // Matches: A list of string ranges identifying where the input request matched |
| 629 | // in `text`. The ranges can be used to format specific parts of `text`. The |
| 630 | // substrings may not be exact matches of `input` if the matching was |
| 631 | // determined by criteria other than string matching (for example, spell |
| 632 | // corrections or transliterations). These values are Unicode character offsets |
| 633 | // of `text`. The ranges are guaranteed to be ordered in increasing offset |
| 634 | // values. |
| 635 | Matches []*GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange `json:"matches,omitempty"` |
| 636 | // Text: Text that may be used as is or formatted with `matches`. |
| 637 | Text string `json:"text,omitempty"` |
| 638 | // ForceSendFields is a list of field names (e.g. "Matches") to unconditionally |
| 639 | // include in API requests. By default, fields with empty or default values are |
| 640 | // omitted from API requests. See |
| 641 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 642 | // details. |
| 643 | ForceSendFields []string `json:"-"` |
| 644 | // NullFields is a list of field names (e.g. "Matches") to include in API |
| 645 | // requests with the JSON null value. By default, fields with empty values are |
| 646 | // omitted from API requests. See |
| 647 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 648 | NullFields []string `json:"-"` |
| 649 | } |
| 650 | |
| 651 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText) MarshalJSON() ([]byte, error) { |
| 652 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText |
| 653 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 654 | } |
| 655 | |
| 656 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction: |
| 657 | // Prediction results for a Place Autocomplete prediction. |
| 658 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction struct { |
| 659 | // DistanceMeters: The length of the geodesic in meters from `origin` if |
| 660 | // `origin` is specified. Certain predictions such as routes may not populate |
| 661 | // this field. |
| 662 | DistanceMeters int64 `json:"distanceMeters,omitempty"` |
| 663 | // Place: The resource name of the suggested Place. This name can be used in |
| 664 | // other APIs that accept Place names. |
| 665 | Place string `json:"place,omitempty"` |
| 666 | // PlaceId: The unique identifier of the suggested Place. This identifier can |
| 667 | // be used in other APIs that accept Place IDs. |
| 668 | PlaceId string `json:"placeId,omitempty"` |
| 669 | // StructuredFormat: A breakdown of the Place prediction into main text |
| 670 | // containing the name of the Place and secondary text containing additional |
| 671 | // disambiguating features (such as a city or region). `structured_format` is |
| 672 | // recommended for developers who wish to show two separate, but related, UI |
| 673 | // elements. Developers who wish to show a single UI element may want to use |
| 674 | // `text` instead. They are two different ways to represent a Place prediction. |
| 675 | // Users should not try to parse `structured_format` into `text` or vice versa. |
| 676 | StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` |
| 677 | // Text: Contains the human-readable name for the returned result. For |
| 678 | // establishment results, this is usually the business name and address. `text` |
| 679 | // is recommended for developers who wish to show a single UI element. |
| 680 | // Developers who wish to show two separate, but related, UI elements may want |
| 681 | // to use `structured_format` instead. They are two different ways to represent |
| 682 | // a Place prediction. Users should not try to parse `structured_format` into |
| 683 | // `text` or vice versa. This text may be different from the `display_name` |
| 684 | // returned by GetPlace. May be in mixed languages if the request `input` and |
| 685 | // `language_code` are in different languages or if the Place does not have a |
| 686 | // translation from the local language to `language_code`. |
| 687 | Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` |
| 688 | // Types: List of types that apply to this Place from Table A or Table B in |
| 689 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 690 | // A type is a categorization of a Place. Places with shared types will share |
| 691 | // similar characteristics. |
| 692 | Types []string `json:"types,omitempty"` |
| 693 | // ForceSendFields is a list of field names (e.g. "DistanceMeters") to |
| 694 | // unconditionally include in API requests. By default, fields with empty or |
| 695 | // default values are omitted from API requests. See |
| 696 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 697 | // details. |
| 698 | ForceSendFields []string `json:"-"` |
| 699 | // NullFields is a list of field names (e.g. "DistanceMeters") to include in |
| 700 | // API requests with the JSON null value. By default, fields with empty values |
| 701 | // are omitted from API requests. See |
| 702 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 703 | NullFields []string `json:"-"` |
| 704 | } |
| 705 | |
| 706 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction) MarshalJSON() ([]byte, error) { |
| 707 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction |
| 708 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 709 | } |
| 710 | |
| 711 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction: |
| 712 | // Prediction results for a Query Autocomplete prediction. |
| 713 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction struct { |
| 714 | // StructuredFormat: A breakdown of the query prediction into main text |
| 715 | // containing the query and secondary text containing additional disambiguating |
| 716 | // features (such as a city or region). `structured_format` is recommended for |
| 717 | // developers who wish to show two separate, but related, UI elements. |
| 718 | // Developers who wish to show a single UI element may want to use `text` |
| 719 | // instead. They are two different ways to represent a query prediction. Users |
| 720 | // should not try to parse `structured_format` into `text` or vice versa. |
| 721 | StructuredFormat *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat `json:"structuredFormat,omitempty"` |
| 722 | // Text: The predicted text. This text does not represent a Place, but rather a |
| 723 | // text query that could be used in a search endpoint (for example, Text |
| 724 | // Search). `text` is recommended for developers who wish to show a single UI |
| 725 | // element. Developers who wish to show two separate, but related, UI elements |
| 726 | // may want to use `structured_format` instead. They are two different ways to |
| 727 | // represent a query prediction. Users should not try to parse |
| 728 | // `structured_format` into `text` or vice versa. May be in mixed languages if |
| 729 | // the request `input` and `language_code` are in different languages or if |
| 730 | // part of the query does not have a translation from the local language to |
| 731 | // `language_code`. |
| 732 | Text *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"text,omitempty"` |
| 733 | // ForceSendFields is a list of field names (e.g. "StructuredFormat") to |
| 734 | // unconditionally include in API requests. By default, fields with empty or |
| 735 | // default values are omitted from API requests. See |
| 736 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 737 | // details. |
| 738 | ForceSendFields []string `json:"-"` |
| 739 | // NullFields is a list of field names (e.g. "StructuredFormat") to include in |
| 740 | // API requests with the JSON null value. By default, fields with empty values |
| 741 | // are omitted from API requests. See |
| 742 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 743 | NullFields []string `json:"-"` |
| 744 | } |
| 745 | |
| 746 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction) MarshalJSON() ([]byte, error) { |
| 747 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction |
| 748 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 749 | } |
| 750 | |
| 751 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange: |
| 752 | // Identifies a substring within a given text. |
| 753 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange struct { |
| 754 | // EndOffset: Zero-based offset of the last Unicode character (exclusive). |
| 755 | EndOffset int64 `json:"endOffset,omitempty"` |
| 756 | // StartOffset: Zero-based offset of the first Unicode character of the string |
| 757 | // (inclusive). |
| 758 | StartOffset int64 `json:"startOffset,omitempty"` |
| 759 | // ForceSendFields is a list of field names (e.g. "EndOffset") to |
| 760 | // unconditionally include in API requests. By default, fields with empty or |
| 761 | // default values are omitted from API requests. See |
| 762 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 763 | // details. |
| 764 | ForceSendFields []string `json:"-"` |
| 765 | // NullFields is a list of field names (e.g. "EndOffset") to include in API |
| 766 | // requests with the JSON null value. By default, fields with empty values are |
| 767 | // omitted from API requests. See |
| 768 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 769 | NullFields []string `json:"-"` |
| 770 | } |
| 771 | |
| 772 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange) MarshalJSON() ([]byte, error) { |
| 773 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange |
| 774 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 775 | } |
| 776 | |
| 777 | // GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat: |
| 778 | // Contains a breakdown of a Place or query prediction into main text and |
| 779 | // secondary text. For Place predictions, the main text contains the specific |
| 780 | // name of the Place. For query predictions, the main text contains the query. |
| 781 | // The secondary text contains additional disambiguating features (such as a |
| 782 | // city or region) to further identify the Place or refine the query. |
| 783 | type GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat struct { |
| 784 | // MainText: Represents the name of the Place or query. |
| 785 | MainText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"mainText,omitempty"` |
| 786 | // SecondaryText: Represents additional disambiguating features (such as a city |
| 787 | // or region) to further identify the Place or refine the query. |
| 788 | SecondaryText *GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText `json:"secondaryText,omitempty"` |
| 789 | // ForceSendFields is a list of field names (e.g. "MainText") to |
| 790 | // unconditionally include in API requests. By default, fields with empty or |
| 791 | // default values are omitted from API requests. See |
| 792 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 793 | // details. |
| 794 | ForceSendFields []string `json:"-"` |
| 795 | // NullFields is a list of field names (e.g. "MainText") to include in API |
| 796 | // requests with the JSON null value. By default, fields with empty values are |
| 797 | // omitted from API requests. See |
| 798 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 799 | NullFields []string `json:"-"` |
| 800 | } |
| 801 | |
| 802 | func (s GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat) MarshalJSON() ([]byte, error) { |
| 803 | type NoMethod GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat |
| 804 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 805 | } |
| 806 | |
| 807 | // GoogleMapsPlacesV1Circle: Circle with a LatLng as center and radius. |
| 808 | type GoogleMapsPlacesV1Circle struct { |
| 809 | // Center: Required. Center latitude and longitude. The range of latitude must |
| 810 | // be within [-90.0, 90.0]. The range of the longitude must be within [-180.0, |
| 811 | // 180.0]. |
| 812 | Center *GoogleTypeLatLng `json:"center,omitempty"` |
| 813 | // Radius: Required. Radius measured in meters. The radius must be within [0.0, |
| 814 | // 50000.0]. |
| 815 | Radius float64 `json:"radius,omitempty"` |
| 816 | // ForceSendFields is a list of field names (e.g. "Center") to unconditionally |
| 817 | // include in API requests. By default, fields with empty or default values are |
| 818 | // omitted from API requests. See |
| 819 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 820 | // details. |
| 821 | ForceSendFields []string `json:"-"` |
| 822 | // NullFields is a list of field names (e.g. "Center") to include in API |
| 823 | // requests with the JSON null value. By default, fields with empty values are |
| 824 | // omitted from API requests. See |
| 825 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 826 | NullFields []string `json:"-"` |
| 827 | } |
| 828 | |
| 829 | func (s GoogleMapsPlacesV1Circle) MarshalJSON() ([]byte, error) { |
| 830 | type NoMethod GoogleMapsPlacesV1Circle |
| 831 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 832 | } |
| 833 | |
| 834 | func (s *GoogleMapsPlacesV1Circle) UnmarshalJSON(data []byte) error { |
| 835 | type NoMethod GoogleMapsPlacesV1Circle |
| 836 | var s1 struct { |
| 837 | Radius gensupport.JSONFloat64 `json:"radius"` |
| 838 | *NoMethod |
| 839 | } |
| 840 | s1.NoMethod = (*NoMethod)(s) |
| 841 | if err := json.Unmarshal(data, &s1); err != nil { |
| 842 | return err |
| 843 | } |
| 844 | s.Radius = float64(s1.Radius) |
| 845 | return nil |
| 846 | } |
| 847 | |
| 848 | // GoogleMapsPlacesV1ContentBlock: A block of content that can be served |
| 849 | // individually. |
| 850 | type GoogleMapsPlacesV1ContentBlock struct { |
| 851 | // Content: Content related to the topic. |
| 852 | Content *GoogleTypeLocalizedText `json:"content,omitempty"` |
| 853 | // ReferencedPlaces: The list of resource names of the referenced places. This |
| 854 | // name can be used in other APIs that accept Place resource names. |
| 855 | ReferencedPlaces []string `json:"referencedPlaces,omitempty"` |
| 856 | // ForceSendFields is a list of field names (e.g. "Content") to unconditionally |
| 857 | // include in API requests. By default, fields with empty or default values are |
| 858 | // omitted from API requests. See |
| 859 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 860 | // details. |
| 861 | ForceSendFields []string `json:"-"` |
| 862 | // NullFields is a list of field names (e.g. "Content") to include in API |
| 863 | // requests with the JSON null value. By default, fields with empty values are |
| 864 | // omitted from API requests. See |
| 865 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 866 | NullFields []string `json:"-"` |
| 867 | } |
| 868 | |
| 869 | func (s GoogleMapsPlacesV1ContentBlock) MarshalJSON() ([]byte, error) { |
| 870 | type NoMethod GoogleMapsPlacesV1ContentBlock |
| 871 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 872 | } |
| 873 | |
| 874 | // GoogleMapsPlacesV1ContextualContent: Experimental: See |
| 875 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 876 | // for more details. Content that is contextual to the place query. |
| 877 | type GoogleMapsPlacesV1ContextualContent struct { |
| 878 | // Justifications: Experimental: See |
| 879 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 880 | // for more details. Justifications for the place. |
| 881 | Justifications []*GoogleMapsPlacesV1ContextualContentJustification `json:"justifications,omitempty"` |
| 882 | // Photos: Information (including references) about photos of this place, |
| 883 | // contextual to the place query. |
| 884 | Photos []*GoogleMapsPlacesV1Photo `json:"photos,omitempty"` |
| 885 | // Reviews: List of reviews about this place, contextual to the place query. |
| 886 | Reviews []*GoogleMapsPlacesV1Review `json:"reviews,omitempty"` |
| 887 | // ForceSendFields is a list of field names (e.g. "Justifications") to |
| 888 | // unconditionally include in API requests. By default, fields with empty or |
| 889 | // default values are omitted from API requests. See |
| 890 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 891 | // details. |
| 892 | ForceSendFields []string `json:"-"` |
| 893 | // NullFields is a list of field names (e.g. "Justifications") to include in |
| 894 | // API requests with the JSON null value. By default, fields with empty values |
| 895 | // are omitted from API requests. See |
| 896 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 897 | NullFields []string `json:"-"` |
| 898 | } |
| 899 | |
| 900 | func (s GoogleMapsPlacesV1ContextualContent) MarshalJSON() ([]byte, error) { |
| 901 | type NoMethod GoogleMapsPlacesV1ContextualContent |
| 902 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 903 | } |
| 904 | |
| 905 | // GoogleMapsPlacesV1ContextualContentJustification: Experimental: See |
| 906 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 907 | // for more details. Justifications for the place. Justifications answers the |
| 908 | // question of why a place could interest an end user. |
| 909 | type GoogleMapsPlacesV1ContextualContentJustification struct { |
| 910 | // BusinessAvailabilityAttributesJustification: Experimental: See |
| 911 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 912 | // for more details. |
| 913 | BusinessAvailabilityAttributesJustification *GoogleMapsPlacesV1ContextualContentJustificationBusinessAvailabilityAttributesJustification `json:"businessAvailabilityAttributesJustification,omitempty"` |
| 914 | // ReviewJustification: Experimental: See |
| 915 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 916 | // for more details. |
| 917 | ReviewJustification *GoogleMapsPlacesV1ContextualContentJustificationReviewJustification `json:"reviewJustification,omitempty"` |
| 918 | // ForceSendFields is a list of field names (e.g. |
| 919 | // "BusinessAvailabilityAttributesJustification") to unconditionally include in |
| 920 | // API requests. By default, fields with empty or default values are omitted |
| 921 | // from API requests. See |
| 922 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 923 | // details. |
| 924 | ForceSendFields []string `json:"-"` |
| 925 | // NullFields is a list of field names (e.g. |
| 926 | // "BusinessAvailabilityAttributesJustification") to include in API requests |
| 927 | // with the JSON null value. By default, fields with empty values are omitted |
| 928 | // from API requests. See |
| 929 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 930 | NullFields []string `json:"-"` |
| 931 | } |
| 932 | |
| 933 | func (s GoogleMapsPlacesV1ContextualContentJustification) MarshalJSON() ([]byte, error) { |
| 934 | type NoMethod GoogleMapsPlacesV1ContextualContentJustification |
| 935 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 936 | } |
| 937 | |
| 938 | // GoogleMapsPlacesV1ContextualContentJustificationBusinessAvailabilityAttribute |
| 939 | // sJustification: Experimental: See |
| 940 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 941 | // for more details. BusinessAvailabilityAttributes justifications. This shows |
| 942 | // some attributes a business has that could interest an end user. |
| 943 | type GoogleMapsPlacesV1ContextualContentJustificationBusinessAvailabilityAttributesJustification struct { |
| 944 | // Delivery: If a place provides delivery. |
| 945 | Delivery bool `json:"delivery,omitempty"` |
| 946 | // DineIn: If a place provides dine-in. |
| 947 | DineIn bool `json:"dineIn,omitempty"` |
| 948 | // Takeout: If a place provides takeout. |
| 949 | Takeout bool `json:"takeout,omitempty"` |
| 950 | // ForceSendFields is a list of field names (e.g. "Delivery") to |
| 951 | // unconditionally include in API requests. By default, fields with empty or |
| 952 | // default values are omitted from API requests. See |
| 953 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 954 | // details. |
| 955 | ForceSendFields []string `json:"-"` |
| 956 | // NullFields is a list of field names (e.g. "Delivery") to include in API |
| 957 | // requests with the JSON null value. By default, fields with empty values are |
| 958 | // omitted from API requests. See |
| 959 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 960 | NullFields []string `json:"-"` |
| 961 | } |
| 962 | |
| 963 | func (s GoogleMapsPlacesV1ContextualContentJustificationBusinessAvailabilityAttributesJustification) MarshalJSON() ([]byte, error) { |
| 964 | type NoMethod GoogleMapsPlacesV1ContextualContentJustificationBusinessAvailabilityAttributesJustification |
| 965 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 966 | } |
| 967 | |
| 968 | // GoogleMapsPlacesV1ContextualContentJustificationReviewJustification: |
| 969 | // Experimental: See |
| 970 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 971 | // for more details. User review justifications. This highlights a section of |
| 972 | // the user review that would interest an end user. For instance, if the search |
| 973 | // query is "firewood pizza", the review justification highlights the text |
| 974 | // relevant to the search query. |
| 975 | type GoogleMapsPlacesV1ContextualContentJustificationReviewJustification struct { |
| 976 | HighlightedText *GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedText `json:"highlightedText,omitempty"` |
| 977 | // Review: The review that the highlighted text is generated from. |
| 978 | Review *GoogleMapsPlacesV1Review `json:"review,omitempty"` |
| 979 | // ForceSendFields is a list of field names (e.g. "HighlightedText") to |
| 980 | // unconditionally include in API requests. By default, fields with empty or |
| 981 | // default values are omitted from API requests. See |
| 982 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 983 | // details. |
| 984 | ForceSendFields []string `json:"-"` |
| 985 | // NullFields is a list of field names (e.g. "HighlightedText") to include in |
| 986 | // API requests with the JSON null value. By default, fields with empty values |
| 987 | // are omitted from API requests. See |
| 988 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 989 | NullFields []string `json:"-"` |
| 990 | } |
| 991 | |
| 992 | func (s GoogleMapsPlacesV1ContextualContentJustificationReviewJustification) MarshalJSON() ([]byte, error) { |
| 993 | type NoMethod GoogleMapsPlacesV1ContextualContentJustificationReviewJustification |
| 994 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 995 | } |
| 996 | |
| 997 | // GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlighte |
| 998 | // dText: The text highlighted by the justification. This is a subset of the |
| 999 | // review itself. The exact word to highlight is marked by the |
| 1000 | // HighlightedTextRange. There could be several words in the text being |
| 1001 | // highlighted. |
| 1002 | type GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedText struct { |
| 1003 | // HighlightedTextRanges: The list of the ranges of the highlighted text. |
| 1004 | HighlightedTextRanges []*GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedTextHighlightedTextRange `json:"highlightedTextRanges,omitempty"` |
| 1005 | Text string `json:"text,omitempty"` |
| 1006 | // ForceSendFields is a list of field names (e.g. "HighlightedTextRanges") to |
| 1007 | // unconditionally include in API requests. By default, fields with empty or |
| 1008 | // default values are omitted from API requests. See |
| 1009 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1010 | // details. |
| 1011 | ForceSendFields []string `json:"-"` |
| 1012 | // NullFields is a list of field names (e.g. "HighlightedTextRanges") to |
| 1013 | // include in API requests with the JSON null value. By default, fields with |
| 1014 | // empty values are omitted from API requests. See |
| 1015 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1016 | NullFields []string `json:"-"` |
| 1017 | } |
| 1018 | |
| 1019 | func (s GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedText) MarshalJSON() ([]byte, error) { |
| 1020 | type NoMethod GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedText |
| 1021 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1022 | } |
| 1023 | |
| 1024 | // GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlighte |
| 1025 | // dTextHighlightedTextRange: The range of highlighted text. |
| 1026 | type GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedTextHighlightedTextRange struct { |
| 1027 | EndIndex int64 `json:"endIndex,omitempty"` |
| 1028 | StartIndex int64 `json:"startIndex,omitempty"` |
| 1029 | // ForceSendFields is a list of field names (e.g. "EndIndex") to |
| 1030 | // unconditionally include in API requests. By default, fields with empty or |
| 1031 | // default values are omitted from API requests. See |
| 1032 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1033 | // details. |
| 1034 | ForceSendFields []string `json:"-"` |
| 1035 | // NullFields is a list of field names (e.g. "EndIndex") to include in API |
| 1036 | // requests with the JSON null value. By default, fields with empty values are |
| 1037 | // omitted from API requests. See |
| 1038 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1039 | NullFields []string `json:"-"` |
| 1040 | } |
| 1041 | |
| 1042 | func (s GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedTextHighlightedTextRange) MarshalJSON() ([]byte, error) { |
| 1043 | type NoMethod GoogleMapsPlacesV1ContextualContentJustificationReviewJustificationHighlightedTextHighlightedTextRange |
| 1044 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1045 | } |
| 1046 | |
| 1047 | // GoogleMapsPlacesV1EVChargeOptions: Information about the EV Charge Station |
| 1048 | // hosted in Place. Terminology follows |
| 1049 | // https://afdc.energy.gov/fuels/electricity_infrastructure.html One port could |
| 1050 | // charge one car at a time. One port has one or more connectors. One station |
| 1051 | // has one or more ports. |
| 1052 | type GoogleMapsPlacesV1EVChargeOptions struct { |
| 1053 | // ConnectorAggregation: A list of EV charging connector aggregations that |
| 1054 | // contain connectors of the same type and same charge rate. |
| 1055 | ConnectorAggregation []*GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation `json:"connectorAggregation,omitempty"` |
| 1056 | // ConnectorCount: Number of connectors at this station. However, because some |
| 1057 | // ports can have multiple connectors but only be able to charge one car at a |
| 1058 | // time (e.g.) the number of connectors may be greater than the total number of |
| 1059 | // cars which can charge simultaneously. |
| 1060 | ConnectorCount int64 `json:"connectorCount,omitempty"` |
| 1061 | // ForceSendFields is a list of field names (e.g. "ConnectorAggregation") to |
| 1062 | // unconditionally include in API requests. By default, fields with empty or |
| 1063 | // default values are omitted from API requests. See |
| 1064 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1065 | // details. |
| 1066 | ForceSendFields []string `json:"-"` |
| 1067 | // NullFields is a list of field names (e.g. "ConnectorAggregation") to include |
| 1068 | // in API requests with the JSON null value. By default, fields with empty |
| 1069 | // values are omitted from API requests. See |
| 1070 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1071 | NullFields []string `json:"-"` |
| 1072 | } |
| 1073 | |
| 1074 | func (s GoogleMapsPlacesV1EVChargeOptions) MarshalJSON() ([]byte, error) { |
| 1075 | type NoMethod GoogleMapsPlacesV1EVChargeOptions |
| 1076 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1077 | } |
| 1078 | |
| 1079 | // GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation: EV charging |
| 1080 | // information grouped by [type, max_charge_rate_kw]. Shows EV charge |
| 1081 | // aggregation of connectors that have the same type and max charge rate in kw. |
| 1082 | type GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation struct { |
| 1083 | // AvailabilityLastUpdateTime: The timestamp when the connector availability |
| 1084 | // information in this aggregation was last updated. |
| 1085 | AvailabilityLastUpdateTime string `json:"availabilityLastUpdateTime,omitempty"` |
| 1086 | // AvailableCount: Number of connectors in this aggregation that are currently |
| 1087 | // available. |
| 1088 | AvailableCount int64 `json:"availableCount,omitempty"` |
| 1089 | // Count: Number of connectors in this aggregation. |
| 1090 | Count int64 `json:"count,omitempty"` |
| 1091 | // MaxChargeRateKw: The static max charging rate in kw of each connector in the |
| 1092 | // aggregation. |
| 1093 | MaxChargeRateKw float64 `json:"maxChargeRateKw,omitempty"` |
| 1094 | // OutOfServiceCount: Number of connectors in this aggregation that are |
| 1095 | // currently out of service. |
| 1096 | OutOfServiceCount int64 `json:"outOfServiceCount,omitempty"` |
| 1097 | // Type: The connector type of this aggregation. |
| 1098 | // |
| 1099 | // Possible values: |
| 1100 | // "EV_CONNECTOR_TYPE_UNSPECIFIED" - Unspecified connector. |
| 1101 | // "EV_CONNECTOR_TYPE_OTHER" - Other connector types. |
| 1102 | // "EV_CONNECTOR_TYPE_J1772" - J1772 type 1 connector. |
| 1103 | // "EV_CONNECTOR_TYPE_TYPE_2" - IEC 62196 type 2 connector. Often referred to |
| 1104 | // as MENNEKES. |
| 1105 | // "EV_CONNECTOR_TYPE_CHADEMO" - CHAdeMO type connector. |
| 1106 | // "EV_CONNECTOR_TYPE_CCS_COMBO_1" - Combined Charging System (AC and DC). |
| 1107 | // Based on SAE. Type-1 J-1772 connector |
| 1108 | // "EV_CONNECTOR_TYPE_CCS_COMBO_2" - Combined Charging System (AC and DC). |
| 1109 | // Based on Type-2 Mennekes connector |
| 1110 | // "EV_CONNECTOR_TYPE_TESLA" - The generic TESLA connector. This is NACS in |
| 1111 | // the North America but can be non-NACS in other parts of the world (e.g. CCS |
| 1112 | // Combo 2 (CCS2) or GB/T). This value is less representative of an actual |
| 1113 | // connector type, and more represents the ability to charge a Tesla brand |
| 1114 | // vehicle at a Tesla owned charging station. |
| 1115 | // "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T" - GB/T type corresponds to the GB/T |
| 1116 | // standard in China. This type covers all GB_T types. |
| 1117 | // "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET" - Unspecified wall outlet. |
| 1118 | // "EV_CONNECTOR_TYPE_NACS" - The North American Charging System (NACS), |
| 1119 | // standardized as SAE J3400. |
| 1120 | Type string `json:"type,omitempty"` |
| 1121 | // ForceSendFields is a list of field names (e.g. "AvailabilityLastUpdateTime") |
| 1122 | // to unconditionally include in API requests. By default, fields with empty or |
| 1123 | // default values are omitted from API requests. See |
| 1124 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1125 | // details. |
| 1126 | ForceSendFields []string `json:"-"` |
| 1127 | // NullFields is a list of field names (e.g. "AvailabilityLastUpdateTime") to |
| 1128 | // include in API requests with the JSON null value. By default, fields with |
| 1129 | // empty values are omitted from API requests. See |
| 1130 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1131 | NullFields []string `json:"-"` |
| 1132 | } |
| 1133 | |
| 1134 | func (s GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation) MarshalJSON() ([]byte, error) { |
| 1135 | type NoMethod GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation |
| 1136 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1137 | } |
| 1138 | |
| 1139 | func (s *GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation) UnmarshalJSON(data []byte) error { |
| 1140 | type NoMethod GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation |
| 1141 | var s1 struct { |
| 1142 | MaxChargeRateKw gensupport.JSONFloat64 `json:"maxChargeRateKw"` |
| 1143 | *NoMethod |
| 1144 | } |
| 1145 | s1.NoMethod = (*NoMethod)(s) |
| 1146 | if err := json.Unmarshal(data, &s1); err != nil { |
| 1147 | return err |
| 1148 | } |
| 1149 | s.MaxChargeRateKw = float64(s1.MaxChargeRateKw) |
| 1150 | return nil |
| 1151 | } |
| 1152 | |
| 1153 | // GoogleMapsPlacesV1FuelOptions: The most recent information about fuel |
| 1154 | // options in a gas station. This information is updated regularly. |
| 1155 | type GoogleMapsPlacesV1FuelOptions struct { |
| 1156 | // FuelPrices: The last known fuel price for each type of fuel this station |
| 1157 | // has. There is one entry per fuel type this station has. Order is not |
| 1158 | // important. |
| 1159 | FuelPrices []*GoogleMapsPlacesV1FuelOptionsFuelPrice `json:"fuelPrices,omitempty"` |
| 1160 | // ForceSendFields is a list of field names (e.g. "FuelPrices") to |
| 1161 | // unconditionally include in API requests. By default, fields with empty or |
| 1162 | // default values are omitted from API requests. See |
| 1163 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1164 | // details. |
| 1165 | ForceSendFields []string `json:"-"` |
| 1166 | // NullFields is a list of field names (e.g. "FuelPrices") to include in API |
| 1167 | // requests with the JSON null value. By default, fields with empty values are |
| 1168 | // omitted from API requests. See |
| 1169 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1170 | NullFields []string `json:"-"` |
| 1171 | } |
| 1172 | |
| 1173 | func (s GoogleMapsPlacesV1FuelOptions) MarshalJSON() ([]byte, error) { |
| 1174 | type NoMethod GoogleMapsPlacesV1FuelOptions |
| 1175 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1176 | } |
| 1177 | |
| 1178 | // GoogleMapsPlacesV1FuelOptionsFuelPrice: Fuel price information for a given |
| 1179 | // type. |
| 1180 | type GoogleMapsPlacesV1FuelOptionsFuelPrice struct { |
| 1181 | // Price: The price of the fuel. |
| 1182 | Price *GoogleTypeMoney `json:"price,omitempty"` |
| 1183 | // Type: The type of fuel. |
| 1184 | // |
| 1185 | // Possible values: |
| 1186 | // "FUEL_TYPE_UNSPECIFIED" - Unspecified fuel type. |
| 1187 | // "DIESEL" - Diesel fuel. |
| 1188 | // "DIESEL_PLUS" - Diesel plus fuel. |
| 1189 | // "REGULAR_UNLEADED" - Regular unleaded. |
| 1190 | // "MIDGRADE" - Midgrade. |
| 1191 | // "PREMIUM" - Premium. |
| 1192 | // "SP91" - SP 91. |
| 1193 | // "SP91_E10" - SP 91 E10. |
| 1194 | // "SP92" - SP 92. |
| 1195 | // "SP95" - SP 95. |
| 1196 | // "SP95_E10" - SP95 E10. |
| 1197 | // "SP98" - SP 98. |
| 1198 | // "SP99" - SP 99. |
| 1199 | // "SP100" - SP 100. |
| 1200 | // "LPG" - Liquefied Petroleum Gas. |
| 1201 | // "E80" - E 80. |
| 1202 | // "E85" - E 85. |
| 1203 | // "E100" - E 100. |
| 1204 | // "METHANE" - Methane. |
| 1205 | // "BIO_DIESEL" - Bio-diesel. |
| 1206 | // "TRUCK_DIESEL" - Truck diesel. |
| 1207 | Type string `json:"type,omitempty"` |
| 1208 | // UpdateTime: The time the fuel price was last updated. |
| 1209 | UpdateTime string `json:"updateTime,omitempty"` |
| 1210 | // ForceSendFields is a list of field names (e.g. "Price") to unconditionally |
| 1211 | // include in API requests. By default, fields with empty or default values are |
| 1212 | // omitted from API requests. See |
| 1213 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1214 | // details. |
| 1215 | ForceSendFields []string `json:"-"` |
| 1216 | // NullFields is a list of field names (e.g. "Price") to include in API |
| 1217 | // requests with the JSON null value. By default, fields with empty values are |
| 1218 | // omitted from API requests. See |
| 1219 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1220 | NullFields []string `json:"-"` |
| 1221 | } |
| 1222 | |
| 1223 | func (s GoogleMapsPlacesV1FuelOptionsFuelPrice) MarshalJSON() ([]byte, error) { |
| 1224 | type NoMethod GoogleMapsPlacesV1FuelOptionsFuelPrice |
| 1225 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1226 | } |
| 1227 | |
| 1228 | // GoogleMapsPlacesV1Photo: Information about a photo of a place. |
| 1229 | type GoogleMapsPlacesV1Photo struct { |
| 1230 | // AuthorAttributions: This photo's authors. |
| 1231 | AuthorAttributions []*GoogleMapsPlacesV1AuthorAttribution `json:"authorAttributions,omitempty"` |
| 1232 | // FlagContentUri: A link where users can flag a problem with the photo. |
| 1233 | FlagContentUri string `json:"flagContentUri,omitempty"` |
| 1234 | // GoogleMapsUri: A link to show the photo on Google Maps. |
| 1235 | GoogleMapsUri string `json:"googleMapsUri,omitempty"` |
| 1236 | // HeightPx: The maximum available height, in pixels. |
| 1237 | HeightPx int64 `json:"heightPx,omitempty"` |
| 1238 | // Name: Identifier. A reference representing this place photo which may be |
| 1239 | // used to look up this place photo again (also called the API "resource" name: |
| 1240 | // `places/{place_id}/photos/{photo}`). |
| 1241 | Name string `json:"name,omitempty"` |
| 1242 | // WidthPx: The maximum available width, in pixels. |
| 1243 | WidthPx int64 `json:"widthPx,omitempty"` |
| 1244 | // ForceSendFields is a list of field names (e.g. "AuthorAttributions") to |
| 1245 | // unconditionally include in API requests. By default, fields with empty or |
| 1246 | // default values are omitted from API requests. See |
| 1247 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1248 | // details. |
| 1249 | ForceSendFields []string `json:"-"` |
| 1250 | // NullFields is a list of field names (e.g. "AuthorAttributions") to include |
| 1251 | // in API requests with the JSON null value. By default, fields with empty |
| 1252 | // values are omitted from API requests. See |
| 1253 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1254 | NullFields []string `json:"-"` |
| 1255 | } |
| 1256 | |
| 1257 | func (s GoogleMapsPlacesV1Photo) MarshalJSON() ([]byte, error) { |
| 1258 | type NoMethod GoogleMapsPlacesV1Photo |
| 1259 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1260 | } |
| 1261 | |
| 1262 | // GoogleMapsPlacesV1PhotoMedia: A photo media from Places API. |
| 1263 | type GoogleMapsPlacesV1PhotoMedia struct { |
| 1264 | // Name: The resource name of a photo media in the format: |
| 1265 | // `places/{place_id}/photos/{photo_reference}/media`. |
| 1266 | Name string `json:"name,omitempty"` |
| 1267 | // PhotoUri: A short-lived uri that can be used to render the photo. |
| 1268 | PhotoUri string `json:"photoUri,omitempty"` |
| 1269 | |
| 1270 | // ServerResponse contains the HTTP response code and headers from the server. |
| 1271 | googleapi.ServerResponse `json:"-"` |
| 1272 | // ForceSendFields is a list of field names (e.g. "Name") to unconditionally |
| 1273 | // include in API requests. By default, fields with empty or default values are |
| 1274 | // omitted from API requests. See |
| 1275 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1276 | // details. |
| 1277 | ForceSendFields []string `json:"-"` |
| 1278 | // NullFields is a list of field names (e.g. "Name") to include in API requests |
| 1279 | // with the JSON null value. By default, fields with empty values are omitted |
| 1280 | // from API requests. See |
| 1281 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1282 | NullFields []string `json:"-"` |
| 1283 | } |
| 1284 | |
| 1285 | func (s GoogleMapsPlacesV1PhotoMedia) MarshalJSON() ([]byte, error) { |
| 1286 | type NoMethod GoogleMapsPlacesV1PhotoMedia |
| 1287 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1288 | } |
| 1289 | |
| 1290 | // GoogleMapsPlacesV1Place: All the information representing a Place. |
| 1291 | type GoogleMapsPlacesV1Place struct { |
| 1292 | // AccessibilityOptions: Information about the accessibility options a place |
| 1293 | // offers. |
| 1294 | AccessibilityOptions *GoogleMapsPlacesV1PlaceAccessibilityOptions `json:"accessibilityOptions,omitempty"` |
| 1295 | // AddressComponents: Repeated components for each locality level. Note the |
| 1296 | // following facts about the address_components[] array: - The array of address |
| 1297 | // components may contain more components than the formatted_address. - The |
| 1298 | // array does not necessarily include all the political entities that contain |
| 1299 | // an address, apart from those included in the formatted_address. To retrieve |
| 1300 | // all the political entities that contain a specific address, you should use |
| 1301 | // reverse geocoding, passing the latitude/longitude of the address as a |
| 1302 | // parameter to the request. - The format of the response is not guaranteed to |
| 1303 | // remain the same between requests. In particular, the number of |
| 1304 | // address_components varies based on the address requested and can change over |
| 1305 | // time for the same address. A component can change position in the array. The |
| 1306 | // type of the component can change. A particular component may be missing in a |
| 1307 | // later response. |
| 1308 | AddressComponents []*GoogleMapsPlacesV1PlaceAddressComponent `json:"addressComponents,omitempty"` |
| 1309 | // AddressDescriptor: The address descriptor of the place. Address descriptors |
| 1310 | // include additional information that help describe a location using landmarks |
| 1311 | // and areas. See address descriptor regional coverage in |
| 1312 | // https://developers.google.com/maps/documentation/geocoding/address-descriptors/coverage. |
| 1313 | AddressDescriptor *GoogleMapsPlacesV1AddressDescriptor `json:"addressDescriptor,omitempty"` |
| 1314 | // AdrFormatAddress: The place's address in adr microformat: |
| 1315 | // http://microformats.org/wiki/adr. |
| 1316 | AdrFormatAddress string `json:"adrFormatAddress,omitempty"` |
| 1317 | // AllowsDogs: Place allows dogs. |
| 1318 | AllowsDogs bool `json:"allowsDogs,omitempty"` |
| 1319 | // Attributions: A set of data provider that must be shown with this result. |
| 1320 | Attributions []*GoogleMapsPlacesV1PlaceAttribution `json:"attributions,omitempty"` |
| 1321 | // BusinessStatus: The business status for the place. |
| 1322 | // |
| 1323 | // Possible values: |
| 1324 | // "BUSINESS_STATUS_UNSPECIFIED" - Default value. This value is unused. |
| 1325 | // "OPERATIONAL" - The establishment is operational, not necessarily open |
| 1326 | // now. |
| 1327 | // "CLOSED_TEMPORARILY" - The establishment is temporarily closed. |
| 1328 | // "CLOSED_PERMANENTLY" - The establishment is permanently closed. |
| 1329 | // "FUTURE_OPENING" - The establishment will open in the future. |
| 1330 | BusinessStatus string `json:"businessStatus,omitempty"` |
| 1331 | // ConsumerAlert: The consumer alert message for the place when we detect |
| 1332 | // suspicious review activity on a business or a business violates our |
| 1333 | // policies. |
| 1334 | ConsumerAlert *GoogleMapsPlacesV1PlaceConsumerAlert `json:"consumerAlert,omitempty"` |
| 1335 | // ContainingPlaces: List of places in which the current place is located. |
| 1336 | ContainingPlaces []*GoogleMapsPlacesV1PlaceContainingPlace `json:"containingPlaces,omitempty"` |
| 1337 | // CurbsidePickup: Specifies if the business supports curbside pickup. |
| 1338 | CurbsidePickup bool `json:"curbsidePickup,omitempty"` |
| 1339 | // CurrentOpeningHours: The hours of operation for the next seven days |
| 1340 | // (including today). The time period starts at midnight on the date of the |
| 1341 | // request and ends at 11:59 pm six days later. This field includes the |
| 1342 | // special_days subfield of all hours, set for dates that have exceptional |
| 1343 | // hours. |
| 1344 | CurrentOpeningHours *GoogleMapsPlacesV1PlaceOpeningHours `json:"currentOpeningHours,omitempty"` |
| 1345 | // CurrentSecondaryOpeningHours: Contains an array of entries for the next |
| 1346 | // seven days including information about secondary hours of a business. |
| 1347 | // Secondary hours are different from a business's main hours. For example, a |
| 1348 | // restaurant can specify drive through hours or delivery hours as its |
| 1349 | // secondary hours. This field populates the type subfield, which draws from a |
| 1350 | // predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or |
| 1351 | // TAKEOUT) based on the types of the place. This field includes the |
| 1352 | // special_days subfield of all hours, set for dates that have exceptional |
| 1353 | // hours. |
| 1354 | CurrentSecondaryOpeningHours []*GoogleMapsPlacesV1PlaceOpeningHours `json:"currentSecondaryOpeningHours,omitempty"` |
| 1355 | // Delivery: Specifies if the business supports delivery. |
| 1356 | Delivery bool `json:"delivery,omitempty"` |
| 1357 | // DineIn: Specifies if the business supports indoor or outdoor seating |
| 1358 | // options. |
| 1359 | DineIn bool `json:"dineIn,omitempty"` |
| 1360 | // DisplayName: The localized name of the place, suitable as a short |
| 1361 | // human-readable description. For example, "Google Sydney", "Starbucks", |
| 1362 | // "Pyrmont", etc. |
| 1363 | DisplayName *GoogleTypeLocalizedText `json:"displayName,omitempty"` |
| 1364 | // EditorialSummary: Contains a summary of the place. A summary is comprised of |
| 1365 | // a textual overview, and also includes the language code for these if |
| 1366 | // applicable. Summary text must be presented as-is and can not be modified or |
| 1367 | // altered. |
| 1368 | EditorialSummary *GoogleTypeLocalizedText `json:"editorialSummary,omitempty"` |
| 1369 | // EvChargeAmenitySummary: The summary of amenities near the EV charging |
| 1370 | // station. |
| 1371 | EvChargeAmenitySummary *GoogleMapsPlacesV1PlaceEvChargeAmenitySummary `json:"evChargeAmenitySummary,omitempty"` |
| 1372 | // EvChargeOptions: Information of ev charging options. |
| 1373 | EvChargeOptions *GoogleMapsPlacesV1EVChargeOptions `json:"evChargeOptions,omitempty"` |
| 1374 | // FormattedAddress: A full, human-readable address for this place. |
| 1375 | FormattedAddress string `json:"formattedAddress,omitempty"` |
| 1376 | // FuelOptions: The most recent information about fuel options in a gas |
| 1377 | // station. This information is updated regularly. |
| 1378 | FuelOptions *GoogleMapsPlacesV1FuelOptions `json:"fuelOptions,omitempty"` |
| 1379 | // GenerativeSummary: AI-generated summary of the place. |
| 1380 | GenerativeSummary *GoogleMapsPlacesV1PlaceGenerativeSummary `json:"generativeSummary,omitempty"` |
| 1381 | // GoodForChildren: Place is good for children. |
| 1382 | GoodForChildren bool `json:"goodForChildren,omitempty"` |
| 1383 | // GoodForGroups: Place accommodates groups. |
| 1384 | GoodForGroups bool `json:"goodForGroups,omitempty"` |
| 1385 | // GoodForWatchingSports: Place is suitable for watching sports. |
| 1386 | GoodForWatchingSports bool `json:"goodForWatchingSports,omitempty"` |
| 1387 | // GoogleMapsLinks: Links to trigger different Google Maps actions. |
| 1388 | GoogleMapsLinks *GoogleMapsPlacesV1PlaceGoogleMapsLinks `json:"googleMapsLinks,omitempty"` |
| 1389 | // GoogleMapsTypeLabel: The type label of the place on Google Maps, localized |
| 1390 | // to the request language if applicable, for example, "Restaurant", "Cafe", |
| 1391 | // "Airport", etc. The type label may be different from the primary type |
| 1392 | // display name and may not be a supported type in Places API Place Types table |
| 1393 | // (https://developers.google.com/maps/documentation/places/web-service/place-types). |
| 1394 | GoogleMapsTypeLabel *GoogleTypeLocalizedText `json:"googleMapsTypeLabel,omitempty"` |
| 1395 | // GoogleMapsUri: A URL providing more information about this place. |
| 1396 | GoogleMapsUri string `json:"googleMapsUri,omitempty"` |
| 1397 | // IconBackgroundColor: Background color for icon_mask in hex format, e.g. |
| 1398 | // #909CE1. |
| 1399 | IconBackgroundColor string `json:"iconBackgroundColor,omitempty"` |
| 1400 | // IconMaskBaseUri: A truncated URL to an icon mask. User can access different |
| 1401 | // icon type by appending type suffix to the end (eg, ".svg" or ".png"). |
| 1402 | IconMaskBaseUri string `json:"iconMaskBaseUri,omitempty"` |
| 1403 | // Id: The unique identifier of a place. |
| 1404 | Id string `json:"id,omitempty"` |
| 1405 | // InternationalPhoneNumber: A human-readable phone number for the place, in |
| 1406 | // international format. |
| 1407 | InternationalPhoneNumber string `json:"internationalPhoneNumber,omitempty"` |
| 1408 | // LiveMusic: Place provides live music. |
| 1409 | LiveMusic bool `json:"liveMusic,omitempty"` |
| 1410 | // Location: The position of this place. |
| 1411 | Location *GoogleTypeLatLng `json:"location,omitempty"` |
| 1412 | // MenuForChildren: Place has a children's menu. |
| 1413 | MenuForChildren bool `json:"menuForChildren,omitempty"` |
| 1414 | // MovedPlace: If this Place is permanently closed and has moved to a new |
| 1415 | // Place, this field contains the new Place's resource name, in |
| 1416 | // `places/{place_id}` format. If this Place moved multiple times, this field |
| 1417 | // will represent the first moved place. This field will not be populated if |
| 1418 | // this Place has not moved. |
| 1419 | MovedPlace string `json:"movedPlace,omitempty"` |
| 1420 | // MovedPlaceId: If this Place is permanently closed and has moved to a new |
| 1421 | // Place, this field contains the new Place's place ID. If this Place moved |
| 1422 | // multiple times, this field will represent the first moved Place. This field |
| 1423 | // will not be populated if this Place has not moved. |
| 1424 | MovedPlaceId string `json:"movedPlaceId,omitempty"` |
| 1425 | // Name: This Place's resource name, in `places/{place_id}` format. Can be used |
| 1426 | // to look up the Place. |
| 1427 | Name string `json:"name,omitempty"` |
| 1428 | // NationalPhoneNumber: A human-readable phone number for the place, in |
| 1429 | // national format. |
| 1430 | NationalPhoneNumber string `json:"nationalPhoneNumber,omitempty"` |
| 1431 | // NeighborhoodSummary: A summary of points of interest near the place. |
| 1432 | NeighborhoodSummary *GoogleMapsPlacesV1PlaceNeighborhoodSummary `json:"neighborhoodSummary,omitempty"` |
| 1433 | // OpeningDate: The date this place will open in the future. This field is only |
| 1434 | // populated if the business status is FUTURE_OPENING. |
| 1435 | OpeningDate *GoogleTypeDate `json:"openingDate,omitempty"` |
| 1436 | // OutdoorSeating: Place provides outdoor seating. |
| 1437 | OutdoorSeating bool `json:"outdoorSeating,omitempty"` |
| 1438 | // ParkingOptions: Options of parking provided by the place. |
| 1439 | ParkingOptions *GoogleMapsPlacesV1PlaceParkingOptions `json:"parkingOptions,omitempty"` |
| 1440 | // PaymentOptions: Payment options the place accepts. If a payment option data |
| 1441 | // is not available, the payment option field will be unset. |
| 1442 | PaymentOptions *GoogleMapsPlacesV1PlacePaymentOptions `json:"paymentOptions,omitempty"` |
| 1443 | // Photos: Information (including references) about photos of this place. A |
| 1444 | // maximum of 10 photos can be returned. |
| 1445 | Photos []*GoogleMapsPlacesV1Photo `json:"photos,omitempty"` |
| 1446 | // PlusCode: Plus code of the place location lat/long. |
| 1447 | PlusCode *GoogleMapsPlacesV1PlacePlusCode `json:"plusCode,omitempty"` |
| 1448 | // PostalAddress: The address in postal address format. |
| 1449 | PostalAddress *GoogleTypePostalAddress `json:"postalAddress,omitempty"` |
| 1450 | // PriceLevel: Price level of the place. |
| 1451 | // |
| 1452 | // Possible values: |
| 1453 | // "PRICE_LEVEL_UNSPECIFIED" - Place price level is unspecified or unknown. |
| 1454 | // "PRICE_LEVEL_FREE" - Place provides free services. |
| 1455 | // "PRICE_LEVEL_INEXPENSIVE" - Place provides inexpensive services. |
| 1456 | // "PRICE_LEVEL_MODERATE" - Place provides moderately priced services. |
| 1457 | // "PRICE_LEVEL_EXPENSIVE" - Place provides expensive services. |
| 1458 | // "PRICE_LEVEL_VERY_EXPENSIVE" - Place provides very expensive services. |
| 1459 | PriceLevel string `json:"priceLevel,omitempty"` |
| 1460 | // PriceRange: The price range associated with a Place. |
| 1461 | PriceRange *GoogleMapsPlacesV1PriceRange `json:"priceRange,omitempty"` |
| 1462 | // PrimaryType: The primary type of the given result. This type must be one of |
| 1463 | // the Places API supported types. For example, "restaurant", "cafe", |
| 1464 | // "airport", etc. A place can only have a single primary type. For the |
| 1465 | // complete list of possible values, see Table A and Table B at |
| 1466 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 1467 | // The primary type may be missing if the place's primary type is not a |
| 1468 | // supported type. When a primary type is present, it is always one of the |
| 1469 | // types in the `types` field. |
| 1470 | PrimaryType string `json:"primaryType,omitempty"` |
| 1471 | // PrimaryTypeDisplayName: The display name of the primary type, localized to |
| 1472 | // the request language if applicable. For the complete list of possible |
| 1473 | // values, see Table A and Table B at |
| 1474 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 1475 | // The primary type may be missing if the place's primary type is not a |
| 1476 | // supported type. |
| 1477 | PrimaryTypeDisplayName *GoogleTypeLocalizedText `json:"primaryTypeDisplayName,omitempty"` |
| 1478 | // PureServiceAreaBusiness: Indicates whether the place is a pure service area |
| 1479 | // business. Pure service area business is a business that visits or delivers |
| 1480 | // to customers directly but does not serve customers at their business |
| 1481 | // address. For example, businesses like cleaning services or plumbers. Those |
| 1482 | // businesses may not have a physical address or location on Google Maps. |
| 1483 | PureServiceAreaBusiness bool `json:"pureServiceAreaBusiness,omitempty"` |
| 1484 | // Rating: A rating between 1.0 and 5.0, based on user reviews of this place. |
| 1485 | Rating float64 `json:"rating,omitempty"` |
| 1486 | // RegularOpeningHours: The regular hours of operation. Note that if a place is |
| 1487 | // always open (24 hours), the `close` field will not be set. Clients can rely |
| 1488 | // on always open (24 hours) being represented as an `open` |
| 1489 | // (https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Period) |
| 1490 | // period containing `day` |
| 1491 | // (https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point) |
| 1492 | // with value `0`, `hour` |
| 1493 | // (https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point) |
| 1494 | // with value `0`, and `minute` |
| 1495 | // (https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#Point) |
| 1496 | // with value `0`. |
| 1497 | RegularOpeningHours *GoogleMapsPlacesV1PlaceOpeningHours `json:"regularOpeningHours,omitempty"` |
| 1498 | // RegularSecondaryOpeningHours: Contains an array of entries for information |
| 1499 | // about regular secondary hours of a business. Secondary hours are different |
| 1500 | // from a business's main hours. For example, a restaurant can specify drive |
| 1501 | // through hours or delivery hours as its secondary hours. This field populates |
| 1502 | // the type subfield, which draws from a predefined list of opening hours types |
| 1503 | // (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. |
| 1504 | RegularSecondaryOpeningHours []*GoogleMapsPlacesV1PlaceOpeningHours `json:"regularSecondaryOpeningHours,omitempty"` |
| 1505 | // Reservable: Specifies if the place supports reservations. |
| 1506 | Reservable bool `json:"reservable,omitempty"` |
| 1507 | // Restroom: Place has restroom. |
| 1508 | Restroom bool `json:"restroom,omitempty"` |
| 1509 | // ReviewSummary: AI-generated summary of the place using user reviews. |
| 1510 | ReviewSummary *GoogleMapsPlacesV1PlaceReviewSummary `json:"reviewSummary,omitempty"` |
| 1511 | // Reviews: List of reviews about this place, sorted by relevance. A maximum of |
| 1512 | // 5 reviews can be returned. |
| 1513 | Reviews []*GoogleMapsPlacesV1Review `json:"reviews,omitempty"` |
| 1514 | // ServesBeer: Specifies if the place serves beer. |
| 1515 | ServesBeer bool `json:"servesBeer,omitempty"` |
| 1516 | // ServesBreakfast: Specifies if the place serves breakfast. |
| 1517 | ServesBreakfast bool `json:"servesBreakfast,omitempty"` |
| 1518 | // ServesBrunch: Specifies if the place serves brunch. |
| 1519 | ServesBrunch bool `json:"servesBrunch,omitempty"` |
| 1520 | // ServesCocktails: Place serves cocktails. |
| 1521 | ServesCocktails bool `json:"servesCocktails,omitempty"` |
| 1522 | // ServesCoffee: Place serves coffee. |
| 1523 | ServesCoffee bool `json:"servesCoffee,omitempty"` |
| 1524 | // ServesDessert: Place serves dessert. |
| 1525 | ServesDessert bool `json:"servesDessert,omitempty"` |
| 1526 | // ServesDinner: Specifies if the place serves dinner. |
| 1527 | ServesDinner bool `json:"servesDinner,omitempty"` |
| 1528 | // ServesLunch: Specifies if the place serves lunch. |
| 1529 | ServesLunch bool `json:"servesLunch,omitempty"` |
| 1530 | // ServesVegetarianFood: Specifies if the place serves vegetarian food. |
| 1531 | ServesVegetarianFood bool `json:"servesVegetarianFood,omitempty"` |
| 1532 | // ServesWine: Specifies if the place serves wine. |
| 1533 | ServesWine bool `json:"servesWine,omitempty"` |
| 1534 | // ShortFormattedAddress: A short, human-readable address for this place. |
| 1535 | ShortFormattedAddress string `json:"shortFormattedAddress,omitempty"` |
| 1536 | // SubDestinations: A list of sub-destinations related to the place. |
| 1537 | SubDestinations []*GoogleMapsPlacesV1PlaceSubDestination `json:"subDestinations,omitempty"` |
| 1538 | // Takeout: Specifies if the business supports takeout. |
| 1539 | Takeout bool `json:"takeout,omitempty"` |
| 1540 | // TimeZone: IANA Time Zone Database time zone. For example "America/New_York". |
| 1541 | TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` |
| 1542 | // Types: A set of type tags for this result. For example, "political" and |
| 1543 | // "locality". For the complete list of possible values, see Table A and Table |
| 1544 | // B at |
| 1545 | // https://developers.google.com/maps/documentation/places/web-service/place-types |
| 1546 | Types []string `json:"types,omitempty"` |
| 1547 | // UserRatingCount: The total number of reviews (with or without text) for this |
| 1548 | // place. |
| 1549 | UserRatingCount int64 `json:"userRatingCount,omitempty"` |
| 1550 | // UtcOffsetMinutes: Number of minutes this place's timezone is currently |
| 1551 | // offset from UTC. This is expressed in minutes to support timezones that are |
| 1552 | // offset by fractions of an hour, e.g. X hours and 15 minutes. |
| 1553 | UtcOffsetMinutes int64 `json:"utcOffsetMinutes,omitempty"` |
| 1554 | // Viewport: A viewport suitable for displaying the place on an average-sized |
| 1555 | // map. This viewport should not be used as the physical boundary or the |
| 1556 | // service area of the business. |
| 1557 | Viewport *GoogleGeoTypeViewport `json:"viewport,omitempty"` |
| 1558 | // WebsiteUri: The authoritative website for this place, e.g. a business' |
| 1559 | // homepage. Note that for places that are part of a chain (e.g. an IKEA |
| 1560 | // store), this will usually be the website for the individual store, not the |
| 1561 | // overall chain. |
| 1562 | WebsiteUri string `json:"websiteUri,omitempty"` |
| 1563 | |
| 1564 | // ServerResponse contains the HTTP response code and headers from the server. |
| 1565 | googleapi.ServerResponse `json:"-"` |
| 1566 | // ForceSendFields is a list of field names (e.g. "AccessibilityOptions") to |
| 1567 | // unconditionally include in API requests. By default, fields with empty or |
| 1568 | // default values are omitted from API requests. See |
| 1569 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1570 | // details. |
| 1571 | ForceSendFields []string `json:"-"` |
| 1572 | // NullFields is a list of field names (e.g. "AccessibilityOptions") to include |
| 1573 | // in API requests with the JSON null value. By default, fields with empty |
| 1574 | // values are omitted from API requests. See |
| 1575 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1576 | NullFields []string `json:"-"` |
| 1577 | } |
| 1578 | |
| 1579 | func (s GoogleMapsPlacesV1Place) MarshalJSON() ([]byte, error) { |
| 1580 | type NoMethod GoogleMapsPlacesV1Place |
| 1581 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1582 | } |
| 1583 | |
| 1584 | func (s *GoogleMapsPlacesV1Place) UnmarshalJSON(data []byte) error { |
| 1585 | type NoMethod GoogleMapsPlacesV1Place |
| 1586 | var s1 struct { |
| 1587 | Rating gensupport.JSONFloat64 `json:"rating"` |
| 1588 | *NoMethod |
| 1589 | } |
| 1590 | s1.NoMethod = (*NoMethod)(s) |
| 1591 | if err := json.Unmarshal(data, &s1); err != nil { |
| 1592 | return err |
| 1593 | } |
| 1594 | s.Rating = float64(s1.Rating) |
| 1595 | return nil |
| 1596 | } |
| 1597 | |
| 1598 | // GoogleMapsPlacesV1PlaceAccessibilityOptions: Information about the |
| 1599 | // accessibility options a place offers. |
| 1600 | type GoogleMapsPlacesV1PlaceAccessibilityOptions struct { |
| 1601 | // WheelchairAccessibleEntrance: Places has wheelchair accessible entrance. |
| 1602 | WheelchairAccessibleEntrance bool `json:"wheelchairAccessibleEntrance,omitempty"` |
| 1603 | // WheelchairAccessibleParking: Place offers wheelchair accessible parking. |
| 1604 | WheelchairAccessibleParking bool `json:"wheelchairAccessibleParking,omitempty"` |
| 1605 | // WheelchairAccessibleRestroom: Place has wheelchair accessible restroom. |
| 1606 | WheelchairAccessibleRestroom bool `json:"wheelchairAccessibleRestroom,omitempty"` |
| 1607 | // WheelchairAccessibleSeating: Place has wheelchair accessible seating. |
| 1608 | WheelchairAccessibleSeating bool `json:"wheelchairAccessibleSeating,omitempty"` |
| 1609 | // ForceSendFields is a list of field names (e.g. |
| 1610 | // "WheelchairAccessibleEntrance") to unconditionally include in API requests. |
| 1611 | // By default, fields with empty or default values are omitted from API |
| 1612 | // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields |
| 1613 | // for more details. |
| 1614 | ForceSendFields []string `json:"-"` |
| 1615 | // NullFields is a list of field names (e.g. "WheelchairAccessibleEntrance") to |
| 1616 | // include in API requests with the JSON null value. By default, fields with |
| 1617 | // empty values are omitted from API requests. See |
| 1618 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1619 | NullFields []string `json:"-"` |
| 1620 | } |
| 1621 | |
| 1622 | func (s GoogleMapsPlacesV1PlaceAccessibilityOptions) MarshalJSON() ([]byte, error) { |
| 1623 | type NoMethod GoogleMapsPlacesV1PlaceAccessibilityOptions |
| 1624 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1625 | } |
| 1626 | |
| 1627 | // GoogleMapsPlacesV1PlaceAddressComponent: The structured components that form |
| 1628 | // the formatted address, if this information is available. |
| 1629 | type GoogleMapsPlacesV1PlaceAddressComponent struct { |
| 1630 | // LanguageCode: The language used to format this components, in CLDR notation. |
| 1631 | LanguageCode string `json:"languageCode,omitempty"` |
| 1632 | // LongText: The full text description or name of the address component. For |
| 1633 | // example, an address component for the country Australia may have a long_name |
| 1634 | // of "Australia". |
| 1635 | LongText string `json:"longText,omitempty"` |
| 1636 | // ShortText: An abbreviated textual name for the address component, if |
| 1637 | // available. For example, an address component for the country of Australia |
| 1638 | // may have a short_name of "AU". |
| 1639 | ShortText string `json:"shortText,omitempty"` |
| 1640 | // Types: An array indicating the type(s) of the address component. |
| 1641 | Types []string `json:"types,omitempty"` |
| 1642 | // ForceSendFields is a list of field names (e.g. "LanguageCode") to |
| 1643 | // unconditionally include in API requests. By default, fields with empty or |
| 1644 | // default values are omitted from API requests. See |
| 1645 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1646 | // details. |
| 1647 | ForceSendFields []string `json:"-"` |
| 1648 | // NullFields is a list of field names (e.g. "LanguageCode") to include in API |
| 1649 | // requests with the JSON null value. By default, fields with empty values are |
| 1650 | // omitted from API requests. See |
| 1651 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1652 | NullFields []string `json:"-"` |
| 1653 | } |
| 1654 | |
| 1655 | func (s GoogleMapsPlacesV1PlaceAddressComponent) MarshalJSON() ([]byte, error) { |
| 1656 | type NoMethod GoogleMapsPlacesV1PlaceAddressComponent |
| 1657 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1658 | } |
| 1659 | |
| 1660 | // GoogleMapsPlacesV1PlaceAttribution: Information about data providers of this |
| 1661 | // place. |
| 1662 | type GoogleMapsPlacesV1PlaceAttribution struct { |
| 1663 | // Provider: Name of the Place's data provider. |
| 1664 | Provider string `json:"provider,omitempty"` |
| 1665 | // ProviderUri: URI to the Place's data provider. |
| 1666 | ProviderUri string `json:"providerUri,omitempty"` |
| 1667 | // ForceSendFields is a list of field names (e.g. "Provider") to |
| 1668 | // unconditionally include in API requests. By default, fields with empty or |
| 1669 | // default values are omitted from API requests. See |
| 1670 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1671 | // details. |
| 1672 | ForceSendFields []string `json:"-"` |
| 1673 | // NullFields is a list of field names (e.g. "Provider") to include in API |
| 1674 | // requests with the JSON null value. By default, fields with empty values are |
| 1675 | // omitted from API requests. See |
| 1676 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1677 | NullFields []string `json:"-"` |
| 1678 | } |
| 1679 | |
| 1680 | func (s GoogleMapsPlacesV1PlaceAttribution) MarshalJSON() ([]byte, error) { |
| 1681 | type NoMethod GoogleMapsPlacesV1PlaceAttribution |
| 1682 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1683 | } |
| 1684 | |
| 1685 | // GoogleMapsPlacesV1PlaceConsumerAlert: The consumer alert message for the |
| 1686 | // place when we detect suspicious review activity on a business or a business |
| 1687 | // violates our policies. |
| 1688 | type GoogleMapsPlacesV1PlaceConsumerAlert struct { |
| 1689 | // Details: The details of the consumer alert message. |
| 1690 | Details *GoogleMapsPlacesV1PlaceConsumerAlertDetails `json:"details,omitempty"` |
| 1691 | // LanguageCode: The language code of the consumer alert message. This is a BCP |
| 1692 | // 47 language code. |
| 1693 | LanguageCode string `json:"languageCode,omitempty"` |
| 1694 | // Overview: The overview of the consumer alert message. |
| 1695 | Overview string `json:"overview,omitempty"` |
| 1696 | // ForceSendFields is a list of field names (e.g. "Details") to unconditionally |
| 1697 | // include in API requests. By default, fields with empty or default values are |
| 1698 | // omitted from API requests. See |
| 1699 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1700 | // details. |
| 1701 | ForceSendFields []string `json:"-"` |
| 1702 | // NullFields is a list of field names (e.g. "Details") to include in API |
| 1703 | // requests with the JSON null value. By default, fields with empty values are |
| 1704 | // omitted from API requests. See |
| 1705 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1706 | NullFields []string `json:"-"` |
| 1707 | } |
| 1708 | |
| 1709 | func (s GoogleMapsPlacesV1PlaceConsumerAlert) MarshalJSON() ([]byte, error) { |
| 1710 | type NoMethod GoogleMapsPlacesV1PlaceConsumerAlert |
| 1711 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1712 | } |
| 1713 | |
| 1714 | // GoogleMapsPlacesV1PlaceConsumerAlertDetails: The details of the consumer |
| 1715 | // alert message. |
| 1716 | type GoogleMapsPlacesV1PlaceConsumerAlertDetails struct { |
| 1717 | // AboutLink: The link to show together with the description to provide more |
| 1718 | // information. |
| 1719 | AboutLink *GoogleMapsPlacesV1PlaceConsumerAlertDetailsLink `json:"aboutLink,omitempty"` |
| 1720 | // Description: The description of the consumer alert message. |
| 1721 | Description string `json:"description,omitempty"` |
| 1722 | // Title: The title to show together with the description. |
| 1723 | Title string `json:"title,omitempty"` |
| 1724 | // ForceSendFields is a list of field names (e.g. "AboutLink") to |
| 1725 | // unconditionally include in API requests. By default, fields with empty or |
| 1726 | // default values are omitted from API requests. See |
| 1727 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1728 | // details. |
| 1729 | ForceSendFields []string `json:"-"` |
| 1730 | // NullFields is a list of field names (e.g. "AboutLink") to include in API |
| 1731 | // requests with the JSON null value. By default, fields with empty values are |
| 1732 | // omitted from API requests. See |
| 1733 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1734 | NullFields []string `json:"-"` |
| 1735 | } |
| 1736 | |
| 1737 | func (s GoogleMapsPlacesV1PlaceConsumerAlertDetails) MarshalJSON() ([]byte, error) { |
| 1738 | type NoMethod GoogleMapsPlacesV1PlaceConsumerAlertDetails |
| 1739 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1740 | } |
| 1741 | |
| 1742 | // GoogleMapsPlacesV1PlaceConsumerAlertDetailsLink: The link to show together |
| 1743 | // with the description to provide more information. |
| 1744 | type GoogleMapsPlacesV1PlaceConsumerAlertDetailsLink struct { |
| 1745 | // Title: The title to show for the link. |
| 1746 | Title string `json:"title,omitempty"` |
| 1747 | // Uri: The uri of the link. |
| 1748 | Uri string `json:"uri,omitempty"` |
| 1749 | // ForceSendFields is a list of field names (e.g. "Title") to unconditionally |
| 1750 | // include in API requests. By default, fields with empty or default values are |
| 1751 | // omitted from API requests. See |
| 1752 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1753 | // details. |
| 1754 | ForceSendFields []string `json:"-"` |
| 1755 | // NullFields is a list of field names (e.g. "Title") to include in API |
| 1756 | // requests with the JSON null value. By default, fields with empty values are |
| 1757 | // omitted from API requests. See |
| 1758 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1759 | NullFields []string `json:"-"` |
| 1760 | } |
| 1761 | |
| 1762 | func (s GoogleMapsPlacesV1PlaceConsumerAlertDetailsLink) MarshalJSON() ([]byte, error) { |
| 1763 | type NoMethod GoogleMapsPlacesV1PlaceConsumerAlertDetailsLink |
| 1764 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1765 | } |
| 1766 | |
| 1767 | // GoogleMapsPlacesV1PlaceContainingPlace: Info about the place in which this |
| 1768 | // place is located. |
| 1769 | type GoogleMapsPlacesV1PlaceContainingPlace struct { |
| 1770 | // Id: The place id of the place in which this place is located. |
| 1771 | Id string `json:"id,omitempty"` |
| 1772 | // Name: The resource name of the place in which this place is located. |
| 1773 | Name string `json:"name,omitempty"` |
| 1774 | // ForceSendFields is a list of field names (e.g. "Id") to unconditionally |
| 1775 | // include in API requests. By default, fields with empty or default values are |
| 1776 | // omitted from API requests. See |
| 1777 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1778 | // details. |
| 1779 | ForceSendFields []string `json:"-"` |
| 1780 | // NullFields is a list of field names (e.g. "Id") to include in API requests |
| 1781 | // with the JSON null value. By default, fields with empty values are omitted |
| 1782 | // from API requests. See |
| 1783 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1784 | NullFields []string `json:"-"` |
| 1785 | } |
| 1786 | |
| 1787 | func (s GoogleMapsPlacesV1PlaceContainingPlace) MarshalJSON() ([]byte, error) { |
| 1788 | type NoMethod GoogleMapsPlacesV1PlaceContainingPlace |
| 1789 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1790 | } |
| 1791 | |
| 1792 | // GoogleMapsPlacesV1PlaceEvChargeAmenitySummary: The summary of amenities near |
| 1793 | // the EV charging station. This only applies to places with type |
| 1794 | // `electric_vehicle_charging_station`. The `overview` field is guaranteed to |
| 1795 | // be provided while the other fields are optional. |
| 1796 | type GoogleMapsPlacesV1PlaceEvChargeAmenitySummary struct { |
| 1797 | // Coffee: A summary of the nearby coffee options. |
| 1798 | Coffee *GoogleMapsPlacesV1ContentBlock `json:"coffee,omitempty"` |
| 1799 | // DisclosureText: The AI disclosure message "Summarized with Gemini" (and its |
| 1800 | // localized variants). This will be in the language specified in the request |
| 1801 | // if available. |
| 1802 | DisclosureText *GoogleTypeLocalizedText `json:"disclosureText,omitempty"` |
| 1803 | // FlagContentUri: A link where users can flag a problem with the summary. |
| 1804 | FlagContentUri string `json:"flagContentUri,omitempty"` |
| 1805 | // Overview: An overview of the available amenities. This is guaranteed to be |
| 1806 | // provided. |
| 1807 | Overview *GoogleMapsPlacesV1ContentBlock `json:"overview,omitempty"` |
| 1808 | // Restaurant: A summary of the nearby restaurants. |
| 1809 | Restaurant *GoogleMapsPlacesV1ContentBlock `json:"restaurant,omitempty"` |
| 1810 | // Store: A summary of the nearby stores. |
| 1811 | Store *GoogleMapsPlacesV1ContentBlock `json:"store,omitempty"` |
| 1812 | // ForceSendFields is a list of field names (e.g. "Coffee") to unconditionally |
| 1813 | // include in API requests. By default, fields with empty or default values are |
| 1814 | // omitted from API requests. See |
| 1815 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1816 | // details. |
| 1817 | ForceSendFields []string `json:"-"` |
| 1818 | // NullFields is a list of field names (e.g. "Coffee") to include in API |
| 1819 | // requests with the JSON null value. By default, fields with empty values are |
| 1820 | // omitted from API requests. See |
| 1821 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1822 | NullFields []string `json:"-"` |
| 1823 | } |
| 1824 | |
| 1825 | func (s GoogleMapsPlacesV1PlaceEvChargeAmenitySummary) MarshalJSON() ([]byte, error) { |
| 1826 | type NoMethod GoogleMapsPlacesV1PlaceEvChargeAmenitySummary |
| 1827 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1828 | } |
| 1829 | |
| 1830 | // GoogleMapsPlacesV1PlaceGenerativeSummary: AI-generated summary of the place. |
| 1831 | type GoogleMapsPlacesV1PlaceGenerativeSummary struct { |
| 1832 | // DisclosureText: The AI disclosure message "Summarized with Gemini" (and its |
| 1833 | // localized variants). This will be in the language specified in the request |
| 1834 | // if available. |
| 1835 | DisclosureText *GoogleTypeLocalizedText `json:"disclosureText,omitempty"` |
| 1836 | // Overview: The overview of the place. |
| 1837 | Overview *GoogleTypeLocalizedText `json:"overview,omitempty"` |
| 1838 | // OverviewFlagContentUri: A link where users can flag a problem with the |
| 1839 | // overview summary. |
| 1840 | OverviewFlagContentUri string `json:"overviewFlagContentUri,omitempty"` |
| 1841 | // ForceSendFields is a list of field names (e.g. "DisclosureText") to |
| 1842 | // unconditionally include in API requests. By default, fields with empty or |
| 1843 | // default values are omitted from API requests. See |
| 1844 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1845 | // details. |
| 1846 | ForceSendFields []string `json:"-"` |
| 1847 | // NullFields is a list of field names (e.g. "DisclosureText") to include in |
| 1848 | // API requests with the JSON null value. By default, fields with empty values |
| 1849 | // are omitted from API requests. See |
| 1850 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1851 | NullFields []string `json:"-"` |
| 1852 | } |
| 1853 | |
| 1854 | func (s GoogleMapsPlacesV1PlaceGenerativeSummary) MarshalJSON() ([]byte, error) { |
| 1855 | type NoMethod GoogleMapsPlacesV1PlaceGenerativeSummary |
| 1856 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1857 | } |
| 1858 | |
| 1859 | // GoogleMapsPlacesV1PlaceGoogleMapsLinks: Links to trigger different Google |
| 1860 | // Maps actions. |
| 1861 | type GoogleMapsPlacesV1PlaceGoogleMapsLinks struct { |
| 1862 | // DirectionsUri: A link to show the directions to the place. The link only |
| 1863 | // populates the destination location and uses the default travel mode `DRIVE`. |
| 1864 | DirectionsUri string `json:"directionsUri,omitempty"` |
| 1865 | // PhotosUri: A link to show photos of this place on Google Maps. |
| 1866 | PhotosUri string `json:"photosUri,omitempty"` |
| 1867 | // PlaceUri: A link to show this place. |
| 1868 | PlaceUri string `json:"placeUri,omitempty"` |
| 1869 | // ReviewsUri: A link to show reviews of this place on Google Maps. |
| 1870 | ReviewsUri string `json:"reviewsUri,omitempty"` |
| 1871 | // WriteAReviewUri: A link to write a review for this place on Google Maps. |
| 1872 | WriteAReviewUri string `json:"writeAReviewUri,omitempty"` |
| 1873 | // ForceSendFields is a list of field names (e.g. "DirectionsUri") to |
| 1874 | // unconditionally include in API requests. By default, fields with empty or |
| 1875 | // default values are omitted from API requests. See |
| 1876 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1877 | // details. |
| 1878 | ForceSendFields []string `json:"-"` |
| 1879 | // NullFields is a list of field names (e.g. "DirectionsUri") to include in API |
| 1880 | // requests with the JSON null value. By default, fields with empty values are |
| 1881 | // omitted from API requests. See |
| 1882 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1883 | NullFields []string `json:"-"` |
| 1884 | } |
| 1885 | |
| 1886 | func (s GoogleMapsPlacesV1PlaceGoogleMapsLinks) MarshalJSON() ([]byte, error) { |
| 1887 | type NoMethod GoogleMapsPlacesV1PlaceGoogleMapsLinks |
| 1888 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1889 | } |
| 1890 | |
| 1891 | // GoogleMapsPlacesV1PlaceNeighborhoodSummary: A summary of points of interest |
| 1892 | // near the place. |
| 1893 | type GoogleMapsPlacesV1PlaceNeighborhoodSummary struct { |
| 1894 | // Description: A detailed description of the neighborhood. |
| 1895 | Description *GoogleMapsPlacesV1ContentBlock `json:"description,omitempty"` |
| 1896 | // DisclosureText: The AI disclosure message "Summarized with Gemini" (and its |
| 1897 | // localized variants). This will be in the language specified in the request |
| 1898 | // if available. |
| 1899 | DisclosureText *GoogleTypeLocalizedText `json:"disclosureText,omitempty"` |
| 1900 | // FlagContentUri: A link where users can flag a problem with the summary. |
| 1901 | FlagContentUri string `json:"flagContentUri,omitempty"` |
| 1902 | // Overview: An overview summary of the neighborhood. |
| 1903 | Overview *GoogleMapsPlacesV1ContentBlock `json:"overview,omitempty"` |
| 1904 | // ForceSendFields is a list of field names (e.g. "Description") to |
| 1905 | // unconditionally include in API requests. By default, fields with empty or |
| 1906 | // default values are omitted from API requests. See |
| 1907 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1908 | // details. |
| 1909 | ForceSendFields []string `json:"-"` |
| 1910 | // NullFields is a list of field names (e.g. "Description") to include in API |
| 1911 | // requests with the JSON null value. By default, fields with empty values are |
| 1912 | // omitted from API requests. See |
| 1913 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1914 | NullFields []string `json:"-"` |
| 1915 | } |
| 1916 | |
| 1917 | func (s GoogleMapsPlacesV1PlaceNeighborhoodSummary) MarshalJSON() ([]byte, error) { |
| 1918 | type NoMethod GoogleMapsPlacesV1PlaceNeighborhoodSummary |
| 1919 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1920 | } |
| 1921 | |
| 1922 | // GoogleMapsPlacesV1PlaceOpeningHours: Information about business hour of the |
| 1923 | // place. |
| 1924 | type GoogleMapsPlacesV1PlaceOpeningHours struct { |
| 1925 | // NextCloseTime: The next time the current opening hours period ends up to 7 |
| 1926 | // days in the future. This field is only populated if the opening hours period |
| 1927 | // is active at the time of serving the request. |
| 1928 | NextCloseTime string `json:"nextCloseTime,omitempty"` |
| 1929 | // NextOpenTime: The next time the current opening hours period starts up to 7 |
| 1930 | // days in the future. This field is only populated if the opening hours period |
| 1931 | // is not active at the time of serving the request. |
| 1932 | NextOpenTime string `json:"nextOpenTime,omitempty"` |
| 1933 | // OpenNow: Whether the opening hours period is currently active. For regular |
| 1934 | // opening hours and current opening hours, this field means whether the place |
| 1935 | // is open. For secondary opening hours and current secondary opening hours, |
| 1936 | // this field means whether the secondary hours of this place is active. |
| 1937 | OpenNow bool `json:"openNow,omitempty"` |
| 1938 | // Periods: The periods that this place is open during the week. The periods |
| 1939 | // are in chronological order, in the place-local timezone. An empty (but not |
| 1940 | // absent) value indicates a place that is never open, e.g. because it is |
| 1941 | // closed temporarily for renovations. The starting day of `periods` is NOT |
| 1942 | // fixed and should not be assumed to be Sunday. The API determines the start |
| 1943 | // day based on a variety of factors. For example, for a 24/7 business, the |
| 1944 | // first period may begin on the day of the request. For other businesses, it |
| 1945 | // might be the first day of the week that they are open. NOTE: The ordering of |
| 1946 | // the `periods` array is independent of the ordering of the |
| 1947 | // `weekday_descriptions` array. Do not assume they will begin on the same day. |
| 1948 | Periods []*GoogleMapsPlacesV1PlaceOpeningHoursPeriod `json:"periods,omitempty"` |
| 1949 | // SecondaryHoursType: A type string used to identify the type of secondary |
| 1950 | // hours. |
| 1951 | // |
| 1952 | // Possible values: |
| 1953 | // "SECONDARY_HOURS_TYPE_UNSPECIFIED" - Default value when secondary hour |
| 1954 | // type is not specified. |
| 1955 | // "DRIVE_THROUGH" - The drive-through hour for banks, restaurants, or |
| 1956 | // pharmacies. |
| 1957 | // "HAPPY_HOUR" - The happy hour. |
| 1958 | // "DELIVERY" - The delivery hour. |
| 1959 | // "TAKEOUT" - The takeout hour. |
| 1960 | // "KITCHEN" - The kitchen hour. |
| 1961 | // "BREAKFAST" - The breakfast hour. |
| 1962 | // "LUNCH" - The lunch hour. |
| 1963 | // "DINNER" - The dinner hour. |
| 1964 | // "BRUNCH" - The brunch hour. |
| 1965 | // "PICKUP" - The pickup hour. |
| 1966 | // "ACCESS" - The access hours for storage places. |
| 1967 | // "SENIOR_HOURS" - The special hours for seniors. |
| 1968 | // "ONLINE_SERVICE_HOURS" - The online service hours. |
| 1969 | SecondaryHoursType string `json:"secondaryHoursType,omitempty"` |
| 1970 | // SpecialDays: Structured information for special days that fall within the |
| 1971 | // period that the returned opening hours cover. Special days are days that |
| 1972 | // could impact the business hours of a place, e.g. Christmas day. Set for |
| 1973 | // current_opening_hours and current_secondary_opening_hours if there are |
| 1974 | // exceptional hours. |
| 1975 | SpecialDays []*GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay `json:"specialDays,omitempty"` |
| 1976 | // WeekdayDescriptions: Localized strings describing the opening hours of this |
| 1977 | // place, one string for each day of the week. NOTE: The order of the days and |
| 1978 | // the start of the week is determined by the locale (language and region). The |
| 1979 | // ordering of the `periods` array is independent of the ordering of the |
| 1980 | // `weekday_descriptions` array. Do not assume they will begin on the same day. |
| 1981 | // Will be empty if the hours are unknown or could not be converted to |
| 1982 | // localized text. Example: "Sun: 18:00–06:00" |
| 1983 | WeekdayDescriptions []string `json:"weekdayDescriptions,omitempty"` |
| 1984 | // ForceSendFields is a list of field names (e.g. "NextCloseTime") to |
| 1985 | // unconditionally include in API requests. By default, fields with empty or |
| 1986 | // default values are omitted from API requests. See |
| 1987 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1988 | // details. |
| 1989 | ForceSendFields []string `json:"-"` |
| 1990 | // NullFields is a list of field names (e.g. "NextCloseTime") to include in API |
| 1991 | // requests with the JSON null value. By default, fields with empty values are |
| 1992 | // omitted from API requests. See |
| 1993 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1994 | NullFields []string `json:"-"` |
| 1995 | } |
| 1996 | |
| 1997 | func (s GoogleMapsPlacesV1PlaceOpeningHours) MarshalJSON() ([]byte, error) { |
| 1998 | type NoMethod GoogleMapsPlacesV1PlaceOpeningHours |
| 1999 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2000 | } |
| 2001 | |
| 2002 | // GoogleMapsPlacesV1PlaceOpeningHoursPeriod: A period the place remains in |
| 2003 | // open_now status. |
| 2004 | type GoogleMapsPlacesV1PlaceOpeningHoursPeriod struct { |
| 2005 | // Close: The time that the place starts to be closed. |
| 2006 | Close *GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint `json:"close,omitempty"` |
| 2007 | // Open: The time that the place starts to be open. |
| 2008 | Open *GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint `json:"open,omitempty"` |
| 2009 | // ForceSendFields is a list of field names (e.g. "Close") to unconditionally |
| 2010 | // include in API requests. By default, fields with empty or default values are |
| 2011 | // omitted from API requests. See |
| 2012 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2013 | // details. |
| 2014 | ForceSendFields []string `json:"-"` |
| 2015 | // NullFields is a list of field names (e.g. "Close") to include in API |
| 2016 | // requests with the JSON null value. By default, fields with empty values are |
| 2017 | // omitted from API requests. See |
| 2018 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2019 | NullFields []string `json:"-"` |
| 2020 | } |
| 2021 | |
| 2022 | func (s GoogleMapsPlacesV1PlaceOpeningHoursPeriod) MarshalJSON() ([]byte, error) { |
| 2023 | type NoMethod GoogleMapsPlacesV1PlaceOpeningHoursPeriod |
| 2024 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2025 | } |
| 2026 | |
| 2027 | // GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint: Status changing points. |
| 2028 | type GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint struct { |
| 2029 | // Date: Date in the local timezone for the place. |
| 2030 | Date *GoogleTypeDate `json:"date,omitempty"` |
| 2031 | // Day: A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is |
| 2032 | // Monday, etc. |
| 2033 | Day int64 `json:"day,omitempty"` |
| 2034 | // Hour: The hour in 24 hour format. Ranges from 0 to 23. |
| 2035 | Hour int64 `json:"hour,omitempty"` |
| 2036 | // Minute: The minute. Ranges from 0 to 59. |
| 2037 | Minute int64 `json:"minute,omitempty"` |
| 2038 | // Truncated: Whether or not this endpoint was truncated. Truncation occurs |
| 2039 | // when the real hours are outside the times we are willing to return hours |
| 2040 | // between, so we truncate the hours back to these boundaries. This ensures |
| 2041 | // that at most 24 * 7 hours from midnight of the day of the request are |
| 2042 | // returned. |
| 2043 | Truncated bool `json:"truncated,omitempty"` |
| 2044 | // ForceSendFields is a list of field names (e.g. "Date") to unconditionally |
| 2045 | // include in API requests. By default, fields with empty or default values are |
| 2046 | // omitted from API requests. See |
| 2047 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2048 | // details. |
| 2049 | ForceSendFields []string `json:"-"` |
| 2050 | // NullFields is a list of field names (e.g. "Date") to include in API requests |
| 2051 | // with the JSON null value. By default, fields with empty values are omitted |
| 2052 | // from API requests. See |
| 2053 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2054 | NullFields []string `json:"-"` |
| 2055 | } |
| 2056 | |
| 2057 | func (s GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint) MarshalJSON() ([]byte, error) { |
| 2058 | type NoMethod GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint |
| 2059 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2060 | } |
| 2061 | |
| 2062 | // GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay: Structured information for |
| 2063 | // special days that fall within the period that the returned opening hours |
| 2064 | // cover. Special days are days that could impact the business hours of a |
| 2065 | // place, e.g. Christmas day. |
| 2066 | type GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay struct { |
| 2067 | // Date: The date of this special day. |
| 2068 | Date *GoogleTypeDate `json:"date,omitempty"` |
| 2069 | // ForceSendFields is a list of field names (e.g. "Date") to unconditionally |
| 2070 | // include in API requests. By default, fields with empty or default values are |
| 2071 | // omitted from API requests. See |
| 2072 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2073 | // details. |
| 2074 | ForceSendFields []string `json:"-"` |
| 2075 | // NullFields is a list of field names (e.g. "Date") to include in API requests |
| 2076 | // with the JSON null value. By default, fields with empty values are omitted |
| 2077 | // from API requests. See |
| 2078 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2079 | NullFields []string `json:"-"` |
| 2080 | } |
| 2081 | |
| 2082 | func (s GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay) MarshalJSON() ([]byte, error) { |
| 2083 | type NoMethod GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay |
| 2084 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2085 | } |
| 2086 | |
| 2087 | // GoogleMapsPlacesV1PlaceParkingOptions: Information about parking options for |
| 2088 | // the place. A parking lot could support more than one option at the same |
| 2089 | // time. |
| 2090 | type GoogleMapsPlacesV1PlaceParkingOptions struct { |
| 2091 | // FreeGarageParking: Place offers free garage parking. |
| 2092 | FreeGarageParking bool `json:"freeGarageParking,omitempty"` |
| 2093 | // FreeParkingLot: Place offers free parking lots. |
| 2094 | FreeParkingLot bool `json:"freeParkingLot,omitempty"` |
| 2095 | // FreeStreetParking: Place offers free street parking. |
| 2096 | FreeStreetParking bool `json:"freeStreetParking,omitempty"` |
| 2097 | // PaidGarageParking: Place offers paid garage parking. |
| 2098 | PaidGarageParking bool `json:"paidGarageParking,omitempty"` |
| 2099 | // PaidParkingLot: Place offers paid parking lots. |
| 2100 | PaidParkingLot bool `json:"paidParkingLot,omitempty"` |
| 2101 | // PaidStreetParking: Place offers paid street parking. |
| 2102 | PaidStreetParking bool `json:"paidStreetParking,omitempty"` |
| 2103 | // ValetParking: Place offers valet parking. |
| 2104 | ValetParking bool `json:"valetParking,omitempty"` |
| 2105 | // ForceSendFields is a list of field names (e.g. "FreeGarageParking") to |
| 2106 | // unconditionally include in API requests. By default, fields with empty or |
| 2107 | // default values are omitted from API requests. See |
| 2108 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2109 | // details. |
| 2110 | ForceSendFields []string `json:"-"` |
| 2111 | // NullFields is a list of field names (e.g. "FreeGarageParking") to include in |
| 2112 | // API requests with the JSON null value. By default, fields with empty values |
| 2113 | // are omitted from API requests. See |
| 2114 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2115 | NullFields []string `json:"-"` |
| 2116 | } |
| 2117 | |
| 2118 | func (s GoogleMapsPlacesV1PlaceParkingOptions) MarshalJSON() ([]byte, error) { |
| 2119 | type NoMethod GoogleMapsPlacesV1PlaceParkingOptions |
| 2120 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2121 | } |
| 2122 | |
| 2123 | // GoogleMapsPlacesV1PlacePaymentOptions: Payment options the place accepts. |
| 2124 | type GoogleMapsPlacesV1PlacePaymentOptions struct { |
| 2125 | // AcceptsCashOnly: Place accepts cash only as payment. Places with this |
| 2126 | // attribute may still accept other payment methods. |
| 2127 | AcceptsCashOnly bool `json:"acceptsCashOnly,omitempty"` |
| 2128 | // AcceptsCreditCards: Place accepts credit cards as payment. |
| 2129 | AcceptsCreditCards bool `json:"acceptsCreditCards,omitempty"` |
| 2130 | // AcceptsDebitCards: Place accepts debit cards as payment. |
| 2131 | AcceptsDebitCards bool `json:"acceptsDebitCards,omitempty"` |
| 2132 | // AcceptsNfc: Place accepts NFC payments. |
| 2133 | AcceptsNfc bool `json:"acceptsNfc,omitempty"` |
| 2134 | // ForceSendFields is a list of field names (e.g. "AcceptsCashOnly") to |
| 2135 | // unconditionally include in API requests. By default, fields with empty or |
| 2136 | // default values are omitted from API requests. See |
| 2137 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2138 | // details. |
| 2139 | ForceSendFields []string `json:"-"` |
| 2140 | // NullFields is a list of field names (e.g. "AcceptsCashOnly") to include in |
| 2141 | // API requests with the JSON null value. By default, fields with empty values |
| 2142 | // are omitted from API requests. See |
| 2143 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2144 | NullFields []string `json:"-"` |
| 2145 | } |
| 2146 | |
| 2147 | func (s GoogleMapsPlacesV1PlacePaymentOptions) MarshalJSON() ([]byte, error) { |
| 2148 | type NoMethod GoogleMapsPlacesV1PlacePaymentOptions |
| 2149 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2150 | } |
| 2151 | |
| 2152 | // GoogleMapsPlacesV1PlacePlusCode: Plus code (http://plus.codes) is a location |
| 2153 | // reference with two formats: global code defining a 14mx14m (1/8000th of a |
| 2154 | // degree) or smaller rectangle, and compound code, replacing the prefix with a |
| 2155 | // reference location. |
| 2156 | type GoogleMapsPlacesV1PlacePlusCode struct { |
| 2157 | // CompoundCode: Place's compound code, such as "33GV+HQ, Ramberg, Norway", |
| 2158 | // containing the suffix of the global code and replacing the prefix with a |
| 2159 | // formatted name of a reference entity. |
| 2160 | CompoundCode string `json:"compoundCode,omitempty"` |
| 2161 | // GlobalCode: Place's global (full) code, such as "9FWM33GV+HQ", representing |
| 2162 | // an 1/8000 by 1/8000 degree area (~14 by 14 meters). |
| 2163 | GlobalCode string `json:"globalCode,omitempty"` |
| 2164 | // ForceSendFields is a list of field names (e.g. "CompoundCode") to |
| 2165 | // unconditionally include in API requests. By default, fields with empty or |
| 2166 | // default values are omitted from API requests. See |
| 2167 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2168 | // details. |
| 2169 | ForceSendFields []string `json:"-"` |
| 2170 | // NullFields is a list of field names (e.g. "CompoundCode") to include in API |
| 2171 | // requests with the JSON null value. By default, fields with empty values are |
| 2172 | // omitted from API requests. See |
| 2173 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2174 | NullFields []string `json:"-"` |
| 2175 | } |
| 2176 | |
| 2177 | func (s GoogleMapsPlacesV1PlacePlusCode) MarshalJSON() ([]byte, error) { |
| 2178 | type NoMethod GoogleMapsPlacesV1PlacePlusCode |
| 2179 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2180 | } |
| 2181 | |
| 2182 | // GoogleMapsPlacesV1PlaceReviewSummary: AI-generated summary of the place |
| 2183 | // using user reviews. |
| 2184 | type GoogleMapsPlacesV1PlaceReviewSummary struct { |
| 2185 | // DisclosureText: The AI disclosure message "Summarized with Gemini" (and its |
| 2186 | // localized variants). This will be in the language specified in the request |
| 2187 | // if available. |
| 2188 | DisclosureText *GoogleTypeLocalizedText `json:"disclosureText,omitempty"` |
| 2189 | // FlagContentUri: A link where users can flag a problem with the summary. |
| 2190 | FlagContentUri string `json:"flagContentUri,omitempty"` |
| 2191 | // ReviewsUri: A link to show reviews of this place on Google Maps. |
| 2192 | ReviewsUri string `json:"reviewsUri,omitempty"` |
| 2193 | // Text: The summary of user reviews. |
| 2194 | Text *GoogleTypeLocalizedText `json:"text,omitempty"` |
| 2195 | // ForceSendFields is a list of field names (e.g. "DisclosureText") to |
| 2196 | // unconditionally include in API requests. By default, fields with empty or |
| 2197 | // default values are omitted from API requests. See |
| 2198 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2199 | // details. |
| 2200 | ForceSendFields []string `json:"-"` |
| 2201 | // NullFields is a list of field names (e.g. "DisclosureText") to include in |
| 2202 | // API requests with the JSON null value. By default, fields with empty values |
| 2203 | // are omitted from API requests. See |
| 2204 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2205 | NullFields []string `json:"-"` |
| 2206 | } |
| 2207 | |
| 2208 | func (s GoogleMapsPlacesV1PlaceReviewSummary) MarshalJSON() ([]byte, error) { |
| 2209 | type NoMethod GoogleMapsPlacesV1PlaceReviewSummary |
| 2210 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2211 | } |
| 2212 | |
| 2213 | // GoogleMapsPlacesV1PlaceSubDestination: Sub-destinations are specific places |
| 2214 | // associated with a main place. These provide more specific destinations for |
| 2215 | // users who are searching within a large or complex place, like an airport, |
| 2216 | // national park, university, or stadium. For example, sub-destinations at an |
| 2217 | // airport might include associated terminals and parking lots. |
| 2218 | // Sub-destinations return the place ID and place resource name, which can be |
| 2219 | // used in subsequent Place Details (New) requests to fetch richer details, |
| 2220 | // including the sub-destination's display name and location. |
| 2221 | type GoogleMapsPlacesV1PlaceSubDestination struct { |
| 2222 | // Id: The place id of the sub-destination. |
| 2223 | Id string `json:"id,omitempty"` |
| 2224 | // Name: The resource name of the sub-destination. |
| 2225 | Name string `json:"name,omitempty"` |
| 2226 | // ForceSendFields is a list of field names (e.g. "Id") to unconditionally |
| 2227 | // include in API requests. By default, fields with empty or default values are |
| 2228 | // omitted from API requests. See |
| 2229 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2230 | // details. |
| 2231 | ForceSendFields []string `json:"-"` |
| 2232 | // NullFields is a list of field names (e.g. "Id") to include in API requests |
| 2233 | // with the JSON null value. By default, fields with empty values are omitted |
| 2234 | // from API requests. See |
| 2235 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2236 | NullFields []string `json:"-"` |
| 2237 | } |
| 2238 | |
| 2239 | func (s GoogleMapsPlacesV1PlaceSubDestination) MarshalJSON() ([]byte, error) { |
| 2240 | type NoMethod GoogleMapsPlacesV1PlaceSubDestination |
| 2241 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2242 | } |
| 2243 | |
| 2244 | // GoogleMapsPlacesV1Polyline: A route polyline. Only supports an encoded |
| 2245 | // polyline |
| 2246 | // (https://developers.google.com/maps/documentation/utilities/polylinealgorithm), |
| 2247 | // which can be passed as a string and includes compression with minimal |
| 2248 | // lossiness. This is the Routes API default output. |
| 2249 | type GoogleMapsPlacesV1Polyline struct { |
| 2250 | // EncodedPolyline: An encoded polyline |
| 2251 | // (https://developers.google.com/maps/documentation/utilities/polylinealgorithm), |
| 2252 | // as returned by the Routes API by default |
| 2253 | // (https://developers.google.com/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#polylineencoding). |
| 2254 | // See the encoder |
| 2255 | // (https://developers.google.com/maps/documentation/utilities/polylineutility) |
| 2256 | // and decoder |
| 2257 | // (https://developers.google.com/maps/documentation/routes/polylinedecoder) |
| 2258 | // tools. |
| 2259 | EncodedPolyline string `json:"encodedPolyline,omitempty"` |
| 2260 | // ForceSendFields is a list of field names (e.g. "EncodedPolyline") to |
| 2261 | // unconditionally include in API requests. By default, fields with empty or |
| 2262 | // default values are omitted from API requests. See |
| 2263 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2264 | // details. |
| 2265 | ForceSendFields []string `json:"-"` |
| 2266 | // NullFields is a list of field names (e.g. "EncodedPolyline") to include in |
| 2267 | // API requests with the JSON null value. By default, fields with empty values |
| 2268 | // are omitted from API requests. See |
| 2269 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2270 | NullFields []string `json:"-"` |
| 2271 | } |
| 2272 | |
| 2273 | func (s GoogleMapsPlacesV1Polyline) MarshalJSON() ([]byte, error) { |
| 2274 | type NoMethod GoogleMapsPlacesV1Polyline |
| 2275 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2276 | } |
| 2277 | |
| 2278 | // GoogleMapsPlacesV1PriceRange: The price range associated with a Place. |
| 2279 | // `end_price` could be unset, which indicates a range without upper bound |
| 2280 | // (e.g. "More than $100"). |
| 2281 | type GoogleMapsPlacesV1PriceRange struct { |
| 2282 | // EndPrice: The high end of the price range (exclusive). Price should be lower |
| 2283 | // than this amount. |
| 2284 | EndPrice *GoogleTypeMoney `json:"endPrice,omitempty"` |
| 2285 | // StartPrice: The low end of the price range (inclusive). Price should be at |
| 2286 | // or above this amount. |
| 2287 | StartPrice *GoogleTypeMoney `json:"startPrice,omitempty"` |
| 2288 | // ForceSendFields is a list of field names (e.g. "EndPrice") to |
| 2289 | // unconditionally include in API requests. By default, fields with empty or |
| 2290 | // default values are omitted from API requests. See |
| 2291 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2292 | // details. |
| 2293 | ForceSendFields []string `json:"-"` |
| 2294 | // NullFields is a list of field names (e.g. "EndPrice") to include in API |
| 2295 | // requests with the JSON null value. By default, fields with empty values are |
| 2296 | // omitted from API requests. See |
| 2297 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2298 | NullFields []string `json:"-"` |
| 2299 | } |
| 2300 | |
| 2301 | func (s GoogleMapsPlacesV1PriceRange) MarshalJSON() ([]byte, error) { |
| 2302 | type NoMethod GoogleMapsPlacesV1PriceRange |
| 2303 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2304 | } |
| 2305 | |
| 2306 | // GoogleMapsPlacesV1Review: Information about a review of a place. |
| 2307 | type GoogleMapsPlacesV1Review struct { |
| 2308 | // AuthorAttribution: This review's author. |
| 2309 | AuthorAttribution *GoogleMapsPlacesV1AuthorAttribution `json:"authorAttribution,omitempty"` |
| 2310 | // FlagContentUri: A link where users can flag a problem with the review. |
| 2311 | FlagContentUri string `json:"flagContentUri,omitempty"` |
| 2312 | // GoogleMapsUri: A link to show the review on Google Maps. |
| 2313 | GoogleMapsUri string `json:"googleMapsUri,omitempty"` |
| 2314 | // Name: A reference representing this place review which may be used to look |
| 2315 | // up this place review again (also called the API "resource" name: |
| 2316 | // `places/{place_id}/reviews/{review}`). |
| 2317 | Name string `json:"name,omitempty"` |
| 2318 | // OriginalText: The review text in its original language. |
| 2319 | OriginalText *GoogleTypeLocalizedText `json:"originalText,omitempty"` |
| 2320 | // PublishTime: Timestamp for the review. |
| 2321 | PublishTime string `json:"publishTime,omitempty"` |
| 2322 | // Rating: A number between 1.0 and 5.0, also called the number of stars. |
| 2323 | Rating float64 `json:"rating,omitempty"` |
| 2324 | // RelativePublishTimeDescription: A string of formatted recent time, |
| 2325 | // expressing the review time relative to the current time in a form |
| 2326 | // appropriate for the language and country. |
| 2327 | RelativePublishTimeDescription string `json:"relativePublishTimeDescription,omitempty"` |
| 2328 | // Text: The localized text of the review. |
| 2329 | Text *GoogleTypeLocalizedText `json:"text,omitempty"` |
| 2330 | // VisitDate: The date when the author visited the place. This is truncated to |
| 2331 | // the year and month of the visit. |
| 2332 | VisitDate *GoogleTypeDate `json:"visitDate,omitempty"` |
| 2333 | // ForceSendFields is a list of field names (e.g. "AuthorAttribution") to |
| 2334 | // unconditionally include in API requests. By default, fields with empty or |
| 2335 | // default values are omitted from API requests. See |
| 2336 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2337 | // details. |
| 2338 | ForceSendFields []string `json:"-"` |
| 2339 | // NullFields is a list of field names (e.g. "AuthorAttribution") to include in |
| 2340 | // API requests with the JSON null value. By default, fields with empty values |
| 2341 | // are omitted from API requests. See |
| 2342 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2343 | NullFields []string `json:"-"` |
| 2344 | } |
| 2345 | |
| 2346 | func (s GoogleMapsPlacesV1Review) MarshalJSON() ([]byte, error) { |
| 2347 | type NoMethod GoogleMapsPlacesV1Review |
| 2348 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2349 | } |
| 2350 | |
| 2351 | func (s *GoogleMapsPlacesV1Review) UnmarshalJSON(data []byte) error { |
| 2352 | type NoMethod GoogleMapsPlacesV1Review |
| 2353 | var s1 struct { |
| 2354 | Rating gensupport.JSONFloat64 `json:"rating"` |
| 2355 | *NoMethod |
| 2356 | } |
| 2357 | s1.NoMethod = (*NoMethod)(s) |
| 2358 | if err := json.Unmarshal(data, &s1); err != nil { |
| 2359 | return err |
| 2360 | } |
| 2361 | s.Rating = float64(s1.Rating) |
| 2362 | return nil |
| 2363 | } |
| 2364 | |
| 2365 | // GoogleMapsPlacesV1RouteModifiers: Encapsulates a set of optional conditions |
| 2366 | // to satisfy when calculating the routes. |
| 2367 | type GoogleMapsPlacesV1RouteModifiers struct { |
| 2368 | // AvoidFerries: Optional. When set to true, avoids ferries where reasonable, |
| 2369 | // giving preference to routes not containing ferries. Applies only to the |
| 2370 | // `DRIVE` and `TWO_WHEELER` `TravelMode`. |
| 2371 | AvoidFerries bool `json:"avoidFerries,omitempty"` |
| 2372 | // AvoidHighways: Optional. When set to true, avoids highways where reasonable, |
| 2373 | // giving preference to routes not containing highways. Applies only to the |
| 2374 | // `DRIVE` and `TWO_WHEELER` `TravelMode`. |
| 2375 | AvoidHighways bool `json:"avoidHighways,omitempty"` |
| 2376 | // AvoidIndoor: Optional. When set to true, avoids navigating indoors where |
| 2377 | // reasonable, giving preference to routes not containing indoor navigation. |
| 2378 | // Applies only to the `WALK` `TravelMode`. |
| 2379 | AvoidIndoor bool `json:"avoidIndoor,omitempty"` |
| 2380 | // AvoidTolls: Optional. When set to true, avoids toll roads where reasonable, |
| 2381 | // giving preference to routes not containing toll roads. Applies only to the |
| 2382 | // `DRIVE` and `TWO_WHEELER` `TravelMode`. |
| 2383 | AvoidTolls bool `json:"avoidTolls,omitempty"` |
| 2384 | // ForceSendFields is a list of field names (e.g. "AvoidFerries") to |
| 2385 | // unconditionally include in API requests. By default, fields with empty or |
| 2386 | // default values are omitted from API requests. See |
| 2387 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2388 | // details. |
| 2389 | ForceSendFields []string `json:"-"` |
| 2390 | // NullFields is a list of field names (e.g. "AvoidFerries") to include in API |
| 2391 | // requests with the JSON null value. By default, fields with empty values are |
| 2392 | // omitted from API requests. See |
| 2393 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2394 | NullFields []string `json:"-"` |
| 2395 | } |
| 2396 | |
| 2397 | func (s GoogleMapsPlacesV1RouteModifiers) MarshalJSON() ([]byte, error) { |
| 2398 | type NoMethod GoogleMapsPlacesV1RouteModifiers |
| 2399 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2400 | } |
| 2401 | |
| 2402 | // GoogleMapsPlacesV1RoutingParameters: Parameters to configure the routing |
| 2403 | // calculations to the places in the response, both along a route (where result |
| 2404 | // ranking will be influenced) and for calculating travel times on results. |
| 2405 | type GoogleMapsPlacesV1RoutingParameters struct { |
| 2406 | // Origin: Optional. An explicit routing origin that overrides the origin |
| 2407 | // defined in the polyline. By default, the polyline origin is used. |
| 2408 | Origin *GoogleTypeLatLng `json:"origin,omitempty"` |
| 2409 | // RouteModifiers: Optional. The route modifiers. |
| 2410 | RouteModifiers *GoogleMapsPlacesV1RouteModifiers `json:"routeModifiers,omitempty"` |
| 2411 | // RoutingPreference: Optional. Specifies how to compute the routing summaries. |
| 2412 | // The server attempts to use the selected routing preference to compute the |
| 2413 | // route. The traffic aware routing preference is only available for the |
| 2414 | // `DRIVE` or `TWO_WHEELER` `travelMode`. |
| 2415 | // |
| 2416 | // Possible values: |
| 2417 | // "ROUTING_PREFERENCE_UNSPECIFIED" - No routing preference specified. |
| 2418 | // Default to `TRAFFIC_UNAWARE`. |
| 2419 | // "TRAFFIC_UNAWARE" - Computes routes without taking live traffic conditions |
| 2420 | // into consideration. Suitable when traffic conditions don't matter or are not |
| 2421 | // applicable. Using this value produces the lowest latency. Note: For |
| 2422 | // `TravelMode` `DRIVE` and `TWO_WHEELER`, the route and duration chosen are |
| 2423 | // based on road network and average time-independent traffic conditions, not |
| 2424 | // current road conditions. Consequently, routes may include roads that are |
| 2425 | // temporarily closed. Results for a given request may vary over time due to |
| 2426 | // changes in the road network, updated average traffic conditions, and the |
| 2427 | // distributed nature of the service. Results may also vary between |
| 2428 | // nearly-equivalent routes at any time or frequency. |
| 2429 | // "TRAFFIC_AWARE" - Calculates routes taking live traffic conditions into |
| 2430 | // consideration. In contrast to `TRAFFIC_AWARE_OPTIMAL`, some optimizations |
| 2431 | // are applied to significantly reduce latency. |
| 2432 | // "TRAFFIC_AWARE_OPTIMAL" - Calculates the routes taking live traffic |
| 2433 | // conditions into consideration, without applying most performance |
| 2434 | // optimizations. Using this value produces the highest latency. |
| 2435 | RoutingPreference string `json:"routingPreference,omitempty"` |
| 2436 | // TravelMode: Optional. The travel mode. |
| 2437 | // |
| 2438 | // Possible values: |
| 2439 | // "TRAVEL_MODE_UNSPECIFIED" - No travel mode specified. Defaults to `DRIVE`. |
| 2440 | // "DRIVE" - Travel by passenger car. |
| 2441 | // "BICYCLE" - Travel by bicycle. Not supported with |
| 2442 | // `search_along_route_parameters`. |
| 2443 | // "WALK" - Travel by walking. Not supported with |
| 2444 | // `search_along_route_parameters`. |
| 2445 | // "TWO_WHEELER" - Motorized two wheeled vehicles of all kinds such as |
| 2446 | // scooters and motorcycles. Note that this is distinct from the `BICYCLE` |
| 2447 | // travel mode which covers human-powered transport. Not supported with |
| 2448 | // `search_along_route_parameters`. Only supported in those countries listed at |
| 2449 | // [Countries and regions supported for two-wheeled |
| 2450 | // vehicles](https://developers.google.com/maps/documentation/routes/coverage-tw |
| 2451 | // o-wheeled). |
| 2452 | TravelMode string `json:"travelMode,omitempty"` |
| 2453 | // ForceSendFields is a list of field names (e.g. "Origin") to unconditionally |
| 2454 | // include in API requests. By default, fields with empty or default values are |
| 2455 | // omitted from API requests. See |
| 2456 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2457 | // details. |
| 2458 | ForceSendFields []string `json:"-"` |
| 2459 | // NullFields is a list of field names (e.g. "Origin") to include in API |
| 2460 | // requests with the JSON null value. By default, fields with empty values are |
| 2461 | // omitted from API requests. See |
| 2462 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2463 | NullFields []string `json:"-"` |
| 2464 | } |
| 2465 | |
| 2466 | func (s GoogleMapsPlacesV1RoutingParameters) MarshalJSON() ([]byte, error) { |
| 2467 | type NoMethod GoogleMapsPlacesV1RoutingParameters |
| 2468 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2469 | } |
| 2470 | |
| 2471 | // GoogleMapsPlacesV1RoutingSummary: The duration and distance from the routing |
| 2472 | // origin to a place in the response, and a second leg from that place to the |
| 2473 | // destination, if requested. **Note:** Adding `routingSummaries` in the field |
| 2474 | // mask without also including either the `routingParameters.origin` parameter |
| 2475 | // or the `searchAlongRouteParameters.polyline.encodedPolyline` parameter in |
| 2476 | // the request causes an error. |
| 2477 | type GoogleMapsPlacesV1RoutingSummary struct { |
| 2478 | // DirectionsUri: A link to show directions on Google Maps using the waypoints |
| 2479 | // from the given routing summary. The route generated by this link is not |
| 2480 | // guaranteed to be the same as the route used to generate the routing summary. |
| 2481 | // The link uses information provided in the request, from fields including |
| 2482 | // `routingParameters` and `searchAlongRouteParameters` when applicable, to |
| 2483 | // generate the directions link. |
| 2484 | DirectionsUri string `json:"directionsUri,omitempty"` |
| 2485 | // Legs: The legs of the trip. When you calculate travel duration and distance |
| 2486 | // from a set origin, `legs` contains a single leg containing the duration and |
| 2487 | // distance from the origin to the destination. When you do a search along |
| 2488 | // route, `legs` contains two legs: one from the origin to place, and one from |
| 2489 | // the place to the destination. |
| 2490 | Legs []*GoogleMapsPlacesV1RoutingSummaryLeg `json:"legs,omitempty"` |
| 2491 | // ForceSendFields is a list of field names (e.g. "DirectionsUri") to |
| 2492 | // unconditionally include in API requests. By default, fields with empty or |
| 2493 | // default values are omitted from API requests. See |
| 2494 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2495 | // details. |
| 2496 | ForceSendFields []string `json:"-"` |
| 2497 | // NullFields is a list of field names (e.g. "DirectionsUri") to include in API |
| 2498 | // requests with the JSON null value. By default, fields with empty values are |
| 2499 | // omitted from API requests. See |
| 2500 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2501 | NullFields []string `json:"-"` |
| 2502 | } |
| 2503 | |
| 2504 | func (s GoogleMapsPlacesV1RoutingSummary) MarshalJSON() ([]byte, error) { |
| 2505 | type NoMethod GoogleMapsPlacesV1RoutingSummary |
| 2506 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2507 | } |
| 2508 | |
| 2509 | // GoogleMapsPlacesV1RoutingSummaryLeg: A leg is a single portion of a journey |
| 2510 | // from one location to another. |
| 2511 | type GoogleMapsPlacesV1RoutingSummaryLeg struct { |
| 2512 | // DistanceMeters: The distance of this leg of the trip. |
| 2513 | DistanceMeters int64 `json:"distanceMeters,omitempty"` |
| 2514 | // Duration: The time it takes to complete this leg of the trip. |
| 2515 | Duration string `json:"duration,omitempty"` |
| 2516 | // ForceSendFields is a list of field names (e.g. "DistanceMeters") to |
| 2517 | // unconditionally include in API requests. By default, fields with empty or |
| 2518 | // default values are omitted from API requests. See |
| 2519 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2520 | // details. |
| 2521 | ForceSendFields []string `json:"-"` |
| 2522 | // NullFields is a list of field names (e.g. "DistanceMeters") to include in |
| 2523 | // API requests with the JSON null value. By default, fields with empty values |
| 2524 | // are omitted from API requests. See |
| 2525 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2526 | NullFields []string `json:"-"` |
| 2527 | } |
| 2528 | |
| 2529 | func (s GoogleMapsPlacesV1RoutingSummaryLeg) MarshalJSON() ([]byte, error) { |
| 2530 | type NoMethod GoogleMapsPlacesV1RoutingSummaryLeg |
| 2531 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2532 | } |
| 2533 | |
| 2534 | // GoogleMapsPlacesV1SearchNearbyRequest: Request proto for Search Nearby. |
| 2535 | type GoogleMapsPlacesV1SearchNearbyRequest struct { |
| 2536 | // ExcludedPrimaryTypes: Excluded primary Place type (e.g. "restaurant" or |
| 2537 | // "gas_station") from |
| 2538 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 2539 | // Up to 50 types from Table A |
| 2540 | // (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) |
| 2541 | // may be specified. If there are any conflicting primary types, i.e. a type |
| 2542 | // appears in both included_primary_types and excluded_primary_types, an |
| 2543 | // INVALID_ARGUMENT error is returned. If a Place type is specified with |
| 2544 | // multiple type restrictions, only places that satisfy all of the restrictions |
| 2545 | // are returned. For example, if we have {included_types = ["restaurant"], |
| 2546 | // excluded_primary_types = ["restaurant"]}, the returned places provide |
| 2547 | // "restaurant" related services but do not operate primarily as "restaurants". |
| 2548 | ExcludedPrimaryTypes []string `json:"excludedPrimaryTypes,omitempty"` |
| 2549 | // ExcludedTypes: Excluded Place type (eg, "restaurant" or "gas_station") from |
| 2550 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 2551 | // Up to 50 types from Table A |
| 2552 | // (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) |
| 2553 | // may be specified. If the client provides both included_types (e.g. |
| 2554 | // restaurant) and excluded_types (e.g. cafe), then the response should include |
| 2555 | // places that are restaurant but not cafe. The response includes places that |
| 2556 | // match at least one of the included_types and none of the excluded_types. If |
| 2557 | // there are any conflicting types, i.e. a type appears in both included_types |
| 2558 | // and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type |
| 2559 | // is specified with multiple type restrictions, only places that satisfy all |
| 2560 | // of the restrictions are returned. For example, if we have {included_types = |
| 2561 | // ["restaurant"], excluded_primary_types = ["restaurant"]}, the returned |
| 2562 | // places provide "restaurant" related services but do not operate primarily as |
| 2563 | // "restaurants". |
| 2564 | ExcludedTypes []string `json:"excludedTypes,omitempty"` |
| 2565 | // IncludeFutureOpeningBusinesses: Optional. If true, include businesses that |
| 2566 | // are not yet open but will open in the future. |
| 2567 | IncludeFutureOpeningBusinesses bool `json:"includeFutureOpeningBusinesses,omitempty"` |
| 2568 | // IncludedPrimaryTypes: Included primary Place type (e.g. "restaurant" or |
| 2569 | // "gas_station") from |
| 2570 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 2571 | // A place can only have a single primary type from the supported types table |
| 2572 | // associated with it. Up to 50 types from Table A |
| 2573 | // (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) |
| 2574 | // may be specified. If there are any conflicting primary types, i.e. a type |
| 2575 | // appears in both included_primary_types and excluded_primary_types, an |
| 2576 | // INVALID_ARGUMENT error is returned. If a Place type is specified with |
| 2577 | // multiple type restrictions, only places that satisfy all of the restrictions |
| 2578 | // are returned. For example, if we have {included_types = ["restaurant"], |
| 2579 | // excluded_primary_types = ["restaurant"]}, the returned places provide |
| 2580 | // "restaurant" related services but do not operate primarily as "restaurants". |
| 2581 | IncludedPrimaryTypes []string `json:"includedPrimaryTypes,omitempty"` |
| 2582 | // IncludedTypes: Included Place type (eg, "restaurant" or "gas_station") from |
| 2583 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 2584 | // Up to 50 types from Table A |
| 2585 | // (https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) |
| 2586 | // may be specified. If there are any conflicting types, i.e. a type appears in |
| 2587 | // both included_types and excluded_types, an INVALID_ARGUMENT error is |
| 2588 | // returned. If a Place type is specified with multiple type restrictions, only |
| 2589 | // places that satisfy all of the restrictions are returned. For example, if we |
| 2590 | // have {included_types = ["restaurant"], excluded_primary_types = |
| 2591 | // ["restaurant"]}, the returned places provide "restaurant" related services |
| 2592 | // but do not operate primarily as "restaurants". |
| 2593 | IncludedTypes []string `json:"includedTypes,omitempty"` |
| 2594 | // LanguageCode: Place details will be displayed with the preferred language if |
| 2595 | // available. If the language code is unspecified or unrecognized, place |
| 2596 | // details of any language may be returned, with a preference for English if |
| 2597 | // such details exist. Current list of supported languages: |
| 2598 | // https://developers.google.com/maps/faq#languagesupport. |
| 2599 | LanguageCode string `json:"languageCode,omitempty"` |
| 2600 | // LocationRestriction: Required. The region to search. |
| 2601 | LocationRestriction *GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction `json:"locationRestriction,omitempty"` |
| 2602 | // MaxResultCount: Maximum number of results to return. It must be between 1 |
| 2603 | // and 20 (default), inclusively. If the number is unset, it falls back to the |
| 2604 | // upper limit. If the number is set to negative or exceeds the upper limit, an |
| 2605 | // INVALID_ARGUMENT error is returned. |
| 2606 | MaxResultCount int64 `json:"maxResultCount,omitempty"` |
| 2607 | // RankPreference: How results will be ranked in the response. |
| 2608 | // |
| 2609 | // Possible values: |
| 2610 | // "RANK_PREFERENCE_UNSPECIFIED" - RankPreference value not set. Will use |
| 2611 | // rank by POPULARITY by default. |
| 2612 | // "DISTANCE" - Ranks results by distance. |
| 2613 | // "POPULARITY" - Ranks results by popularity. |
| 2614 | RankPreference string `json:"rankPreference,omitempty"` |
| 2615 | // RegionCode: The Unicode country/region code (CLDR) of the location where the |
| 2616 | // request is coming from. This parameter is used to display the place details, |
| 2617 | // like region-specific place name, if available. The parameter can affect |
| 2618 | // results based on applicable law. For more information, see |
| 2619 | // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. |
| 2620 | // Note that 3-digit region codes are not currently supported. |
| 2621 | RegionCode string `json:"regionCode,omitempty"` |
| 2622 | // RoutingParameters: Optional. Parameters that affect the routing to the |
| 2623 | // search results. |
| 2624 | RoutingParameters *GoogleMapsPlacesV1RoutingParameters `json:"routingParameters,omitempty"` |
| 2625 | // ForceSendFields is a list of field names (e.g. "ExcludedPrimaryTypes") to |
| 2626 | // unconditionally include in API requests. By default, fields with empty or |
| 2627 | // default values are omitted from API requests. See |
| 2628 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2629 | // details. |
| 2630 | ForceSendFields []string `json:"-"` |
| 2631 | // NullFields is a list of field names (e.g. "ExcludedPrimaryTypes") to include |
| 2632 | // in API requests with the JSON null value. By default, fields with empty |
| 2633 | // values are omitted from API requests. See |
| 2634 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2635 | NullFields []string `json:"-"` |
| 2636 | } |
| 2637 | |
| 2638 | func (s GoogleMapsPlacesV1SearchNearbyRequest) MarshalJSON() ([]byte, error) { |
| 2639 | type NoMethod GoogleMapsPlacesV1SearchNearbyRequest |
| 2640 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2641 | } |
| 2642 | |
| 2643 | // GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction: The region to |
| 2644 | // search. |
| 2645 | type GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction struct { |
| 2646 | // Circle: A circle defined by center point and radius. |
| 2647 | Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` |
| 2648 | // ForceSendFields is a list of field names (e.g. "Circle") to unconditionally |
| 2649 | // include in API requests. By default, fields with empty or default values are |
| 2650 | // omitted from API requests. See |
| 2651 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2652 | // details. |
| 2653 | ForceSendFields []string `json:"-"` |
| 2654 | // NullFields is a list of field names (e.g. "Circle") to include in API |
| 2655 | // requests with the JSON null value. By default, fields with empty values are |
| 2656 | // omitted from API requests. See |
| 2657 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2658 | NullFields []string `json:"-"` |
| 2659 | } |
| 2660 | |
| 2661 | func (s GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction) MarshalJSON() ([]byte, error) { |
| 2662 | type NoMethod GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction |
| 2663 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2664 | } |
| 2665 | |
| 2666 | // GoogleMapsPlacesV1SearchNearbyResponse: Response proto for Search Nearby. |
| 2667 | type GoogleMapsPlacesV1SearchNearbyResponse struct { |
| 2668 | // Places: A list of places that meets user's requirements like places types, |
| 2669 | // number of places and specific location restriction. |
| 2670 | Places []*GoogleMapsPlacesV1Place `json:"places,omitempty"` |
| 2671 | // RoutingSummaries: A list of routing summaries where each entry associates to |
| 2672 | // the corresponding place in the same index in the `places` field. If the |
| 2673 | // routing summary is not available for one of the places, it will contain an |
| 2674 | // empty entry. This list should have as many entries as the list of places if |
| 2675 | // requested. |
| 2676 | RoutingSummaries []*GoogleMapsPlacesV1RoutingSummary `json:"routingSummaries,omitempty"` |
| 2677 | |
| 2678 | // ServerResponse contains the HTTP response code and headers from the server. |
| 2679 | googleapi.ServerResponse `json:"-"` |
| 2680 | // ForceSendFields is a list of field names (e.g. "Places") to unconditionally |
| 2681 | // include in API requests. By default, fields with empty or default values are |
| 2682 | // omitted from API requests. See |
| 2683 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2684 | // details. |
| 2685 | ForceSendFields []string `json:"-"` |
| 2686 | // NullFields is a list of field names (e.g. "Places") to include in API |
| 2687 | // requests with the JSON null value. By default, fields with empty values are |
| 2688 | // omitted from API requests. See |
| 2689 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2690 | NullFields []string `json:"-"` |
| 2691 | } |
| 2692 | |
| 2693 | func (s GoogleMapsPlacesV1SearchNearbyResponse) MarshalJSON() ([]byte, error) { |
| 2694 | type NoMethod GoogleMapsPlacesV1SearchNearbyResponse |
| 2695 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2696 | } |
| 2697 | |
| 2698 | // GoogleMapsPlacesV1SearchTextRequest: Request proto for SearchText. |
| 2699 | type GoogleMapsPlacesV1SearchTextRequest struct { |
| 2700 | // EvOptions: Optional. Set the searchable EV options of a place search |
| 2701 | // request. |
| 2702 | EvOptions *GoogleMapsPlacesV1SearchTextRequestEVOptions `json:"evOptions,omitempty"` |
| 2703 | // IncludeFutureOpeningBusinesses: Optional. If true, include businesses that |
| 2704 | // are not yet open but will open in the future. |
| 2705 | IncludeFutureOpeningBusinesses bool `json:"includeFutureOpeningBusinesses,omitempty"` |
| 2706 | // IncludePureServiceAreaBusinesses: Optional. Include pure service area |
| 2707 | // businesses if the field is set to true. Pure service area business is a |
| 2708 | // business that visits or delivers to customers directly but does not serve |
| 2709 | // customers at their business address. For example, businesses like cleaning |
| 2710 | // services or plumbers. Those businesses do not have a physical address or |
| 2711 | // location on Google Maps. Places will not return fields including `location`, |
| 2712 | // `plus_code`, and other location related fields for these businesses. |
| 2713 | IncludePureServiceAreaBusinesses bool `json:"includePureServiceAreaBusinesses,omitempty"` |
| 2714 | // IncludedType: The requested place type. Full list of types supported: |
| 2715 | // https://developers.google.com/maps/documentation/places/web-service/place-types. |
| 2716 | // Only support one included type. |
| 2717 | IncludedType string `json:"includedType,omitempty"` |
| 2718 | // LanguageCode: Place details will be displayed with the preferred language if |
| 2719 | // available. If the language code is unspecified or unrecognized, place |
| 2720 | // details of any language may be returned, with a preference for English if |
| 2721 | // such details exist. Current list of supported languages: |
| 2722 | // https://developers.google.com/maps/faq#languagesupport. |
| 2723 | LanguageCode string `json:"languageCode,omitempty"` |
| 2724 | // LocationBias: The region to search. This location serves as a bias which |
| 2725 | // means results around given location might be returned. Cannot be set along |
| 2726 | // with location_restriction. |
| 2727 | LocationBias *GoogleMapsPlacesV1SearchTextRequestLocationBias `json:"locationBias,omitempty"` |
| 2728 | // LocationRestriction: The region to search. This location serves as a |
| 2729 | // restriction which means results outside given location will not be returned. |
| 2730 | // Cannot be set along with location_bias. |
| 2731 | LocationRestriction *GoogleMapsPlacesV1SearchTextRequestLocationRestriction `json:"locationRestriction,omitempty"` |
| 2732 | // MaxResultCount: Deprecated: Use `page_size` instead. The maximum number of |
| 2733 | // results per page that can be returned. If the number of available results is |
| 2734 | // larger than `max_result_count`, a `next_page_token` is returned which can be |
| 2735 | // passed to `page_token` to get the next page of results in subsequent |
| 2736 | // requests. If 0 or no value is provided, a default of 20 is used. The maximum |
| 2737 | // value is 20; values above 20 will be coerced to 20. Negative values will |
| 2738 | // return an INVALID_ARGUMENT error. If both `max_result_count` and `page_size` |
| 2739 | // are specified, `max_result_count` will be ignored. |
| 2740 | MaxResultCount int64 `json:"maxResultCount,omitempty"` |
| 2741 | // MinRating: Filter out results whose average user rating is strictly less |
| 2742 | // than this limit. A valid value must be a float between 0 and 5 (inclusively) |
| 2743 | // at a 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating |
| 2744 | // will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 |
| 2745 | // will eliminate all results with a less than 1.0 rating. |
| 2746 | MinRating float64 `json:"minRating,omitempty"` |
| 2747 | // OpenNow: Used to restrict the search to places that are currently open. The |
| 2748 | // default is false. |
| 2749 | OpenNow bool `json:"openNow,omitempty"` |
| 2750 | // PageSize: Optional. The maximum number of results per page that can be |
| 2751 | // returned. If the number of available results is larger than `page_size`, a |
| 2752 | // `next_page_token` is returned which can be passed to `page_token` to get the |
| 2753 | // next page of results in subsequent requests. If 0 or no value is provided, a |
| 2754 | // default of 20 is used. The maximum value is 20; values above 20 will be set |
| 2755 | // to 20. Negative values will return an INVALID_ARGUMENT error. If both |
| 2756 | // `max_result_count` and `page_size` are specified, `max_result_count` will be |
| 2757 | // ignored. |
| 2758 | PageSize int64 `json:"pageSize,omitempty"` |
| 2759 | // PageToken: Optional. A page token, received from a previous TextSearch call. |
| 2760 | // Provide this to retrieve the subsequent page. When paginating, all |
| 2761 | // parameters other than `page_token`, `page_size`, and `max_result_count` |
| 2762 | // provided to TextSearch must match the initial call that provided the page |
| 2763 | // token. Otherwise an INVALID_ARGUMENT error is returned. |
| 2764 | PageToken string `json:"pageToken,omitempty"` |
| 2765 | // PriceLevels: Used to restrict the search to places that are marked as |
| 2766 | // certain price levels. Users can choose any combinations of price levels. |
| 2767 | // Default to select all price levels. |
| 2768 | // |
| 2769 | // Possible values: |
| 2770 | // "PRICE_LEVEL_UNSPECIFIED" - Place price level is unspecified or unknown. |
| 2771 | // "PRICE_LEVEL_FREE" - Place provides free services. |
| 2772 | // "PRICE_LEVEL_INEXPENSIVE" - Place provides inexpensive services. |
| 2773 | // "PRICE_LEVEL_MODERATE" - Place provides moderately priced services. |
| 2774 | // "PRICE_LEVEL_EXPENSIVE" - Place provides expensive services. |
| 2775 | // "PRICE_LEVEL_VERY_EXPENSIVE" - Place provides very expensive services. |
| 2776 | PriceLevels []string `json:"priceLevels,omitempty"` |
| 2777 | // RankPreference: How results will be ranked in the response. |
| 2778 | // |
| 2779 | // Possible values: |
| 2780 | // "RANK_PREFERENCE_UNSPECIFIED" - For a categorical query such as |
| 2781 | // "Restaurants in New York City", RELEVANCE is the default. For |
| 2782 | // non-categorical queries such as "Mountain View, CA" we recommend that you |
| 2783 | // leave rankPreference unset. |
| 2784 | // "DISTANCE" - Ranks results by distance. |
| 2785 | // "RELEVANCE" - Ranks results by relevance. Sort order determined by normal |
| 2786 | // ranking stack. |
| 2787 | RankPreference string `json:"rankPreference,omitempty"` |
| 2788 | // RegionCode: The Unicode country/region code (CLDR) of the location where the |
| 2789 | // request is coming from. This parameter is used to display the place details, |
| 2790 | // like region-specific place name, if available. The parameter can affect |
| 2791 | // results based on applicable law. For more information, see |
| 2792 | // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. |
| 2793 | // Note that 3-digit region codes are not currently supported. |
| 2794 | RegionCode string `json:"regionCode,omitempty"` |
| 2795 | // RoutingParameters: Optional. Additional parameters for routing to results. |
| 2796 | RoutingParameters *GoogleMapsPlacesV1RoutingParameters `json:"routingParameters,omitempty"` |
| 2797 | // SearchAlongRouteParameters: Optional. Additional parameters proto for |
| 2798 | // searching along a route. |
| 2799 | SearchAlongRouteParameters *GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters `json:"searchAlongRouteParameters,omitempty"` |
| 2800 | // StrictTypeFiltering: Used to set strict type filtering for included_type. If |
| 2801 | // set to true, only results of the same type will be returned. Default to |
| 2802 | // false. |
| 2803 | StrictTypeFiltering bool `json:"strictTypeFiltering,omitempty"` |
| 2804 | // TextQuery: Required. The text query for textual search. |
| 2805 | TextQuery string `json:"textQuery,omitempty"` |
| 2806 | // ForceSendFields is a list of field names (e.g. "EvOptions") to |
| 2807 | // unconditionally include in API requests. By default, fields with empty or |
| 2808 | // default values are omitted from API requests. See |
| 2809 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2810 | // details. |
| 2811 | ForceSendFields []string `json:"-"` |
| 2812 | // NullFields is a list of field names (e.g. "EvOptions") to include in API |
| 2813 | // requests with the JSON null value. By default, fields with empty values are |
| 2814 | // omitted from API requests. See |
| 2815 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2816 | NullFields []string `json:"-"` |
| 2817 | } |
| 2818 | |
| 2819 | func (s GoogleMapsPlacesV1SearchTextRequest) MarshalJSON() ([]byte, error) { |
| 2820 | type NoMethod GoogleMapsPlacesV1SearchTextRequest |
| 2821 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2822 | } |
| 2823 | |
| 2824 | func (s *GoogleMapsPlacesV1SearchTextRequest) UnmarshalJSON(data []byte) error { |
| 2825 | type NoMethod GoogleMapsPlacesV1SearchTextRequest |
| 2826 | var s1 struct { |
| 2827 | MinRating gensupport.JSONFloat64 `json:"minRating"` |
| 2828 | *NoMethod |
| 2829 | } |
| 2830 | s1.NoMethod = (*NoMethod)(s) |
| 2831 | if err := json.Unmarshal(data, &s1); err != nil { |
| 2832 | return err |
| 2833 | } |
| 2834 | s.MinRating = float64(s1.MinRating) |
| 2835 | return nil |
| 2836 | } |
| 2837 | |
| 2838 | // GoogleMapsPlacesV1SearchTextRequestEVOptions: Searchable EV options of a |
| 2839 | // place search request. |
| 2840 | type GoogleMapsPlacesV1SearchTextRequestEVOptions struct { |
| 2841 | // ConnectorTypes: Optional. The list of preferred EV connector types. A place |
| 2842 | // that does not support any of the listed connector types is filtered out. |
| 2843 | // |
| 2844 | // Possible values: |
| 2845 | // "EV_CONNECTOR_TYPE_UNSPECIFIED" - Unspecified connector. |
| 2846 | // "EV_CONNECTOR_TYPE_OTHER" - Other connector types. |
| 2847 | // "EV_CONNECTOR_TYPE_J1772" - J1772 type 1 connector. |
| 2848 | // "EV_CONNECTOR_TYPE_TYPE_2" - IEC 62196 type 2 connector. Often referred to |
| 2849 | // as MENNEKES. |
| 2850 | // "EV_CONNECTOR_TYPE_CHADEMO" - CHAdeMO type connector. |
| 2851 | // "EV_CONNECTOR_TYPE_CCS_COMBO_1" - Combined Charging System (AC and DC). |
| 2852 | // Based on SAE. Type-1 J-1772 connector |
| 2853 | // "EV_CONNECTOR_TYPE_CCS_COMBO_2" - Combined Charging System (AC and DC). |
| 2854 | // Based on Type-2 Mennekes connector |
| 2855 | // "EV_CONNECTOR_TYPE_TESLA" - The generic TESLA connector. This is NACS in |
| 2856 | // the North America but can be non-NACS in other parts of the world (e.g. CCS |
| 2857 | // Combo 2 (CCS2) or GB/T). This value is less representative of an actual |
| 2858 | // connector type, and more represents the ability to charge a Tesla brand |
| 2859 | // vehicle at a Tesla owned charging station. |
| 2860 | // "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T" - GB/T type corresponds to the GB/T |
| 2861 | // standard in China. This type covers all GB_T types. |
| 2862 | // "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET" - Unspecified wall outlet. |
| 2863 | // "EV_CONNECTOR_TYPE_NACS" - The North American Charging System (NACS), |
| 2864 | // standardized as SAE J3400. |
| 2865 | ConnectorTypes []string `json:"connectorTypes,omitempty"` |
| 2866 | // MinimumChargingRateKw: Optional. Minimum required charging rate in |
| 2867 | // kilowatts. A place with a charging rate less than the specified rate is |
| 2868 | // filtered out. |
| 2869 | MinimumChargingRateKw float64 `json:"minimumChargingRateKw,omitempty"` |
| 2870 | // ForceSendFields is a list of field names (e.g. "ConnectorTypes") to |
| 2871 | // unconditionally include in API requests. By default, fields with empty or |
| 2872 | // default values are omitted from API requests. See |
| 2873 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2874 | // details. |
| 2875 | ForceSendFields []string `json:"-"` |
| 2876 | // NullFields is a list of field names (e.g. "ConnectorTypes") to include in |
| 2877 | // API requests with the JSON null value. By default, fields with empty values |
| 2878 | // are omitted from API requests. See |
| 2879 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2880 | NullFields []string `json:"-"` |
| 2881 | } |
| 2882 | |
| 2883 | func (s GoogleMapsPlacesV1SearchTextRequestEVOptions) MarshalJSON() ([]byte, error) { |
| 2884 | type NoMethod GoogleMapsPlacesV1SearchTextRequestEVOptions |
| 2885 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2886 | } |
| 2887 | |
| 2888 | func (s *GoogleMapsPlacesV1SearchTextRequestEVOptions) UnmarshalJSON(data []byte) error { |
| 2889 | type NoMethod GoogleMapsPlacesV1SearchTextRequestEVOptions |
| 2890 | var s1 struct { |
| 2891 | MinimumChargingRateKw gensupport.JSONFloat64 `json:"minimumChargingRateKw"` |
| 2892 | *NoMethod |
| 2893 | } |
| 2894 | s1.NoMethod = (*NoMethod)(s) |
| 2895 | if err := json.Unmarshal(data, &s1); err != nil { |
| 2896 | return err |
| 2897 | } |
| 2898 | s.MinimumChargingRateKw = float64(s1.MinimumChargingRateKw) |
| 2899 | return nil |
| 2900 | } |
| 2901 | |
| 2902 | // GoogleMapsPlacesV1SearchTextRequestLocationBias: The region to search. This |
| 2903 | // location serves as a bias which means results around given location might be |
| 2904 | // returned. |
| 2905 | type GoogleMapsPlacesV1SearchTextRequestLocationBias struct { |
| 2906 | // Circle: A circle defined by center point and radius. |
| 2907 | Circle *GoogleMapsPlacesV1Circle `json:"circle,omitempty"` |
| 2908 | // Rectangle: A rectangle box defined by northeast and southwest corner. |
| 2909 | // `rectangle.high()` must be the northeast point of the rectangle viewport. |
| 2910 | // `rectangle.low()` must be the southwest point of the rectangle viewport. |
| 2911 | // `rectangle.low().latitude()` cannot be greater than |
| 2912 | // `rectangle.high().latitude()`. This will result in an empty latitude range. |
| 2913 | // A rectangle viewport cannot be wider than 180 degrees. |
| 2914 | Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` |
| 2915 | // ForceSendFields is a list of field names (e.g. "Circle") to unconditionally |
| 2916 | // include in API requests. By default, fields with empty or default values are |
| 2917 | // omitted from API requests. See |
| 2918 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2919 | // details. |
| 2920 | ForceSendFields []string `json:"-"` |
| 2921 | // NullFields is a list of field names (e.g. "Circle") to include in API |
| 2922 | // requests with the JSON null value. By default, fields with empty values are |
| 2923 | // omitted from API requests. See |
| 2924 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2925 | NullFields []string `json:"-"` |
| 2926 | } |
| 2927 | |
| 2928 | func (s GoogleMapsPlacesV1SearchTextRequestLocationBias) MarshalJSON() ([]byte, error) { |
| 2929 | type NoMethod GoogleMapsPlacesV1SearchTextRequestLocationBias |
| 2930 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2931 | } |
| 2932 | |
| 2933 | // GoogleMapsPlacesV1SearchTextRequestLocationRestriction: The region to |
| 2934 | // search. This location serves as a restriction which means results outside |
| 2935 | // given location will not be returned. |
| 2936 | type GoogleMapsPlacesV1SearchTextRequestLocationRestriction struct { |
| 2937 | // Rectangle: A rectangle box defined by northeast and southwest corner. |
| 2938 | // `rectangle.high()` must be the northeast point of the rectangle viewport. |
| 2939 | // `rectangle.low()` must be the southwest point of the rectangle viewport. |
| 2940 | // `rectangle.low().latitude()` cannot be greater than |
| 2941 | // `rectangle.high().latitude()`. This will result in an empty latitude range. |
| 2942 | // A rectangle viewport cannot be wider than 180 degrees. |
| 2943 | Rectangle *GoogleGeoTypeViewport `json:"rectangle,omitempty"` |
| 2944 | // ForceSendFields is a list of field names (e.g. "Rectangle") to |
| 2945 | // unconditionally include in API requests. By default, fields with empty or |
| 2946 | // default values are omitted from API requests. See |
| 2947 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2948 | // details. |
| 2949 | ForceSendFields []string `json:"-"` |
| 2950 | // NullFields is a list of field names (e.g. "Rectangle") to include in API |
| 2951 | // requests with the JSON null value. By default, fields with empty values are |
| 2952 | // omitted from API requests. See |
| 2953 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2954 | NullFields []string `json:"-"` |
| 2955 | } |
| 2956 | |
| 2957 | func (s GoogleMapsPlacesV1SearchTextRequestLocationRestriction) MarshalJSON() ([]byte, error) { |
| 2958 | type NoMethod GoogleMapsPlacesV1SearchTextRequestLocationRestriction |
| 2959 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2960 | } |
| 2961 | |
| 2962 | // GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters: Specifies a |
| 2963 | // precalculated polyline from the Routes API |
| 2964 | // (https://developers.google.com/maps/documentation/routes) defining the route |
| 2965 | // to search. Searching along a route is similar to using the `locationBias` or |
| 2966 | // `locationRestriction` request option to bias the search results. However, |
| 2967 | // while the `locationBias` and `locationRestriction` options let you specify a |
| 2968 | // region to bias the search results, this option lets you bias the results |
| 2969 | // along a trip route. Results are not guaranteed to be along the route |
| 2970 | // provided, but rather are ranked within the search area defined by the |
| 2971 | // polyline and, optionally, by the `locationBias` or `locationRestriction` |
| 2972 | // based on minimal detour times from origin to destination. The results might |
| 2973 | // be along an alternate route, especially if the provided polyline does not |
| 2974 | // define an optimal route from origin to destination. |
| 2975 | type GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters struct { |
| 2976 | // Polyline: Required. The route polyline. |
| 2977 | Polyline *GoogleMapsPlacesV1Polyline `json:"polyline,omitempty"` |
| 2978 | // ForceSendFields is a list of field names (e.g. "Polyline") to |
| 2979 | // unconditionally include in API requests. By default, fields with empty or |
| 2980 | // default values are omitted from API requests. See |
| 2981 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2982 | // details. |
| 2983 | ForceSendFields []string `json:"-"` |
| 2984 | // NullFields is a list of field names (e.g. "Polyline") to include in API |
| 2985 | // requests with the JSON null value. By default, fields with empty values are |
| 2986 | // omitted from API requests. See |
| 2987 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2988 | NullFields []string `json:"-"` |
| 2989 | } |
| 2990 | |
| 2991 | func (s GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters) MarshalJSON() ([]byte, error) { |
| 2992 | type NoMethod GoogleMapsPlacesV1SearchTextRequestSearchAlongRouteParameters |
| 2993 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2994 | } |
| 2995 | |
| 2996 | // GoogleMapsPlacesV1SearchTextResponse: Response proto for SearchText. |
| 2997 | type GoogleMapsPlacesV1SearchTextResponse struct { |
| 2998 | // ContextualContents: Experimental: See |
| 2999 | // https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative |
| 3000 | // for more details. A list of contextual contents where each entry associates |
| 3001 | // to the corresponding place in the same index in the places field. The |
| 3002 | // contents that are relevant to the `text_query` in the request are preferred. |
| 3003 | // If the contextual content is not available for one of the places, it will |
| 3004 | // return non-contextual content. It will be empty only when the content is |
| 3005 | // unavailable for this place. This list will have as many entries as the list |
| 3006 | // of places if requested. |
| 3007 | ContextualContents []*GoogleMapsPlacesV1ContextualContent `json:"contextualContents,omitempty"` |
| 3008 | // NextPageToken: A token that can be sent as `page_token` to retrieve the next |
| 3009 | // page. If this field is omitted or empty, there are no subsequent pages. |
| 3010 | NextPageToken string `json:"nextPageToken,omitempty"` |
| 3011 | // Places: A list of places that meet the user's text search criteria. |
| 3012 | Places []*GoogleMapsPlacesV1Place `json:"places,omitempty"` |
| 3013 | // RoutingSummaries: A list of routing summaries where each entry associates to |
| 3014 | // the corresponding place in the same index in the `places` field. If the |
| 3015 | // routing summary is not available for one of the places, it will contain an |
| 3016 | // empty entry. This list will have as many entries as the list of places if |
| 3017 | // requested. |
| 3018 | RoutingSummaries []*GoogleMapsPlacesV1RoutingSummary `json:"routingSummaries,omitempty"` |
| 3019 | // SearchUri: A link allows the user to search with the same text query as |
| 3020 | // specified in the request on Google Maps. |
| 3021 | SearchUri string `json:"searchUri,omitempty"` |
| 3022 | |
| 3023 | // ServerResponse contains the HTTP response code and headers from the server. |
| 3024 | googleapi.ServerResponse `json:"-"` |
| 3025 | // ForceSendFields is a list of field names (e.g. "ContextualContents") to |
| 3026 | // unconditionally include in API requests. By default, fields with empty or |
| 3027 | // default values are omitted from API requests. See |
| 3028 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3029 | // details. |
| 3030 | ForceSendFields []string `json:"-"` |
| 3031 | // NullFields is a list of field names (e.g. "ContextualContents") to include |
| 3032 | // in API requests with the JSON null value. By default, fields with empty |
| 3033 | // values are omitted from API requests. See |
| 3034 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3035 | NullFields []string `json:"-"` |
| 3036 | } |
| 3037 | |
| 3038 | func (s GoogleMapsPlacesV1SearchTextResponse) MarshalJSON() ([]byte, error) { |
| 3039 | type NoMethod GoogleMapsPlacesV1SearchTextResponse |
| 3040 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3041 | } |
| 3042 | |
| 3043 | // GoogleTypeDate: Represents a whole or partial calendar date, such as a |
| 3044 | // birthday. The time of day and time zone are either specified elsewhere or |
| 3045 | // are insignificant. The date is relative to the Gregorian Calendar. This can |
| 3046 | // represent one of the following: * A full date, with non-zero year, month, |
| 3047 | // and day values. * A month and day, with a zero year (for example, an |
| 3048 | // anniversary). * A year on its own, with a zero month and a zero day. * A |
| 3049 | // year and month, with a zero day (for example, a credit card expiration |
| 3050 | // date). Related types: * google.type.TimeOfDay * google.type.DateTime * |
| 3051 | // google.protobuf.Timestamp |
| 3052 | type GoogleTypeDate struct { |
| 3053 | // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, |
| 3054 | // or 0 to specify a year by itself or a year and month where the day isn't |
| 3055 | // significant. |
| 3056 | Day int64 `json:"day,omitempty"` |
| 3057 | // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without |
| 3058 | // a month and day. |
| 3059 | Month int64 `json:"month,omitempty"` |
| 3060 | // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date |
| 3061 | // without a year. |
| 3062 | Year int64 `json:"year,omitempty"` |
| 3063 | // ForceSendFields is a list of field names (e.g. "Day") to unconditionally |
| 3064 | // include in API requests. By default, fields with empty or default values are |
| 3065 | // omitted from API requests. See |
| 3066 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3067 | // details. |
| 3068 | ForceSendFields []string `json:"-"` |
| 3069 | // NullFields is a list of field names (e.g. "Day") to include in API requests |
| 3070 | // with the JSON null value. By default, fields with empty values are omitted |
| 3071 | // from API requests. See |
| 3072 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3073 | NullFields []string `json:"-"` |
| 3074 | } |
| 3075 | |
| 3076 | func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { |
| 3077 | type NoMethod GoogleTypeDate |
| 3078 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3079 | } |
| 3080 | |
| 3081 | // GoogleTypeLatLng: An object that represents a latitude/longitude pair. This |
| 3082 | // is expressed as a pair of doubles to represent degrees latitude and degrees |
| 3083 | // longitude. Unless specified otherwise, this object must conform to the WGS84 |
| 3084 | // standard. Values must be within normalized ranges. |
| 3085 | type GoogleTypeLatLng struct { |
| 3086 | // Latitude: The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| 3087 | Latitude float64 `json:"latitude,omitempty"` |
| 3088 | // Longitude: The longitude in degrees. It must be in the range [-180.0, |
| 3089 | // +180.0]. |
| 3090 | Longitude float64 `json:"longitude,omitempty"` |
| 3091 | // ForceSendFields is a list of field names (e.g. "Latitude") to |
| 3092 | // unconditionally include in API requests. By default, fields with empty or |
| 3093 | // default values are omitted from API requests. See |
| 3094 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3095 | // details. |
| 3096 | ForceSendFields []string `json:"-"` |
| 3097 | // NullFields is a list of field names (e.g. "Latitude") to include in API |
| 3098 | // requests with the JSON null value. By default, fields with empty values are |
| 3099 | // omitted from API requests. See |
| 3100 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3101 | NullFields []string `json:"-"` |
| 3102 | } |
| 3103 | |
| 3104 | func (s GoogleTypeLatLng) MarshalJSON() ([]byte, error) { |
| 3105 | type NoMethod GoogleTypeLatLng |
| 3106 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3107 | } |
| 3108 | |
| 3109 | func (s *GoogleTypeLatLng) UnmarshalJSON(data []byte) error { |
| 3110 | type NoMethod GoogleTypeLatLng |
| 3111 | var s1 struct { |
| 3112 | Latitude gensupport.JSONFloat64 `json:"latitude"` |
| 3113 | Longitude gensupport.JSONFloat64 `json:"longitude"` |
| 3114 | *NoMethod |
| 3115 | } |
| 3116 | s1.NoMethod = (*NoMethod)(s) |
| 3117 | if err := json.Unmarshal(data, &s1); err != nil { |
| 3118 | return err |
| 3119 | } |
| 3120 | s.Latitude = float64(s1.Latitude) |
| 3121 | s.Longitude = float64(s1.Longitude) |
| 3122 | return nil |
| 3123 | } |
| 3124 | |
| 3125 | // GoogleTypeLocalizedText: Localized variant of a text in a particular |
| 3126 | // language. |
| 3127 | type GoogleTypeLocalizedText struct { |
| 3128 | // LanguageCode: The text's BCP-47 language code, such as "en-US" or "sr-Latn". |
| 3129 | // For more information, see |
| 3130 | // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. |
| 3131 | LanguageCode string `json:"languageCode,omitempty"` |
| 3132 | // Text: Localized string in the language corresponding to language_code below. |
| 3133 | Text string `json:"text,omitempty"` |
| 3134 | // ForceSendFields is a list of field names (e.g. "LanguageCode") to |
| 3135 | // unconditionally include in API requests. By default, fields with empty or |
| 3136 | // default values are omitted from API requests. See |
| 3137 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3138 | // details. |
| 3139 | ForceSendFields []string `json:"-"` |
| 3140 | // NullFields is a list of field names (e.g. "LanguageCode") to include in API |
| 3141 | // requests with the JSON null value. By default, fields with empty values are |
| 3142 | // omitted from API requests. See |
| 3143 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3144 | NullFields []string `json:"-"` |
| 3145 | } |
| 3146 | |
| 3147 | func (s GoogleTypeLocalizedText) MarshalJSON() ([]byte, error) { |
| 3148 | type NoMethod GoogleTypeLocalizedText |
| 3149 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3150 | } |
| 3151 | |
| 3152 | // GoogleTypeMoney: Represents an amount of money with its currency type. |
| 3153 | type GoogleTypeMoney struct { |
| 3154 | // CurrencyCode: The three-letter currency code defined in ISO 4217. |
| 3155 | CurrencyCode string `json:"currencyCode,omitempty"` |
| 3156 | // Nanos: Number of nano (10^-9) units of the amount. The value must be between |
| 3157 | // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` |
| 3158 | // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, |
| 3159 | // or negative. If `units` is negative, `nanos` must be negative or zero. For |
| 3160 | // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 3161 | Nanos int64 `json:"nanos,omitempty"` |
| 3162 | // Units: The whole units of the amount. For example if `currencyCode` is |
| 3163 | // "USD", then 1 unit is one US dollar. |
| 3164 | Units int64 `json:"units,omitempty,string"` |
| 3165 | // ForceSendFields is a list of field names (e.g. "CurrencyCode") to |
| 3166 | // unconditionally include in API requests. By default, fields with empty or |
| 3167 | // default values are omitted from API requests. See |
| 3168 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3169 | // details. |
| 3170 | ForceSendFields []string `json:"-"` |
| 3171 | // NullFields is a list of field names (e.g. "CurrencyCode") to include in API |
| 3172 | // requests with the JSON null value. By default, fields with empty values are |
| 3173 | // omitted from API requests. See |
| 3174 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3175 | NullFields []string `json:"-"` |
| 3176 | } |
| 3177 | |
| 3178 | func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { |
| 3179 | type NoMethod GoogleTypeMoney |
| 3180 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3181 | } |
| 3182 | |
| 3183 | // GoogleTypePostalAddress: Represents a postal address, such as for postal |
| 3184 | // delivery or payments addresses. With a postal address, a postal service can |
| 3185 | // deliver items to a premise, P.O. box, or similar. A postal address is not |
| 3186 | // intended to model geographical locations like roads, towns, or mountains. In |
| 3187 | // typical usage, an address would be created by user input or from importing |
| 3188 | // existing data, depending on the type of process. Advice on address input or |
| 3189 | // editing: - Use an internationalization-ready address widget such as |
| 3190 | // https://github.com/google/libaddressinput. - Users should not be presented |
| 3191 | // with UI elements for input or editing of fields outside countries where that |
| 3192 | // field is used. For more guidance on how to use this schema, see: |
| 3193 | // https://support.google.com/business/answer/6397478. |
| 3194 | type GoogleTypePostalAddress struct { |
| 3195 | // AddressLines: Unstructured address lines describing the lower levels of an |
| 3196 | // address. Because values in `address_lines` do not have type information and |
| 3197 | // may sometimes contain multiple values in a single field (for example, |
| 3198 | // "Austin, TX"), it is important that the line order is clear. The order of |
| 3199 | // address lines should be "envelope order" for the country or region of the |
| 3200 | // address. In places where this can vary (for example, Japan), |
| 3201 | // `address_language` is used to make it explicit (for example, "ja" for |
| 3202 | // large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this |
| 3203 | // way, the most specific line of an address can be selected based on the |
| 3204 | // language. The minimum permitted structural representation of an address |
| 3205 | // consists of a `region_code` with all remaining information placed in the |
| 3206 | // `address_lines`. It would be possible to format such an address very |
| 3207 | // approximately without geocoding, but no semantic reasoning could be made |
| 3208 | // about any of the address components until it was at least partially |
| 3209 | // resolved. Creating an address only containing a `region_code` and |
| 3210 | // `address_lines` and then geocoding is the recommended way to handle |
| 3211 | // completely unstructured addresses (as opposed to guessing which parts of the |
| 3212 | // address should be localities or administrative areas). |
| 3213 | AddressLines []string `json:"addressLines,omitempty"` |
| 3214 | // AdministrativeArea: Optional. Highest administrative subdivision which is |
| 3215 | // used for postal addresses of a country or region. For example, this can be a |
| 3216 | // state, a province, an oblast, or a prefecture. For Spain, this is the |
| 3217 | // province and not the autonomous community (for example, "Barcelona" and not |
| 3218 | // "Catalonia"). Many countries don't use an administrative area in postal |
| 3219 | // addresses. For example, in Switzerland, this should be left unpopulated. |
| 3220 | AdministrativeArea string `json:"administrativeArea,omitempty"` |
| 3221 | // LanguageCode: Optional. BCP-47 language code of the contents of this address |
| 3222 | // (if known). This is often the UI language of the input form or is expected |
| 3223 | // to match one of the languages used in the address' country/region, or their |
| 3224 | // transliterated equivalents. This can affect formatting in certain countries, |
| 3225 | // but is not critical to the correctness of the data and will never affect any |
| 3226 | // validation or other non-formatting related operations. If this value is not |
| 3227 | // known, it should be omitted (rather than specifying a possibly incorrect |
| 3228 | // default). Examples: "zh-Hant", "ja", "ja-Latn", "en". |
| 3229 | LanguageCode string `json:"languageCode,omitempty"` |
| 3230 | // Locality: Optional. Generally refers to the city or town portion of the |
| 3231 | // address. Examples: US city, IT comune, UK post town. In regions of the world |
| 3232 | // where localities are not well defined or do not fit into this structure |
| 3233 | // well, leave `locality` empty and use `address_lines`. |
| 3234 | Locality string `json:"locality,omitempty"` |
| 3235 | // Organization: Optional. The name of the organization at the address. |
| 3236 | Organization string `json:"organization,omitempty"` |
| 3237 | // PostalCode: Optional. Postal code of the address. Not all countries use or |
| 3238 | // require postal codes to be present, but where they are used, they may |
| 3239 | // trigger additional validation with other parts of the address (for example, |
| 3240 | // state or zip code validation in the United States). |
| 3241 | PostalCode string `json:"postalCode,omitempty"` |
| 3242 | // Recipients: Optional. The recipient at the address. This field may, under |
| 3243 | // certain circumstances, contain multiline information. For example, it might |
| 3244 | // contain "care of" information. |
| 3245 | Recipients []string `json:"recipients,omitempty"` |
| 3246 | // RegionCode: Required. CLDR region code of the country/region of the address. |
| 3247 | // This is never inferred and it is up to the user to ensure the value is |
| 3248 | // correct. See https://cldr.unicode.org/ and |
| 3249 | // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html |
| 3250 | // for details. Example: "CH" for Switzerland. |
| 3251 | RegionCode string `json:"regionCode,omitempty"` |
| 3252 | // Revision: The schema revision of the `PostalAddress`. This must be set to 0, |
| 3253 | // which is the latest revision. All new revisions **must** be backward |
| 3254 | // compatible with old revisions. |
| 3255 | Revision int64 `json:"revision,omitempty"` |
| 3256 | // SortingCode: Optional. Additional, country-specific, sorting code. This is |
| 3257 | // not used in most regions. Where it is used, the value is either a string |
| 3258 | // like "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or |
| 3259 | // just a number alone, representing the "sector code" (Jamaica), "delivery |
| 3260 | // area indicator" (Malawi) or "post office indicator" (Côte d'Ivoire). |
| 3261 | SortingCode string `json:"sortingCode,omitempty"` |
| 3262 | // Sublocality: Optional. Sublocality of the address. For example, this can be |
| 3263 | // a neighborhood, borough, or district. |
| 3264 | Sublocality string `json:"sublocality,omitempty"` |
| 3265 | // ForceSendFields is a list of field names (e.g. "AddressLines") to |
| 3266 | // unconditionally include in API requests. By default, fields with empty or |
| 3267 | // default values are omitted from API requests. See |
| 3268 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3269 | // details. |
| 3270 | ForceSendFields []string `json:"-"` |
| 3271 | // NullFields is a list of field names (e.g. "AddressLines") to include in API |
| 3272 | // requests with the JSON null value. By default, fields with empty values are |
| 3273 | // omitted from API requests. See |
| 3274 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3275 | NullFields []string `json:"-"` |
| 3276 | } |
| 3277 | |
| 3278 | func (s GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { |
| 3279 | type NoMethod GoogleTypePostalAddress |
| 3280 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3281 | } |
| 3282 | |
| 3283 | // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database |
| 3284 | // (https://www.iana.org/time-zones). |
| 3285 | type GoogleTypeTimeZone struct { |
| 3286 | // Id: IANA Time Zone Database time zone. For example "America/New_York". |
| 3287 | Id string `json:"id,omitempty"` |
| 3288 | // Version: Optional. IANA Time Zone Database version number. For example |
| 3289 | // "2019a". |
| 3290 | Version string `json:"version,omitempty"` |
| 3291 | // ForceSendFields is a list of field names (e.g. "Id") to unconditionally |
| 3292 | // include in API requests. By default, fields with empty or default values are |
| 3293 | // omitted from API requests. See |
| 3294 | // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3295 | // details. |
| 3296 | ForceSendFields []string `json:"-"` |
| 3297 | // NullFields is a list of field names (e.g. "Id") to include in API requests |
| 3298 | // with the JSON null value. By default, fields with empty values are omitted |
| 3299 | // from API requests. See |
| 3300 | // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3301 | NullFields []string `json:"-"` |
| 3302 | } |
| 3303 | |
| 3304 | func (s GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { |
| 3305 | type NoMethod GoogleTypeTimeZone |
| 3306 | return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3307 | } |
| 3308 | |
| 3309 | type PlacesAutocompleteCall struct { |
| 3310 | s *Service |
| 3311 | googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest |
| 3312 | urlParams_ gensupport.URLParams |
| 3313 | ctx_ context.Context |
| 3314 | header_ http.Header |
| 3315 | } |
| 3316 | |
| 3317 | // Autocomplete: Returns predictions for the given input. |
| 3318 | func (r *PlacesService) Autocomplete(googlemapsplacesv1autocompleteplacesrequest *GoogleMapsPlacesV1AutocompletePlacesRequest) *PlacesAutocompleteCall { |
| 3319 | c := &PlacesAutocompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3320 | c.googlemapsplacesv1autocompleteplacesrequest = googlemapsplacesv1autocompleteplacesrequest |
| 3321 | return c |
| 3322 | } |
| 3323 | |
| 3324 | // Fields allows partial responses to be retrieved. See |
| 3325 | // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 3326 | // details. |
| 3327 | func (c *PlacesAutocompleteCall) Fields(s ...googleapi.Field) *PlacesAutocompleteCall { |
| 3328 | c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3329 | return c |
| 3330 | } |
| 3331 | |
| 3332 | // Context sets the context to be used in this call's Do method. |
| 3333 | func (c *PlacesAutocompleteCall) Context(ctx context.Context) *PlacesAutocompleteCall { |
| 3334 | c.ctx_ = ctx |
| 3335 | return c |
| 3336 | } |
| 3337 | |
| 3338 | // Header returns a http.Header that can be modified by the caller to add |
| 3339 | // headers to the request. |
| 3340 | func (c *PlacesAutocompleteCall) Header() http.Header { |
| 3341 | if c.header_ == nil { |
| 3342 | c.header_ = make(http.Header) |
| 3343 | } |
| 3344 | return c.header_ |
| 3345 | } |
| 3346 | |
| 3347 | func (c *PlacesAutocompleteCall) doRequest(alt string) (*http.Response, error) { |
| 3348 | reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3349 | body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlemapsplacesv1autocompleteplacesrequest) |
| 3350 | if err != nil { |
| 3351 | return nil, err |
| 3352 | } |
| 3353 | c.urlParams_.Set("alt", alt) |
| 3354 | c.urlParams_.Set("prettyPrint", "false") |
| 3355 | urls := googleapi.ResolveRelative(c.s.BasePath, "v1/places:autocomplete") |
| 3356 | urls += "?" + c.urlParams_.Encode() |
| 3357 | req, err := http.NewRequest("POST", urls, body) |
| 3358 | if err != nil { |
| 3359 | return nil, err |
| 3360 | } |
| 3361 | req.Header = reqHeaders |
| 3362 | c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "places.places.autocomplete", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3363 | return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3364 | } |
| 3365 | |
| 3366 | // Do executes the "places.places.autocomplete" call. |
| 3367 | // Any non-2xx status code is an error. Response headers are in either |
| 3368 | // *GoogleMapsPlacesV1AutocompletePlacesResponse.ServerResponse.Header or (if a |
| 3369 | // response was returned at all) in error.(*googleapi.Error).Header. Use |
| 3370 | // googleapi.IsNotModified to check whether the returned error was because |
| 3371 | // http.StatusNotModified was returned. |
| 3372 | func (c *PlacesAutocompleteCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1AutocompletePlacesResponse, error) { |
| 3373 | gensupport.SetOptions(c.urlParams_, opts...) |
| 3374 | res, err := c.doRequest("json") |
| 3375 | if res != nil && res.StatusCode == http.StatusNotModified { |
| 3376 | if res.Body != nil { |
| 3377 | res.Body.Close() |
| 3378 | } |
| 3379 | return nil, gensupport.WrapError(&googleapi.Error{ |
| 3380 | Code: res.StatusCode, |
| 3381 | Header: res.Header, |
| 3382 | }) |
| 3383 | } |
| 3384 | if err != nil { |
| 3385 | return nil, err |
| 3386 | } |
| 3387 | defer googleapi.CloseBody(res) |
| 3388 | if err := googleapi.CheckResponse(res); err != nil { |
| 3389 | return nil, gensupport.WrapError(err) |
| 3390 | } |
| 3391 | ret := &GoogleMapsPlacesV1AutocompletePlacesResponse{ |
| 3392 | ServerResponse: googleapi.ServerResponse{ |
| 3393 | Header: res.Header, |
| 3394 | HTTPStatusCode: res.StatusCode, |
| 3395 | }, |
| 3396 | } |
| 3397 | target := &ret |
| 3398 | b, err := gensupport.DecodeResponseBytes(target, res) |
| 3399 | if err != nil { |
| 3400 | return nil, err |
| 3401 | } |
| 3402 | c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "places.places.autocomplete", "response", internallog.HTTPResponse(res, b)) |
| 3403 | return ret, nil |
| 3404 | } |
| 3405 | |
| 3406 | type PlacesGetCall struct { |
| 3407 | s *Service |
| 3408 | name string |
| 3409 | urlParams_ gensupport.URLParams |
| 3410 | ifNoneMatch_ string |
| 3411 | ctx_ context.Context |
| 3412 | header_ http.Header |
| 3413 | } |
| 3414 | |
| 3415 | // Get: Get the details of a place based on its resource name, which is a |
| 3416 | // string in the `places/{place_id}` format. |
| 3417 | // |
| 3418 | // - name: The resource name of a place, in the `places/{place_id}` format. |
| 3419 | func (r *PlacesService) Get(name string) *PlacesGetCall { |
| 3420 | c := &PlacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3421 | c.name = name |
| 3422 | return c |
| 3423 | } |
| 3424 | |
| 3425 | // LanguageCode sets the optional parameter "languageCode": Place details will |
| 3426 | // be displayed with the preferred language if available. Current list of |
| 3427 | // supported languages: https://developers.google.com/maps/faq#languagesupport. |
| 3428 | func (c *PlacesGetCall) LanguageCode(languageCode string) *PlacesGetCall { |
| 3429 | c.urlParams_.Set("languageCode", languageCode) |
| 3430 | return c |
| 3431 | } |
| 3432 | |
| 3433 | // RegionCode sets the optional parameter "regionCode": The Unicode |
| 3434 | // country/region code (CLDR) of the location where the request is coming from. |
| 3435 | // This parameter is used to display the place details, like region-specific |
| 3436 | // place name, if available. The parameter can affect results based on |
| 3437 | // applicable law. For more information, see |
| 3438 | // https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. |
| 3439 | // Note that 3-digit region codes are not currently supported. |
| 3440 | func (c *PlacesGetCall) RegionCode(regionCode string) *PlacesGetCall { |
| 3441 | c.urlParams_.Set("regionCode", regionCode) |
| 3442 | return c |
| 3443 | } |
| 3444 | |
| 3445 | // SessionToken sets the optional parameter "sessionToken": A string which |
| 3446 | // identifies an Autocomplete session for billing purposes. Must be a URL and |
| 3447 | // filename safe base64 string with at most 36 ASCII characters in length. |
| 3448 | // Otherwise an INVALID_ARGUMENT error is returned. The session begins when the |
| 3449 | // user starts typing a query, and concludes when they select a place and a |
| 3450 | // call to Place Details or Address Validation is made. Each session can have |
| 3451 | // multiple queries, followed by one Place Details or Address Validation |
| 3452 | // request. The credentials used for each request within a session must belong |
| 3453 | // to the same Google Cloud Console project. Once a session has concluded, the |
| 3454 | // token is no longer valid; your app must generate a fresh token for each |
| 3455 | // session. If the `session_token` parameter is omitted, or if you reuse a |
| 3456 | // session token, the session is charged as if no session token was provided |
| 3457 | // (each request is billed separately). We recommend the following guidelines: |
| 3458 | // * Use session tokens for all Place Autocomplete calls. * Generate a fresh |
| 3459 | // token for each session. Using a version 4 UUID is recommended. * Ensure that |
| 3460 | // the credentials used for all Place Autocomplete, Place Details, and Address |
| 3461 | // Validation requests within a session belong to the same Cloud Console |
| 3462 | // project. * Be sure to pass a unique session token for each new session. |
| 3463 | // Using the same token for more than one session will result in each request |
| 3464 | // being billed individually. |
| 3465 | func (c *PlacesGetCall) SessionToken(sessionToken string) *PlacesGetCall { |
| 3466 | c.urlParams_.Set("sessionToken", sessionToken) |
| 3467 | return c |
| 3468 | } |
| 3469 | |
| 3470 | // Fields allows partial responses to be retrieved. See |
| 3471 | // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 3472 | // details. |
| 3473 | func (c *PlacesGetCall) Fields(s ...googleapi.Field) *PlacesGetCall { |
| 3474 | c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3475 | return c |
| 3476 | } |
| 3477 | |
| 3478 | // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 3479 | // object's ETag matches the given value. This is useful for getting updates |
| 3480 | // only after the object has changed since the last request. |
| 3481 | func (c *PlacesGetCall) IfNoneMatch(entityTag string) *PlacesGetCall { |
| 3482 | c.ifNoneMatch_ = entityTag |
| 3483 | return c |
| 3484 | } |
| 3485 | |
| 3486 | // Context sets the context to be used in this call's Do method. |
| 3487 | func (c *PlacesGetCall) Context(ctx context.Context) *PlacesGetCall { |
| 3488 | c.ctx_ = ctx |
| 3489 | return c |
| 3490 | } |
| 3491 | |
| 3492 | // Header returns a http.Header that can be modified by the caller to add |
| 3493 | // headers to the request. |
| 3494 | func (c *PlacesGetCall) Header() http.Header { |
| 3495 | if c.header_ == nil { |
| 3496 | c.header_ = make(http.Header) |
| 3497 | } |
| 3498 | return c.header_ |
| 3499 | } |
| 3500 | |
| 3501 | func (c *PlacesGetCall) doRequest(alt string) (*http.Response, error) { |
| 3502 | reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 3503 | if c.ifNoneMatch_ != "" { |
| 3504 | reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 3505 | } |
| 3506 | c.urlParams_.Set("alt", alt) |
| 3507 | c.urlParams_.Set("prettyPrint", "false") |
| 3508 | urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 3509 | urls += "?" + c.urlParams_.Encode() |
| 3510 | req, err := http.NewRequest("GET", urls, nil) |
| 3511 | if err != nil { |
| 3512 | return nil, err |
| 3513 | } |
| 3514 | req.Header = reqHeaders |
| 3515 | googleapi.Expand(req.URL, map[string]string{ |
| 3516 | "name": c.name, |
| 3517 | }) |
| 3518 | c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "places.places.get", "request", internallog.HTTPRequest(req, nil)) |
| 3519 | return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3520 | } |
| 3521 | |
| 3522 | // Do executes the "places.places.get" call. |
| 3523 | // Any non-2xx status code is an error. Response headers are in either |
| 3524 | // *GoogleMapsPlacesV1Place.ServerResponse.Header or (if a response was |
| 3525 | // returned at all) in error.(*googleapi.Error).Header. Use |
| 3526 | // googleapi.IsNotModified to check whether the returned error was because |
| 3527 | // http.StatusNotModified was returned. |
| 3528 | func (c *PlacesGetCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1Place, error) { |
| 3529 | gensupport.SetOptions(c.urlParams_, opts...) |
| 3530 | res, err := c.doRequest("json") |
| 3531 | if res != nil && res.StatusCode == http.StatusNotModified { |
| 3532 | if res.Body != nil { |
| 3533 | res.Body.Close() |
| 3534 | } |
| 3535 | return nil, gensupport.WrapError(&googleapi.Error{ |
| 3536 | Code: res.StatusCode, |
| 3537 | Header: res.Header, |
| 3538 | }) |
| 3539 | } |
| 3540 | if err != nil { |
| 3541 | return nil, err |
| 3542 | } |
| 3543 | defer googleapi.CloseBody(res) |
| 3544 | if err := googleapi.CheckResponse(res); err != nil { |
| 3545 | return nil, gensupport.WrapError(err) |
| 3546 | } |
| 3547 | ret := &GoogleMapsPlacesV1Place{ |
| 3548 | ServerResponse: googleapi.ServerResponse{ |
| 3549 | Header: res.Header, |
| 3550 | HTTPStatusCode: res.StatusCode, |
| 3551 | }, |
| 3552 | } |
| 3553 | target := &ret |
| 3554 | b, err := gensupport.DecodeResponseBytes(target, res) |
| 3555 | if err != nil { |
| 3556 | return nil, err |
| 3557 | } |
| 3558 | c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "places.places.get", "response", internallog.HTTPResponse(res, b)) |
| 3559 | return ret, nil |
| 3560 | } |
| 3561 | |
| 3562 | type PlacesSearchNearbyCall struct { |
| 3563 | s *Service |
| 3564 | googlemapsplacesv1searchnearbyrequest *GoogleMapsPlacesV1SearchNearbyRequest |
| 3565 | urlParams_ gensupport.URLParams |
| 3566 | ctx_ context.Context |
| 3567 | header_ http.Header |
| 3568 | } |
| 3569 | |
| 3570 | // SearchNearby: Search for places near locations. |
| 3571 | func (r *PlacesService) SearchNearby(googlemapsplacesv1searchnearbyrequest *GoogleMapsPlacesV1SearchNearbyRequest) *PlacesSearchNearbyCall { |
| 3572 | c := &PlacesSearchNearbyCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3573 | c.googlemapsplacesv1searchnearbyrequest = googlemapsplacesv1searchnearbyrequest |
| 3574 | return c |
| 3575 | } |
| 3576 | |
| 3577 | // Fields allows partial responses to be retrieved. See |
| 3578 | // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 3579 | // details. |
| 3580 | func (c *PlacesSearchNearbyCall) Fields(s ...googleapi.Field) *PlacesSearchNearbyCall { |
| 3581 | c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3582 | return c |
| 3583 | } |
| 3584 | |
| 3585 | // Context sets the context to be used in this call's Do method. |
| 3586 | func (c *PlacesSearchNearbyCall) Context(ctx context.Context) *PlacesSearchNearbyCall { |
| 3587 | c.ctx_ = ctx |
| 3588 | return c |
| 3589 | } |
| 3590 | |
| 3591 | // Header returns a http.Header that can be modified by the caller to add |
| 3592 | // headers to the request. |
| 3593 | func (c *PlacesSearchNearbyCall) Header() http.Header { |
| 3594 | if c.header_ == nil { |
| 3595 | c.header_ = make(http.Header) |
| 3596 | } |
| 3597 | return c.header_ |
| 3598 | } |
| 3599 | |
| 3600 | func (c *PlacesSearchNearbyCall) doRequest(alt string) (*http.Response, error) { |
| 3601 | reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3602 | body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlemapsplacesv1searchnearbyrequest) |
| 3603 | if err != nil { |
| 3604 | return nil, err |
| 3605 | } |
| 3606 | c.urlParams_.Set("alt", alt) |
| 3607 | c.urlParams_.Set("prettyPrint", "false") |
| 3608 | urls := googleapi.ResolveRelative(c.s.BasePath, "v1/places:searchNearby") |
| 3609 | urls += "?" + c.urlParams_.Encode() |
| 3610 | req, err := http.NewRequest("POST", urls, body) |
| 3611 | if err != nil { |
| 3612 | return nil, err |
| 3613 | } |
| 3614 | req.Header = reqHeaders |
| 3615 | c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "places.places.searchNearby", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3616 | return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3617 | } |
| 3618 | |
| 3619 | // Do executes the "places.places.searchNearby" call. |
| 3620 | // Any non-2xx status code is an error. Response headers are in either |
| 3621 | // *GoogleMapsPlacesV1SearchNearbyResponse.ServerResponse.Header or (if a |
| 3622 | // response was returned at all) in error.(*googleapi.Error).Header. Use |
| 3623 | // googleapi.IsNotModified to check whether the returned error was because |
| 3624 | // http.StatusNotModified was returned. |
| 3625 | func (c *PlacesSearchNearbyCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1SearchNearbyResponse, error) { |
| 3626 | gensupport.SetOptions(c.urlParams_, opts...) |
| 3627 | res, err := c.doRequest("json") |
| 3628 | if res != nil && res.StatusCode == http.StatusNotModified { |
| 3629 | if res.Body != nil { |
| 3630 | res.Body.Close() |
| 3631 | } |
| 3632 | return nil, gensupport.WrapError(&googleapi.Error{ |
| 3633 | Code: res.StatusCode, |
| 3634 | Header: res.Header, |
| 3635 | }) |
| 3636 | } |
| 3637 | if err != nil { |
| 3638 | return nil, err |
| 3639 | } |
| 3640 | defer googleapi.CloseBody(res) |
| 3641 | if err := googleapi.CheckResponse(res); err != nil { |
| 3642 | return nil, gensupport.WrapError(err) |
| 3643 | } |
| 3644 | ret := &GoogleMapsPlacesV1SearchNearbyResponse{ |
| 3645 | ServerResponse: googleapi.ServerResponse{ |
| 3646 | Header: res.Header, |
| 3647 | HTTPStatusCode: res.StatusCode, |
| 3648 | }, |
| 3649 | } |
| 3650 | target := &ret |
| 3651 | b, err := gensupport.DecodeResponseBytes(target, res) |
| 3652 | if err != nil { |
| 3653 | return nil, err |
| 3654 | } |
| 3655 | c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "places.places.searchNearby", "response", internallog.HTTPResponse(res, b)) |
| 3656 | return ret, nil |
| 3657 | } |
| 3658 | |
| 3659 | type PlacesSearchTextCall struct { |
| 3660 | s *Service |
| 3661 | googlemapsplacesv1searchtextrequest *GoogleMapsPlacesV1SearchTextRequest |
| 3662 | urlParams_ gensupport.URLParams |
| 3663 | ctx_ context.Context |
| 3664 | header_ http.Header |
| 3665 | } |
| 3666 | |
| 3667 | // SearchText: Text query based place search. |
| 3668 | func (r *PlacesService) SearchText(googlemapsplacesv1searchtextrequest *GoogleMapsPlacesV1SearchTextRequest) *PlacesSearchTextCall { |
| 3669 | c := &PlacesSearchTextCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3670 | c.googlemapsplacesv1searchtextrequest = googlemapsplacesv1searchtextrequest |
| 3671 | return c |
| 3672 | } |
| 3673 | |
| 3674 | // Fields allows partial responses to be retrieved. See |
| 3675 | // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 3676 | // details. |
| 3677 | func (c *PlacesSearchTextCall) Fields(s ...googleapi.Field) *PlacesSearchTextCall { |
| 3678 | c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3679 | return c |
| 3680 | } |
| 3681 | |
| 3682 | // Context sets the context to be used in this call's Do method. |
| 3683 | func (c *PlacesSearchTextCall) Context(ctx context.Context) *PlacesSearchTextCall { |
| 3684 | c.ctx_ = ctx |
| 3685 | return c |
| 3686 | } |
| 3687 | |
| 3688 | // Header returns a http.Header that can be modified by the caller to add |
| 3689 | // headers to the request. |
| 3690 | func (c *PlacesSearchTextCall) Header() http.Header { |
| 3691 | if c.header_ == nil { |
| 3692 | c.header_ = make(http.Header) |
| 3693 | } |
| 3694 | return c.header_ |
| 3695 | } |
| 3696 | |
| 3697 | func (c *PlacesSearchTextCall) doRequest(alt string) (*http.Response, error) { |
| 3698 | reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 3699 | body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlemapsplacesv1searchtextrequest) |
| 3700 | if err != nil { |
| 3701 | return nil, err |
| 3702 | } |
| 3703 | c.urlParams_.Set("alt", alt) |
| 3704 | c.urlParams_.Set("prettyPrint", "false") |
| 3705 | urls := googleapi.ResolveRelative(c.s.BasePath, "v1/places:searchText") |
| 3706 | urls += "?" + c.urlParams_.Encode() |
| 3707 | req, err := http.NewRequest("POST", urls, body) |
| 3708 | if err != nil { |
| 3709 | return nil, err |
| 3710 | } |
| 3711 | req.Header = reqHeaders |
| 3712 | c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "places.places.searchText", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 3713 | return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3714 | } |
| 3715 | |
| 3716 | // Do executes the "places.places.searchText" call. |
| 3717 | // Any non-2xx status code is an error. Response headers are in either |
| 3718 | // *GoogleMapsPlacesV1SearchTextResponse.ServerResponse.Header or (if a |
| 3719 | // response was returned at all) in error.(*googleapi.Error).Header. Use |
| 3720 | // googleapi.IsNotModified to check whether the returned error was because |
| 3721 | // http.StatusNotModified was returned. |
| 3722 | func (c *PlacesSearchTextCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1SearchTextResponse, error) { |
| 3723 | gensupport.SetOptions(c.urlParams_, opts...) |
| 3724 | res, err := c.doRequest("json") |
| 3725 | if res != nil && res.StatusCode == http.StatusNotModified { |
| 3726 | if res.Body != nil { |
| 3727 | res.Body.Close() |
| 3728 | } |
| 3729 | return nil, gensupport.WrapError(&googleapi.Error{ |
| 3730 | Code: res.StatusCode, |
| 3731 | Header: res.Header, |
| 3732 | }) |
| 3733 | } |
| 3734 | if err != nil { |
| 3735 | return nil, err |
| 3736 | } |
| 3737 | defer googleapi.CloseBody(res) |
| 3738 | if err := googleapi.CheckResponse(res); err != nil { |
| 3739 | return nil, gensupport.WrapError(err) |
| 3740 | } |
| 3741 | ret := &GoogleMapsPlacesV1SearchTextResponse{ |
| 3742 | ServerResponse: googleapi.ServerResponse{ |
| 3743 | Header: res.Header, |
| 3744 | HTTPStatusCode: res.StatusCode, |
| 3745 | }, |
| 3746 | } |
| 3747 | target := &ret |
| 3748 | b, err := gensupport.DecodeResponseBytes(target, res) |
| 3749 | if err != nil { |
| 3750 | return nil, err |
| 3751 | } |
| 3752 | c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "places.places.searchText", "response", internallog.HTTPResponse(res, b)) |
| 3753 | return ret, nil |
| 3754 | } |
| 3755 | |
| 3756 | // Pages invokes f for each page of results. |
| 3757 | // A non-nil error returned from f will halt the iteration. |
| 3758 | // The provided context supersedes any context provided to the Context method. |
| 3759 | func (c *PlacesSearchTextCall) Pages(ctx context.Context, f func(*GoogleMapsPlacesV1SearchTextResponse) error) error { |
| 3760 | c.ctx_ = ctx |
| 3761 | defer func(pt string) { c.googlemapsplacesv1searchtextrequest.PageToken = pt }(c.googlemapsplacesv1searchtextrequest.PageToken) |
| 3762 | for { |
| 3763 | x, err := c.Do() |
| 3764 | if err != nil { |
| 3765 | return err |
| 3766 | } |
| 3767 | if err := f(x); err != nil { |
| 3768 | return err |
| 3769 | } |
| 3770 | if x.NextPageToken == "" { |
| 3771 | return nil |
| 3772 | } |
| 3773 | c.googlemapsplacesv1searchtextrequest.PageToken = x.NextPageToken |
| 3774 | } |
| 3775 | } |
| 3776 | |
| 3777 | type PlacesPhotosGetMediaCall struct { |
| 3778 | s *Service |
| 3779 | name string |
| 3780 | urlParams_ gensupport.URLParams |
| 3781 | ifNoneMatch_ string |
| 3782 | ctx_ context.Context |
| 3783 | header_ http.Header |
| 3784 | } |
| 3785 | |
| 3786 | // GetMedia: Get a photo media with a photo reference string. |
| 3787 | // |
| 3788 | // - name: The resource name of a photo media in the format: |
| 3789 | // `places/{place_id}/photos/{photo_reference}/media`. The resource name of a |
| 3790 | // photo as returned in a Place object's `photos.name` field comes with the |
| 3791 | // format `places/{place_id}/photos/{photo_reference}`. You need to append |
| 3792 | // `/media` at the end of the photo resource to get the photo media resource |
| 3793 | // name. |
| 3794 | func (r *PlacesPhotosService) GetMedia(name string) *PlacesPhotosGetMediaCall { |
| 3795 | c := &PlacesPhotosGetMediaCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 3796 | c.name = name |
| 3797 | return c |
| 3798 | } |
| 3799 | |
| 3800 | // MaxHeightPx sets the optional parameter "maxHeightPx": Specifies the maximum |
| 3801 | // desired height, in pixels, of the image. If the image is smaller than the |
| 3802 | // values specified, the original image will be returned. If the image is |
| 3803 | // larger in either dimension, it will be scaled to match the smaller of the |
| 3804 | // two dimensions, restricted to its original aspect ratio. Both the |
| 3805 | // max_height_px and max_width_px properties accept an integer between 1 and |
| 3806 | // 4800, inclusively. If the value is not within the allowed range, an |
| 3807 | // INVALID_ARGUMENT error will be returned. At least one of max_height_px or |
| 3808 | // max_width_px needs to be specified. If neither max_height_px nor |
| 3809 | // max_width_px is specified, an INVALID_ARGUMENT error will be returned. |
| 3810 | func (c *PlacesPhotosGetMediaCall) MaxHeightPx(maxHeightPx int64) *PlacesPhotosGetMediaCall { |
| 3811 | c.urlParams_.Set("maxHeightPx", fmt.Sprint(maxHeightPx)) |
| 3812 | return c |
| 3813 | } |
| 3814 | |
| 3815 | // MaxWidthPx sets the optional parameter "maxWidthPx": Specifies the maximum |
| 3816 | // desired width, in pixels, of the image. If the image is smaller than the |
| 3817 | // values specified, the original image will be returned. If the image is |
| 3818 | // larger in either dimension, it will be scaled to match the smaller of the |
| 3819 | // two dimensions, restricted to its original aspect ratio. Both the |
| 3820 | // max_height_px and max_width_px properties accept an integer between 1 and |
| 3821 | // 4800, inclusively. If the value is not within the allowed range, an |
| 3822 | // INVALID_ARGUMENT error will be returned. At least one of max_height_px or |
| 3823 | // max_width_px needs to be specified. If neither max_height_px nor |
| 3824 | // max_width_px is specified, an INVALID_ARGUMENT error will be returned. |
| 3825 | func (c *PlacesPhotosGetMediaCall) MaxWidthPx(maxWidthPx int64) *PlacesPhotosGetMediaCall { |
| 3826 | c.urlParams_.Set("maxWidthPx", fmt.Sprint(maxWidthPx)) |
| 3827 | return c |
| 3828 | } |
| 3829 | |
| 3830 | // SkipHttpRedirect sets the optional parameter "skipHttpRedirect": If set, |
| 3831 | // skip the default HTTP redirect behavior and render a text format (for |
| 3832 | // example, in JSON format for HTTP use case) response. If not set, an HTTP |
| 3833 | // redirect will be issued to redirect the call to the image media. This option |
| 3834 | // is ignored for non-HTTP requests. |
| 3835 | func (c *PlacesPhotosGetMediaCall) SkipHttpRedirect(skipHttpRedirect bool) *PlacesPhotosGetMediaCall { |
| 3836 | c.urlParams_.Set("skipHttpRedirect", fmt.Sprint(skipHttpRedirect)) |
| 3837 | return c |
| 3838 | } |
| 3839 | |
| 3840 | // Fields allows partial responses to be retrieved. See |
| 3841 | // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 3842 | // details. |
| 3843 | func (c *PlacesPhotosGetMediaCall) Fields(s ...googleapi.Field) *PlacesPhotosGetMediaCall { |
| 3844 | c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 3845 | return c |
| 3846 | } |
| 3847 | |
| 3848 | // IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 3849 | // object's ETag matches the given value. This is useful for getting updates |
| 3850 | // only after the object has changed since the last request. |
| 3851 | func (c *PlacesPhotosGetMediaCall) IfNoneMatch(entityTag string) *PlacesPhotosGetMediaCall { |
| 3852 | c.ifNoneMatch_ = entityTag |
| 3853 | return c |
| 3854 | } |
| 3855 | |
| 3856 | // Context sets the context to be used in this call's Do method. |
| 3857 | func (c *PlacesPhotosGetMediaCall) Context(ctx context.Context) *PlacesPhotosGetMediaCall { |
| 3858 | c.ctx_ = ctx |
| 3859 | return c |
| 3860 | } |
| 3861 | |
| 3862 | // Header returns a http.Header that can be modified by the caller to add |
| 3863 | // headers to the request. |
| 3864 | func (c *PlacesPhotosGetMediaCall) Header() http.Header { |
| 3865 | if c.header_ == nil { |
| 3866 | c.header_ = make(http.Header) |
| 3867 | } |
| 3868 | return c.header_ |
| 3869 | } |
| 3870 | |
| 3871 | func (c *PlacesPhotosGetMediaCall) doRequest(alt string) (*http.Response, error) { |
| 3872 | reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 3873 | if c.ifNoneMatch_ != "" { |
| 3874 | reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 3875 | } |
| 3876 | c.urlParams_.Set("alt", alt) |
| 3877 | c.urlParams_.Set("prettyPrint", "false") |
| 3878 | urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") |
| 3879 | urls += "?" + c.urlParams_.Encode() |
| 3880 | req, err := http.NewRequest("GET", urls, nil) |
| 3881 | if err != nil { |
| 3882 | return nil, err |
| 3883 | } |
| 3884 | req.Header = reqHeaders |
| 3885 | googleapi.Expand(req.URL, map[string]string{ |
| 3886 | "name": c.name, |
| 3887 | }) |
| 3888 | c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "places.places.photos.getMedia", "request", internallog.HTTPRequest(req, nil)) |
| 3889 | return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 3890 | } |
| 3891 | |
| 3892 | // Do executes the "places.places.photos.getMedia" call. |
| 3893 | // Any non-2xx status code is an error. Response headers are in either |
| 3894 | // *GoogleMapsPlacesV1PhotoMedia.ServerResponse.Header or (if a response was |
| 3895 | // returned at all) in error.(*googleapi.Error).Header. Use |
| 3896 | // googleapi.IsNotModified to check whether the returned error was because |
| 3897 | // http.StatusNotModified was returned. |
| 3898 | func (c *PlacesPhotosGetMediaCall) Do(opts ...googleapi.CallOption) (*GoogleMapsPlacesV1PhotoMedia, error) { |
| 3899 | gensupport.SetOptions(c.urlParams_, opts...) |
| 3900 | res, err := c.doRequest("json") |
| 3901 | if res != nil && res.StatusCode == http.StatusNotModified { |
| 3902 | if res.Body != nil { |
| 3903 | res.Body.Close() |
| 3904 | } |
| 3905 | return nil, gensupport.WrapError(&googleapi.Error{ |
| 3906 | Code: res.StatusCode, |
| 3907 | Header: res.Header, |
| 3908 | }) |
| 3909 | } |
| 3910 | if err != nil { |
| 3911 | return nil, err |
| 3912 | } |
| 3913 | defer googleapi.CloseBody(res) |
| 3914 | if err := googleapi.CheckResponse(res); err != nil { |
| 3915 | return nil, gensupport.WrapError(err) |
| 3916 | } |
| 3917 | ret := &GoogleMapsPlacesV1PhotoMedia{ |
| 3918 | ServerResponse: googleapi.ServerResponse{ |
| 3919 | Header: res.Header, |
| 3920 | HTTPStatusCode: res.StatusCode, |
| 3921 | }, |
| 3922 | } |
| 3923 | target := &ret |
| 3924 | b, err := gensupport.DecodeResponseBytes(target, res) |
| 3925 | if err != nil { |
| 3926 | return nil, err |
| 3927 | } |
| 3928 | c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "places.places.photos.getMedia", "response", internallog.HTTPResponse(res, b)) |
| 3929 | return ret, nil |
| 3930 | } |