Class: OCI::ApmTraces::Models::AttributeResponse
- Inherits:
-
Object
- Object
- OCI::ApmTraces::Models::AttributeResponse
- Defined in:
- lib/oci/apm_traces/models/attribute_response.rb
Overview
Response of an individual attribute item in the bulk activate or deactivate operation.
Constant Summary collapse
- ATTRIBUTE_TYPE_ENUM =
[ ATTRIBUTE_TYPE_NUMERIC = 'NUMERIC'.freeze, ATTRIBUTE_TYPE_STRING = 'STRING'.freeze, ATTRIBUTE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- UNIT_ENUM =
[ UNIT_NONE = 'NONE'.freeze, UNIT_EPOCH_TIME_MS = 'EPOCH_TIME_MS'.freeze, UNIT_BYTES = 'BYTES'.freeze, UNIT_COUNT = 'COUNT'.freeze, UNIT_DURATION_MS = 'DURATION_MS'.freeze, UNIT_TRACE_STATUS = 'TRACE_STATUS'.freeze, UNIT_PERCENTAGE = 'PERCENTAGE'.freeze, UNIT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_ACTIVATE = 'ACTIVATE'.freeze, OPERATION_TYPE_DEACTIVATE = 'DEACTIVATE'.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_ACTIVE = 'ATTRIBUTE_ALREADY_ACTIVE'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_ACTIVATED = 'ATTRIBUTE_ACTIVATED'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_DEACTIVATED = 'ATTRIBUTE_DEACTIVATED'.freeze, ATTRIBUTE_STATUS_DEACTIVATION_NOT_ALLOWED = 'DEACTIVATION_NOT_ALLOWED'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_DOES_NOT_EXIST = 'ATTRIBUTE_DOES_NOT_EXIST'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_ALREADY_DEACTIVATED = 'ATTRIBUTE_ALREADY_DEACTIVATED'.freeze, ATTRIBUTE_STATUS_DUPLICATE_ATTRIBUTE = 'DUPLICATE_ATTRIBUTE'.freeze, ATTRIBUTE_STATUS_INVALID_ATTRIBUTE = 'INVALID_ATTRIBUTE'.freeze, ATTRIBUTE_STATUS_INVALID_ATTRIBUTE_TYPE_CONFLICT = 'INVALID_ATTRIBUTE_TYPE_CONFLICT'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_NOT_PROCESSED = 'ATTRIBUTE_NOT_PROCESSED'.freeze, ATTRIBUTE_STATUS_ATTRIBUTE_UPDATE_NOT_ALLOWED = 'ATTRIBUTE_UPDATE_NOT_ALLOWED'.freeze, ATTRIBUTE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#attribute_name ⇒ String
[Required] Attribute that was activated or deactivated 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.
-
#attribute_type ⇒ String
[Required] Type of the attribute.
-
#notes ⇒ String
Notes for the activated attribute.
-
#operation_type ⇒ String
[Required] Type of operation - activate or deactivate.
-
#time_updated ⇒ DateTime
[Required] Time when the attribute was activated or deactivated.
-
#unit ⇒ String
Unit of the attribute.
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 = {}) ⇒ AttributeResponse
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 = {}) ⇒ AttributeResponse
Initializes the object
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 163 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.attribute_type = attributes[:'attributeType'] if attributes[:'attributeType'] raise 'You cannot provide both :attributeType and :attribute_type' if attributes.key?(:'attributeType') && attributes.key?(:'attribute_type') self.attribute_type = attributes[:'attribute_type'] if attributes[:'attribute_type'] self.unit = attributes[:'unit'] if attributes[:'unit'] 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 activated or deactivated by this bulk operation.
60 61 62 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 60 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.
86 87 88 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 86 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 activate or deactivate 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 successful and they get a success status back. The following are successful status values of individual attribute items in a bulk attribute activation operation. ATTRIBUTE_ACTIVATED - The attribute is activated and is available to be queried. Note that ingest might still have not picked up the changes, and the associated caches would not have refreshed yet to pick up the changes. ATTRIBUTE_ALREADY_ACTIVE - The caller is trying to activate an attribute that is already active or in the process of getting activated. ATTRIBUTE_DEACTIVATED - The attribute is deactivated and will not appear in searches. Ingest might not have picked up the new changes and the associated caches might not have refreshed yet. ATTRIBUTE_ALREADY_DEACTIVATED - The caller is trying to deactivate an attribute that has already been deactivated or in the process of deactivation. 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. None of the attributes in the bulk request would have been activated or deactivated by this bulk operation. DEACTIVATION_NOT_ALLOWED - The caller has asked for the deactivation of an out of box tag which is not permitted. ATTRIBUTE_DOES_NOT_EXIST - The caller tries to deactivate an attribute that doesn't exist in the APM Domain. INVALID_ATTRIBUTE - The attribute is invalid. INVALID_ATTRIBUTE_TYPE_CONFLICT - The attribute is invalid. There were two attributes with same name but different type in the bulk request. ATTRIBUTE_NOT_PROCESSED - The attribute was not processed, as there was another attribute in this bulk request collection that resulted in a processing error. ATTRIBUTE_UPDATE_NOT_ALLOWED - The unit of the attribute cannot be updated as it is an in-built system attribute.
110 111 112 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 110 def attribute_status @attribute_status end |
#attribute_type ⇒ String
[Required] Type of the attribute.
65 66 67 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 65 def attribute_type @attribute_type end |
#notes ⇒ String
Notes for the activated attribute.
75 76 77 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 75 def notes @notes end |
#operation_type ⇒ String
[Required] Type of operation - activate or deactivate.
80 81 82 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 80 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.
115 116 117 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 115 def time_updated @time_updated end |
#unit ⇒ String
Unit of the attribute.
70 71 72 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 70 def unit @unit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 118 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'attribute_name': :'attributeName', 'attribute_type': :'attributeType', 'unit': :'unit', '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.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 134 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'attribute_name': :'String', 'attribute_type': :'String', 'unit': :'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.
284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 284 def ==(other) return true if equal?(other) self.class == other.class && attribute_name == other.attribute_name && attribute_type == other.attribute_type && unit == other.unit && 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
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 321 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
301 302 303 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 301 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
310 311 312 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 310 def hash [attribute_name, attribute_type, unit, notes, operation_type, attribute_name_space, attribute_status, time_updated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
354 355 356 357 358 359 360 361 362 363 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 354 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
348 349 350 |
# File 'lib/oci/apm_traces/models/attribute_response.rb', line 348 def to_s to_hash.to_s end |