Class: OCI::ApmTraces::Models::AttributePinResponse
- Inherits:
-
Object
- Object
- OCI::ApmTraces::Models::AttributePinResponse
- Defined in:
- lib/oci/apm_traces/models/attribute_pin_response.rb
Overview
Response of an individual attribute item in the bulk pin operation.
Constant Summary collapse
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_PIN = 'PIN'.freeze, OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ATTRIBUTE_NAME_SPACE_ENUM =
[ ATTRIBUTE_NAME_SPACE_TRACES = 'TRACES'.freeze, ATTRIBUTE_NAME_SPACE_SYNTHETIC = 'SYNTHETIC'.freeze, ATTRIBUTE_NAME_SPACE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ATTRIBUTE_STATUS_ENUM =
[ ATTRIBUTE_STATUS_ATTRIBUTE_ALREADY_PINNED = 'ATTRIBUTE_ALREADY_PINNED'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_PINNED = 'ATTRIBUTE_PINNED'.freeze, ATTRIBUTE_STATUS_PIN_NOT_ALLOWED = 'PIN_NOT_ALLOWED'.freeze, ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = 'DUPLICATE_ATTRIBUTE'.freeze, ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = 'INVALID_ATTRIBUTE'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = 'ATTRIBUTE_NOT_PROCESSED'.freeze, ATTRIBUTE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#attribute_name ⇒ String
[Required] Attribute that was pinned by this bulk operation.
-
#attribute_name_space ⇒ String
[Required] Namespace of the attribute whose properties were updated.
-
#attribute_status ⇒ String
[Required] Status of the attribute after this operation.
-
#notes ⇒ String
[Required] Notes added to this attribute.
-
#operation_type ⇒ String
[Required] Type of operation - pin.
-
#time_updated ⇒ DateTime
[Required] Time when the attribute was activated or deactivated.
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 = {}) ⇒ AttributePinResponse
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 = {}) ⇒ AttributePinResponse
Initializes the object
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 116 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.attribute_name = attributes[:'attributeName'] if attributes[:'attributeName'] raise 'You cannot provide both :attributeName and :attribute_name' if attributes.key?(:'attributeName') && attributes.key?(:'attribute_name') self.attribute_name = attributes[:'attribute_name'] if attributes[:'attribute_name'] self.notes = attributes[:'notes'] if attributes[:'notes'] self.operation_type = attributes[:'operationType'] if attributes[:'operationType'] raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type') self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type'] self.attribute_name_space = attributes[:'attributeNameSpace'] if attributes[:'attributeNameSpace'] self.attribute_name_space = "TRACES" if attribute_name_space.nil? && !attributes.key?(:'attributeNameSpace') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :attributeNameSpace and :attribute_name_space' if attributes.key?(:'attributeNameSpace') && attributes.key?(:'attribute_name_space') self.attribute_name_space = attributes[:'attribute_name_space'] if attributes[:'attribute_name_space'] self.attribute_name_space = "TRACES" if attribute_name_space.nil? && !attributes.key?(:'attributeNameSpace') && !attributes.key?(:'attribute_name_space') # rubocop:disable Style/StringLiterals self.attribute_status = attributes[:'attributeStatus'] if attributes[:'attributeStatus'] raise 'You cannot provide both :attributeStatus and :attribute_status' if attributes.key?(:'attributeStatus') && attributes.key?(:'attribute_status') self.attribute_status = attributes[:'attribute_status'] if attributes[:'attribute_status'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] end |
Instance Attribute Details
#attribute_name ⇒ String
[Required] Attribute that was pinned by this bulk operation.
37 38 39 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 37 def attribute_name @attribute_name end |
#attribute_name_space ⇒ String
[Required] Namespace of the attribute whose properties were updated. The attributeNameSpace will default to TRACES if it is not passed in.
53 54 55 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 53 def attribute_name_space @attribute_name_space end |
#attribute_status ⇒ String
[Required] Status of the attribute after this operation. The attribute can have one of the following statuses after the pin operation. The attribute can have either a success status or an error status. The status of the attribute must be correlated with the operation status property in the bulk operation metadata object. The bulk operation will be successful only when all attributes in the bulk request are processed successfully and they get a success status back. The following are successful status values of individual attribute items in a bulk attribute pin operation. ATTRIBUTE_PINNED - The attribute is marked pinned and associated notes have been added. ATTRIBUTE_ALREADY_PINNED - The caller is trying to pin an attribute that has already been pinned. DUPLICATE_ATTRIBUTE - The attribute is a duplicate of an attribute that was present in this bulk request. Note that we deduplicate the attribute collection, process only unique attributes, and call out duplicates. A duplicate attribute in a bulk request will not prevent the processing of further attributes in the bulk operation. The following values are error statuses and the bulk processing is stopped when the first error is encountered. PIN_NOT_ALLOWED - The caller has asked to pin an active attribute which is not allowed. INVALID_ATTRIBUTE - The attribute is invalid. ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error.
69 70 71 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 69 def attribute_status @attribute_status end |
#notes ⇒ String
[Required] Notes added to this attribute.
42 43 44 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 42 def notes @notes end |
#operation_type ⇒ String
[Required] Type of operation - pin.
47 48 49 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 47 def operation_type @operation_type end |
#time_updated ⇒ DateTime
[Required] Time when the attribute was activated or deactivated. Note that ingest might not have picked up the changes even if this time has elapsed.
74 75 76 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 74 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'attribute_name': :'attributeName', 'notes': :'notes', 'operation_type': :'operationType', 'attribute_name_space': :'attributeNameSpace', 'attribute_status': :'attributeStatus', 'time_updated': :'timeUpdated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 91 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'attribute_name': :'String', 'notes': :'String', 'operation_type': :'String', 'attribute_name_space': :'String', 'attribute_status': :'String', 'time_updated': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 203 def ==(other) return true if equal?(other) self.class == other.class && attribute_name == other.attribute_name && notes == other.notes && operation_type == other.operation_type && attribute_name_space == other.attribute_name_space && attribute_status == other.attribute_status && time_updated == other.time_updated end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 238 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
218 219 220 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 218 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
227 228 229 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 227 def hash [attribute_name, notes, operation_type, attribute_name_space, attribute_status, time_updated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 271 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
265 266 267 |
# File 'lib/oci/apm_traces/models/attribute_pin_response.rb', line 265 def to_s to_hash.to_s end |