Class: OCI::LogAnalytics::Models::DependentSource
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::DependentSource
- Defined in:
- lib/oci/log_analytics/models/dependent_source.rb
Overview
A source that uses the parser, either directly or indirectly.
Instance Attribute Summary collapse
-
#dependencies ⇒ Array<OCI::LogAnalytics::Models::Dependency>
The list of dependencies defined by the source.
-
#entity_types ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsSourceEntityType>
The entity types.
-
#is_auto_association_enabled ⇒ BOOLEAN
A flag indicating whether or not the source is marked for auto association.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#source_display_name ⇒ String
The source display name.
-
#source_id ⇒ Integer
The source unique identifier.
-
#source_name ⇒ String
The source name.
-
#source_type ⇒ String
The source 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 = {}) ⇒ DependentSource
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 = {}) ⇒ DependentSource
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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 92 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.source_name = attributes[:'sourceName'] if attributes[:'sourceName'] raise 'You cannot provide both :sourceName and :source_name' if attributes.key?(:'sourceName') && attributes.key?(:'source_name') self.source_name = attributes[:'source_name'] if attributes[:'source_name'] self.source_display_name = attributes[:'sourceDisplayName'] if attributes[:'sourceDisplayName'] raise 'You cannot provide both :sourceDisplayName and :source_display_name' if attributes.key?(:'sourceDisplayName') && attributes.key?(:'source_display_name') self.source_display_name = attributes[:'source_display_name'] if attributes[:'source_display_name'] self.source_id = attributes[:'sourceId'] if attributes[:'sourceId'] raise 'You cannot provide both :sourceId and :source_id' if attributes.key?(:'sourceId') && attributes.key?(:'source_id') self.source_id = attributes[:'source_id'] if attributes[:'source_id'] self.source_type = attributes[:'sourceType'] if attributes[:'sourceType'] raise 'You cannot provide both :sourceType and :source_type' if attributes.key?(:'sourceType') && attributes.key?(:'source_type') self.source_type = attributes[:'source_type'] if attributes[:'source_type'] self.is_system = attributes[:'isSystem'] unless attributes[:'isSystem'].nil? raise 'You cannot provide both :isSystem and :is_system' if attributes.key?(:'isSystem') && attributes.key?(:'is_system') self.is_system = attributes[:'is_system'] unless attributes[:'is_system'].nil? self.is_auto_association_enabled = attributes[:'isAutoAssociationEnabled'] unless attributes[:'isAutoAssociationEnabled'].nil? raise 'You cannot provide both :isAutoAssociationEnabled and :is_auto_association_enabled' if attributes.key?(:'isAutoAssociationEnabled') && attributes.key?(:'is_auto_association_enabled') self.is_auto_association_enabled = attributes[:'is_auto_association_enabled'] unless attributes[:'is_auto_association_enabled'].nil? self.entity_types = attributes[:'entityTypes'] if attributes[:'entityTypes'] raise 'You cannot provide both :entityTypes and :entity_types' if attributes.key?(:'entityTypes') && attributes.key?(:'entity_types') self.entity_types = attributes[:'entity_types'] if attributes[:'entity_types'] self.dependencies = attributes[:'dependencies'] if attributes[:'dependencies'] end |
Instance Attribute Details
#dependencies ⇒ Array<OCI::LogAnalytics::Models::Dependency>
The list of dependencies defined by the source.
44 45 46 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 44 def dependencies @dependencies end |
#entity_types ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsSourceEntityType>
The entity types.
40 41 42 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 40 def entity_types @entity_types end |
#is_auto_association_enabled ⇒ BOOLEAN
A flag indicating whether or not the source is marked for auto association.
36 37 38 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 36 def is_auto_association_enabled @is_auto_association_enabled end |
#is_system ⇒ BOOLEAN
The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
31 32 33 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 31 def is_system @is_system end |
#source_display_name ⇒ String
The source display name.
17 18 19 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 17 def source_display_name @source_display_name end |
#source_id ⇒ Integer
The source unique identifier.
21 22 23 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 21 def source_id @source_id end |
#source_name ⇒ String
The source name.
13 14 15 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 13 def source_name @source_name end |
#source_type ⇒ String
The source type.
25 26 27 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 25 def source_type @source_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 47 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'source_name': :'sourceName', 'source_display_name': :'sourceDisplayName', 'source_id': :'sourceId', 'source_type': :'sourceType', 'is_system': :'isSystem', 'is_auto_association_enabled': :'isAutoAssociationEnabled', 'entity_types': :'entityTypes', 'dependencies': :'dependencies' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 63 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'source_name': :'String', 'source_display_name': :'String', 'source_id': :'Integer', 'source_type': :'String', 'is_system': :'BOOLEAN', 'is_auto_association_enabled': :'BOOLEAN', 'entity_types': :'Array<OCI::LogAnalytics::Models::LogAnalyticsSourceEntityType>', 'dependencies': :'Array<OCI::LogAnalytics::Models::Dependency>' # 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 162 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 150 def ==(other) return true if equal?(other) self.class == other.class && source_name == other.source_name && source_display_name == other.source_display_name && source_id == other.source_id && source_type == other.source_type && is_system == other.is_system && is_auto_association_enabled == other.is_auto_association_enabled && entity_types == other.entity_types && dependencies == other.dependencies end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 187 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
167 168 169 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 167 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
176 177 178 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 176 def hash [source_name, source_display_name, source_id, source_type, is_system, is_auto_association_enabled, entity_types, dependencies].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 220 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
214 215 216 |
# File 'lib/oci/log_analytics/models/dependent_source.rb', line 214 def to_s to_hash.to_s end |