Class: OCI::StackMonitoring::Models::SearchMonitoredResourceAssociationsDetails
- Inherits:
-
Object
- Object
- OCI::StackMonitoring::Models::SearchMonitoredResourceAssociationsDetails
- Defined in:
- lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb
Overview
The information required to search monitored resource associations.
Constant Summary collapse
- SORT_BY_ENUM =
[ SORT_BY_TIME_CREATED = 'TIME_CREATED'.freeze, SORT_BY_ASSOC_TYPE = 'ASSOC_TYPE'.freeze ].freeze
- SORT_ORDER_ENUM =
[ SORT_ORDER_ASC = 'ASC'.freeze, SORT_ORDER_DESC = 'DESC'.freeze ].freeze
Instance Attribute Summary collapse
-
#association_type ⇒ String
Association type to be created between source and destination resources.
-
#compartment_id ⇒ String
**[Required]** Compartment Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
-
#destination_resource_id ⇒ String
Destination Monitored Resource Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
-
#destination_resource_name ⇒ String
Source Monitored Resource Name.
-
#destination_resource_type ⇒ String
Source Monitored Resource Type.
-
#sort_by ⇒ String
The field to sort by.
-
#sort_order ⇒ String
The sort order to use, either 'ASC' or 'DESC'.
-
#source_resource_id ⇒ String
Source Monitored Resource Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
-
#source_resource_name ⇒ String
Source Monitored Resource Name.
-
#source_resource_type ⇒ String
Source Monitored Resource Type.
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 = {}) ⇒ SearchMonitoredResourceAssociationsDetails
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 = {}) ⇒ SearchMonitoredResourceAssociationsDetails
Initializes the object
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 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 114 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.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.source_resource_id = attributes[:'sourceResourceId'] if attributes[:'sourceResourceId'] raise 'You cannot provide both :sourceResourceId and :source_resource_id' if attributes.key?(:'sourceResourceId') && attributes.key?(:'source_resource_id') self.source_resource_id = attributes[:'source_resource_id'] if attributes[:'source_resource_id'] self.source_resource_name = attributes[:'sourceResourceName'] if attributes[:'sourceResourceName'] raise 'You cannot provide both :sourceResourceName and :source_resource_name' if attributes.key?(:'sourceResourceName') && attributes.key?(:'source_resource_name') self.source_resource_name = attributes[:'source_resource_name'] if attributes[:'source_resource_name'] self.source_resource_type = attributes[:'sourceResourceType'] if attributes[:'sourceResourceType'] raise 'You cannot provide both :sourceResourceType and :source_resource_type' if attributes.key?(:'sourceResourceType') && attributes.key?(:'source_resource_type') self.source_resource_type = attributes[:'source_resource_type'] if attributes[:'source_resource_type'] self.destination_resource_id = attributes[:'destinationResourceId'] if attributes[:'destinationResourceId'] raise 'You cannot provide both :destinationResourceId and :destination_resource_id' if attributes.key?(:'destinationResourceId') && attributes.key?(:'destination_resource_id') self.destination_resource_id = attributes[:'destination_resource_id'] if attributes[:'destination_resource_id'] self.destination_resource_name = attributes[:'destinationResourceName'] if attributes[:'destinationResourceName'] raise 'You cannot provide both :destinationResourceName and :destination_resource_name' if attributes.key?(:'destinationResourceName') && attributes.key?(:'destination_resource_name') self.destination_resource_name = attributes[:'destination_resource_name'] if attributes[:'destination_resource_name'] self.destination_resource_type = attributes[:'destinationResourceType'] if attributes[:'destinationResourceType'] raise 'You cannot provide both :destinationResourceType and :destination_resource_type' if attributes.key?(:'destinationResourceType') && attributes.key?(:'destination_resource_type') self.destination_resource_type = attributes[:'destination_resource_type'] if attributes[:'destination_resource_type'] self.association_type = attributes[:'associationType'] if attributes[:'associationType'] raise 'You cannot provide both :associationType and :association_type' if attributes.key?(:'associationType') && attributes.key?(:'association_type') self.association_type = attributes[:'association_type'] if attributes[:'association_type'] self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy'] self.sort_by = "TIME_CREATED" if sort_by.nil? && !attributes.key?(:'sortBy') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :sortBy and :sort_by' if attributes.key?(:'sortBy') && attributes.key?(:'sort_by') self.sort_by = attributes[:'sort_by'] if attributes[:'sort_by'] self.sort_by = "TIME_CREATED" if sort_by.nil? && !attributes.key?(:'sortBy') && !attributes.key?(:'sort_by') # rubocop:disable Style/StringLiterals self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder'] raise 'You cannot provide both :sortOrder and :sort_order' if attributes.key?(:'sortOrder') && attributes.key?(:'sort_order') self.sort_order = attributes[:'sort_order'] if attributes[:'sort_order'] end |
Instance Attribute Details
#association_type ⇒ String
Association type to be created between source and destination resources
50 51 52 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 50 def association_type @association_type end |
#compartment_id ⇒ String
**[Required]** Compartment Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
22 23 24 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 22 def compartment_id @compartment_id end |
#destination_resource_id ⇒ String
Destination Monitored Resource Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
38 39 40 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 38 def destination_resource_id @destination_resource_id end |
#destination_resource_name ⇒ String
Source Monitored Resource Name
42 43 44 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 42 def destination_resource_name @destination_resource_name end |
#destination_resource_type ⇒ String
Source Monitored Resource Type
46 47 48 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 46 def destination_resource_type @destination_resource_type end |
#sort_by ⇒ String
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for assocType is descending.
56 57 58 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 56 def sort_by @sort_by end |
#sort_order ⇒ String
The sort order to use, either 'ASC' or 'DESC'.
60 61 62 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 60 def sort_order @sort_order end |
#source_resource_id ⇒ String
Source Monitored Resource Identifier [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)
26 27 28 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 26 def source_resource_id @source_resource_id end |
#source_resource_name ⇒ String
Source Monitored Resource Name
30 31 32 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 30 def source_resource_name @source_resource_name end |
#source_resource_type ⇒ String
Source Monitored Resource Type
34 35 36 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 34 def source_resource_type @source_resource_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 63 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'source_resource_id': :'sourceResourceId', 'source_resource_name': :'sourceResourceName', 'source_resource_type': :'sourceResourceType', 'destination_resource_id': :'destinationResourceId', 'destination_resource_name': :'destinationResourceName', 'destination_resource_type': :'destinationResourceType', 'association_type': :'associationType', 'sort_by': :'sortBy', 'sort_order': :'sortOrder' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 81 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'source_resource_id': :'String', 'source_resource_name': :'String', 'source_resource_type': :'String', 'destination_resource_id': :'String', 'destination_resource_name': :'String', 'destination_resource_type': :'String', 'association_type': :'String', 'sort_by': :'String', 'sort_order': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 206 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && source_resource_id == other.source_resource_id && source_resource_name == other.source_resource_name && source_resource_type == other.source_resource_type && destination_resource_id == other.destination_resource_id && destination_resource_name == other.destination_resource_name && destination_resource_type == other.destination_resource_type && association_type == other.association_type && sort_by == other.sort_by && sort_order == other.sort_order end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 245 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
225 226 227 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 225 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
234 235 236 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 234 def hash [compartment_id, source_resource_id, source_resource_name, source_resource_type, destination_resource_id, destination_resource_name, destination_resource_type, association_type, sort_by, sort_order].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 278 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
272 273 274 |
# File 'lib/oci/stack_monitoring/models/search_monitored_resource_associations_details.rb', line 272 def to_s to_hash.to_s end |