Class: OCI::GoldenGate::Models::DeploymentEnvironmentSummary
- Inherits:
-
Object
- Object
- OCI::GoldenGate::Models::DeploymentEnvironmentSummary
- Defined in:
- lib/oci/golden_gate/models/deployment_environment_summary.rb
Overview
The metadata specific to a production or development/testing environment.
Constant Summary collapse
- ENVIRONMENT_TYPE_ENUM =
[ ENVIRONMENT_TYPE_PRODUCTION = 'PRODUCTION'.freeze, ENVIRONMENT_TYPE_DEVELOPMENT_OR_TESTING = 'DEVELOPMENT_OR_TESTING'.freeze, ENVIRONMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CATEGORY_ENUM =
[ CATEGORY_DATA_REPLICATION = 'DATA_REPLICATION'.freeze, CATEGORY_STREAM_ANALYTICS = 'STREAM_ANALYTICS'.freeze, CATEGORY_DATA_TRANSFORMS = 'DATA_TRANSFORMS'.freeze, CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#category ⇒ String
[Required] The deployment category defines the broad separation of the deployment type into three categories.
-
#default_cpu_core_count ⇒ Integer
[Required] The default CPU core count.
-
#display_name ⇒ String
An object's Display Name.
-
#environment_type ⇒ String
[Required] Specifies whether the deployment is used in a production or development/testing environment.
-
#is_auto_scaling_enabled_by_default ⇒ BOOLEAN
[Required] Specifies whether the "Auto scaling" option should be enabled by default or not.
-
#max_cpu_core_count ⇒ Integer
[Required] The maximum CPU core count.
-
#memory_per_ocpu_in_gbs ⇒ Integer
[Required] The multiplier value between CPU core count and memory size.
-
#min_cpu_core_count ⇒ Integer
[Required] The minimum CPU core count.
-
#network_bandwidth_per_ocpu_in_gbps ⇒ Integer
[Required] The multiplier value between CPU core count and network bandwidth.
-
#storage_usage_limit_per_ocpu_in_gbs ⇒ Integer
[Required] The multiplier value between CPU core count and storage usage limit size.
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 = {}) ⇒ DeploymentEnvironmentSummary
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 = {}) ⇒ DeploymentEnvironmentSummary
Initializes the object
129 130 131 132 133 134 135 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 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 129 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.environment_type = attributes[:'environmentType'] if attributes[:'environmentType'] raise 'You cannot provide both :environmentType and :environment_type' if attributes.key?(:'environmentType') && attributes.key?(:'environment_type') self.environment_type = attributes[:'environment_type'] if attributes[:'environment_type'] self.category = attributes[:'category'] if attributes[:'category'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.min_cpu_core_count = attributes[:'minCpuCoreCount'] if attributes[:'minCpuCoreCount'] raise 'You cannot provide both :minCpuCoreCount and :min_cpu_core_count' if attributes.key?(:'minCpuCoreCount') && attributes.key?(:'min_cpu_core_count') self.min_cpu_core_count = attributes[:'min_cpu_core_count'] if attributes[:'min_cpu_core_count'] self.default_cpu_core_count = attributes[:'defaultCpuCoreCount'] if attributes[:'defaultCpuCoreCount'] raise 'You cannot provide both :defaultCpuCoreCount and :default_cpu_core_count' if attributes.key?(:'defaultCpuCoreCount') && attributes.key?(:'default_cpu_core_count') self.default_cpu_core_count = attributes[:'default_cpu_core_count'] if attributes[:'default_cpu_core_count'] self.max_cpu_core_count = attributes[:'maxCpuCoreCount'] if attributes[:'maxCpuCoreCount'] raise 'You cannot provide both :maxCpuCoreCount and :max_cpu_core_count' if attributes.key?(:'maxCpuCoreCount') && attributes.key?(:'max_cpu_core_count') self.max_cpu_core_count = attributes[:'max_cpu_core_count'] if attributes[:'max_cpu_core_count'] self.is_auto_scaling_enabled_by_default = attributes[:'isAutoScalingEnabledByDefault'] unless attributes[:'isAutoScalingEnabledByDefault'].nil? raise 'You cannot provide both :isAutoScalingEnabledByDefault and :is_auto_scaling_enabled_by_default' if attributes.key?(:'isAutoScalingEnabledByDefault') && attributes.key?(:'is_auto_scaling_enabled_by_default') self.is_auto_scaling_enabled_by_default = attributes[:'is_auto_scaling_enabled_by_default'] unless attributes[:'is_auto_scaling_enabled_by_default'].nil? self.network_bandwidth_per_ocpu_in_gbps = attributes[:'networkBandwidthPerOcpuInGbps'] if attributes[:'networkBandwidthPerOcpuInGbps'] raise 'You cannot provide both :networkBandwidthPerOcpuInGbps and :network_bandwidth_per_ocpu_in_gbps' if attributes.key?(:'networkBandwidthPerOcpuInGbps') && attributes.key?(:'network_bandwidth_per_ocpu_in_gbps') self.network_bandwidth_per_ocpu_in_gbps = attributes[:'network_bandwidth_per_ocpu_in_gbps'] if attributes[:'network_bandwidth_per_ocpu_in_gbps'] self.memory_per_ocpu_in_gbs = attributes[:'memoryPerOcpuInGBs'] if attributes[:'memoryPerOcpuInGBs'] raise 'You cannot provide both :memoryPerOcpuInGBs and :memory_per_ocpu_in_gbs' if attributes.key?(:'memoryPerOcpuInGBs') && attributes.key?(:'memory_per_ocpu_in_gbs') self.memory_per_ocpu_in_gbs = attributes[:'memory_per_ocpu_in_gbs'] if attributes[:'memory_per_ocpu_in_gbs'] self.storage_usage_limit_per_ocpu_in_gbs = attributes[:'storageUsageLimitPerOcpuInGBs'] if attributes[:'storageUsageLimitPerOcpuInGBs'] raise 'You cannot provide both :storageUsageLimitPerOcpuInGBs and :storage_usage_limit_per_ocpu_in_gbs' if attributes.key?(:'storageUsageLimitPerOcpuInGBs') && attributes.key?(:'storage_usage_limit_per_ocpu_in_gbs') self.storage_usage_limit_per_ocpu_in_gbs = attributes[:'storage_usage_limit_per_ocpu_in_gbs'] if attributes[:'storage_usage_limit_per_ocpu_in_gbs'] end |
Instance Attribute Details
#category ⇒ String
[Required] The deployment category defines the broad separation of the deployment type into three categories. Currently the separation is 'DATA_REPLICATION', 'STREAM_ANALYTICS' and 'DATA_TRANSFORMS'.
35 36 37 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 35 def category @category end |
#default_cpu_core_count ⇒ Integer
[Required] The default CPU core count.
50 51 52 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 50 def default_cpu_core_count @default_cpu_core_count end |
#display_name ⇒ String
An object's Display Name.
40 41 42 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 40 def display_name @display_name end |
#environment_type ⇒ String
[Required] Specifies whether the deployment is used in a production or development/testing environment.
29 30 31 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 29 def environment_type @environment_type end |
#is_auto_scaling_enabled_by_default ⇒ BOOLEAN
[Required] Specifies whether the "Auto scaling" option should be enabled by default or not.
60 61 62 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 60 def is_auto_scaling_enabled_by_default @is_auto_scaling_enabled_by_default end |
#max_cpu_core_count ⇒ Integer
[Required] The maximum CPU core count.
55 56 57 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 55 def max_cpu_core_count @max_cpu_core_count end |
#memory_per_ocpu_in_gbs ⇒ Integer
[Required] The multiplier value between CPU core count and memory size.
70 71 72 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 70 def memory_per_ocpu_in_gbs @memory_per_ocpu_in_gbs end |
#min_cpu_core_count ⇒ Integer
[Required] The minimum CPU core count.
45 46 47 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 45 def min_cpu_core_count @min_cpu_core_count end |
#network_bandwidth_per_ocpu_in_gbps ⇒ Integer
[Required] The multiplier value between CPU core count and network bandwidth.
65 66 67 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 65 def network_bandwidth_per_ocpu_in_gbps @network_bandwidth_per_ocpu_in_gbps end |
#storage_usage_limit_per_ocpu_in_gbs ⇒ Integer
[Required] The multiplier value between CPU core count and storage usage limit size.
75 76 77 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 75 def storage_usage_limit_per_ocpu_in_gbs @storage_usage_limit_per_ocpu_in_gbs end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 78 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'environment_type': :'environmentType', 'category': :'category', 'display_name': :'displayName', 'min_cpu_core_count': :'minCpuCoreCount', 'default_cpu_core_count': :'defaultCpuCoreCount', 'max_cpu_core_count': :'maxCpuCoreCount', 'is_auto_scaling_enabled_by_default': :'isAutoScalingEnabledByDefault', 'network_bandwidth_per_ocpu_in_gbps': :'networkBandwidthPerOcpuInGbps', 'memory_per_ocpu_in_gbs': :'memoryPerOcpuInGBs', 'storage_usage_limit_per_ocpu_in_gbs': :'storageUsageLimitPerOcpuInGBs' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 96 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'environment_type': :'String', 'category': :'String', 'display_name': :'String', 'min_cpu_core_count': :'Integer', 'default_cpu_core_count': :'Integer', 'max_cpu_core_count': :'Integer', 'is_auto_scaling_enabled_by_default': :'BOOLEAN', 'network_bandwidth_per_ocpu_in_gbps': :'Integer', 'memory_per_ocpu_in_gbs': :'Integer', 'storage_usage_limit_per_ocpu_in_gbs': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 225 def ==(other) return true if equal?(other) self.class == other.class && environment_type == other.environment_type && category == other.category && display_name == other.display_name && min_cpu_core_count == other.min_cpu_core_count && default_cpu_core_count == other.default_cpu_core_count && max_cpu_core_count == other.max_cpu_core_count && is_auto_scaling_enabled_by_default == other.is_auto_scaling_enabled_by_default && network_bandwidth_per_ocpu_in_gbps == other.network_bandwidth_per_ocpu_in_gbps && memory_per_ocpu_in_gbs == other.memory_per_ocpu_in_gbs && storage_usage_limit_per_ocpu_in_gbs == other.storage_usage_limit_per_ocpu_in_gbs end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 264 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
244 245 246 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 244 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
253 254 255 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 253 def hash [environment_type, category, display_name, min_cpu_core_count, default_cpu_core_count, max_cpu_core_count, is_auto_scaling_enabled_by_default, network_bandwidth_per_ocpu_in_gbps, memory_per_ocpu_in_gbs, storage_usage_limit_per_ocpu_in_gbs].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
297 298 299 300 301 302 303 304 305 306 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 297 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
291 292 293 |
# File 'lib/oci/golden_gate/models/deployment_environment_summary.rb', line 291 def to_s to_hash.to_s end |