Class: Google::Apis::JobsV4::Location

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

Overview

A resource that represents a location with full geographic information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Location

Returns a new instance of Location.



1616
1617
1618
# File 'lib/google/apis/jobs_v4/classes.rb', line 1616

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

Instance Attribute Details

#lat_lngGoogle::Apis::JobsV4::LatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property latLng



1584
1585
1586
# File 'lib/google/apis/jobs_v4/classes.rb', line 1584

def lat_lng
  @lat_lng
end

#location_typeString

The type of a location, which corresponds to the address lines field of google. type.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)


1592
1593
1594
# File 'lib/google/apis/jobs_v4/classes.rb', line 1592

def location_type
  @location_type
end

#postal_addressGoogle::Apis::JobsV4::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: - Use an i18n-ready address widget such as https:// github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support. google.com/business/answer/6397478 Corresponds to the JSON property postalAddress



1606
1607
1608
# File 'lib/google/apis/jobs_v4/classes.rb', line 1606

def postal_address
  @postal_address
end

#radius_milesFloat

Radius in miles of the job location. This value is derived from the location bounding box in which a circle with the specified radius centered from google. type.LatLng covers the area associated with the job location. For example, currently, "Mountain View, CA, USA" has a radius of 6.17 miles. Corresponds to the JSON property radiusMiles

Returns:

  • (Float)


1614
1615
1616
# File 'lib/google/apis/jobs_v4/classes.rb', line 1614

def radius_miles
  @radius_miles
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1621
1622
1623
1624
1625
1626
# File 'lib/google/apis/jobs_v4/classes.rb', line 1621

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_miles = args[:radius_miles] if args.key?(:radius_miles)
end