Class: RightScale::SecureDocument
- Includes:
- Serializable
- Defined in:
- lib/right_agent/core_payload_types/secure_document.rb
Overview
Class encapsulating the actual value of a credential.
Instance Attribute Summary collapse
-
#content ⇒ Object
The content of this document; if envelope_mime_type is not nil, then this value is actually an envelope that contains the document value.
-
#envelope_mime_type ⇒ Object
(String) MIME type of the value’s envelope, e.g.
-
#mime_type ⇒ Object
(String) MIME type of the document itself e.g.
-
#name ⇒ Object
(String) Namespace-unique identifier for this credential value.
-
#storage_policy_name ⇒ Object
(String) Name of the storage policy used to encrypt this document (if any).
-
#version ⇒ Object
(Integer) Monotonic version number of this document.
Instance Method Summary collapse
-
#initialize(*args) ⇒ SecureDocument
constructor
Initialize fields from given arguments.
-
#serialized_members ⇒ Object
Array of serialized fields given to constructor.
Methods included from Serializable
Constructor Details
#initialize(*args) ⇒ SecureDocument
Initialize fields from given arguments
52 53 54 55 56 57 58 59 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 52 def initialize(*args) @name = args[0] if args.size > 0 @version = args[1] if args.size > 1 @content = args[2] if args.size > 2 @storage_policy_name = args[3] if args.size > 3 @mime_type = args[4] if args.size > 4 @envelope_mime_type = args[5] if args.size > 5 end |
Instance Attribute Details
#content ⇒ Object
The content of this document; if envelope_mime_type is not nil, then this value is actually an envelope that contains the document value
39 40 41 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 39 def content @content end |
#envelope_mime_type ⇒ Object
(String) MIME type of the value’s envelope, e.g. an encoding or encryption format, or nil if there is no envelope MIME type.
49 50 51 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 49 def envelope_mime_type @envelope_mime_type end |
#mime_type ⇒ Object
(String) MIME type of the document itself e.g. “text/plain”
45 46 47 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 45 def mime_type @mime_type end |
#name ⇒ Object
(String) Namespace-unique identifier for this credential value
32 33 34 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 32 def name @name end |
#storage_policy_name ⇒ Object
(String) Name of the storage policy used to encrypt this document (if any).
42 43 44 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 42 def storage_policy_name @storage_policy_name end |
#version ⇒ Object
(Integer) Monotonic version number of this document
35 36 37 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 35 def version @version end |
Instance Method Details
#serialized_members ⇒ Object
Array of serialized fields given to constructor
62 63 64 |
# File 'lib/right_agent/core_payload_types/secure_document.rb', line 62 def serialized_members [ @name, @version, @content, @storage_policy_name, @mime_type, @envelope_mime_type ] end |