/aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/transform/DataSourceParametersMarshaller.java

https://github.com/aws/aws-sdk-java · Java · 115 lines · 86 code · 11 blank · 18 comment · 2 complexity · 85b06bc79b8787a66cbb7e4555863ff2 MD5 · raw file

  1. /*
  2. * Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
  5. * the License. A copy of the License is located at
  6. *
  7. * http://aws.amazon.com/apache2.0
  8. *
  9. * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  10. * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
  11. * and limitations under the License.
  12. */
  13. package com.amazonaws.services.quicksight.model.transform;
  14. import javax.annotation.Generated;
  15. import com.amazonaws.SdkClientException;
  16. import com.amazonaws.services.quicksight.model.*;
  17. import com.amazonaws.protocol.*;
  18. import com.amazonaws.annotation.SdkInternalApi;
  19. /**
  20. * DataSourceParametersMarshaller
  21. */
  22. @Generated("com.amazonaws:aws-java-sdk-code-generator")
  23. @SdkInternalApi
  24. public class DataSourceParametersMarshaller {
  25. private static final MarshallingInfo<StructuredPojo> AMAZONELASTICSEARCHPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  26. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AmazonElasticsearchParameters").build();
  27. private static final MarshallingInfo<StructuredPojo> ATHENAPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  28. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AthenaParameters").build();
  29. private static final MarshallingInfo<StructuredPojo> AURORAPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  30. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AuroraParameters").build();
  31. private static final MarshallingInfo<StructuredPojo> AURORAPOSTGRESQLPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  32. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AuroraPostgreSqlParameters").build();
  33. private static final MarshallingInfo<StructuredPojo> AWSIOTANALYTICSPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  34. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AwsIotAnalyticsParameters").build();
  35. private static final MarshallingInfo<StructuredPojo> JIRAPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  36. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("JiraParameters").build();
  37. private static final MarshallingInfo<StructuredPojo> MARIADBPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  38. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("MariaDbParameters").build();
  39. private static final MarshallingInfo<StructuredPojo> MYSQLPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  40. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("MySqlParameters").build();
  41. private static final MarshallingInfo<StructuredPojo> ORACLEPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  42. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("OracleParameters").build();
  43. private static final MarshallingInfo<StructuredPojo> POSTGRESQLPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  44. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PostgreSqlParameters").build();
  45. private static final MarshallingInfo<StructuredPojo> PRESTOPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  46. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PrestoParameters").build();
  47. private static final MarshallingInfo<StructuredPojo> RDSPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  48. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RdsParameters").build();
  49. private static final MarshallingInfo<StructuredPojo> REDSHIFTPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  50. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RedshiftParameters").build();
  51. private static final MarshallingInfo<StructuredPojo> S3PARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  52. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("S3Parameters").build();
  53. private static final MarshallingInfo<StructuredPojo> SERVICENOWPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  54. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ServiceNowParameters").build();
  55. private static final MarshallingInfo<StructuredPojo> SNOWFLAKEPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  56. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SnowflakeParameters").build();
  57. private static final MarshallingInfo<StructuredPojo> SPARKPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  58. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SparkParameters").build();
  59. private static final MarshallingInfo<StructuredPojo> SQLSERVERPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  60. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("SqlServerParameters").build();
  61. private static final MarshallingInfo<StructuredPojo> TERADATAPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  62. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TeradataParameters").build();
  63. private static final MarshallingInfo<StructuredPojo> TWITTERPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  64. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TwitterParameters").build();
  65. private static final MarshallingInfo<StructuredPojo> AMAZONOPENSEARCHPARAMETERS_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
  66. .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("AmazonOpenSearchParameters").build();
  67. private static final DataSourceParametersMarshaller instance = new DataSourceParametersMarshaller();
  68. public static DataSourceParametersMarshaller getInstance() {
  69. return instance;
  70. }
  71. /**
  72. * Marshall the given parameter object.
  73. */
  74. public void marshall(DataSourceParameters dataSourceParameters, ProtocolMarshaller protocolMarshaller) {
  75. if (dataSourceParameters == null) {
  76. throw new SdkClientException("Invalid argument passed to marshall(...)");
  77. }
  78. try {
  79. protocolMarshaller.marshall(dataSourceParameters.getAmazonElasticsearchParameters(), AMAZONELASTICSEARCHPARAMETERS_BINDING);
  80. protocolMarshaller.marshall(dataSourceParameters.getAthenaParameters(), ATHENAPARAMETERS_BINDING);
  81. protocolMarshaller.marshall(dataSourceParameters.getAuroraParameters(), AURORAPARAMETERS_BINDING);
  82. protocolMarshaller.marshall(dataSourceParameters.getAuroraPostgreSqlParameters(), AURORAPOSTGRESQLPARAMETERS_BINDING);
  83. protocolMarshaller.marshall(dataSourceParameters.getAwsIotAnalyticsParameters(), AWSIOTANALYTICSPARAMETERS_BINDING);
  84. protocolMarshaller.marshall(dataSourceParameters.getJiraParameters(), JIRAPARAMETERS_BINDING);
  85. protocolMarshaller.marshall(dataSourceParameters.getMariaDbParameters(), MARIADBPARAMETERS_BINDING);
  86. protocolMarshaller.marshall(dataSourceParameters.getMySqlParameters(), MYSQLPARAMETERS_BINDING);
  87. protocolMarshaller.marshall(dataSourceParameters.getOracleParameters(), ORACLEPARAMETERS_BINDING);
  88. protocolMarshaller.marshall(dataSourceParameters.getPostgreSqlParameters(), POSTGRESQLPARAMETERS_BINDING);
  89. protocolMarshaller.marshall(dataSourceParameters.getPrestoParameters(), PRESTOPARAMETERS_BINDING);
  90. protocolMarshaller.marshall(dataSourceParameters.getRdsParameters(), RDSPARAMETERS_BINDING);
  91. protocolMarshaller.marshall(dataSourceParameters.getRedshiftParameters(), REDSHIFTPARAMETERS_BINDING);
  92. protocolMarshaller.marshall(dataSourceParameters.getS3Parameters(), S3PARAMETERS_BINDING);
  93. protocolMarshaller.marshall(dataSourceParameters.getServiceNowParameters(), SERVICENOWPARAMETERS_BINDING);
  94. protocolMarshaller.marshall(dataSourceParameters.getSnowflakeParameters(), SNOWFLAKEPARAMETERS_BINDING);
  95. protocolMarshaller.marshall(dataSourceParameters.getSparkParameters(), SPARKPARAMETERS_BINDING);
  96. protocolMarshaller.marshall(dataSourceParameters.getSqlServerParameters(), SQLSERVERPARAMETERS_BINDING);
  97. protocolMarshaller.marshall(dataSourceParameters.getTeradataParameters(), TERADATAPARAMETERS_BINDING);
  98. protocolMarshaller.marshall(dataSourceParameters.getTwitterParameters(), TWITTERPARAMETERS_BINDING);
  99. protocolMarshaller.marshall(dataSourceParameters.getAmazonOpenSearchParameters(), AMAZONOPENSEARCHPARAMETERS_BINDING);
  100. } catch (Exception e) {
  101. throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
  102. }
  103. }
  104. }