Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequest

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 SearchText.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1SearchTextRequest

Returns a new instance of GoogleMapsPlacesV1SearchTextRequest.



1524
1525
1526
# File 'lib/google/apis/places_v1/classes.rb', line 1524

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

Instance Attribute Details

#included_typeString

The requested place type. Full list of types supported: https://developers. google.com/maps/documentation/places/web-service/place-types. Only support one included type. Corresponds to the JSON property includedType

Returns:

  • (String)


1443
1444
1445
# File 'lib/google/apis/places_v1/classes.rb', line 1443

def included_type
  @included_type
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)


1452
1453
1454
# File 'lib/google/apis/places_v1/classes.rb', line 1452

def language_code
  @language_code
end

#location_biasGoogle::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationBias

The region to search. This location serves as a bias which means results around given location might be returned. Corresponds to the JSON property locationBias



1458
1459
1460
# File 'lib/google/apis/places_v1/classes.rb', line 1458

def location_bias
  @location_bias
end

#location_restrictionGoogle::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationRestriction

The region to search. This location serves as a restriction which means results outside given location will not be returned. Corresponds to the JSON property locationRestriction



1464
1465
1466
# File 'lib/google/apis/places_v1/classes.rb', line 1464

def location_restriction
  @location_restriction
end

#max_result_countFixnum

Maximum number of results to return. It must be between 1 and 20, inclusively. The default is 20. 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)


1472
1473
1474
# File 'lib/google/apis/places_v1/classes.rb', line 1472

def max_result_count
  @max_result_count
end

#min_ratingFloat

Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence i. e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating. Corresponds to the JSON property minRating

Returns:

  • (Float)


1481
1482
1483
# File 'lib/google/apis/places_v1/classes.rb', line 1481

def min_rating
  @min_rating
end

#open_nowBoolean Also known as: open_now?

Used to restrict the search to places that are currently open. The default is false. Corresponds to the JSON property openNow

Returns:

  • (Boolean)


1487
1488
1489
# File 'lib/google/apis/places_v1/classes.rb', line 1487

def open_now
  @open_now
end

#price_levelsArray<String>

Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels. Corresponds to the JSON property priceLevels

Returns:

  • (Array<String>)


1495
1496
1497
# File 'lib/google/apis/places_v1/classes.rb', line 1495

def price_levels
  @price_levels
end

#rank_preferenceString

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

Returns:

  • (String)


1500
1501
1502
# File 'lib/google/apis/places_v1/classes.rb', line 1500

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)


1510
1511
1512
# File 'lib/google/apis/places_v1/classes.rb', line 1510

def region_code
  @region_code
end

#strict_type_filteringBoolean Also known as: strict_type_filtering?

Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false. Corresponds to the JSON property strictTypeFiltering

Returns:

  • (Boolean)


1516
1517
1518
# File 'lib/google/apis/places_v1/classes.rb', line 1516

def strict_type_filtering
  @strict_type_filtering
end

#text_queryString

Required. The text query for textual search. Corresponds to the JSON property textQuery

Returns:

  • (String)


1522
1523
1524
# File 'lib/google/apis/places_v1/classes.rb', line 1522

def text_query
  @text_query
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
# File 'lib/google/apis/places_v1/classes.rb', line 1529

def update!(**args)
  @included_type = args[:included_type] if args.key?(:included_type)
  @language_code = args[:language_code] if args.key?(:language_code)
  @location_bias = args[:location_bias] if args.key?(:location_bias)
  @location_restriction = args[:location_restriction] if args.key?(:location_restriction)
  @max_result_count = args[:max_result_count] if args.key?(:max_result_count)
  @min_rating = args[:min_rating] if args.key?(:min_rating)
  @open_now = args[:open_now] if args.key?(:open_now)
  @price_levels = args[:price_levels] if args.key?(:price_levels)
  @rank_preference = args[:rank_preference] if args.key?(:rank_preference)
  @region_code = args[:region_code] if args.key?(:region_code)
  @strict_type_filtering = args[:strict_type_filtering] if args.key?(:strict_type_filtering)
  @text_query = args[:text_query] if args.key?(:text_query)
end