PageRenderTime 47ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 232 lines | 113 code | 22 blank | 97 comment | 21 complexity | a716812080ae5ef5561ed3d7cd2de49f 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.AmazonRedshiftLinkedServiceTypeProperties;
  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. /** Linked service for Amazon Redshift. */
  14. @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
  15. @JsonTypeName("AmazonRedshift")
  16. @Fluent
  17. public final class AmazonRedshiftLinkedService extends LinkedService {
  18. /*
  19. * Amazon Redshift linked service properties.
  20. */
  21. @JsonProperty(value = "typeProperties", required = true)
  22. private AmazonRedshiftLinkedServiceTypeProperties innerTypeProperties =
  23. new AmazonRedshiftLinkedServiceTypeProperties();
  24. /**
  25. * Get the innerTypeProperties property: Amazon Redshift linked service properties.
  26. *
  27. * @return the innerTypeProperties value.
  28. */
  29. private AmazonRedshiftLinkedServiceTypeProperties innerTypeProperties() {
  30. return this.innerTypeProperties;
  31. }
  32. /** {@inheritDoc} */
  33. @Override
  34. public AmazonRedshiftLinkedService withConnectVia(IntegrationRuntimeReference connectVia) {
  35. super.withConnectVia(connectVia);
  36. return this;
  37. }
  38. /** {@inheritDoc} */
  39. @Override
  40. public AmazonRedshiftLinkedService withDescription(String description) {
  41. super.withDescription(description);
  42. return this;
  43. }
  44. /** {@inheritDoc} */
  45. @Override
  46. public AmazonRedshiftLinkedService withParameters(Map<String, ParameterSpecification> parameters) {
  47. super.withParameters(parameters);
  48. return this;
  49. }
  50. /** {@inheritDoc} */
  51. @Override
  52. public AmazonRedshiftLinkedService withAnnotations(List<Object> annotations) {
  53. super.withAnnotations(annotations);
  54. return this;
  55. }
  56. /**
  57. * Get the server property: The name of the Amazon Redshift server. Type: string (or Expression with resultType
  58. * string).
  59. *
  60. * @return the server value.
  61. */
  62. public Object server() {
  63. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().server();
  64. }
  65. /**
  66. * Set the server property: The name of the Amazon Redshift server. Type: string (or Expression with resultType
  67. * string).
  68. *
  69. * @param server the server value to set.
  70. * @return the AmazonRedshiftLinkedService object itself.
  71. */
  72. public AmazonRedshiftLinkedService withServer(Object server) {
  73. if (this.innerTypeProperties() == null) {
  74. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  75. }
  76. this.innerTypeProperties().withServer(server);
  77. return this;
  78. }
  79. /**
  80. * Get the username property: The username of the Amazon Redshift source. Type: string (or Expression with
  81. * resultType string).
  82. *
  83. * @return the username value.
  84. */
  85. public Object username() {
  86. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().username();
  87. }
  88. /**
  89. * Set the username property: The username of the Amazon Redshift source. Type: string (or Expression with
  90. * resultType string).
  91. *
  92. * @param username the username value to set.
  93. * @return the AmazonRedshiftLinkedService object itself.
  94. */
  95. public AmazonRedshiftLinkedService withUsername(Object username) {
  96. if (this.innerTypeProperties() == null) {
  97. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  98. }
  99. this.innerTypeProperties().withUsername(username);
  100. return this;
  101. }
  102. /**
  103. * Get the password property: The password of the Amazon Redshift source.
  104. *
  105. * @return the password value.
  106. */
  107. public SecretBase password() {
  108. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().password();
  109. }
  110. /**
  111. * Set the password property: The password of the Amazon Redshift source.
  112. *
  113. * @param password the password value to set.
  114. * @return the AmazonRedshiftLinkedService object itself.
  115. */
  116. public AmazonRedshiftLinkedService withPassword(SecretBase password) {
  117. if (this.innerTypeProperties() == null) {
  118. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  119. }
  120. this.innerTypeProperties().withPassword(password);
  121. return this;
  122. }
  123. /**
  124. * Get the database property: The database name of the Amazon Redshift source. Type: string (or Expression with
  125. * resultType string).
  126. *
  127. * @return the database value.
  128. */
  129. public Object database() {
  130. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().database();
  131. }
  132. /**
  133. * Set the database property: The database name of the Amazon Redshift source. Type: string (or Expression with
  134. * resultType string).
  135. *
  136. * @param database the database value to set.
  137. * @return the AmazonRedshiftLinkedService object itself.
  138. */
  139. public AmazonRedshiftLinkedService withDatabase(Object database) {
  140. if (this.innerTypeProperties() == null) {
  141. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  142. }
  143. this.innerTypeProperties().withDatabase(database);
  144. return this;
  145. }
  146. /**
  147. * Get the port property: The TCP port number that the Amazon Redshift server uses to listen for client connections.
  148. * The default value is 5439. Type: integer (or Expression with resultType integer).
  149. *
  150. * @return the port value.
  151. */
  152. public Object port() {
  153. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().port();
  154. }
  155. /**
  156. * Set the port property: The TCP port number that the Amazon Redshift server uses to listen for client connections.
  157. * The default value is 5439. Type: integer (or Expression with resultType integer).
  158. *
  159. * @param port the port value to set.
  160. * @return the AmazonRedshiftLinkedService object itself.
  161. */
  162. public AmazonRedshiftLinkedService withPort(Object port) {
  163. if (this.innerTypeProperties() == null) {
  164. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  165. }
  166. this.innerTypeProperties().withPort(port);
  167. return this;
  168. }
  169. /**
  170. * Get the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
  171. * using the integration runtime credential manager. Type: string (or Expression with resultType string).
  172. *
  173. * @return the encryptedCredential value.
  174. */
  175. public Object encryptedCredential() {
  176. return this.innerTypeProperties() == null ? null : this.innerTypeProperties().encryptedCredential();
  177. }
  178. /**
  179. * Set the encryptedCredential property: The encrypted credential used for authentication. Credentials are encrypted
  180. * using the integration runtime credential manager. Type: string (or Expression with resultType string).
  181. *
  182. * @param encryptedCredential the encryptedCredential value to set.
  183. * @return the AmazonRedshiftLinkedService object itself.
  184. */
  185. public AmazonRedshiftLinkedService withEncryptedCredential(Object encryptedCredential) {
  186. if (this.innerTypeProperties() == null) {
  187. this.innerTypeProperties = new AmazonRedshiftLinkedServiceTypeProperties();
  188. }
  189. this.innerTypeProperties().withEncryptedCredential(encryptedCredential);
  190. return this;
  191. }
  192. /**
  193. * Validates the instance.
  194. *
  195. * @throws IllegalArgumentException thrown if the instance is not valid.
  196. */
  197. @Override
  198. public void validate() {
  199. super.validate();
  200. if (innerTypeProperties() == null) {
  201. throw LOGGER
  202. .logExceptionAsError(
  203. new IllegalArgumentException(
  204. "Missing required property innerTypeProperties in model AmazonRedshiftLinkedService"));
  205. } else {
  206. innerTypeProperties().validate();
  207. }
  208. }
  209. private static final ClientLogger LOGGER = new ClientLogger(AmazonRedshiftLinkedService.class);
  210. }