Class: OCI::StackMonitoring::Models::SqlUpdateQueryProperties
- Inherits:
- 
      MetricExtensionUpdateQueryProperties
      
        - Object
- MetricExtensionUpdateQueryProperties
- OCI::StackMonitoring::Models::SqlUpdateQueryProperties
 
- Defined in:
- lib/oci/stack_monitoring/models/sql_update_query_properties.rb
Overview
Query Properties applicable to SQL type of collection method
Constant Summary collapse
- SQL_TYPE_ENUM =
- [ SQL_TYPE_STATEMENT = 'STATEMENT'.freeze, SQL_TYPE_SQL_SCRIPT = 'SQL_SCRIPT'.freeze ].freeze 
Constants inherited from MetricExtensionUpdateQueryProperties
MetricExtensionUpdateQueryProperties::COLLECTION_METHOD_ENUM
Instance Attribute Summary collapse
- 
  
    
      #in_param_details  ⇒ Array<OCI::StackMonitoring::Models::SqlInParamDetails> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    List of values and position of PL/SQL procedure IN parameters. 
- #out_param_details ⇒ OCI::StackMonitoring::Models::SqlOutParamDetails
- #sql_details ⇒ OCI::StackMonitoring::Models::SqlDetails
- 
  
    
      #sql_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Type of SQL data collection method i.e. 
Attributes inherited from MetricExtensionUpdateQueryProperties
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 = {})  ⇒ SqlUpdateQueryProperties 
    
    
  
  
  
    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 MetricExtensionUpdateQueryProperties
Constructor Details
#initialize(attributes = {}) ⇒ SqlUpdateQueryProperties
Initializes the object
| 67 68 69 70 71 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 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 67 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['collectionMethod'] = 'SQL' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.sql_type = attributes[:'sqlType'] if attributes[:'sqlType'] raise 'You cannot provide both :sqlType and :sql_type' if attributes.key?(:'sqlType') && attributes.key?(:'sql_type') self.sql_type = attributes[:'sql_type'] if attributes[:'sql_type'] self.sql_details = attributes[:'sqlDetails'] if attributes[:'sqlDetails'] raise 'You cannot provide both :sqlDetails and :sql_details' if attributes.key?(:'sqlDetails') && attributes.key?(:'sql_details') self.sql_details = attributes[:'sql_details'] if attributes[:'sql_details'] self.in_param_details = attributes[:'inParamDetails'] if attributes[:'inParamDetails'] raise 'You cannot provide both :inParamDetails and :in_param_details' if attributes.key?(:'inParamDetails') && attributes.key?(:'in_param_details') self.in_param_details = attributes[:'in_param_details'] if attributes[:'in_param_details'] self.out_param_details = attributes[:'outParamDetails'] if attributes[:'outParamDetails'] raise 'You cannot provide both :outParamDetails and :out_param_details' if attributes.key?(:'outParamDetails') && attributes.key?(:'out_param_details') self.out_param_details = attributes[:'out_param_details'] if attributes[:'out_param_details'] end | 
Instance Attribute Details
#in_param_details ⇒ Array<OCI::StackMonitoring::Models::SqlInParamDetails>
List of values and position of PL/SQL procedure IN parameters
| 26 27 28 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 26 def in_param_details @in_param_details end | 
#out_param_details ⇒ OCI::StackMonitoring::Models::SqlOutParamDetails
| 29 30 31 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 29 def out_param_details @out_param_details end | 
#sql_details ⇒ OCI::StackMonitoring::Models::SqlDetails
| 22 23 24 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 22 def sql_details @sql_details end | 
#sql_type ⇒ String
Type of SQL data collection method i.e. either a Statement or SQL Script File
| 19 20 21 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 19 def sql_type @sql_type end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 32 33 34 35 36 37 38 39 40 41 42 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 32 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'collection_method': :'collectionMethod', 'sql_type': :'sqlType', 'sql_details': :'sqlDetails', 'in_param_details': :'inParamDetails', 'out_param_details': :'outParamDetails' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 45 46 47 48 49 50 51 52 53 54 55 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 45 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'collection_method': :'String', 'sql_type': :'String', 'sql_details': :'OCI::StackMonitoring::Models::SqlDetails', 'in_param_details': :'Array<OCI::StackMonitoring::Models::SqlInParamDetails>', 'out_param_details': :'OCI::StackMonitoring::Models::SqlOutParamDetails' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 117 118 119 120 121 122 123 124 125 126 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 117 def ==(other) return true if equal?(other) self.class == other.class && collection_method == other.collection_method && sql_type == other.sql_type && sql_details == other.sql_details && in_param_details == other.in_param_details && out_param_details == other.out_param_details end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 151 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
| 131 132 133 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 131 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 140 141 142 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 140 def hash [collection_method, sql_type, sql_details, in_param_details, out_param_details].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 184 185 186 187 188 189 190 191 192 193 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 184 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
| 178 179 180 | # File 'lib/oci/stack_monitoring/models/sql_update_query_properties.rb', line 178 def to_s to_hash.to_s end |