Class: OCI::StackMonitoring::Models::ImportOciTelemetryResourcesTaskDetails
- Inherits:
-
MonitoredResourceTaskDetails
- Object
- MonitoredResourceTaskDetails
- OCI::StackMonitoring::Models::ImportOciTelemetryResourcesTaskDetails
- Defined in:
- lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb
Overview
Request details for importing resources from Telemetry like resources from OCI Native Services and prometheus.
Constant Summary collapse
- SOURCE_ENUM =
[ SOURCE_OCI_TELEMETRY_NATIVE = 'OCI_TELEMETRY_NATIVE'.freeze, SOURCE_OCI_TELEMETRY_PROMETHEUS = 'OCI_TELEMETRY_PROMETHEUS'.freeze, SOURCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from MonitoredResourceTaskDetails
MonitoredResourceTaskDetails::TYPE_ENUM
Instance Attribute Summary collapse
-
#availability_proxy_metric_collection_interval ⇒ Integer
Metrics collection interval in seconds used when calculating the availability of the resource based on metrics specified using the property 'availabilityProxyMetrics'.
-
#availability_proxy_metrics ⇒ Array<String>
List of metrics to be used to calculate the availability of the resource.
-
#namespace ⇒ String
[Required] Name space to be used for OCI Native service resources discovery.
-
#resource_group ⇒ String
The resource group to use while fetching metrics from telemetry.
-
#source ⇒ String
[Required] Source from where the metrics pushed to telemetry.
Attributes inherited from MonitoredResourceTaskDetails
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 = {}) ⇒ ImportOciTelemetryResourcesTaskDetails
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.
Methods inherited from MonitoredResourceTaskDetails
Constructor Details
#initialize(attributes = {}) ⇒ ImportOciTelemetryResourcesTaskDetails
Initializes the object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 92 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'IMPORT_OCI_TELEMETRY_RESOURCES' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.source = attributes[:'source'] if attributes[:'source'] self.namespace = attributes[:'namespace'] if attributes[:'namespace'] self.resource_group = attributes[:'resourceGroup'] if attributes[:'resourceGroup'] raise 'You cannot provide both :resourceGroup and :resource_group' if attributes.key?(:'resourceGroup') && attributes.key?(:'resource_group') self.resource_group = attributes[:'resource_group'] if attributes[:'resource_group'] self.availability_proxy_metrics = attributes[:'availabilityProxyMetrics'] if attributes[:'availabilityProxyMetrics'] raise 'You cannot provide both :availabilityProxyMetrics and :availability_proxy_metrics' if attributes.key?(:'availabilityProxyMetrics') && attributes.key?(:'availability_proxy_metrics') self.availability_proxy_metrics = attributes[:'availability_proxy_metrics'] if attributes[:'availability_proxy_metrics'] self.availability_proxy_metric_collection_interval = attributes[:'availabilityProxyMetricCollectionInterval'] if attributes[:'availabilityProxyMetricCollectionInterval'] raise 'You cannot provide both :availabilityProxyMetricCollectionInterval and :availability_proxy_metric_collection_interval' if attributes.key?(:'availabilityProxyMetricCollectionInterval') && attributes.key?(:'availability_proxy_metric_collection_interval') self.availability_proxy_metric_collection_interval = attributes[:'availability_proxy_metric_collection_interval'] if attributes[:'availability_proxy_metric_collection_interval'] end |
Instance Attribute Details
#availability_proxy_metric_collection_interval ⇒ Integer
Metrics collection interval in seconds used when calculating the availability of the resource based on metrics specified using the property 'availabilityProxyMetrics'.
51 52 53 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 51 def availability_proxy_metric_collection_interval @availability_proxy_metric_collection_interval end |
#availability_proxy_metrics ⇒ Array<String>
List of metrics to be used to calculate the availability of the resource. Resource is considered to be up if at least one of the specified metrics is available for the resource during the specified interval using the property 'availabilityProxyMetricCollectionIntervalInSeconds'. If no metrics are specified, availability will not be calculated for the resource.
45 46 47 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 45 def availability_proxy_metrics @availability_proxy_metrics end |
#namespace ⇒ String
[Required] Name space to be used for OCI Native service resources discovery.
30 31 32 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 30 def namespace @namespace end |
#resource_group ⇒ String
The resource group to use while fetching metrics from telemetry. If not specified, resource group will be skipped in the list metrics request.
36 37 38 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 36 def resource_group @resource_group end |
#source ⇒ String
[Required] Source from where the metrics pushed to telemetry. Possible values: * OCI_TELEMETRY_NATIVE - The metrics are pushed to telemetry from OCI Native Services. * OCI_TELEMETRY_PROMETHEUS - The metrics are pushed to telemetry from Prometheus.
26 27 28 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 26 def source @source end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 54 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'source': :'source', 'namespace': :'namespace', 'resource_group': :'resourceGroup', 'availability_proxy_metrics': :'availabilityProxyMetrics', 'availability_proxy_metric_collection_interval': :'availabilityProxyMetricCollectionInterval' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'source': :'String', 'namespace': :'String', 'resource_group': :'String', 'availability_proxy_metrics': :'Array<String>', 'availability_proxy_metric_collection_interval': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 145 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && source == other.source && namespace == other.namespace && resource_group == other.resource_group && availability_proxy_metrics == other.availability_proxy_metrics && availability_proxy_metric_collection_interval == other.availability_proxy_metric_collection_interval end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 180 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
160 161 162 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 160 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
169 170 171 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 169 def hash [type, source, namespace, resource_group, availability_proxy_metrics, availability_proxy_metric_collection_interval].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 213 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
207 208 209 |
# File 'lib/oci/stack_monitoring/models/import_oci_telemetry_resources_task_details.rb', line 207 def to_s to_hash.to_s end |