Class: OCI::StackMonitoring::Models::UpdateAgentReceiverTaskDetails
- Inherits:
-
MonitoredResourceTaskDetails
- Object
- MonitoredResourceTaskDetails
- OCI::StackMonitoring::Models::UpdateAgentReceiverTaskDetails
- Defined in:
- lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb
Overview
Request details for enabling/disabling the metric receiver on the management agent.
Constant Summary collapse
- HANDLER_TYPE_ENUM =
[ HANDLER_TYPE_TELEGRAF = 'TELEGRAF'.freeze, HANDLER_TYPE_COLLECTD = 'COLLECTD'.freeze, HANDLER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from MonitoredResourceTaskDetails
MonitoredResourceTaskDetails::TYPE_ENUM
Instance Attribute Summary collapse
-
#agent_id ⇒ String
[Required] Management Agent Identifier OCID.
-
#handler_type ⇒ String
[Required] Type of the handler.
-
#is_enable ⇒ BOOLEAN
[Required] True to enable the receiver and false to disable the receiver on the agent.
- #receiver_properties ⇒ OCI::StackMonitoring::Models::AgentReceiverProperties
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 = {}) ⇒ UpdateAgentReceiverTaskDetails
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 = {}) ⇒ UpdateAgentReceiverTaskDetails
Initializes the object
72 73 74 75 76 77 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 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 72 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'UPDATE_AGENT_RECEIVER' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.agent_id = attributes[:'agentId'] if attributes[:'agentId'] raise 'You cannot provide both :agentId and :agent_id' if attributes.key?(:'agentId') && attributes.key?(:'agent_id') self.agent_id = attributes[:'agent_id'] if attributes[:'agent_id'] self.handler_type = attributes[:'handlerType'] if attributes[:'handlerType'] raise 'You cannot provide both :handlerType and :handler_type' if attributes.key?(:'handlerType') && attributes.key?(:'handler_type') self.handler_type = attributes[:'handler_type'] if attributes[:'handler_type'] self.is_enable = attributes[:'isEnable'] unless attributes[:'isEnable'].nil? raise 'You cannot provide both :isEnable and :is_enable' if attributes.key?(:'isEnable') && attributes.key?(:'is_enable') self.is_enable = attributes[:'is_enable'] unless attributes[:'is_enable'].nil? self.receiver_properties = attributes[:'receiverProperties'] if attributes[:'receiverProperties'] raise 'You cannot provide both :receiverProperties and :receiver_properties' if attributes.key?(:'receiverProperties') && attributes.key?(:'receiver_properties') self.receiver_properties = attributes[:'receiver_properties'] if attributes[:'receiver_properties'] end |
Instance Attribute Details
#agent_id ⇒ String
[Required] Management Agent Identifier OCID.
22 23 24 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 22 def agent_id @agent_id end |
#handler_type ⇒ String
[Required] Type of the handler.
26 27 28 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 26 def handler_type @handler_type end |
#is_enable ⇒ BOOLEAN
[Required] True to enable the receiver and false to disable the receiver on the agent.
31 32 33 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 31 def is_enable @is_enable end |
#receiver_properties ⇒ OCI::StackMonitoring::Models::AgentReceiverProperties
34 35 36 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 34 def receiver_properties @receiver_properties end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 37 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'agent_id': :'agentId', 'handler_type': :'handlerType', 'is_enable': :'isEnable', 'receiver_properties': :'receiverProperties' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'agent_id': :'String', 'handler_type': :'String', 'is_enable': :'BOOLEAN', 'receiver_properties': :'OCI::StackMonitoring::Models::AgentReceiverProperties' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 127 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && agent_id == other.agent_id && handler_type == other.handler_type && is_enable == other.is_enable && receiver_properties == other.receiver_properties end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 161 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
141 142 143 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 141 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
150 151 152 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 150 def hash [type, agent_id, handler_type, is_enable, receiver_properties].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 194 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
188 189 190 |
# File 'lib/oci/stack_monitoring/models/update_agent_receiver_task_details.rb', line 188 def to_s to_hash.to_s end |