Class: OCI::StackMonitoring::Models::SystemFormatResourceTypeMetadataDetails
- Inherits:
-
ResourceTypeMetadataDetails
- Object
- ResourceTypeMetadataDetails
- OCI::StackMonitoring::Models::SystemFormatResourceTypeMetadataDetails
- Defined in:
- lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb
Overview
The resource type metadata is defined in machine friendly format.
Constant Summary
Constants inherited from ResourceTypeMetadataDetails
ResourceTypeMetadataDetails::FORMAT_ENUM
Instance Attribute Summary collapse
-
#agent_properties ⇒ Array<String>
List of properties needed by the agent for monitoring the resource.
-
#required_properties ⇒ Array<String>
List of required properties for resource type.
-
#unique_property_sets ⇒ Array<OCI::StackMonitoring::Models::UniquePropertySet>
List of property sets used to uniquely identify the resources.
-
#valid_properties_for_create ⇒ Array<String>
List of valid properties for resource type while creating the monitored resource.
-
#valid_properties_for_update ⇒ Array<String>
List of valid properties for resource type while updating the monitored resource.
-
#valid_property_values ⇒ Hash<String, Array<String>>
List of valid values for the properties.
Attributes inherited from ResourceTypeMetadataDetails
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 = {}) ⇒ SystemFormatResourceTypeMetadataDetails
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 ResourceTypeMetadataDetails
Constructor Details
#initialize(attributes = {}) ⇒ SystemFormatResourceTypeMetadataDetails
Initializes the object
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 96 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['format'] = 'SYSTEM_FORMAT' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.required_properties = attributes[:'requiredProperties'] if attributes[:'requiredProperties'] raise 'You cannot provide both :requiredProperties and :required_properties' if attributes.key?(:'requiredProperties') && attributes.key?(:'required_properties') self.required_properties = attributes[:'required_properties'] if attributes[:'required_properties'] self.agent_properties = attributes[:'agentProperties'] if attributes[:'agentProperties'] raise 'You cannot provide both :agentProperties and :agent_properties' if attributes.key?(:'agentProperties') && attributes.key?(:'agent_properties') self.agent_properties = attributes[:'agent_properties'] if attributes[:'agent_properties'] self.valid_properties_for_create = attributes[:'validPropertiesForCreate'] if attributes[:'validPropertiesForCreate'] raise 'You cannot provide both :validPropertiesForCreate and :valid_properties_for_create' if attributes.key?(:'validPropertiesForCreate') && attributes.key?(:'valid_properties_for_create') self.valid_properties_for_create = attributes[:'valid_properties_for_create'] if attributes[:'valid_properties_for_create'] self.valid_properties_for_update = attributes[:'validPropertiesForUpdate'] if attributes[:'validPropertiesForUpdate'] raise 'You cannot provide both :validPropertiesForUpdate and :valid_properties_for_update' if attributes.key?(:'validPropertiesForUpdate') && attributes.key?(:'valid_properties_for_update') self.valid_properties_for_update = attributes[:'valid_properties_for_update'] if attributes[:'valid_properties_for_update'] self.unique_property_sets = attributes[:'uniquePropertySets'] if attributes[:'uniquePropertySets'] raise 'You cannot provide both :uniquePropertySets and :unique_property_sets' if attributes.key?(:'uniquePropertySets') && attributes.key?(:'unique_property_sets') self.unique_property_sets = attributes[:'unique_property_sets'] if attributes[:'unique_property_sets'] self.valid_property_values = attributes[:'validPropertyValues'] if attributes[:'validPropertyValues'] raise 'You cannot provide both :validPropertyValues and :valid_property_values' if attributes.key?(:'validPropertyValues') && attributes.key?(:'valid_property_values') self.valid_property_values = attributes[:'valid_property_values'] if attributes[:'valid_property_values'] end |
Instance Attribute Details
#agent_properties ⇒ Array<String>
List of properties needed by the agent for monitoring the resource. Valid only if resource type is OCI management agent based. When specified, these properties are passed to the management agent during resource create or update.
21 22 23 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 21 def agent_properties @agent_properties end |
#required_properties ⇒ Array<String>
List of required properties for resource type.
14 15 16 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 14 def required_properties @required_properties end |
#unique_property_sets ⇒ Array<OCI::StackMonitoring::Models::UniquePropertySet>
List of property sets used to uniquely identify the resources. This check is made during create or update of stack monitoring resource. The resource has to pass unique check for each set in the list. For example, database can have user, password and SID as one unique set. Another unique set would be user, password and service name.
44 45 46 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 44 def unique_property_sets @unique_property_sets end |
#valid_properties_for_create ⇒ Array<String>
List of valid properties for resource type while creating the monitored resource. If resources of this type specifies any other properties during create operation, the operation will fail.
28 29 30 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 28 def valid_properties_for_create @valid_properties_for_create end |
#valid_properties_for_update ⇒ Array<String>
List of valid properties for resource type while updating the monitored resource. If resources of this type specifies any other properties during update operation, the operation will fail.
35 36 37 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 35 def valid_properties_for_update @valid_properties_for_update end |
#valid_property_values ⇒ Hash<String, Array<String>>
List of valid values for the properties. This is useful when resource type wants to restrict only certain values for some properties. For instance for 'osType' property, supported values can be restricted to be either Linux or Windows. Example: { \"osType\": [\"Linux\",\"Windows\",\"Solaris\"]}
52 53 54 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 52 def valid_property_values @valid_property_values end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 55 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'format': :'format', 'required_properties': :'requiredProperties', 'agent_properties': :'agentProperties', 'valid_properties_for_create': :'validPropertiesForCreate', 'valid_properties_for_update': :'validPropertiesForUpdate', 'unique_property_sets': :'uniquePropertySets', 'valid_property_values': :'validPropertyValues' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 70 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'format': :'String', 'required_properties': :'Array<String>', 'agent_properties': :'Array<String>', 'valid_properties_for_create': :'Array<String>', 'valid_properties_for_update': :'Array<String>', 'unique_property_sets': :'Array<OCI::StackMonitoring::Models::UniquePropertySet>', 'valid_property_values': :'Hash<String, Array<String>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 150 def ==(other) return true if equal?(other) self.class == other.class && format == other.format && required_properties == other.required_properties && agent_properties == other.agent_properties && valid_properties_for_create == other.valid_properties_for_create && valid_properties_for_update == other.valid_properties_for_update && unique_property_sets == other.unique_property_sets && valid_property_values == other.valid_property_values end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 186 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
166 167 168 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 166 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 175 def hash [format, required_properties, agent_properties, valid_properties_for_create, valid_properties_for_update, unique_property_sets, valid_property_values].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 219 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
213 214 215 |
# File 'lib/oci/stack_monitoring/models/system_format_resource_type_metadata_details.rb', line 213 def to_s to_hash.to_s end |