Class: OCI::Limits::Models::LimitDefinitionSummary
- Inherits:
-
Object
- Object
- OCI::Limits::Models::LimitDefinitionSummary
- Defined in:
- lib/oci/limits/models/limit_definition_summary.rb
Overview
The metadata specific to a resource limit definition.
Constant Summary collapse
- SCOPE_TYPE_ENUM =
[ SCOPE_TYPE_GLOBAL = 'GLOBAL'.freeze, SCOPE_TYPE_REGION = 'REGION'.freeze, SCOPE_TYPE_AD = 'AD'.freeze, SCOPE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#are_quotas_supported ⇒ BOOLEAN
If true, quota policies can be created on top of this resource limit.
-
#description ⇒ String
The limit description.
-
#external_location_supported_subscriptions ⇒ Array<String>
An array of subscription types that support ExternalLocations.
-
#is_deprecated ⇒ BOOLEAN
Indicates if the limit has been deprecated.
-
#is_dynamic ⇒ BOOLEAN
The limit for this resource has a dynamic value that is based on consumption across all OCI services.
-
#is_eligible_for_limit_increase ⇒ BOOLEAN
Indicates if the customer can request a limit increase for this resource.
-
#is_resource_availability_supported ⇒ BOOLEAN
Reflects whether or not the GetResourceAvailability API is supported for this limit.
-
#name ⇒ String
The resource limit name.
-
#scope_type ⇒ String
Reflects the scope of the resource limit, whether Global (across all regions), regional, or availability domain-specific.
-
#service_name ⇒ String
The service name of the limit.
-
#supported_quota_families ⇒ Array<String>
Supported quota family names for creation of quota policy.
-
#supported_subscriptions ⇒ Array<String>
An array of subscription types supported by the limit.
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 = {}) ⇒ LimitDefinitionSummary
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 = {}) ⇒ LimitDefinitionSummary
Initializes the object
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 136 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.name = attributes[:'name'] if attributes[:'name'] self.service_name = attributes[:'serviceName'] if attributes[:'serviceName'] raise 'You cannot provide both :serviceName and :service_name' if attributes.key?(:'serviceName') && attributes.key?(:'service_name') self.service_name = attributes[:'service_name'] if attributes[:'service_name'] self.description = attributes[:'description'] if attributes[:'description'] self.scope_type = attributes[:'scopeType'] if attributes[:'scopeType'] raise 'You cannot provide both :scopeType and :scope_type' if attributes.key?(:'scopeType') && attributes.key?(:'scope_type') self.scope_type = attributes[:'scope_type'] if attributes[:'scope_type'] self.are_quotas_supported = attributes[:'areQuotasSupported'] unless attributes[:'areQuotasSupported'].nil? raise 'You cannot provide both :areQuotasSupported and :are_quotas_supported' if attributes.key?(:'areQuotasSupported') && attributes.key?(:'are_quotas_supported') self.are_quotas_supported = attributes[:'are_quotas_supported'] unless attributes[:'are_quotas_supported'].nil? self.is_resource_availability_supported = attributes[:'isResourceAvailabilitySupported'] unless attributes[:'isResourceAvailabilitySupported'].nil? raise 'You cannot provide both :isResourceAvailabilitySupported and :is_resource_availability_supported' if attributes.key?(:'isResourceAvailabilitySupported') && attributes.key?(:'is_resource_availability_supported') self.is_resource_availability_supported = attributes[:'is_resource_availability_supported'] unless attributes[:'is_resource_availability_supported'].nil? self.is_deprecated = attributes[:'isDeprecated'] unless attributes[:'isDeprecated'].nil? raise 'You cannot provide both :isDeprecated and :is_deprecated' if attributes.key?(:'isDeprecated') && attributes.key?(:'is_deprecated') self.is_deprecated = attributes[:'is_deprecated'] unless attributes[:'is_deprecated'].nil? self.is_eligible_for_limit_increase = attributes[:'isEligibleForLimitIncrease'] unless attributes[:'isEligibleForLimitIncrease'].nil? raise 'You cannot provide both :isEligibleForLimitIncrease and :is_eligible_for_limit_increase' if attributes.key?(:'isEligibleForLimitIncrease') && attributes.key?(:'is_eligible_for_limit_increase') self.is_eligible_for_limit_increase = attributes[:'is_eligible_for_limit_increase'] unless attributes[:'is_eligible_for_limit_increase'].nil? self.is_dynamic = attributes[:'isDynamic'] unless attributes[:'isDynamic'].nil? raise 'You cannot provide both :isDynamic and :is_dynamic' if attributes.key?(:'isDynamic') && attributes.key?(:'is_dynamic') self.is_dynamic = attributes[:'is_dynamic'] unless attributes[:'is_dynamic'].nil? self.external_location_supported_subscriptions = attributes[:'externalLocationSupportedSubscriptions'] if attributes[:'externalLocationSupportedSubscriptions'] raise 'You cannot provide both :externalLocationSupportedSubscriptions and :external_location_supported_subscriptions' if attributes.key?(:'externalLocationSupportedSubscriptions') && attributes.key?(:'external_location_supported_subscriptions') self.external_location_supported_subscriptions = attributes[:'external_location_supported_subscriptions'] if attributes[:'external_location_supported_subscriptions'] self.supported_subscriptions = attributes[:'supportedSubscriptions'] if attributes[:'supportedSubscriptions'] raise 'You cannot provide both :supportedSubscriptions and :supported_subscriptions' if attributes.key?(:'supportedSubscriptions') && attributes.key?(:'supported_subscriptions') self.supported_subscriptions = attributes[:'supported_subscriptions'] if attributes[:'supported_subscriptions'] self.supported_quota_families = attributes[:'supportedQuotaFamilies'] if attributes[:'supportedQuotaFamilies'] raise 'You cannot provide both :supportedQuotaFamilies and :supported_quota_families' if attributes.key?(:'supportedQuotaFamilies') && attributes.key?(:'supported_quota_families') self.supported_quota_families = attributes[:'supported_quota_families'] if attributes[:'supported_quota_families'] end |
Instance Attribute Details
#are_quotas_supported ⇒ BOOLEAN
If true, quota policies can be created on top of this resource limit.
40 41 42 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 40 def are_quotas_supported @are_quotas_supported end |
#description ⇒ String
The limit description.
30 31 32 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 30 def description @description end |
#external_location_supported_subscriptions ⇒ Array<String>
An array of subscription types that support ExternalLocations.
66 67 68 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 66 def external_location_supported_subscriptions @external_location_supported_subscriptions end |
#is_deprecated ⇒ BOOLEAN
Indicates if the limit has been deprecated.
51 52 53 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 51 def is_deprecated @is_deprecated end |
#is_dynamic ⇒ BOOLEAN
The limit for this resource has a dynamic value that is based on consumption across all OCI services.
61 62 63 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 61 def is_dynamic @is_dynamic end |
#is_eligible_for_limit_increase ⇒ BOOLEAN
Indicates if the customer can request a limit increase for this resource.
56 57 58 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 56 def is_eligible_for_limit_increase @is_eligible_for_limit_increase end |
#is_resource_availability_supported ⇒ BOOLEAN
Reflects whether or not the GetResourceAvailability API is supported for this limit. If not, the API returns an empty JSON response.
46 47 48 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 46 def is_resource_availability_supported @is_resource_availability_supported end |
#name ⇒ String
The resource limit name. To be used for writing policies (in case of quotas) or other programmatic calls.
22 23 24 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 22 def name @name end |
#scope_type ⇒ String
Reflects the scope of the resource limit, whether Global (across all regions), regional, or availability domain-specific.
35 36 37 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 35 def scope_type @scope_type end |
#service_name ⇒ String
The service name of the limit.
26 27 28 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 26 def service_name @service_name end |
#supported_quota_families ⇒ Array<String>
Supported quota family names for creation of quota policy.
76 77 78 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 76 def supported_quota_families @supported_quota_families end |
#supported_subscriptions ⇒ Array<String>
An array of subscription types supported by the limit. For example, the type of subscription, such as SAAS, ERP, or CRM.
71 72 73 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 71 def supported_subscriptions @supported_subscriptions end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'service_name': :'serviceName', 'description': :'description', 'scope_type': :'scopeType', 'are_quotas_supported': :'areQuotasSupported', 'is_resource_availability_supported': :'isResourceAvailabilitySupported', 'is_deprecated': :'isDeprecated', 'is_eligible_for_limit_increase': :'isEligibleForLimitIncrease', 'is_dynamic': :'isDynamic', 'external_location_supported_subscriptions': :'externalLocationSupportedSubscriptions', 'supported_subscriptions': :'supportedSubscriptions', 'supported_quota_families': :'supportedQuotaFamilies' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 99 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'service_name': :'String', 'description': :'String', 'scope_type': :'String', 'are_quotas_supported': :'BOOLEAN', 'is_resource_availability_supported': :'BOOLEAN', 'is_deprecated': :'BOOLEAN', 'is_eligible_for_limit_increase': :'BOOLEAN', 'is_dynamic': :'BOOLEAN', 'external_location_supported_subscriptions': :'Array<String>', 'supported_subscriptions': :'Array<String>', 'supported_quota_families': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 227 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && service_name == other.service_name && description == other.description && scope_type == other.scope_type && are_quotas_supported == other.are_quotas_supported && is_resource_availability_supported == other.is_resource_availability_supported && is_deprecated == other.is_deprecated && is_eligible_for_limit_increase == other.is_eligible_for_limit_increase && is_dynamic == other.is_dynamic && external_location_supported_subscriptions == other.external_location_supported_subscriptions && supported_subscriptions == other.supported_subscriptions && supported_quota_families == other.supported_quota_families end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 268 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
248 249 250 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 248 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
257 258 259 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 257 def hash [name, service_name, description, scope_type, are_quotas_supported, is_resource_availability_supported, is_deprecated, is_eligible_for_limit_increase, is_dynamic, external_location_supported_subscriptions, supported_subscriptions, supported_quota_families].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
301 302 303 304 305 306 307 308 309 310 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 301 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
295 296 297 |
# File 'lib/oci/limits/models/limit_definition_summary.rb', line 295 def to_s to_hash.to_s end |