Class: RightScale::SecureDocumentLocation

Inherits:
Object
  • Object
show all
Includes:
Serializable
Defined in:
lib/right_agent/core_payload_types/secure_document_location.rb

Overview

Everything necessary to retrieve a SecureDocument from a RightNet agent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Serializable

included

Constructor Details

#initialize(*args) ⇒ SecureDocumentLocation

Initialize fields from given arguments



50
51
52
53
54
55
56
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 50

def initialize(*args)
  @namespace = args[0] if args.size > 0
  @name      = args[1] if args.size > 1
  @version   = args[2] if args.size > 2
  @ticket    = args[3] if args.size > 3
  @targets   = args[4] if args.size > 4
end

Instance Attribute Details

#nameObject

(String)

Namespace-unique identifier of the document that should be retrieved.



35
36
37
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 35

def name
  @name
end

#namespaceObject

(String)

Namespace within which the document resides



32
33
34
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 32

def namespace
  @namespace
end

#targetsObject

Array(String)

Identities of RightNet agents capable of providing the document.

If nil, then no target should be specified when sending RightNet requests; this is used to route requests to “trusted infrastructure” nodes at the discretion of the RightNet router.



47
48
49
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 47

def targets
  @targets
end

#ticketObject

(String)

Access token that should be used to fetch the document



41
42
43
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 41

def ticket
  @ticket
end

#versionObject

(Integer)

Monotonic version of the document to be requested



38
39
40
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 38

def version
  @version
end

Instance Method Details

#serialized_membersObject

Array of serialized fields given to constructor



59
60
61
# File 'lib/right_agent/core_payload_types/secure_document_location.rb', line 59

def serialized_members
  [ @namespace, @name, @version, @ticket, @targets ]
end