Class: OCI::CloudGuard::Models::NonDisclosureAgreement
- Inherits:
-
Object
- Object
- OCI::CloudGuard::Models::NonDisclosureAgreement
- Defined in:
- lib/oci/cloud_guard/models/non_disclosure_agreement.rb
Overview
A non-disclosure agreement that describes terms of use for a particular compliance document.
Instance Attribute Summary collapse
-
#agreement_content ⇒ String
[Required] The actual terms of the non-disclosure agreement between the customer and Oracle.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the non-disclosure agreement.
-
#document_id ⇒ String
[Required] The ID of the compliance document associated with the non-disclosure agreement.
-
#id ⇒ String
[Required] The OCID of the non-disclosure agreement, which is assigned when you create the non-disclosure agreement as an Oracle Cloud Infrastructure resource and is immutable.
-
#time_created ⇒ DateTime
The date and time the non-disclosure agreement was created, expressed in RFC 3339 timestamp format.
-
#user_id ⇒ String
[Required] The OCID of the principal that called CreateNonDisclosureAgreement.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ NonDisclosureAgreement
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ NonDisclosureAgreement
Initializes the object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 78 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.document_id = attributes[:'documentId'] if attributes[:'documentId'] raise 'You cannot provide both :documentId and :document_id' if attributes.key?(:'documentId') && attributes.key?(:'document_id') self.document_id = attributes[:'document_id'] if attributes[:'document_id'] self.user_id = attributes[:'userId'] if attributes[:'userId'] raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] if attributes[:'user_id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.agreement_content = attributes[:'agreementContent'] if attributes[:'agreementContent'] raise 'You cannot provide both :agreementContent and :agreement_content' if attributes.key?(:'agreementContent') && attributes.key?(:'agreement_content') self.agreement_content = attributes[:'agreement_content'] if attributes[:'agreement_content'] end |
Instance Attribute Details
#agreement_content ⇒ String
[Required] The actual terms of the non-disclosure agreement between the customer and Oracle.
36 37 38 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 36 def agreement_content @agreement_content end |
#compartment_id ⇒ String
[Required] The OCID of the compartment that contains the non-disclosure agreement.
32 33 34 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 32 def compartment_id @compartment_id end |
#document_id ⇒ String
[Required] The ID of the compliance document associated with the non-disclosure agreement.
24 25 26 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 24 def document_id @document_id end |
#id ⇒ String
[Required] The OCID of the non-disclosure agreement, which is assigned when you create the non-disclosure agreement as an Oracle Cloud Infrastructure resource and is immutable.
15 16 17 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 15 def id @id end |
#time_created ⇒ DateTime
The date and time the non-disclosure agreement was created, expressed in RFC 3339 timestamp format.
20 21 22 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 20 def time_created @time_created end |
#user_id ⇒ String
[Required] The OCID of the principal that called CreateNonDisclosureAgreement.
28 29 30 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 28 def user_id @user_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'time_created': :'timeCreated', 'document_id': :'documentId', 'user_id': :'userId', 'compartment_id': :'compartmentId', 'agreement_content': :'agreementContent' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'time_created': :'DateTime', 'document_id': :'String', 'user_id': :'String', 'compartment_id': :'String', 'agreement_content': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 124 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && time_created == other.time_created && document_id == other.document_id && user_id == other.user_id && compartment_id == other.compartment_id && agreement_content == other.agreement_content end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 159 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
139 140 141 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 139 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
148 149 150 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 148 def hash [id, time_created, document_id, user_id, compartment_id, agreement_content].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 192 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
186 187 188 |
# File 'lib/oci/cloud_guard/models/non_disclosure_agreement.rb', line 186 def to_s to_hash.to_s end |