Class: OCI::ApmTraces::Models::BulkPinMetadata
- Inherits:
-
Object
- Object
- OCI::ApmTraces::Models::BulkPinMetadata
- Defined in:
- lib/oci/apm_traces/models/bulk_pin_metadata.rb
Overview
Metadata about the bulk pin operation. The bulk pin operation is atomic and binary. If the processing of any of the attributes in the bulk pin request results in a processing or validation error, then none of the attributes in the request are pinned.
Constant Summary collapse
- OPERATION_STATUS_ENUM =
[ OPERATION_STATUS_SUCCESS = 'SUCCESS'.freeze, OPERATION_STATUS_EMPTY_ATTRIBUTE_LIST = 'EMPTY_ATTRIBUTE_LIST'.freeze, OPERATION_STATUS_INVALID_BULK_REQUEST = 'INVALID_BULK_REQUEST'.freeze, OPERATION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_PIN = 'PIN'.freeze, OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#attributes_pinned ⇒ Integer
[Required] Total number attributes (both string and numeric) in TRACES namespace that were pinned.
-
#operation_status ⇒ String
[Required] Operation status of the bulk pin operation.
-
#operation_type ⇒ String
[Required] Type of operation.
-
#synthetic_attributes_pinned ⇒ Integer
Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned.
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 = {}) ⇒ BulkPinMetadata
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 = {}) ⇒ BulkPinMetadata
Initializes the object
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 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 85 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.operation_status = attributes[:'operationStatus'] if attributes[:'operationStatus'] raise 'You cannot provide both :operationStatus and :operation_status' if attributes.key?(:'operationStatus') && attributes.key?(:'operation_status') self.operation_status = attributes[:'operation_status'] if attributes[:'operation_status'] 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.attributes_pinned = attributes[:'attributesPinned'] if attributes[:'attributesPinned'] raise 'You cannot provide both :attributesPinned and :attributes_pinned' if attributes.key?(:'attributesPinned') && attributes.key?(:'attributes_pinned') self.attributes_pinned = attributes[:'attributes_pinned'] if attributes[:'attributes_pinned'] self.synthetic_attributes_pinned = attributes[:'syntheticAttributesPinned'] if attributes[:'syntheticAttributesPinned'] raise 'You cannot provide both :syntheticAttributesPinned and :synthetic_attributes_pinned' if attributes.key?(:'syntheticAttributesPinned') && attributes.key?(:'synthetic_attributes_pinned') self.synthetic_attributes_pinned = attributes[:'synthetic_attributes_pinned'] if attributes[:'synthetic_attributes_pinned'] end |
Instance Attribute Details
#attributes_pinned ⇒ Integer
[Required] Total number attributes (both string and numeric) in TRACES namespace that were pinned.
44 45 46 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 44 def attributes_pinned @attributes_pinned end |
#operation_status ⇒ String
[Required] Operation status of the bulk pin operation. SUCCESS - The bulk pin operation has succeeded and all the attributes in the bulk pin request have been pinned by this operation or pinned earlier. The following are error statuses for the bulk pin operation. EMPTY_ATTRIBUTE_LIST - The bulk pin request object was empty and did not contain any attributes to be pinned. INVALID_BULK_REQUEST - The bulk request contains invalid attribute(s), or attribute(s) that resulted in a validation error, or an attribute that resulted in a processing error.
34 35 36 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 34 def operation_status @operation_status end |
#operation_type ⇒ String
[Required] Type of operation.
39 40 41 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 39 def operation_type @operation_type end |
#synthetic_attributes_pinned ⇒ Integer
Total number attributes (both string and numeric) in SYNTHETIC namespace that were pinned.
49 50 51 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 49 def synthetic_attributes_pinned @synthetic_attributes_pinned end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'operation_status': :'operationStatus', 'operation_type': :'operationType', 'attributes_pinned': :'attributesPinned', 'synthetic_attributes_pinned': :'syntheticAttributesPinned' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'operation_status': :'String', 'operation_type': :'String', 'attributes_pinned': :'Integer', 'synthetic_attributes_pinned': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 149 def ==(other) return true if equal?(other) self.class == other.class && operation_status == other.operation_status && operation_type == other.operation_type && attributes_pinned == other.attributes_pinned && synthetic_attributes_pinned == other.synthetic_attributes_pinned end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 182 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
162 163 164 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 162 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
171 172 173 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 171 def hash [operation_status, operation_type, attributes_pinned, synthetic_attributes_pinned].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
215 216 217 218 219 220 221 222 223 224 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 215 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
209 210 211 |
# File 'lib/oci/apm_traces/models/bulk_pin_metadata.rb', line 209 def to_s to_hash.to_s end |