Class: Google::Apis::ProximitybeaconV1beta1::BeaconAttachment

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

Overview

Project-specific data associated with a beacon.

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

Returns a new instance of BeaconAttachment.



281
282
283
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 281

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

Instance Attribute Details

#attachment_nameString

Resource name of this attachment. Attachment names have the format: beacons/beacon_id/attachments/attachment_id. Leave this empty on creation. Corresponds to the JSON property attachmentName

Returns:

  • (String)


239
240
241
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 239

def attachment_name
  @attachment_name
end

#creation_time_msString

The UTC time when this attachment was created, in milliseconds since the UNIX epoch. Corresponds to the JSON property creationTimeMs

Returns:

  • (String)


245
246
247
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 245

def creation_time_ms
  @creation_time_ms
end

#dataString

An opaque data container for client-provided data. Must be base64 encoded in HTTP requests, and will be so encoded (with padding) in responses. Required. Corresponds to the JSON property data NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


254
255
256
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 254

def data
  @data
end

#max_distance_metersFloat

The distance away from the beacon at which this attachment should be delivered to a mobile app. Setting this to a value greater than zero indicates that the app should behave as if the beacon is "seen" when the mobile device is less than this distance away from the beacon. Different attachments on the same beacon can have different max distances. Note that even though this value is expressed with fractional meter precision, real-world behavior is likley to be much less precise than one meter, due to the nature of current Bluetooth radio technology. Optional. When not set or zero, the attachment should be delivered at the beacon's outer limit of detection. Negative values are invalid and return an error. Corresponds to the JSON property maxDistanceMeters

Returns:

  • (Float)


270
271
272
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 270

def max_distance_meters
  @max_distance_meters
end

#namespaced_typeString

Specifies what kind of attachment this is. Tells a client how to interpret the data field. Format is namespace/type. Namespace provides type separation between clients. Type describes the type of data, for use by the client when parsing the data field. Required. Corresponds to the JSON property namespacedType

Returns:

  • (String)


279
280
281
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 279

def namespaced_type
  @namespaced_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



286
287
288
289
290
291
292
# File 'generated/google/apis/proximitybeacon_v1beta1/classes.rb', line 286

def update!(**args)
  @attachment_name = args[:attachment_name] if args.key?(:attachment_name)
  @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms)
  @data = args[:data] if args.key?(:data)
  @max_distance_meters = args[:max_distance_meters] if args.key?(:max_distance_meters)
  @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type)
end