Class: OCI::Opsi::Models::NewsContentTypes
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::NewsContentTypes
- Defined in:
- lib/oci/opsi/models/news_content_types.rb
Overview
Content types that the news report can handle.
Instance Attribute Summary collapse
-
#capacity_planning_resources ⇒ Array<OCI::Opsi::Models::NewsContentTypesResource>
Supported resources for capacity planning content type.
-
#sql_insights_fleet_analysis_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - fleet analysis content type.
-
#sql_insights_performance_degradation_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - performance degradation content type.
-
#sql_insights_plan_changes_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - plan changes content type.
-
#sql_insights_top_databases_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top databases content type.
-
#sql_insights_top_sql_by_insights_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top SQL by insights content type.
-
#sql_insights_top_sql_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top SQL content 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 = {}) ⇒ NewsContentTypes
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 = {}) ⇒ NewsContentTypes
Initializes the object
82 83 84 85 86 87 88 89 90 91 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 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 82 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.capacity_planning_resources = attributes[:'capacityPlanningResources'] if attributes[:'capacityPlanningResources'] raise 'You cannot provide both :capacityPlanningResources and :capacity_planning_resources' if attributes.key?(:'capacityPlanningResources') && attributes.key?(:'capacity_planning_resources') self.capacity_planning_resources = attributes[:'capacity_planning_resources'] if attributes[:'capacity_planning_resources'] self.sql_insights_fleet_analysis_resources = attributes[:'sqlInsightsFleetAnalysisResources'] if attributes[:'sqlInsightsFleetAnalysisResources'] raise 'You cannot provide both :sqlInsightsFleetAnalysisResources and :sql_insights_fleet_analysis_resources' if attributes.key?(:'sqlInsightsFleetAnalysisResources') && attributes.key?(:'sql_insights_fleet_analysis_resources') self.sql_insights_fleet_analysis_resources = attributes[:'sql_insights_fleet_analysis_resources'] if attributes[:'sql_insights_fleet_analysis_resources'] self.sql_insights_plan_changes_resources = attributes[:'sqlInsightsPlanChangesResources'] if attributes[:'sqlInsightsPlanChangesResources'] raise 'You cannot provide both :sqlInsightsPlanChangesResources and :sql_insights_plan_changes_resources' if attributes.key?(:'sqlInsightsPlanChangesResources') && attributes.key?(:'sql_insights_plan_changes_resources') self.sql_insights_plan_changes_resources = attributes[:'sql_insights_plan_changes_resources'] if attributes[:'sql_insights_plan_changes_resources'] self.sql_insights_top_databases_resources = attributes[:'sqlInsightsTopDatabasesResources'] if attributes[:'sqlInsightsTopDatabasesResources'] raise 'You cannot provide both :sqlInsightsTopDatabasesResources and :sql_insights_top_databases_resources' if attributes.key?(:'sqlInsightsTopDatabasesResources') && attributes.key?(:'sql_insights_top_databases_resources') self.sql_insights_top_databases_resources = attributes[:'sql_insights_top_databases_resources'] if attributes[:'sql_insights_top_databases_resources'] self.sql_insights_top_sql_by_insights_resources = attributes[:'sqlInsightsTopSqlByInsightsResources'] if attributes[:'sqlInsightsTopSqlByInsightsResources'] raise 'You cannot provide both :sqlInsightsTopSqlByInsightsResources and :sql_insights_top_sql_by_insights_resources' if attributes.key?(:'sqlInsightsTopSqlByInsightsResources') && attributes.key?(:'sql_insights_top_sql_by_insights_resources') self.sql_insights_top_sql_by_insights_resources = attributes[:'sql_insights_top_sql_by_insights_resources'] if attributes[:'sql_insights_top_sql_by_insights_resources'] self.sql_insights_top_sql_resources = attributes[:'sqlInsightsTopSqlResources'] if attributes[:'sqlInsightsTopSqlResources'] raise 'You cannot provide both :sqlInsightsTopSqlResources and :sql_insights_top_sql_resources' if attributes.key?(:'sqlInsightsTopSqlResources') && attributes.key?(:'sql_insights_top_sql_resources') self.sql_insights_top_sql_resources = attributes[:'sql_insights_top_sql_resources'] if attributes[:'sql_insights_top_sql_resources'] self.sql_insights_performance_degradation_resources = attributes[:'sqlInsightsPerformanceDegradationResources'] if attributes[:'sqlInsightsPerformanceDegradationResources'] raise 'You cannot provide both :sqlInsightsPerformanceDegradationResources and :sql_insights_performance_degradation_resources' if attributes.key?(:'sqlInsightsPerformanceDegradationResources') && attributes.key?(:'sql_insights_performance_degradation_resources') self.sql_insights_performance_degradation_resources = attributes[:'sql_insights_performance_degradation_resources'] if attributes[:'sql_insights_performance_degradation_resources'] end |
Instance Attribute Details
#capacity_planning_resources ⇒ Array<OCI::Opsi::Models::NewsContentTypesResource>
Supported resources for capacity planning content type.
13 14 15 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 13 def capacity_planning_resources @capacity_planning_resources end |
#sql_insights_fleet_analysis_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - fleet analysis content type.
17 18 19 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 17 def sql_insights_fleet_analysis_resources @sql_insights_fleet_analysis_resources end |
#sql_insights_performance_degradation_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - performance degradation content type.
37 38 39 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 37 def sql_insights_performance_degradation_resources @sql_insights_performance_degradation_resources end |
#sql_insights_plan_changes_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - plan changes content type.
21 22 23 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 21 def sql_insights_plan_changes_resources @sql_insights_plan_changes_resources end |
#sql_insights_top_databases_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top databases content type.
25 26 27 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 25 def sql_insights_top_databases_resources @sql_insights_top_databases_resources end |
#sql_insights_top_sql_by_insights_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top SQL by insights content type.
29 30 31 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 29 def sql_insights_top_sql_by_insights_resources @sql_insights_top_sql_by_insights_resources end |
#sql_insights_top_sql_resources ⇒ Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>
Supported resources for SQL insights - top SQL content type.
33 34 35 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 33 def sql_insights_top_sql_resources @sql_insights_top_sql_resources end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 40 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'capacity_planning_resources': :'capacityPlanningResources', 'sql_insights_fleet_analysis_resources': :'sqlInsightsFleetAnalysisResources', 'sql_insights_plan_changes_resources': :'sqlInsightsPlanChangesResources', 'sql_insights_top_databases_resources': :'sqlInsightsTopDatabasesResources', 'sql_insights_top_sql_by_insights_resources': :'sqlInsightsTopSqlByInsightsResources', 'sql_insights_top_sql_resources': :'sqlInsightsTopSqlResources', 'sql_insights_performance_degradation_resources': :'sqlInsightsPerformanceDegradationResources' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'capacity_planning_resources': :'Array<OCI::Opsi::Models::NewsContentTypesResource>', 'sql_insights_fleet_analysis_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>', 'sql_insights_plan_changes_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>', 'sql_insights_top_databases_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>', 'sql_insights_top_sql_by_insights_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>', 'sql_insights_top_sql_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>', 'sql_insights_performance_degradation_resources': :'Array<OCI::Opsi::Models::NewsSqlInsightsContentTypesResource>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 138 def ==(other) return true if equal?(other) self.class == other.class && capacity_planning_resources == other.capacity_planning_resources && sql_insights_fleet_analysis_resources == other.sql_insights_fleet_analysis_resources && sql_insights_plan_changes_resources == other.sql_insights_plan_changes_resources && sql_insights_top_databases_resources == other.sql_insights_top_databases_resources && sql_insights_top_sql_by_insights_resources == other.sql_insights_top_sql_by_insights_resources && sql_insights_top_sql_resources == other.sql_insights_top_sql_resources && sql_insights_performance_degradation_resources == other.sql_insights_performance_degradation_resources end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 174 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
154 155 156 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 154 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
163 164 165 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 163 def hash [capacity_planning_resources, sql_insights_fleet_analysis_resources, sql_insights_plan_changes_resources, sql_insights_top_databases_resources, sql_insights_top_sql_by_insights_resources, sql_insights_top_sql_resources, sql_insights_performance_degradation_resources].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 207 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
201 202 203 |
# File 'lib/oci/opsi/models/news_content_types.rb', line 201 def to_s to_hash.to_s end |