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.
Constant Summary collapse
- LIMIT_STATUS_ENUM =
[ LIMIT_STATUS_APPROVED = 'APPROVED'.freeze, LIMIT_STATUS_PARTIALLY_APPROVED = 'PARTIALLY_APPROVED'.freeze, LIMIT_STATUS_NOT_APPROVED = 'NOT_APPROVED'.freeze ].freeze
Instance Attribute Summary collapse
-
#current_limit ⇒ Integer
The limit of the resource currently available.
-
#current_usage ⇒ Integer
The current usage of the resource.
-
#limit_status ⇒ String
The current status of the request.
-
#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
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 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 82 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'] self.limit_status = attributes[:'limitStatus'] if attributes[:'limitStatus'] raise 'You cannot provide both :limitStatus and :limit_status' if attributes.key?(:'limitStatus') && attributes.key?(:'limit_status') self.limit_status = attributes[:'limit_status'] if attributes[:'limit_status'] end |
Instance Attribute Details
#current_limit ⇒ Integer
The limit of the resource currently available.
20 21 22 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 20 def current_limit @current_limit end |
#current_usage ⇒ Integer
The current usage of the resource.
24 25 26 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 24 def current_usage @current_usage end |
#limit_status ⇒ String
The current status of the request.
32 33 34 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 32 def limit_status @limit_status end |
#requested_limit ⇒ Integer
The new service limit being requested.
28 29 30 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 28 def requested_limit @requested_limit end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 35 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', 'limit_status': :'limitStatus' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 52 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', 'limit_status': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 132 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 && limit_status == other.limit_status end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 170 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
150 151 152 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 150 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
159 160 161 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 159 def hash [type, category, sub_category, issue_type, name, current_limit, current_usage, requested_limit, limit_status].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
203 204 205 206 207 208 209 210 211 212 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 203 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
197 198 199 |
# File 'lib/oci/cims/models/create_limit_item_details.rb', line 197 def to_s to_hash.to_s end |