PageRenderTime 21ms CodeModel.GetById 35ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 353 lines | 161 code | 35 blank | 157 comment | 32 complexity | 38868e60fb8c707294a97f4a077e0c4b 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.fluent.models;
  5. import com.azure.core.annotation.Fluent;
  6. import com.azure.core.management.SubResource;
  7. import com.azure.core.util.logging.ClientLogger;
  8. import com.azure.resourcemanager.datafactory.models.Activity;
  9. import com.azure.resourcemanager.datafactory.models.ParameterSpecification;
  10. import com.azure.resourcemanager.datafactory.models.PipelineFolder;
  11. import com.azure.resourcemanager.datafactory.models.PipelinePolicy;
  12. import com.azure.resourcemanager.datafactory.models.VariableSpecification;
  13. import com.fasterxml.jackson.annotation.JsonAnyGetter;
  14. import com.fasterxml.jackson.annotation.JsonAnySetter;
  15. import com.fasterxml.jackson.annotation.JsonIgnore;
  16. import com.fasterxml.jackson.annotation.JsonProperty;
  17. import java.util.HashMap;
  18. import java.util.List;
  19. import java.util.Map;
  20. /** Pipeline resource type. */
  21. @Fluent
  22. public final class PipelineResourceInner extends SubResource {
  23. /*
  24. * Properties of the pipeline.
  25. */
  26. @JsonProperty(value = "properties", required = true)
  27. private Pipeline innerProperties = new Pipeline();
  28. /*
  29. * The resource name.
  30. */
  31. @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
  32. private String name;
  33. /*
  34. * The resource type.
  35. */
  36. @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
  37. private String type;
  38. /*
  39. * Etag identifies change in the resource.
  40. */
  41. @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
  42. private String etag;
  43. /*
  44. * Pipeline resource type.
  45. */
  46. @JsonIgnore private Map<String, Object> additionalProperties;
  47. /**
  48. * Get the innerProperties property: Properties of the pipeline.
  49. *
  50. * @return the innerProperties value.
  51. */
  52. private Pipeline innerProperties() {
  53. return this.innerProperties;
  54. }
  55. /**
  56. * Get the name property: The resource name.
  57. *
  58. * @return the name value.
  59. */
  60. public String name() {
  61. return this.name;
  62. }
  63. /**
  64. * Get the type property: The resource type.
  65. *
  66. * @return the type value.
  67. */
  68. public String type() {
  69. return this.type;
  70. }
  71. /**
  72. * Get the etag property: Etag identifies change in the resource.
  73. *
  74. * @return the etag value.
  75. */
  76. public String etag() {
  77. return this.etag;
  78. }
  79. /**
  80. * Get the additionalProperties property: Pipeline resource type.
  81. *
  82. * @return the additionalProperties value.
  83. */
  84. @JsonAnyGetter
  85. public Map<String, Object> additionalProperties() {
  86. return this.additionalProperties;
  87. }
  88. /**
  89. * Set the additionalProperties property: Pipeline resource type.
  90. *
  91. * @param additionalProperties the additionalProperties value to set.
  92. * @return the PipelineResourceInner object itself.
  93. */
  94. public PipelineResourceInner withAdditionalProperties(Map<String, Object> additionalProperties) {
  95. this.additionalProperties = additionalProperties;
  96. return this;
  97. }
  98. @JsonAnySetter
  99. void withAdditionalProperties(String key, Object value) {
  100. if (additionalProperties == null) {
  101. additionalProperties = new HashMap<>();
  102. }
  103. additionalProperties.put(key, value);
  104. }
  105. /** {@inheritDoc} */
  106. @Override
  107. public PipelineResourceInner withId(String id) {
  108. super.withId(id);
  109. return this;
  110. }
  111. /**
  112. * Get the description property: The description of the pipeline.
  113. *
  114. * @return the description value.
  115. */
  116. public String description() {
  117. return this.innerProperties() == null ? null : this.innerProperties().description();
  118. }
  119. /**
  120. * Set the description property: The description of the pipeline.
  121. *
  122. * @param description the description value to set.
  123. * @return the PipelineResourceInner object itself.
  124. */
  125. public PipelineResourceInner withDescription(String description) {
  126. if (this.innerProperties() == null) {
  127. this.innerProperties = new Pipeline();
  128. }
  129. this.innerProperties().withDescription(description);
  130. return this;
  131. }
  132. /**
  133. * Get the activities property: List of activities in pipeline.
  134. *
  135. * @return the activities value.
  136. */
  137. public List<Activity> activities() {
  138. return this.innerProperties() == null ? null : this.innerProperties().activities();
  139. }
  140. /**
  141. * Set the activities property: List of activities in pipeline.
  142. *
  143. * @param activities the activities value to set.
  144. * @return the PipelineResourceInner object itself.
  145. */
  146. public PipelineResourceInner withActivities(List<Activity> activities) {
  147. if (this.innerProperties() == null) {
  148. this.innerProperties = new Pipeline();
  149. }
  150. this.innerProperties().withActivities(activities);
  151. return this;
  152. }
  153. /**
  154. * Get the parameters property: List of parameters for pipeline.
  155. *
  156. * @return the parameters value.
  157. */
  158. public Map<String, ParameterSpecification> parameters() {
  159. return this.innerProperties() == null ? null : this.innerProperties().parameters();
  160. }
  161. /**
  162. * Set the parameters property: List of parameters for pipeline.
  163. *
  164. * @param parameters the parameters value to set.
  165. * @return the PipelineResourceInner object itself.
  166. */
  167. public PipelineResourceInner withParameters(Map<String, ParameterSpecification> parameters) {
  168. if (this.innerProperties() == null) {
  169. this.innerProperties = new Pipeline();
  170. }
  171. this.innerProperties().withParameters(parameters);
  172. return this;
  173. }
  174. /**
  175. * Get the variables property: List of variables for pipeline.
  176. *
  177. * @return the variables value.
  178. */
  179. public Map<String, VariableSpecification> variables() {
  180. return this.innerProperties() == null ? null : this.innerProperties().variables();
  181. }
  182. /**
  183. * Set the variables property: List of variables for pipeline.
  184. *
  185. * @param variables the variables value to set.
  186. * @return the PipelineResourceInner object itself.
  187. */
  188. public PipelineResourceInner withVariables(Map<String, VariableSpecification> variables) {
  189. if (this.innerProperties() == null) {
  190. this.innerProperties = new Pipeline();
  191. }
  192. this.innerProperties().withVariables(variables);
  193. return this;
  194. }
  195. /**
  196. * Get the concurrency property: The max number of concurrent runs for the pipeline.
  197. *
  198. * @return the concurrency value.
  199. */
  200. public Integer concurrency() {
  201. return this.innerProperties() == null ? null : this.innerProperties().concurrency();
  202. }
  203. /**
  204. * Set the concurrency property: The max number of concurrent runs for the pipeline.
  205. *
  206. * @param concurrency the concurrency value to set.
  207. * @return the PipelineResourceInner object itself.
  208. */
  209. public PipelineResourceInner withConcurrency(Integer concurrency) {
  210. if (this.innerProperties() == null) {
  211. this.innerProperties = new Pipeline();
  212. }
  213. this.innerProperties().withConcurrency(concurrency);
  214. return this;
  215. }
  216. /**
  217. * Get the annotations property: List of tags that can be used for describing the Pipeline.
  218. *
  219. * @return the annotations value.
  220. */
  221. public List<Object> annotations() {
  222. return this.innerProperties() == null ? null : this.innerProperties().annotations();
  223. }
  224. /**
  225. * Set the annotations property: List of tags that can be used for describing the Pipeline.
  226. *
  227. * @param annotations the annotations value to set.
  228. * @return the PipelineResourceInner object itself.
  229. */
  230. public PipelineResourceInner withAnnotations(List<Object> annotations) {
  231. if (this.innerProperties() == null) {
  232. this.innerProperties = new Pipeline();
  233. }
  234. this.innerProperties().withAnnotations(annotations);
  235. return this;
  236. }
  237. /**
  238. * Get the runDimensions property: Dimensions emitted by Pipeline.
  239. *
  240. * @return the runDimensions value.
  241. */
  242. public Map<String, Object> runDimensions() {
  243. return this.innerProperties() == null ? null : this.innerProperties().runDimensions();
  244. }
  245. /**
  246. * Set the runDimensions property: Dimensions emitted by Pipeline.
  247. *
  248. * @param runDimensions the runDimensions value to set.
  249. * @return the PipelineResourceInner object itself.
  250. */
  251. public PipelineResourceInner withRunDimensions(Map<String, Object> runDimensions) {
  252. if (this.innerProperties() == null) {
  253. this.innerProperties = new Pipeline();
  254. }
  255. this.innerProperties().withRunDimensions(runDimensions);
  256. return this;
  257. }
  258. /**
  259. * Get the folder property: The folder that this Pipeline is in. If not specified, Pipeline will appear at the root
  260. * level.
  261. *
  262. * @return the folder value.
  263. */
  264. public PipelineFolder folder() {
  265. return this.innerProperties() == null ? null : this.innerProperties().folder();
  266. }
  267. /**
  268. * Set the folder property: The folder that this Pipeline is in. If not specified, Pipeline will appear at the root
  269. * level.
  270. *
  271. * @param folder the folder value to set.
  272. * @return the PipelineResourceInner object itself.
  273. */
  274. public PipelineResourceInner withFolder(PipelineFolder folder) {
  275. if (this.innerProperties() == null) {
  276. this.innerProperties = new Pipeline();
  277. }
  278. this.innerProperties().withFolder(folder);
  279. return this;
  280. }
  281. /**
  282. * Get the policy property: Pipeline Policy.
  283. *
  284. * @return the policy value.
  285. */
  286. public PipelinePolicy policy() {
  287. return this.innerProperties() == null ? null : this.innerProperties().policy();
  288. }
  289. /**
  290. * Set the policy property: Pipeline Policy.
  291. *
  292. * @param policy the policy value to set.
  293. * @return the PipelineResourceInner object itself.
  294. */
  295. public PipelineResourceInner withPolicy(PipelinePolicy policy) {
  296. if (this.innerProperties() == null) {
  297. this.innerProperties = new Pipeline();
  298. }
  299. this.innerProperties().withPolicy(policy);
  300. return this;
  301. }
  302. /**
  303. * Validates the instance.
  304. *
  305. * @throws IllegalArgumentException thrown if the instance is not valid.
  306. */
  307. public void validate() {
  308. if (innerProperties() == null) {
  309. throw LOGGER
  310. .logExceptionAsError(
  311. new IllegalArgumentException(
  312. "Missing required property innerProperties in model PipelineResourceInner"));
  313. } else {
  314. innerProperties().validate();
  315. }
  316. }
  317. private static final ClientLogger LOGGER = new ClientLogger(PipelineResourceInner.class);
  318. }