Class: Google::Apis::JobsV2::CommutePreference

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CommutePreference

Returns a new instance of CommutePreference.


180
181
182
# File 'generated/google/apis/jobs_v2/classes.rb', line 180

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

Instance Attribute Details

#allow_non_street_level_addressBoolean 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

Returns:

  • (Boolean)

143
144
145
# File 'generated/google/apis/jobs_v2/classes.rb', line 143

def allow_non_street_level_address
  @allow_non_street_level_address
end

#departure_hour_localFixnum

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

Returns:

  • (Fixnum)

151
152
153
# File 'generated/google/apis/jobs_v2/classes.rb', line 151

def departure_hour_local
  @departure_hour_local
end

#method_propString

Required. The method of transportation for which to calculate the commute time. Corresponds to the JSON property method

Returns:

  • (String)

156
157
158
# File 'generated/google/apis/jobs_v2/classes.rb', line 156

def method_prop
  @method_prop
end

#road_trafficString

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

Returns:

  • (String)

162
163
164
# File 'generated/google/apis/jobs_v2/classes.rb', line 162

def road_traffic
  @road_traffic
end

#start_locationGoogle::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


171
172
173
# File 'generated/google/apis/jobs_v2/classes.rb', line 171

def start_location
  @start_location
end

#travel_timeString

Required. The maximum travel time in seconds. The maximum allowed value is 3600s (one hour). Format is 123s. Corresponds to the JSON property travelTime

Returns:

  • (String)

178
179
180
# File 'generated/google/apis/jobs_v2/classes.rb', line 178

def travel_time
  @travel_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


185
186
187
188
189
190
191
192
# File 'generated/google/apis/jobs_v2/classes.rb', line 185

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