Class: Google::Apis::JobsV2::JobLocation

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

Output only. A resource that represents a location with full geographic information.

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) ⇒ JobLocation

Returns a new instance of JobLocation.



2168
2169
2170
# File 'generated/google/apis/jobs_v2/classes.rb', line 2168

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

Instance Attribute Details

#lat_lngGoogle::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 latLng



2131
2132
2133
# File 'generated/google/apis/jobs_v2/classes.rb', line 2131

def lat_lng
  @lat_lng
end

#location_typeString

The type of a location, which corresponds to the address lines field of PostalAddress. For example, "Downtown, Atlanta, GA, USA" has a type of LocationType#NEIGHBORHOOD, and "Kansas City, KS, USA" has a type of LocationType#LOCALITY. Corresponds to the JSON property locationType

Returns:

  • (String)


2139
2140
2141
# File 'generated/google/apis/jobs_v2/classes.rb', line 2139

def location_type
  @location_type
end

#postal_addressGoogle::Apis::JobsV2::PostalAddress

Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing:



2157
2158
2159
# File 'generated/google/apis/jobs_v2/classes.rb', line 2157

def postal_address
  @postal_address
end

#radius_metersFloat

Radius in meters of the job location. This value is derived from the location bounding box in which a circle with the specified radius centered from LatLng coves the area associated with the job location. For example, currently, "Mountain View, CA, USA" has a radius of 7885.79 meters. Corresponds to the JSON property radiusMeters

Returns:

  • (Float)


2166
2167
2168
# File 'generated/google/apis/jobs_v2/classes.rb', line 2166

def radius_meters
  @radius_meters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2173
2174
2175
2176
2177
2178
# File 'generated/google/apis/jobs_v2/classes.rb', line 2173

def update!(**args)
  @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
  @location_type = args[:location_type] if args.key?(:location_type)
  @postal_address = args[:postal_address] if args.key?(:postal_address)
  @radius_meters = args[:radius_meters] if args.key?(:radius_meters)
end