class Google::Apis::ProximitybeaconV1beta1::Beacon
Details of a beacon device.
Attributes
Defines a unique identifier of a beacon as broadcast by the device. Corresponds to the JSON property `advertisedId` @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId]
Resource name of this beacon. A beacon name has the format “beacons/N!beaconId” where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations. Corresponds to the JSON property `beaconName` @return [String]
Free text used to identify and describe the beacon. Maximum length 140 characters. Optional. Corresponds to the JSON property `description` @return [String]
Expected location stability. This is set when the beacon is registered or updated, not automatically detected in any way. Optional. Corresponds to the JSON property `expectedStability` @return [String]
Indoor level, a human-readable string as returned by Google Maps APIs, useful to indicate which floor of a building a beacon is located on. Corresponds to the JSON property `indoorLevel` @return [Google::Apis::ProximitybeaconV1beta1::IndoorLevel]
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. Example of normalization code in Python: def NormalizeLongitude(longitude): “”“Wrapsdecimal degrees longitude to [-180.0, 180.0].”“” q, r = divmod(longitude, 360.0) if r > 180.0 or (r == 180.0 and q <= -1.0): return r - 360.0 return r def NormalizeLatLng(latitude, longitude): “”“ Wraps decimal degrees latitude and longitude to [-180.0, 180.0] and [-90.0, 90. 0], respectively.”“” r = latitude % 360.0 if r = 270.0: return r - 360, NormalizeLongitude(longitude) else: return 180 - r, NormalizeLongitude( longitude + 180.0) assert 180.0 == NormalizeLongitude(180.0) assert -180.0 == NormalizeLongitude(-180.0) assert -179.0 == NormalizeLongitude(181.0) assert ( 0.0, 0.0) == NormalizeLatLng(360.0, 0.0) assert (0.0, 0.0) == NormalizeLatLng(- 360.0, 0.0) assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) assert (-85.0, - 170.0) == NormalizeLatLng(-95.0, 10.0) assert (90.0, 10.0) == NormalizeLatLng( 90.0, 10.0) assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10. 0) assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) Corresponds to the JSON property `latLng` @return [Google::Apis::ProximitybeaconV1beta1::LatLng]
The [Google Places API](/places/place-id) Place ID of the place where the beacon is deployed. This is given when the beacon is registered or updated, not automatically detected in any way. Optional. Corresponds to the JSON property `placeId` @return [String]
Properties of the beacon device, for example battery type or firmware version. Optional. Corresponds to the JSON property `properties` @return [Hash<String,String>]
Current status of the beacon. Required. Corresponds to the JSON property `status` @return [String]
Public Class Methods
# File generated/google/apis/proximitybeacon_v1beta1/classes.rb, line 102 def initialize(**args) update!(**args) end
Public Instance Methods
Update properties of this object
# File generated/google/apis/proximitybeacon_v1beta1/classes.rb, line 107 def update!(**args) @beacon_name = args[:beacon_name] if args.key?(:beacon_name) @advertised_id = args[:advertised_id] if args.key?(:advertised_id) @status = args[:status] if args.key?(:status) @place_id = args[:place_id] if args.key?(:place_id) @lat_lng = args[:lat_lng] if args.key?(:lat_lng) @indoor_level = args[:indoor_level] if args.key?(:indoor_level) @expected_stability = args[:expected_stability] if args.key?(:expected_stability) @description = args[:description] if args.key?(:description) @properties = args[:properties] if args.key?(:properties) end