Class: ReactorSDK::Resources::ComprehensiveUpstreamChainEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(library:, stage:, resource:, revision_id:, revision:, comprehensive_resource:) ⇒ ComprehensiveUpstreamChainEntry

Returns a new instance of ComprehensiveUpstreamChainEntry.



8
9
10
11
12
13
14
15
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 8

def initialize(library:, stage:, resource:, revision_id:, revision:, comprehensive_resource:)
  @library = library
  @stage = stage
  @resource = resource
  @revision_id = revision_id
  @revision = revision
  @comprehensive_resource = comprehensive_resource
end

Instance Attribute Details

#comprehensive_resourceObject (readonly)

Returns the value of attribute comprehensive_resource.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def comprehensive_resource
  @comprehensive_resource
end

#libraryObject (readonly)

Returns the value of attribute library.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def library
  @library
end

#resourceObject (readonly)

Returns the value of attribute resource.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def resource
  @resource
end

#revisionObject (readonly)

Returns the value of attribute revision.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def revision
  @revision
end

#revision_idObject (readonly)

Returns the value of attribute revision_id.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def revision_id
  @revision_id
end

#stageObject (readonly)

Returns the value of attribute stage.



6
7
8
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 6

def stage
  @stage
end

Instance Method Details

#entity_snapshotObject



21
22
23
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 21

def entity_snapshot
  @revision&.entity_snapshot
end

#normalized_jsonObject



29
30
31
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 29

def normalized_json
  @comprehensive_resource&.normalized_json
end

#normalized_payloadObject



25
26
27
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 25

def normalized_payload
  @comprehensive_resource&.normalized_payload
end

#present?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/reactor_sdk/resources/comprehensive_upstream_chain_entry.rb', line 17

def present?
  !@resource.nil?
end