Class: OCI::DataFlow::Models::CreateApplicationDetails
- Inherits:
-
Object
- Object
- OCI::DataFlow::Models::CreateApplicationDetails
- Defined in:
- lib/oci/data_flow/models/create_application_details.rb
Overview
The create application details.
Constant Summary collapse
- LANGUAGE_ENUM =
[ LANGUAGE_SCALA = 'SCALA'.freeze, LANGUAGE_JAVA = 'JAVA'.freeze, LANGUAGE_PYTHON = 'PYTHON'.freeze, LANGUAGE_SQL = 'SQL'.freeze ].freeze
Instance Attribute Summary collapse
-
#arguments ⇒ Array<String>
The arguments passed to the running application as command line arguments.
-
#class_name ⇒ String
The class for the application.
-
#compartment_id ⇒ String
[Required] The OCID of a compartment.
-
#configuration ⇒ Hash<String, String>
The Spark configuration passed to the running process.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A user-friendly description.
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#driver_shape ⇒ String
[Required] The VM shape for the driver.
-
#executor_shape ⇒ String
[Required] The VM shape for the executors.
-
#file_uri ⇒ String
[Required] An Oracle Cloud Infrastructure URI of the file containing the application to execute.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#language ⇒ String
[Required] The Spark language.
-
#logs_bucket_uri ⇒ String
An Oracle Cloud Infrastructure URI of the bucket where the Spark job logs are to be uploaded.
-
#num_executors ⇒ Integer
[Required] The number of executor VMs requested.
-
#parameters ⇒ Array<OCI::DataFlow::Models::ApplicationParameter>
An array of name/value pairs used to fill placeholders found in properties like
Application.arguments
. -
#spark_version ⇒ String
[Required] The Spark version utilized to run the application.
-
#warehouse_bucket_uri ⇒ String
An Oracle Cloud Infrastructure URI of the bucket to be used as default warehouse directory for BATCH SQL runs.
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 = {}) ⇒ CreateApplicationDetails
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 = {}) ⇒ CreateApplicationDetails
Initializes the object
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 197 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.arguments = attributes[:'arguments'] if attributes[:'arguments'] self.class_name = attributes[:'className'] if attributes[:'className'] raise 'You cannot provide both :className and :class_name' if attributes.key?(:'className') && attributes.key?(:'class_name') self.class_name = attributes[:'class_name'] if attributes[:'class_name'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.configuration = attributes[:'configuration'] if attributes[:'configuration'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.description = attributes[:'description'] if attributes[:'description'] 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.driver_shape = attributes[:'driverShape'] if attributes[:'driverShape'] raise 'You cannot provide both :driverShape and :driver_shape' if attributes.key?(:'driverShape') && attributes.key?(:'driver_shape') self.driver_shape = attributes[:'driver_shape'] if attributes[:'driver_shape'] self.executor_shape = attributes[:'executorShape'] if attributes[:'executorShape'] raise 'You cannot provide both :executorShape and :executor_shape' if attributes.key?(:'executorShape') && attributes.key?(:'executor_shape') self.executor_shape = attributes[:'executor_shape'] if attributes[:'executor_shape'] self.file_uri = attributes[:'fileUri'] if attributes[:'fileUri'] raise 'You cannot provide both :fileUri and :file_uri' if attributes.key?(:'fileUri') && attributes.key?(:'file_uri') self.file_uri = attributes[:'file_uri'] if attributes[:'file_uri'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.language = attributes[:'language'] if attributes[:'language'] self.logs_bucket_uri = attributes[:'logsBucketUri'] if attributes[:'logsBucketUri'] raise 'You cannot provide both :logsBucketUri and :logs_bucket_uri' if attributes.key?(:'logsBucketUri') && attributes.key?(:'logs_bucket_uri') self.logs_bucket_uri = attributes[:'logs_bucket_uri'] if attributes[:'logs_bucket_uri'] self.num_executors = attributes[:'numExecutors'] if attributes[:'numExecutors'] raise 'You cannot provide both :numExecutors and :num_executors' if attributes.key?(:'numExecutors') && attributes.key?(:'num_executors') self.num_executors = attributes[:'num_executors'] if attributes[:'num_executors'] self.parameters = attributes[:'parameters'] if attributes[:'parameters'] self.spark_version = attributes[:'sparkVersion'] if attributes[:'sparkVersion'] raise 'You cannot provide both :sparkVersion and :spark_version' if attributes.key?(:'sparkVersion') && attributes.key?(:'spark_version') self.spark_version = attributes[:'spark_version'] if attributes[:'spark_version'] self.warehouse_bucket_uri = attributes[:'warehouseBucketUri'] if attributes[:'warehouseBucketUri'] raise 'You cannot provide both :warehouseBucketUri and :warehouse_bucket_uri' if attributes.key?(:'warehouseBucketUri') && attributes.key?(:'warehouse_bucket_uri') self.warehouse_bucket_uri = attributes[:'warehouse_bucket_uri'] if attributes[:'warehouse_bucket_uri'] end |
Instance Attribute Details
#arguments ⇒ Array<String>
The arguments passed to the running application as command line arguments. An argument is either a plain text or a placeholder. Placeholders are replaced using values from the parameters map. Each placeholder specified must be represented in the parameters map else the request (POST or PUT) will fail with a HTTP 400 status code. Placeholders are specified as Service Api Spec
, where name
is the name of the parameter. Example: [ \"--input\", \"${input_file}\", \"--name\", \"John Doe\" ]
If "input_file" has a value of "mydata.xml", then the value above will be translated to --input mydata.xml --name \"John Doe\"
28 29 30 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 28 def arguments @arguments end |
#class_name ⇒ String
The class for the application.
33 34 35 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 33 def class_name @class_name end |
#compartment_id ⇒ String
[Required] The OCID of a compartment.
38 39 40 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 38 def compartment_id @compartment_id end |
#configuration ⇒ Hash<String, String>
The Spark configuration passed to the running process. See spark.apache.org/docs/latest/configuration.html#available-properties Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } Note: Not all Spark properties are permitted to be set. Attempting to set a property that is not allowed to be overwritten will cause a 400 status to be returned.
47 48 49 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 47 def configuration @configuration end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
53 54 55 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 53 def @defined_tags end |
#description ⇒ String
A user-friendly description. Avoid entering confidential information.
58 59 60 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 58 def description @description end |
#display_name ⇒ String
[Required] A user-friendly name. It does not have to be unique. Avoid entering confidential information.
63 64 65 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 63 def display_name @display_name end |
#driver_shape ⇒ String
[Required] The VM shape for the driver. Sets the driver cores and memory.
68 69 70 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 68 def driver_shape @driver_shape end |
#executor_shape ⇒ String
[Required] The VM shape for the executors. Sets the executor cores and memory.
73 74 75 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 73 def executor_shape @executor_shape end |
#file_uri ⇒ String
[Required] An Oracle Cloud Infrastructure URI of the file containing the application to execute. See docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat
79 80 81 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 79 def file_uri @file_uri end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
86 87 88 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 86 def @freeform_tags end |
#language ⇒ String
[Required] The Spark language.
91 92 93 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 91 def language @language end |
#logs_bucket_uri ⇒ String
An Oracle Cloud Infrastructure URI of the bucket where the Spark job logs are to be uploaded. See docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat
97 98 99 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 97 def logs_bucket_uri @logs_bucket_uri end |
#num_executors ⇒ Integer
[Required] The number of executor VMs requested.
102 103 104 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 102 def num_executors @num_executors end |
#parameters ⇒ Array<OCI::DataFlow::Models::ApplicationParameter>
An array of name/value pairs used to fill placeholders found in properties like Application.arguments
. The name must be a string of one or more word characters (a-z, A-Z, 0-9, _). The value can be a string of 0 or more characters of any kind. Example: [ { name: "iterations", value: "10"}, { name: "input_file", value: "mydata.xml" }, { name: "variable_x", value: "$x"} ]
110 111 112 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 110 def parameters @parameters end |
#spark_version ⇒ String
[Required] The Spark version utilized to run the application.
115 116 117 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 115 def spark_version @spark_version end |
#warehouse_bucket_uri ⇒ String
An Oracle Cloud Infrastructure URI of the bucket to be used as default warehouse directory for BATCH SQL runs. See docs.cloud.oracle.com/iaas/Content/API/SDKDocs/hdfsconnector.htm#uriformat
122 123 124 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 122 def warehouse_bucket_uri @warehouse_bucket_uri end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 125 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'arguments': :'arguments', 'class_name': :'className', 'compartment_id': :'compartmentId', 'configuration': :'configuration', 'defined_tags': :'definedTags', 'description': :'description', 'display_name': :'displayName', 'driver_shape': :'driverShape', 'executor_shape': :'executorShape', 'file_uri': :'fileUri', 'freeform_tags': :'freeformTags', 'language': :'language', 'logs_bucket_uri': :'logsBucketUri', 'num_executors': :'numExecutors', 'parameters': :'parameters', 'spark_version': :'sparkVersion', 'warehouse_bucket_uri': :'warehouseBucketUri' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 150 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'arguments': :'Array<String>', 'class_name': :'String', 'compartment_id': :'String', 'configuration': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'description': :'String', 'display_name': :'String', 'driver_shape': :'String', 'executor_shape': :'String', 'file_uri': :'String', 'freeform_tags': :'Hash<String, String>', 'language': :'String', 'logs_bucket_uri': :'String', 'num_executors': :'Integer', 'parameters': :'Array<OCI::DataFlow::Models::ApplicationParameter>', 'spark_version': :'String', 'warehouse_bucket_uri': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 301 def ==(other) return true if equal?(other) self.class == other.class && arguments == other.arguments && class_name == other.class_name && compartment_id == other.compartment_id && configuration == other.configuration && == other. && description == other.description && display_name == other.display_name && driver_shape == other.driver_shape && executor_shape == other.executor_shape && file_uri == other.file_uri && == other. && language == other.language && logs_bucket_uri == other.logs_bucket_uri && num_executors == other.num_executors && parameters == other.parameters && spark_version == other.spark_version && warehouse_bucket_uri == other.warehouse_bucket_uri end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 347 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
327 328 329 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 327 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
336 337 338 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 336 def hash [arguments, class_name, compartment_id, configuration, , description, display_name, driver_shape, executor_shape, file_uri, , language, logs_bucket_uri, num_executors, parameters, spark_version, warehouse_bucket_uri].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
380 381 382 383 384 385 386 387 388 389 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 380 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
374 375 376 |
# File 'lib/oci/data_flow/models/create_application_details.rb', line 374 def to_s to_hash.to_s end |