Class: Google::Apis::ContaineranalysisV1alpha1::RelationshipOccurrence

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

Overview

RelationshipOccurrence represents an SPDX Relationship section: https://spdx. github.io/spdx-spec/7-relationships-between-SPDX-elements/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RelationshipOccurrence

Returns a new instance of RelationshipOccurrence.



5231
5232
5233
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5231

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

Instance Attribute Details

#commentString

A place for the SPDX file creator to record any general comments about the relationship Corresponds to the JSON property comment

Returns:

  • (String)


5209
5210
5211
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5209

def comment
  @comment
end

#sourceString

Also referred to as SPDXRef-A The source SPDX element (file, package, etc) Corresponds to the JSON property source

Returns:

  • (String)


5214
5215
5216
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5214

def source
  @source
end

#targetString

Also referred to as SPDXRef-B The target SPDC element (file, package, etc) In cases where there are "known unknowns", the use of the keyword NOASSERTION can be used The keywords NONE can be used to indicate that an SPDX element ( package/file/snippet) has no other elements connected by some relationship to it Corresponds to the JSON property target

Returns:

  • (String)


5223
5224
5225
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5223

def target
  @target
end

#typeString

Output only. The type of relationship between the source and target SPDX elements Corresponds to the JSON property type

Returns:

  • (String)


5229
5230
5231
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5229

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5236
5237
5238
5239
5240
5241
# File 'lib/google/apis/containeranalysis_v1alpha1/classes.rb', line 5236

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