Class: Google::Apis::DigitalassetlinksV1::Statement

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

Overview

Describes a reliable statement that has been made about the relationship between a source asset and a target asset. Statements are always made by the source asset, either directly or by delegating to a statement list that is stored elsewhere. For more detailed definitions of statements and assets, please refer to our API documentation landing page.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Statement

Returns a new instance of Statement.



347
348
349
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 347

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

Instance Attribute Details

#relationString

The relation identifies the use of the statement as intended by the source asset's owner (that is, the person or entity who issued the statement). Every complete statement has a relation. We identify relations with strings of the format /, where must be one of a set of pre-defined purpose categories, and is a free-form lowercase alphanumeric string that describes the specific use case of the statement. Refer to our API documentation for the current list of supported relations. Example: delegate_permission/common.handle_all_urls REQUIRED Corresponds to the JSON property relation

Returns:

  • (String)


315
316
317
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 315

def relation
  @relation
end

#relation_extensionsHash<String,Object>

Statements may specify relation level extensions/payloads to express more details when declaring permissions to grant from the source asset to the target asset. These relation extensions should be specified in the relation_extensions object, keyed by the relation type they're associated with. relation: ["delegate_permission/common.handle_all_urls"], target:... , relation_extensions: "delegate_permission/common.handle_all_urls": ... handle_all_urls specific payload specified here... When requested, and specified in the statement file, the API will return relation_extensions associated with the statement's relation type. i.e. the API will only return relation_extensions specified for "delegate_permission/common.handle_all_urls" if this statement object's relation type is "delegate_permission/common. handle_all_urls". Corresponds to the JSON property relationExtensions

Returns:

  • (Hash<String,Object>)


331
332
333
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 331

def relation_extensions
  @relation_extensions
end

#sourceGoogle::Apis::DigitalassetlinksV1::Asset

Uniquely identifies an asset. A digital asset is an identifiable and addressable online entity that typically provides some service or content. Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages. Corresponds to the JSON property source



338
339
340
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 338

def source
  @source
end

#targetGoogle::Apis::DigitalassetlinksV1::Asset

Uniquely identifies an asset. A digital asset is an identifiable and addressable online entity that typically provides some service or content. Examples of assets are websites, Android apps, Twitter feeds, and Plus Pages. Corresponds to the JSON property target



345
346
347
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 345

def target
  @target
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



352
353
354
355
356
357
# File 'lib/google/apis/digitalassetlinks_v1/classes.rb', line 352

def update!(**args)
  @relation = args[:relation] if args.key?(:relation)
  @relation_extensions = args[:relation_extensions] if args.key?(:relation_extensions)
  @source = args[:source] if args.key?(:source)
  @target = args[:target] if args.key?(:target)
end