PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/DatabricksSparkPythonActivity.java

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 169 lines | 93 code | 18 blank | 58 comment | 12 complexity | a8aa0d6bc8a146d27ac45210c4ec1f49 MD5 | raw file
Possible License(s): MIT
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. // Code generated by Microsoft (R) AutoRest Code Generator.
  4. package com.azure.resourcemanager.datafactory.models;
  5. import com.azure.core.annotation.Fluent;
  6. import com.azure.core.util.logging.ClientLogger;
  7. import com.azure.resourcemanager.datafactory.fluent.models.DatabricksSparkPythonActivityTypeProperties;
  8. import com.fasterxml.jackson.annotation.JsonProperty;
  9. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  10. import com.fasterxml.jackson.annotation.JsonTypeName;
  11. import java.util.List;
  12. import java.util.Map;
  13. /** DatabricksSparkPython activity. */
  14. @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
  15. @JsonTypeName("DatabricksSparkPython")
  16. @Fluent
  17. public final class DatabricksSparkPythonActivity extends ExecutionActivity {
  18. /*
  19. * Databricks SparkPython activity properties.
  20. */
  21. @JsonProperty(value = "typeProperties", required = true)
  22. private DatabricksSparkPythonActivityTypeProperties innerTypeProperties =
  23. new DatabricksSparkPythonActivityTypeProperties();
  24. /**
  25. * Get the innerTypeProperties property: Databricks SparkPython activity properties.
  26. *
  27. * @return the innerTypeProperties value.
  28. */
  29. private DatabricksSparkPythonActivityTypeProperties innerTypeProperties() {
  30. return this.innerTypeProperties;
  31. }
  32. /** {@inheritDoc} */
  33. @Override
  34. public DatabricksSparkPythonActivity withLinkedServiceName(LinkedServiceReference linkedServiceName) {
  35. super.withLinkedServiceName(linkedServiceName);
  36. return this;
  37. }
  38. /** {@inheritDoc} */
  39. @Override
  40. public DatabricksSparkPythonActivity withPolicy(ActivityPolicy policy) {
  41. super.withPolicy(policy);
  42. return this;
  43. }
  44. /** {@inheritDoc} */
  45. @Override
  46. public DatabricksSparkPythonActivity withName(String name) {
  47. super.withName(name);
  48. return this;
  49. }
  50. /** {@inheritDoc} */
  51. @Override
  52. public DatabricksSparkPythonActivity withDescription(String description) {
  53. super.withDescription(description);
  54. return this;
  55. }
  56. /** {@inheritDoc} */
  57. @Override
  58. public DatabricksSparkPythonActivity withDependsOn(List<ActivityDependency> dependsOn) {
  59. super.withDependsOn(dependsOn);
  60. return this;
  61. }
  62. /** {@inheritDoc} */
  63. @Override
  64. public DatabricksSparkPythonActivity withUserProperties(List<UserProperty> userProperties) {
  65. super.withUserProperties(userProperties);
  66. return this;
  67. }
  68. /**
  69. * Get the pythonFile property: The URI of the Python file to be executed. DBFS paths are supported. Type: string
  70. * (or Expression with resultType string).
  71. *
  72. * @return the pythonFile value.
  73. */
  74. public Object pythonFile() {
  75. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().pythonFile();
  76. }
  77. /**
  78. * Set the pythonFile property: The URI of the Python file to be executed. DBFS paths are supported. Type: string
  79. * (or Expression with resultType string).
  80. *
  81. * @param pythonFile the pythonFile value to set.
  82. * @return the DatabricksSparkPythonActivity object itself.
  83. */
  84. public DatabricksSparkPythonActivity withPythonFile(Object pythonFile) {
  85. if (this.innerTypeProperties() == null) {
  86. this.innerTypeProperties = new DatabricksSparkPythonActivityTypeProperties();
  87. }
  88. this.innerTypeProperties().withPythonFile(pythonFile);
  89. return this;
  90. }
  91. /**
  92. * Get the parameters property: Command line parameters that will be passed to the Python file.
  93. *
  94. * @return the parameters value.
  95. */
  96. public List<Object> parameters() {
  97. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().parameters();
  98. }
  99. /**
  100. * Set the parameters property: Command line parameters that will be passed to the Python file.
  101. *
  102. * @param parameters the parameters value to set.
  103. * @return the DatabricksSparkPythonActivity object itself.
  104. */
  105. public DatabricksSparkPythonActivity withParameters(List<Object> parameters) {
  106. if (this.innerTypeProperties() == null) {
  107. this.innerTypeProperties = new DatabricksSparkPythonActivityTypeProperties();
  108. }
  109. this.innerTypeProperties().withParameters(parameters);
  110. return this;
  111. }
  112. /**
  113. * Get the libraries property: A list of libraries to be installed on the cluster that will execute the job.
  114. *
  115. * @return the libraries value.
  116. */
  117. public List<Map<String, Object>> libraries() {
  118. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().libraries();
  119. }
  120. /**
  121. * Set the libraries property: A list of libraries to be installed on the cluster that will execute the job.
  122. *
  123. * @param libraries the libraries value to set.
  124. * @return the DatabricksSparkPythonActivity object itself.
  125. */
  126. public DatabricksSparkPythonActivity withLibraries(List<Map<String, Object>> libraries) {
  127. if (this.innerTypeProperties() == null) {
  128. this.innerTypeProperties = new DatabricksSparkPythonActivityTypeProperties();
  129. }
  130. this.innerTypeProperties().withLibraries(libraries);
  131. return this;
  132. }
  133. /**
  134. * Validates the instance.
  135. *
  136. * @throws IllegalArgumentException thrown if the instance is not valid.
  137. */
  138. @Override
  139. public void validate() {
  140. super.validate();
  141. if (innerTypeProperties() == null) {
  142. throw LOGGER
  143. .logExceptionAsError(
  144. new IllegalArgumentException(
  145. "Missing required property innerTypeProperties in model DatabricksSparkPythonActivity"));
  146. } else {
  147. innerTypeProperties().validate();
  148. }
  149. }
  150. private static final ClientLogger LOGGER = new ClientLogger(DatabricksSparkPythonActivity.class);
  151. }