Class: OCI::Cims::Models::CreateLimitItemDetails
- Inherits:
-
CreateItemDetails
- Object
- CreateItemDetails
- OCI::Cims::Models::CreateLimitItemDetails
- Defined in:
- lib/oci/cims/models/create_limit_item_details.rb
Overview
Details about the service limit increase request. Avoid entering confidential information. For information about LIMIT
support tickets, see Creating a Service Limit Increase Request.
Instance Attribute Summary collapse
-
#current_limit ⇒ Integer
The limit of the resource currently available.
-
#current_usage ⇒ Integer
The current usage of the resource.
-
#requested_limit ⇒ Integer
The new service limit being requested.
Attributes inherited from CreateItemDetails
#category, #issue_type, #name, #sub_category, #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 = {}) ⇒ CreateLimitItemDetails
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 CreateItemDetails
Constructor Details
#initialize(attributes = {}) ⇒ CreateLimitItemDetails
Initializes the object
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 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 71 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'limit' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.current_limit = attributes[:'currentLimit'] if attributes[:'currentLimit'] raise 'You cannot provide both :currentLimit and :current_limit' if attributes.key?(:'currentLimit') && attributes.key?(:'current_limit') self.current_limit = attributes[:'current_limit'] if attributes[:'current_limit'] self.current_usage = attributes[:'currentUsage'] if attributes[:'currentUsage'] raise 'You cannot provide both :currentUsage and :current_usage' if attributes.key?(:'currentUsage') && attributes.key?(:'current_usage') self.current_usage = attributes[:'current_usage'] if attributes[:'current_usage'] self.requested_limit = attributes[:'requestedLimit'] if attributes[:'requestedLimit'] raise 'You cannot provide both :requestedLimit and :requested_limit' if attributes.key?(:'requestedLimit') && attributes.key?(:'requested_limit') self.requested_limit = attributes[:'requested_limit'] if attributes[:'requested_limit'] end |
Instance Attribute Details
#current_limit ⇒ Integer
The limit of the resource currently available.
16 17 18 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 16 def current_limit @current_limit end |
#current_usage ⇒ Integer
The current usage of the resource.
20 21 22 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 20 def current_usage @current_usage end |
#requested_limit ⇒ Integer
The new service limit being requested.
24 25 26 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 24 def requested_limit @requested_limit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 27 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'category': :'category', 'sub_category': :'subCategory', 'issue_type': :'issueType', 'name': :'name', 'current_limit': :'currentLimit', 'current_usage': :'currentUsage', 'requested_limit': :'requestedLimit' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 43 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'category': :'OCI::Cims::Models::CreateCategoryDetails', 'sub_category': :'OCI::Cims::Models::CreateSubCategoryDetails', 'issue_type': :'OCI::Cims::Models::CreateIssueTypeDetails', 'name': :'String', 'current_limit': :'Integer', 'current_usage': :'Integer', 'requested_limit': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 107 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && category == other.category && sub_category == other.sub_category && issue_type == other.issue_type && name == other.name && current_limit == other.current_limit && current_usage == other.current_usage && requested_limit == other.requested_limit end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 144 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
124 125 126 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 124 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
133 134 135 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 133 def hash [type, category, sub_category, issue_type, name, current_limit, current_usage, requested_limit].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 177 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
171 172 173 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 171 def to_s to_hash.to_s end |