Class: Google::Apis::JobsV2::CommutePreference
- Inherits:
-
Object
- Object
- Google::Apis::JobsV2::CommutePreference
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/jobs_v2/classes.rb,
generated/google/apis/jobs_v2/representations.rb,
generated/google/apis/jobs_v2/representations.rb
Overview
Input only. Parameters needed for commute search.
Instance Attribute Summary collapse
-
#allow_non_street_level_address ⇒ Boolean
(also: #allow_non_street_level_address?)
Optional.
-
#departure_hour_local ⇒ Fixnum
Optional.
-
#method_prop ⇒ String
Required.
-
#road_traffic ⇒ String
Optional.
-
#start_location ⇒ Google::Apis::JobsV2::LatLng
An object representing a latitude/longitude pair.
-
#travel_time ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CommutePreference
constructor
A new instance of CommutePreference.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CommutePreference
Returns a new instance of CommutePreference
185 186 187 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 185 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allow_non_street_level_address ⇒ Boolean Also known as: allow_non_street_level_address?
Optional.
If true
, jobs without street level addresses may also be returned.
For city level addresses, the city center is used. For state and coarser
level addresses, text matching is used.
If this field is set to false
or is not specified, only jobs that include
street level addresses will be returned by commute search.
Corresponds to the JSON property allowNonStreetLevelAddress
145 146 147 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 145 def allow_non_street_level_address @allow_non_street_level_address end |
#departure_hour_local ⇒ Fixnum
Optional.
The departure hour to use to calculate traffic impact. Accepts an
integer between 0 and 23, representing the hour in the time zone of the
start_location. Must not be present if road_traffic is specified.
Corresponds to the JSON property departureHourLocal
154 155 156 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 154 def departure_hour_local @departure_hour_local end |
#method_prop ⇒ String
Required.
The method of transportation for which to calculate the commute time.
Corresponds to the JSON property method
160 161 162 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 160 def method_prop @method_prop end |
#road_traffic ⇒ String
Optional.
Specifies the traffic density to use when calculating commute time.
Must not be present if departure_hour_local is specified.
Corresponds to the JSON property roadTraffic
167 168 169 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 167 def road_traffic @road_traffic end |
#start_location ⇒ Google::Apis::JobsV2::LatLng
An object representing a latitude/longitude pair. This is expressed as a pair
of doubles representing degrees latitude and degrees longitude. Unless
specified otherwise, this must conform to the
WGS84
standard. Values must be within normalized ranges.
Corresponds to the JSON property startLocation
176 177 178 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 176 def start_location @start_location end |
#travel_time ⇒ String
Required.
The maximum travel time in seconds. The maximum allowed value is 3600s
(one hour). Format is 123s
.
Corresponds to the JSON property travelTime
183 184 185 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 183 def travel_time @travel_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
190 191 192 193 194 195 196 197 |
# File 'generated/google/apis/jobs_v2/classes.rb', line 190 def update!(**args) @allow_non_street_level_address = args[:allow_non_street_level_address] if args.key?(:allow_non_street_level_address) @departure_hour_local = args[:departure_hour_local] if args.key?(:departure_hour_local) @method_prop = args[:method_prop] if args.key?(:method_prop) @road_traffic = args[:road_traffic] if args.key?(:road_traffic) @start_location = args[:start_location] if args.key?(:start_location) @travel_time = args[:travel_time] if args.key?(:travel_time) end |