Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchNearbyRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb

Overview

Request proto for Search Nearby.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1SearchNearbyRequest

Returns a new instance of GoogleMapsPlacesV1SearchNearbyRequest.



1377
1378
1379
# File 'lib/google/apis/places_v1/classes.rb', line 1377

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#excluded_primary_typesArray<String>

Excluded primary Place type (e.g. "restaurant" or "gas_station") from https:// developers.google.com/maps/documentation/places/web-service/place-types. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have included_types = ["restaurant"], excluded_primary_types = [" restaurant"], the returned places provide "restaurant" related services but do not operate primarily as "restaurants". Corresponds to the JSON property excludedPrimaryTypes

Returns:

  • (Array<String>)


1295
1296
1297
# File 'lib/google/apis/places_v1/classes.rb', line 1295

def excluded_primary_types
  @excluded_primary_types
end

#excluded_typesArray<String>

Excluded Place type (eg, "restaurant" or "gas_station") from https:// developers.google.com/maps/documentation/places/web-service/place-types. If the client provides both included_types (e.g. restaurant) and excluded_types ( e.g. cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have included_types = ["restaurant"], excluded_primary_types = ["restaurant"], the returned places provide " restaurant" related services but do not operate primarily as "restaurants". Corresponds to the JSON property excludedTypes

Returns:

  • (Array<String>)


1311
1312
1313
# File 'lib/google/apis/places_v1/classes.rb', line 1311

def excluded_types
  @excluded_types
end

#included_primary_typesArray<String>

Included primary Place type (e.g. "restaurant" or "gas_station") from https:// developers.google.com/maps/documentation/places/web-service/place-types. A place can only have a single primary type from the supported types table associated with it. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have included_types = ["restaurant"], excluded_primary_types = ["restaurant"], the returned places provide " restaurant" related services but do not operate primarily as "restaurants". Corresponds to the JSON property includedPrimaryTypes

Returns:

  • (Array<String>)


1325
1326
1327
# File 'lib/google/apis/places_v1/classes.rb', line 1325

def included_primary_types
  @included_primary_types
end

#included_typesArray<String>

Included Place type (eg, "restaurant" or "gas_station") from https:// developers.google.com/maps/documentation/places/web-service/place-types. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have included_types = [" restaurant"], excluded_primary_types = ["restaurant"], the returned places provide "restaurant" related services but do not operate primarily as " restaurants". Corresponds to the JSON property includedTypes

Returns:

  • (Array<String>)


1338
1339
1340
# File 'lib/google/apis/places_v1/classes.rb', line 1338

def included_types
  @included_types
end

#language_codeString

Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq# languagesupport. Corresponds to the JSON property languageCode

Returns:

  • (String)


1347
1348
1349
# File 'lib/google/apis/places_v1/classes.rb', line 1347

def language_code
  @language_code
end

#location_restrictionGoogle::Apis::PlacesV1::GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction

The region to search. Corresponds to the JSON property locationRestriction



1352
1353
1354
# File 'lib/google/apis/places_v1/classes.rb', line 1352

def location_restriction
  @location_restriction
end

#max_result_countFixnum

Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property maxResultCount

Returns:

  • (Fixnum)


1360
1361
1362
# File 'lib/google/apis/places_v1/classes.rb', line 1360

def max_result_count
  @max_result_count
end

#rank_preferenceString

How results will be ranked in the response. Corresponds to the JSON property rankPreference

Returns:

  • (String)


1365
1366
1367
# File 'lib/google/apis/places_v1/classes.rb', line 1365

def rank_preference
  @rank_preference
end

#region_codeString

The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region- specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/ latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported. Corresponds to the JSON property regionCode

Returns:

  • (String)


1375
1376
1377
# File 'lib/google/apis/places_v1/classes.rb', line 1375

def region_code
  @region_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/google/apis/places_v1/classes.rb', line 1382

def update!(**args)
  @excluded_primary_types = args[:excluded_primary_types] if args.key?(:excluded_primary_types)
  @excluded_types = args[:excluded_types] if args.key?(:excluded_types)
  @included_primary_types = args[:included_primary_types] if args.key?(:included_primary_types)
  @included_types = args[:included_types] if args.key?(:included_types)
  @language_code = args[:language_code] if args.key?(:language_code)
  @location_restriction = args[:location_restriction] if args.key?(:location_restriction)
  @max_result_count = args[:max_result_count] if args.key?(:max_result_count)
  @rank_preference = args[:rank_preference] if args.key?(:rank_preference)
  @region_code = args[:region_code] if args.key?(:region_code)
end