Class: OCI::DataScience::Models::UpdateOcirModelDeploymentEnvironmentConfigurationDetails
- Inherits:
-
UpdateModelDeploymentEnvironmentConfigurationDetails
- Object
- UpdateModelDeploymentEnvironmentConfigurationDetails
- OCI::DataScience::Models::UpdateOcirModelDeploymentEnvironmentConfigurationDetails
- Defined in:
- lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb
Overview
The update environment configuration details object for OCI Registry
Constant Summary
Constants inherited from UpdateModelDeploymentEnvironmentConfigurationDetails
Instance Attribute Summary collapse
-
#cmd ⇒ Array<String>
The container image run CMD as a list of strings.
-
#custom_http_endpoints ⇒ Array<OCI::DataScience::Models::InferenceHttpEndpoint>
List of custom inference HTTP endpoints configured on the model deployment instance for inferencing.
-
#entrypoint ⇒ Array<String>
The container image run ENTRYPOINT as a list of strings.
-
#environment_variables ⇒ Hash<String, String>
Environment variables to set for the web server container.
-
#health_check_port ⇒ Integer
The port on which the container HEALTHCHECK would listen.
-
#image ⇒ String
The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format.
-
#image_digest ⇒ String
The digest of the container image.
-
#image_signature_id ⇒ String
OCID of the container image signature.
-
#predict_api_specification ⇒ String
The chosen specification from predefined set of endpoints a user can access.
-
#server_port ⇒ Integer
The port on which the web server serving the inference is running.
Attributes inherited from UpdateModelDeploymentEnvironmentConfigurationDetails
#environment_configuration_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 = {}) ⇒ UpdateOcirModelDeploymentEnvironmentConfigurationDetails
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 UpdateModelDeploymentEnvironmentConfigurationDetails
Constructor Details
#initialize(attributes = {}) ⇒ UpdateOcirModelDeploymentEnvironmentConfigurationDetails
Initializes the object
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 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 137 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['environmentConfigurationType'] = 'OCIR_CONTAINER' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.image = attributes[:'image'] if attributes[:'image'] self.image_digest = attributes[:'imageDigest'] if attributes[:'imageDigest'] raise 'You cannot provide both :imageDigest and :image_digest' if attributes.key?(:'imageDigest') && attributes.key?(:'image_digest') self.image_digest = attributes[:'image_digest'] if attributes[:'image_digest'] self.image_signature_id = attributes[:'imageSignatureId'] if attributes[:'imageSignatureId'] raise 'You cannot provide both :imageSignatureId and :image_signature_id' if attributes.key?(:'imageSignatureId') && attributes.key?(:'image_signature_id') self.image_signature_id = attributes[:'image_signature_id'] if attributes[:'image_signature_id'] self.cmd = attributes[:'cmd'] if attributes[:'cmd'] self.entrypoint = attributes[:'entrypoint'] if attributes[:'entrypoint'] self.server_port = attributes[:'serverPort'] if attributes[:'serverPort'] raise 'You cannot provide both :serverPort and :server_port' if attributes.key?(:'serverPort') && attributes.key?(:'server_port') self.server_port = attributes[:'server_port'] if attributes[:'server_port'] self.health_check_port = attributes[:'healthCheckPort'] if attributes[:'healthCheckPort'] raise 'You cannot provide both :healthCheckPort and :health_check_port' if attributes.key?(:'healthCheckPort') && attributes.key?(:'health_check_port') self.health_check_port = attributes[:'health_check_port'] if attributes[:'health_check_port'] self.environment_variables = attributes[:'environmentVariables'] if attributes[:'environmentVariables'] raise 'You cannot provide both :environmentVariables and :environment_variables' if attributes.key?(:'environmentVariables') && attributes.key?(:'environment_variables') self.environment_variables = attributes[:'environment_variables'] if attributes[:'environment_variables'] self.predict_api_specification = attributes[:'predictApiSpecification'] if attributes[:'predictApiSpecification'] raise 'You cannot provide both :predictApiSpecification and :predict_api_specification' if attributes.key?(:'predictApiSpecification') && attributes.key?(:'predict_api_specification') self.predict_api_specification = attributes[:'predict_api_specification'] if attributes[:'predict_api_specification'] self.custom_http_endpoints = attributes[:'customHttpEndpoints'] if attributes[:'customHttpEndpoints'] raise 'You cannot provide both :customHttpEndpoints and :custom_http_endpoints' if attributes.key?(:'customHttpEndpoints') && attributes.key?(:'custom_http_endpoints') self.custom_http_endpoints = attributes[:'custom_http_endpoints'] if attributes[:'custom_http_endpoints'] end |
Instance Attribute Details
#cmd ⇒ Array<String>
The container image run CMD as a list of strings. Use CMD as arguments to the ENTRYPOINT or the only command to run in the absence of an ENTRYPOINT. The combined size of CMD and ENTRYPOINT must be less than 2048 bytes.
35 36 37 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 35 def cmd @cmd end |
#custom_http_endpoints ⇒ Array<OCI::DataScience::Models::InferenceHttpEndpoint>
List of custom inference HTTP endpoints configured on the model deployment instance for inferencing.
81 82 83 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 81 def custom_http_endpoints @custom_http_endpoints end |
#entrypoint ⇒ Array<String>
The container image run ENTRYPOINT as a list of strings. Accept the CMD as extra arguments. The combined size of CMD and ENTRYPOINT must be less than 2048 bytes. More information on how CMD and ENTRYPOINT interact are here.
43 44 45 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 43 def entrypoint @entrypoint end |
#environment_variables ⇒ Hash<String, String>
Environment variables to set for the web server container. The size of envVars must be less than 2048 bytes. Key should be under 32 characters. Key should contain only letters, digits and underscore (_) Key should start with a letter. Key should have at least 2 characters. Key should not end with underscore eg. TEST_ Key if added cannot be empty. Value can be empty. No specific size limits on individual Values. But overall environment variables is limited to 2048 bytes. Key can't be reserved Model Deployment environment variables.
69 70 71 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 69 def environment_variables @environment_variables end |
#health_check_port ⇒ Integer
The port on which the container HEALTHCHECK would listen. The port can be anything between 1024 and 65535. The following ports cannot be used 24224, 8446, 8447.
55 56 57 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 55 def health_check_port @health_check_port end |
#image ⇒ String
The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. Acceptable format: <region>.ocir.io/<registry>/<image>:<tag> <region>.ocir.io/<registry>/<image>:<tag>@digest
18 19 20 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 18 def image @image end |
#image_digest ⇒ String
The digest of the container image. For example, sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
24 25 26 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 24 def image_digest @image_digest end |
#image_signature_id ⇒ String
OCID of the container image signature
28 29 30 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 28 def image_signature_id @image_signature_id end |
#predict_api_specification ⇒ String
The chosen specification from predefined set of endpoints a user can access. For example, if the value is 'openai', the user can access OpenAI-compliant endpoints like /v1/completions, /v1/chat/completions, /v1/models, etc., for inference.
76 77 78 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 76 def predict_api_specification @predict_api_specification end |
#server_port ⇒ Integer
The port on which the web server serving the inference is running. The port can be anything between 1024 and 65535. The following ports cannot be used 24224, 8446, 8447.
49 50 51 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 49 def server_port @server_port end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'environment_configuration_type': :'environmentConfigurationType', 'image': :'image', 'image_digest': :'imageDigest', 'image_signature_id': :'imageSignatureId', 'cmd': :'cmd', 'entrypoint': :'entrypoint', 'server_port': :'serverPort', 'health_check_port': :'healthCheckPort', 'environment_variables': :'environmentVariables', 'predict_api_specification': :'predictApiSpecification', 'custom_http_endpoints': :'customHttpEndpoints' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 103 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'environment_configuration_type': :'String', 'image': :'String', 'image_digest': :'String', 'image_signature_id': :'String', 'cmd': :'Array<String>', 'entrypoint': :'Array<String>', 'server_port': :'Integer', 'health_check_port': :'Integer', 'environment_variables': :'Hash<String, String>', 'predict_api_specification': :'String', 'custom_http_endpoints': :'Array<OCI::DataScience::Models::InferenceHttpEndpoint>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 203 def ==(other) return true if equal?(other) self.class == other.class && environment_configuration_type == other.environment_configuration_type && image == other.image && image_digest == other.image_digest && image_signature_id == other.image_signature_id && cmd == other.cmd && entrypoint == other.entrypoint && server_port == other.server_port && health_check_port == other.health_check_port && environment_variables == other.environment_variables && predict_api_specification == other.predict_api_specification && custom_http_endpoints == other.custom_http_endpoints end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 243 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
223 224 225 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 223 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
232 233 234 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 232 def hash [environment_configuration_type, image, image_digest, image_signature_id, cmd, entrypoint, server_port, health_check_port, environment_variables, predict_api_specification, custom_http_endpoints].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
276 277 278 279 280 281 282 283 284 285 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 276 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
270 271 272 |
# File 'lib/oci/data_science/models/update_ocir_model_deployment_environment_configuration_details.rb', line 270 def to_s to_hash.to_s end |