Class: OCI::LimitsIncrease::Models::LimitsIncreaseQuestionSummary
- Inherits:
-
Object
- Object
- OCI::LimitsIncrease::Models::LimitsIncreaseQuestionSummary
- Defined in:
- lib/oci/limits_increase/models/limits_increase_question_summary.rb
Overview
A summary of properties for a question to be asked for a certain limit. Example questions include database version for some limits in Autonomous AI Database or email domain for some limits in Email Delivery. For more information, see Creating a Limit Increase Request.
Constant Summary collapse
- QUESTION_TYPE_ENUM =
[ QUESTION_TYPE_TEXT = 'TEXT'.freeze, QUESTION_TYPE_NUMBER = 'NUMBER'.freeze, QUESTION_TYPE_RADIO = 'RADIO'.freeze, QUESTION_TYPE_CHECKBOX = 'CHECKBOX'.freeze, QUESTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#id ⇒ String
[Required] The OCID of the question.
-
#is_required ⇒ BOOLEAN
[Required] When
true, requires an answer to the question. -
#limit_name ⇒ String
The name of the limit for the question (empty if the question is for the service).
-
#options ⇒ Hash<String, String>
Set options for the question.
-
#question_text ⇒ String
[Required] The text for the question.
-
#question_type ⇒ String
[Required] The type of question.
-
#service ⇒ String
[Required] The name of the service for the question.
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 = {}) ⇒ LimitsIncreaseQuestionSummary
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 = {}) ⇒ LimitsIncreaseQuestionSummary
Initializes the object
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 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 95 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.id = attributes[:'id'] if attributes[:'id'] self.service = attributes[:'service'] if attributes[:'service'] self.limit_name = attributes[:'limitName'] if attributes[:'limitName'] raise 'You cannot provide both :limitName and :limit_name' if attributes.key?(:'limitName') && attributes.key?(:'limit_name') self.limit_name = attributes[:'limit_name'] if attributes[:'limit_name'] self.question_text = attributes[:'questionText'] if attributes[:'questionText'] raise 'You cannot provide both :questionText and :question_text' if attributes.key?(:'questionText') && attributes.key?(:'question_text') self.question_text = attributes[:'question_text'] if attributes[:'question_text'] self.question_type = attributes[:'questionType'] if attributes[:'questionType'] raise 'You cannot provide both :questionType and :question_type' if attributes.key?(:'questionType') && attributes.key?(:'question_type') self.question_type = attributes[:'question_type'] if attributes[:'question_type'] self. = attributes[:'options'] if attributes[:'options'] self.is_required = attributes[:'isRequired'] unless attributes[:'isRequired'].nil? raise 'You cannot provide both :isRequired and :is_required' if attributes.key?(:'isRequired') && attributes.key?(:'is_required') self.is_required = attributes[:'is_required'] unless attributes[:'is_required'].nil? end |
Instance Attribute Details
#id ⇒ String
[Required] The OCID of the question.
26 27 28 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 26 def id @id end |
#is_required ⇒ BOOLEAN
[Required] When true, requires an answer to the question.
50 51 52 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 50 def is_required @is_required end |
#limit_name ⇒ String
The name of the limit for the question (empty if the question is for the service).
34 35 36 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 34 def limit_name @limit_name end |
#options ⇒ Hash<String, String>
Set options for the question. Applies to questions that aren't free text.
46 47 48 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 46 def @options end |
#question_text ⇒ String
[Required] The text for the question.
38 39 40 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 38 def question_text @question_text end |
#question_type ⇒ String
[Required] The type of question.
42 43 44 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 42 def question_type @question_type end |
#service ⇒ String
[Required] The name of the service for the question.
30 31 32 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 30 def service @service end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 53 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'service': :'service', 'limit_name': :'limitName', 'question_text': :'questionText', 'question_type': :'questionType', 'options': :'options', 'is_required': :'isRequired' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'service': :'String', 'limit_name': :'String', 'question_text': :'String', 'question_type': :'String', 'options': :'Hash<String, String>', 'is_required': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 152 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && service == other.service && limit_name == other.limit_name && question_text == other.question_text && question_type == other.question_type && == other. && is_required == other.is_required end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 188 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
168 169 170 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 168 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
177 178 179 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 177 def hash [id, service, limit_name, question_text, question_type, , is_required].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 221 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
215 216 217 |
# File 'lib/oci/limits_increase/models/limits_increase_question_summary.rb', line 215 def to_s to_hash.to_s end |