diff --git a/README.md b/README.md index 4cb5ddc00..8fd717e4d 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.2.0" + version = "0.2.1" } } } diff --git a/docs/index.md b/docs/index.md index 027bf2998..5ef8be382 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.2.0" + version = "0.2.1" } } } @@ -33,3 +33,4 @@ provider "airbyte" { ### Optional - `bearer_auth` (String, Sensitive) +- `server_url` (String) Server URL (defaults to https://api.airbyte.com/v1) diff --git a/docs/resources/connection.md b/docs/resources/connection.md index c56c1a9c5..33fd7b168 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -14,9 +14,36 @@ Connection Resource ```terraform resource "airbyte_connection" "my_connection" { - destination_id = "89bd9d8d-69a6-474e-8f46-7cc8796ed151" - namespace_format = SOURCE_NAMESPACE - source_id = "a05dfc2d-df7c-4c78-8a1b-a928fc816742" + configurations = { + streams = [ + { + cursor_field = [ + "...", + ] + name = "Terrence Rau" + primary_key = [ + [ + "...", + ], + ] + sync_mode = "incremental_deduped_history" + }, + ] + } + data_residency = "us" + destination_id = "d69a674e-0f46-47cc-8796-ed151a05dfc2" + name = "Wilfred Wolff" + namespace_definition = "custom_format" + namespace_format = SOURCE_NAMESPACE + non_breaking_schema_updates_behavior = "ignore" + prefix = "...my_prefix..." + schedule = { + basic_timing = "...my_basicTiming..." + cron_expression = "...my_cronExpression..." + schedule_type = "cron" + } + source_id = "ca1ba928-fc81-4674-acb7-39205929396f" + status = "deprecated" } ``` diff --git a/docs/resources/destination_amazon_sqs.md b/docs/resources/destination_amazon_sqs.md index 5deb41aaf..3ffbbf5a7 100644 --- a/docs/resources/destination_amazon_sqs.md +++ b/docs/resources/destination_amazon_sqs.md @@ -21,11 +21,11 @@ resource "airbyte_destination_amazon_sqs" "my_destination_amazonsqs" { message_delay = 15 message_group_id = "my-fifo-group" queue_url = "https://sqs.eu-west-1.amazonaws.com/1234567890/my-example-queue" - region = "eu-west-1" + region = "ap-southeast-2" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" } - name = "Edna Mante II" - workspace_id = "929396fe-a759-46eb-90fa-aa2352c59559" + name = "Sheryl Kertzmann" + workspace_id = "10faaa23-52c5-4955-907a-ff1a3a2fa946" } ``` diff --git a/docs/resources/destination_aws_datalake.md b/docs/resources/destination_aws_datalake.md index 01dcd0671..5fc23ea17 100644 --- a/docs/resources/destination_aws_datalake.md +++ b/docs/resources/destination_aws_datalake.md @@ -19,24 +19,28 @@ resource "airbyte_destination_aws_datalake" "my_destination_awsdatalake" { bucket_name = "...my_bucket_name..." bucket_prefix = "...my_bucket_prefix..." credentials = { - credentials_title = "IAM Role" - role_arn = "...my_role_arn..." + destination_aws_datalake_authentication_mode_iam_role = { + credentials_title = "IAM Role" + role_arn = "...my_role_arn..." + } } destination_type = "aws-datalake" format = { - compression_codec = "UNCOMPRESSED" - format_type = "JSONL" + destination_aws_datalake_output_format_wildcard_json_lines_newline_delimited_json = { + compression_codec = "UNCOMPRESSED" + format_type = "JSONL" + } } glue_catalog_float_as_decimal = false lakeformation_database_default_tag_key = "pii_level" lakeformation_database_default_tag_values = "private,public" lakeformation_database_name = "...my_lakeformation_database_name..." - lakeformation_governed_tables = true - partitioning = "YEAR/MONTH/DAY" - region = "us-gov-east-1" + lakeformation_governed_tables = false + partitioning = "DAY" + region = "us-west-2" } - name = "Angie Durgan" - workspace_id = "fa946773-9251-4aa5-ac3f-5ad019da1ffe" + name = "Gloria Padberg" + workspace_id = "2c3f5ad0-19da-41ff-a78f-097b0074f154" } ``` diff --git a/docs/resources/destination_azure_blob_storage.md b/docs/resources/destination_azure_blob_storage.md index f8d5d7d81..664f8730b 100644 --- a/docs/resources/destination_azure_blob_storage.md +++ b/docs/resources/destination_azure_blob_storage.md @@ -23,12 +23,14 @@ resource "airbyte_destination_azure_blob_storage" "my_destination_azureblobstora azure_blob_storage_spill_size = 500 destination_type = "azure-blob-storage" format = { - flattening = "Root level flattening" - format_type = "CSV" + destination_azure_blob_storage_output_format_csv_comma_separated_values = { + flattening = "Root level flattening" + format_type = "CSV" + } } } - name = "Geneva Klein Jr." - workspace_id = "74f15471-b5e6-4e13-b99d-488e1e91e450" + name = "Sophia Jerde I" + workspace_id = "b99d488e-1e91-4e45-8ad2-abd44269802d" } ``` diff --git a/docs/resources/destination_bigquery.md b/docs/resources/destination_bigquery.md index c862c9b8d..9b4f78af6 100644 --- a/docs/resources/destination_bigquery.md +++ b/docs/resources/destination_bigquery.md @@ -18,25 +18,29 @@ resource "airbyte_destination_bigquery" "my_destination_bigquery" { big_query_client_buffer_size_mb = 15 credentials_json = "...my_credentials_json..." dataset_id = "...my_dataset_id..." - dataset_location = "us-east3" + dataset_location = "US" destination_type = "bigquery" loading_method = { - credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_bigquery_loading_method_gcs_staging = { + credential = { + destination_bigquery_loading_method_gcs_staging_credential_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } + } + file_buffer_count = 10 + gcs_bucket_name = "airbyte_sync" + gcs_bucket_path = "data_sync/test" + keep_files_in_gcs_bucket = "Keep all tmp files in GCS" + method = "GCS Staging" } - file_buffer_count = 10 - gcs_bucket_name = "airbyte_sync" - gcs_bucket_path = "data_sync/test" - keep_files_in_gcs_bucket = "Keep all tmp files in GCS" - method = "GCS Staging" } project_id = "...my_project_id..." transformation_priority = "batch" } - name = "Francisco Gleason" - workspace_id = "9802d502-a94b-4b4f-a3c9-69e9a3efa77d" + name = "Olivia Rice" + workspace_id = "63c969e9-a3ef-4a77-9fb1-4cd66ae395ef" } ``` diff --git a/docs/resources/destination_bigquery_denormalized.md b/docs/resources/destination_bigquery_denormalized.md index afe891db2..83d1f7a2a 100644 --- a/docs/resources/destination_bigquery_denormalized.md +++ b/docs/resources/destination_bigquery_denormalized.md @@ -18,24 +18,28 @@ resource "airbyte_destination_bigquery_denormalized" "my_destination_bigqueryden big_query_client_buffer_size_mb = 15 credentials_json = "...my_credentials_json..." dataset_id = "...my_dataset_id..." - dataset_location = "northamerica-northeast2" + dataset_location = "europe-west8" destination_type = "bigquery-denormalized" loading_method = { - credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_bigquery_denormalized_loading_method_gcs_staging = { + credential = { + destination_bigquery_denormalized_loading_method_gcs_staging_credential_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } + } + file_buffer_count = 10 + gcs_bucket_name = "airbyte_sync" + gcs_bucket_path = "data_sync/test" + keep_files_in_gcs_bucket = "Keep all tmp files in GCS" + method = "GCS Staging" } - file_buffer_count = 10 - gcs_bucket_name = "airbyte_sync" - gcs_bucket_path = "data_sync/test" - keep_files_in_gcs_bucket = "Delete all tmp files from GCS" - method = "GCS Staging" } project_id = "...my_project_id..." } - name = "Irving Jenkins" - workspace_id = "e395efb9-ba88-4f3a-a699-7074ba4469b6" + name = "Jaime Will" + workspace_id = "66997074-ba44-469b-ae21-41959890afa5" } ``` diff --git a/docs/resources/destination_cassandra.md b/docs/resources/destination_cassandra.md index 8f25f787f..5919ea081 100644 --- a/docs/resources/destination_cassandra.md +++ b/docs/resources/destination_cassandra.md @@ -20,12 +20,12 @@ resource "airbyte_destination_cassandra" "my_destination_cassandra" { destination_type = "cassandra" keyspace = "...my_keyspace..." password = "...my_password..." - port = 6 - replication = 6 - username = "Kiley_Bartoletti" + port = 9 + replication = 2 + username = "Rachel.Lind10" } - name = "Tommy Kemmer" - workspace_id = "2516fe4c-8b71-41e5-b7fd-2ed028921cdd" + name = "Elvira Herman" + workspace_id = "fd2ed028-921c-4ddc-a926-01fb576b0d5f" } ``` diff --git a/docs/resources/destination_clickhouse.md b/docs/resources/destination_clickhouse.md index bae35dee0..105814d1c 100644 --- a/docs/resources/destination_clickhouse.md +++ b/docs/resources/destination_clickhouse.md @@ -22,12 +22,14 @@ resource "airbyte_destination_clickhouse" "my_destination_clickhouse" { password = "...my_password..." port = 8123 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_clickhouse_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Hannah40" + username = "Russ76" } - name = "Virginia Wunsch" - workspace_id = "76b0d5f0-d30c-45fb-b258-7053202c73d5" + name = "Mindy Renner" + workspace_id = "58705320-2c73-4d5f-a9b9-0c28909b3fe4" } ``` diff --git a/docs/resources/destination_convex.md b/docs/resources/destination_convex.md index 7e390b291..7d9246b6d 100644 --- a/docs/resources/destination_convex.md +++ b/docs/resources/destination_convex.md @@ -19,8 +19,8 @@ resource "airbyte_destination_convex" "my_destination_convex" { deployment_url = "https://cluttered-owl-337.convex.cloud" destination_type = "convex" } - name = "Alejandro Purdy DDS" - workspace_id = "28909b3f-e49a-48d9-8bf4-8633323f9b77" + name = "Casey Stracke" + workspace_id = "bf486333-23f9-4b77-b3a4-100674ebf692" } ``` diff --git a/docs/resources/destination_cumulio.md b/docs/resources/destination_cumulio.md index e3663c869..5d2ff997e 100644 --- a/docs/resources/destination_cumulio.md +++ b/docs/resources/destination_cumulio.md @@ -20,8 +20,8 @@ resource "airbyte_destination_cumulio" "my_destination_cumulio" { api_token = "...my_api_token..." destination_type = "cumulio" } - name = "Allen Parisian Jr." - workspace_id = "0674ebf6-9280-4d1b-a77a-89ebf737ae42" + name = "Miss Paul Steuber" + workspace_id = "77a89ebf-737a-4e42-83ce-5e6a95d8a0d4" } ``` diff --git a/docs/resources/destination_databend.md b/docs/resources/destination_databend.md index e49886aea..799441f45 100644 --- a/docs/resources/destination_databend.md +++ b/docs/resources/destination_databend.md @@ -21,10 +21,10 @@ resource "airbyte_destination_databend" "my_destination_databend" { password = "...my_password..." port = 443 table = "default" - username = "Daphne.Rosenbaum90" + username = "Herminia.Schmeler67" } - name = "Rosie McKenzie" - workspace_id = "8a0d446c-e2af-47a7-bcf3-be453f870b32" + name = "Cory Pfeffer" + workspace_id = "cf3be453-f870-4b32-ab5a-73429cdb1a84" } ``` diff --git a/docs/resources/destination_databricks.md b/docs/resources/destination_databricks.md index 7011bb93b..d9eb4bfd3 100644 --- a/docs/resources/destination_databricks.md +++ b/docs/resources/destination_databricks.md @@ -15,9 +15,11 @@ DestinationDatabricks Resource ```terraform resource "airbyte_destination_databricks" "my_destination_databricks" { configuration = { - accept_terms = false + accept_terms = true data_source = { - data_source_type = "MANAGED_TABLES_STORAGE" + destination_databricks_data_source_recommended_managed_tables = { + data_source_type = "MANAGED_TABLES_STORAGE" + } } database = "...my_database..." databricks_http_path = "sql/protocolvx/o/1234567489/0000-1111111-abcd90" @@ -25,11 +27,11 @@ resource "airbyte_destination_databricks" "my_destination_databricks" { databricks_port = "443" databricks_server_hostname = "abc-12345678-wxyz.cloud.databricks.com" destination_type = "databricks" - purge_staging_data = true + purge_staging_data = false schema = "default" } - name = "Joanna Kohler" - workspace_id = "29cdb1a8-422b-4b67-9d23-22715bf0cbb1" + name = "Cesar Hyatt" + workspace_id = "d2322715-bf0c-4bb1-a31b-8b90f3443a11" } ``` diff --git a/docs/resources/destination_dev_null.md b/docs/resources/destination_dev_null.md index de8dac9ff..fdb37c345 100644 --- a/docs/resources/destination_dev_null.md +++ b/docs/resources/destination_dev_null.md @@ -17,11 +17,13 @@ resource "airbyte_destination_dev_null" "my_destination_devnull" { configuration = { destination_type = "dev-null" test_destination = { - test_destination_type = "SILENT" + destination_dev_null_test_destination_silent = { + test_destination_type = "SILENT" + } } } - name = "Dale Boehm" - workspace_id = "b90f3443-a110-48e0-adcf-4b921879fce9" + name = "Miss Billie Ward" + workspace_id = "cf4b9218-79fc-4e95-bf73-ef7fbc7abd74" } ``` diff --git a/docs/resources/destination_dynamodb.md b/docs/resources/destination_dynamodb.md index 0f42edcf9..38c03cdfd 100644 --- a/docs/resources/destination_dynamodb.md +++ b/docs/resources/destination_dynamodb.md @@ -18,12 +18,12 @@ resource "airbyte_destination_dynamodb" "my_destination_dynamodb" { access_key_id = "A012345678910EXAMPLE" destination_type = "dynamodb" dynamodb_endpoint = "http://localhost:9000" - dynamodb_region = "ap-northeast-1" + dynamodb_region = "eu-west-3" dynamodb_table_name_prefix = "airbyte_sync" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Dixie Klocko" - workspace_id = "f7fbc7ab-d74d-4d39-80f5-d2cff7c70a45" + name = "Earl Mosciski DVM" + workspace_id = "5d2cff7c-70a4-4562-ad43-6813f16d9f5f" } ``` diff --git a/docs/resources/destination_elasticsearch.md b/docs/resources/destination_elasticsearch.md index f84e26ed6..a807612d4 100644 --- a/docs/resources/destination_elasticsearch.md +++ b/docs/resources/destination_elasticsearch.md @@ -16,17 +16,19 @@ DestinationElasticsearch Resource resource "airbyte_destination_elasticsearch" "my_destination_elasticsearch" { configuration = { authentication_method = { - api_key_id = "...my_apiKeyId..." - api_key_secret = "...my_apiKeySecret..." - method = "secret" + destination_elasticsearch_authentication_method_api_key_secret = { + api_key_id = "...my_apiKeyId..." + api_key_secret = "...my_apiKeySecret..." + method = "secret" + } } ca_certificate = "...my_ca_certificate..." destination_type = "elasticsearch" endpoint = "...my_endpoint..." - upsert = true + upsert = false } - name = "Jessie Schuster" - workspace_id = "6813f16d-9f5f-4ce6-8556-146c3e250fb0" + name = "Nathaniel Ryan" + workspace_id = "6146c3e2-50fb-4008-842e-141aac366c8d" } ``` diff --git a/docs/resources/destination_firebolt.md b/docs/resources/destination_firebolt.md index e79fa7fa9..b38672c8f 100644 --- a/docs/resources/destination_firebolt.md +++ b/docs/resources/destination_firebolt.md @@ -21,17 +21,19 @@ resource "airbyte_destination_firebolt" "my_destination_firebolt" { engine = "...my_engine..." host = "api.app.firebolt.io" loading_method = { - aws_key_id = "...my_aws_key_id..." - aws_key_secret = "...my_aws_key_secret..." - method = "S3" - s3_bucket = "...my_s3_bucket..." - s3_region = "us-east-1" + destination_firebolt_loading_method_external_table_via_s3 = { + aws_key_id = "...my_aws_key_id..." + aws_key_secret = "...my_aws_key_secret..." + method = "S3" + s3_bucket = "...my_s3_bucket..." + s3_region = "us-east-1" + } } password = "...my_password..." username = "username@email.com" } - name = "Miss Dennis Friesen" - workspace_id = "c366c8dd-6b14-4429-8747-4778a7bd466d" + name = "Ms. Janice McLaughlin" + workspace_id = "74778a7b-d466-4d28-810a-b3cdca425190" } ``` diff --git a/docs/resources/destination_firestore.md b/docs/resources/destination_firestore.md index 615faa598..5522f18a8 100644 --- a/docs/resources/destination_firestore.md +++ b/docs/resources/destination_firestore.md @@ -19,8 +19,8 @@ resource "airbyte_destination_firestore" "my_destination_firestore" { destination_type = "firestore" project_id = "...my_project_id..." } - name = "Mr. Irma Schaefer" - workspace_id = "b3cdca42-5190-44e5-a3c7-e0bc7178e479" + name = "Henrietta Hilpert" + workspace_id = "c7e0bc71-78e4-4796-b2a7-0c688282aa48" } ``` diff --git a/docs/resources/destination_gcs.md b/docs/resources/destination_gcs.md index 09e5f506e..90aa57f82 100644 --- a/docs/resources/destination_gcs.md +++ b/docs/resources/destination_gcs.md @@ -16,23 +16,29 @@ DestinationGcs Resource resource "airbyte_destination_gcs" "my_destination_gcs" { configuration = { credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_gcs_authentication_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } } destination_type = "gcs" format = { - compression_codec = { - codec = "bzip2" + destination_gcs_output_format_avro_apache_avro = { + compression_codec = { + destination_gcs_output_format_avro_apache_avro_compression_codec_bzip2 = { + codec = "bzip2" + } + } + format_type = "Avro" } - format_type = "Avro" } gcs_bucket_name = "airbyte_sync" gcs_bucket_path = "data_sync/test" - gcs_bucket_region = "europe-west2" + gcs_bucket_region = "us-east4" } - name = "Todd Oberbrunner DDS" - workspace_id = "688282aa-4825-462f-a22e-9817ee17cbe6" + name = "Sue Corkery" + workspace_id = "22e9817e-e17c-4be6-9e6b-7b95bc0ab3c2" } ``` diff --git a/docs/resources/destination_google_sheets.md b/docs/resources/destination_google_sheets.md index c26dfff5c..230e5fc5c 100644 --- a/docs/resources/destination_google_sheets.md +++ b/docs/resources/destination_google_sheets.md @@ -23,8 +23,8 @@ resource "airbyte_destination_google_sheets" "my_destination_googlesheets" { destination_type = "google-sheets" spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit" } - name = "Jenna Kautzer" - workspace_id = "b95bc0ab-3c20-4c4f-b789-fd871f99dd2e" + name = "Sadie Hackett" + workspace_id = "789fd871-f99d-4d2e-bd12-1aa6f1e674bd" } ``` diff --git a/docs/resources/destination_keen.md b/docs/resources/destination_keen.md index acad6e119..bc902bc5f 100644 --- a/docs/resources/destination_keen.md +++ b/docs/resources/destination_keen.md @@ -20,8 +20,8 @@ resource "airbyte_destination_keen" "my_destination_keen" { infer_timestamp = true project_id = "58b4acc22ba938934e888322e" } - name = "Miss Peter Cronin" - workspace_id = "6f1e674b-db04-4f15-b560-82d68ea19f1d" + name = "Mrs. Michele Williamson" + workspace_id = "56082d68-ea19-4f1d-9705-1339d08086a1" } ``` diff --git a/docs/resources/destination_kinesis.md b/docs/resources/destination_kinesis.md index d106d9207..aaf2ed733 100644 --- a/docs/resources/destination_kinesis.md +++ b/docs/resources/destination_kinesis.md @@ -16,15 +16,15 @@ DestinationKinesis Resource resource "airbyte_destination_kinesis" "my_destination_kinesis" { configuration = { access_key = "...my_accessKey..." - buffer_size = 1 + buffer_size = 5 destination_type = "kinesis" endpoint = "kinesis.us‑west‑1.amazonaws.com" private_key = "...my_privateKey..." region = "us‑west‑1" - shard_count = 4 + shard_count = 2 } - name = "Joann Bogan" - workspace_id = "9d08086a-1840-4394-8260-71f93f5f0642" + name = "Carmen McClure" + workspace_id = "26071f93-f5f0-4642-9ac7-af515cc413aa" } ``` diff --git a/docs/resources/destination_mariadb_columnstore.md b/docs/resources/destination_mariadb_columnstore.md index 6f6139ae7..1de641f63 100644 --- a/docs/resources/destination_mariadb_columnstore.md +++ b/docs/resources/destination_mariadb_columnstore.md @@ -22,12 +22,14 @@ resource "airbyte_destination_mariadb_columnstore" "my_destination_mariadbcolumn password = "...my_password..." port = 3306 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mariadb_columnstore_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Loyce_Schoen" + username = "Delaney_Nader" } - name = "Vernon Bergnaum" - workspace_id = "c413aa63-aae8-4d67-864d-bb675fd5e60b" + name = "Nicolas Kassulke" + workspace_id = "64dbb675-fd5e-460b-b75e-d4f6fbee41f3" } ``` diff --git a/docs/resources/destination_meilisearch.md b/docs/resources/destination_meilisearch.md index db0f9c93c..1219eac13 100644 --- a/docs/resources/destination_meilisearch.md +++ b/docs/resources/destination_meilisearch.md @@ -19,8 +19,8 @@ resource "airbyte_destination_meilisearch" "my_destination_meilisearch" { destination_type = "meilisearch" host = "...my_host..." } - name = "Arlene Heidenreich" - workspace_id = "4f6fbee4-1f33-4317-be35-b60eb1ea4265" + name = "Wendy Breitenberg" + workspace_id = "e35b60eb-1ea4-4265-95ba-3c28744ed53b" } ``` diff --git a/docs/resources/destination_mongodb.md b/docs/resources/destination_mongodb.md index 1191158f4..e3d67cdc2 100644 --- a/docs/resources/destination_mongodb.md +++ b/docs/resources/destination_mongodb.md @@ -16,22 +16,28 @@ DestinationMongodb Resource resource "airbyte_destination_mongodb" "my_destination_mongodb" { configuration = { auth_type = { - authorization = "login/password" - password = "...my_password..." - username = "Garland_Hane23" + destination_mongodb_authorization_type_login_password = { + authorization = "login/password" + password = "...my_password..." + username = "Jimmy.Luettgen63" + } } database = "...my_database..." destination_type = "mongodb" instance_type = { - cluster_url = "...my_cluster_url..." - instance = "atlas" + destination_mongodb_mongo_db_instance_type_mongo_db_atlas = { + cluster_url = "...my_cluster_url..." + instance = "atlas" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mongodb_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } } - name = "Ernest Labadie" - workspace_id = "4ed53b88-f3a8-4d8f-9c0b-2f2fb7b194a2" + name = "Dewey Leannon" + workspace_id = "c0b2f2fb-7b19-44a2-b6b2-6916fe1f08f4" } ``` diff --git a/docs/resources/destination_mssql.md b/docs/resources/destination_mssql.md index a32fb5b06..bb7e41206 100644 --- a/docs/resources/destination_mssql.md +++ b/docs/resources/destination_mssql.md @@ -23,15 +23,19 @@ resource "airbyte_destination_mssql" "my_destination_mssql" { port = 1433 schema = "public" ssl_method = { - ssl_method = "encrypted_trust_server_certificate" + destination_mssql_ssl_method_encrypted_trust_server_certificate_ = { + ssl_method = "encrypted_trust_server_certificate" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mssql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Haylie37" + username = "Laron.Gerlach40" } - name = "Joe Hoppe" - workspace_id = "1f08f429-4e36-498f-847f-603e8b445e80" + name = "Isaac Wolf" + workspace_id = "7f603e8b-445e-480c-a55e-fd20e457e185" } ``` diff --git a/docs/resources/destination_mysql.md b/docs/resources/destination_mysql.md index 2653d8b64..39f22cf7c 100644 --- a/docs/resources/destination_mysql.md +++ b/docs/resources/destination_mysql.md @@ -22,12 +22,14 @@ resource "airbyte_destination_mysql" "my_destination_mysql" { password = "...my_password..." port = 3306 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mysql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Lisa92" + username = "Nadia_Howe62" } - name = "Dr. Jody Cummings" - workspace_id = "57e1858b-6a89-4fbe-ba5a-a8e4824d0ab4" + name = "Rudolph Trantow" + workspace_id = "5aa8e482-4d0a-4b40-b508-8e51862065e9" } ``` diff --git a/docs/resources/destination_oracle.md b/docs/resources/destination_oracle.md index 1e0ffe7ec..9d2d19a00 100644 --- a/docs/resources/destination_oracle.md +++ b/docs/resources/destination_oracle.md @@ -23,12 +23,14 @@ resource "airbyte_destination_oracle" "my_destination_oracle" { schema = "airbyte" sid = "...my_sid..." tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_oracle_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jaiden53" + username = "Duncan69" } - name = "Ms. Lamar Hessel" - workspace_id = "2065e904-f3b1-4194-b8ab-f603a79f9dfe" + name = "Diane Mayer" + workspace_id = "8abf603a-79f9-4dfe-8ab7-da8a50ce187f" } ``` diff --git a/docs/resources/destination_postgres.md b/docs/resources/destination_postgres.md index 1ef2cade6..dab70efac 100644 --- a/docs/resources/destination_postgres.md +++ b/docs/resources/destination_postgres.md @@ -23,15 +23,19 @@ resource "airbyte_destination_postgres" "my_destination_postgres" { port = 5432 schema = "public" ssl_mode = { - mode = "allow" + destination_postgres_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_postgres_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Marc_Predovic" + username = "Gerald.Powlowski46" } - name = "Max O'Connell DDS" - workspace_id = "e187f86b-c173-4d68-9eee-9526f8d986e8" + name = "Angelina Jenkins" + workspace_id = "eee9526f-8d98-46e8-81ea-d4f0e1012563" } ``` diff --git a/docs/resources/destination_pubsub.md b/docs/resources/destination_pubsub.md index 0f2d1f14d..264c82203 100644 --- a/docs/resources/destination_pubsub.md +++ b/docs/resources/destination_pubsub.md @@ -15,18 +15,18 @@ DestinationPubsub Resource ```terraform resource "airbyte_destination_pubsub" "my_destination_pubsub" { configuration = { - batching_delay_threshold = 5 - batching_element_count_threshold = 1 - batching_enabled = true - batching_request_bytes_threshold = 7 + batching_delay_threshold = 10 + batching_element_count_threshold = 6 + batching_enabled = false + batching_request_bytes_threshold = 9 credentials_json = "...my_credentials_json..." destination_type = "pubsub" - ordering_enabled = true + ordering_enabled = false project_id = "...my_project_id..." topic_id = "...my_topic_id..." } - name = "Lela Baumbach Jr." - workspace_id = "12563f94-e29e-4973-a922-a57a15be3e06" + name = "Frankie Metz" + workspace_id = "e922a57a-15be-43e0-a080-7e2b6e3ab884" } ``` diff --git a/docs/resources/destination_pulsar.md b/docs/resources/destination_pulsar.md index d9dc0351e..7cfd56ede 100644 --- a/docs/resources/destination_pulsar.md +++ b/docs/resources/destination_pulsar.md @@ -15,27 +15,27 @@ DestinationPulsar Resource ```terraform resource "airbyte_destination_pulsar" "my_destination_pulsar" { configuration = { - batching_enabled = true - batching_max_messages = 5 + batching_enabled = false + batching_max_messages = 10 batching_max_publish_delay = 0 - block_if_queue_full = true + block_if_queue_full = false brokers = "broker1:6650,broker2:6650" - compression_type = "SNAPPY" + compression_type = "ZLIB" destination_type = "pulsar" - max_pending_messages = 2 - max_pending_messages_across_partitions = 8 + max_pending_messages = 5 + max_pending_messages_across_partitions = 7 producer_name = "airbyte-producer" producer_sync = false - send_timeout_ms = 9 + send_timeout_ms = 0 topic_namespace = "default" - topic_pattern = "sample.topic" + topic_pattern = "{namespace}.{stream}.sample" topic_tenant = "public" topic_test = "test.topic" topic_type = "non-persistent" use_tls = true } - name = "Jordan Haag" - workspace_id = "0597a60f-f2a5-44a3-9e94-764a3e865e79" + name = "Warren Greenholt" + workspace_id = "1e94764a-3e86-45e7-956f-9251a5a9da66" } ``` diff --git a/docs/resources/destination_rabbitmq.md b/docs/resources/destination_rabbitmq.md index 28840150e..42f54de46 100644 --- a/docs/resources/destination_rabbitmq.md +++ b/docs/resources/destination_rabbitmq.md @@ -19,14 +19,14 @@ resource "airbyte_destination_rabbitmq" "my_destination_rabbitmq" { exchange = "...my_exchange..." host = "...my_host..." password = "...my_password..." - port = 3 + port = 0 routing_key = "...my_routing_key..." - ssl = false - username = "Walker35" + ssl = true + username = "Winfield_Herman" virtual_host = "...my_virtual_host..." } - name = "Lynda Heathcote" - workspace_id = "da660ff5-7bfa-4ad4-b9ef-c1b4512c1032" + name = "Oliver Osinski" + workspace_id = "f9efc1b4-512c-4103-a648-dc2f615199eb" } ``` diff --git a/docs/resources/destination_redis.md b/docs/resources/destination_redis.md index 02d322ee5..2589bbfc1 100644 --- a/docs/resources/destination_redis.md +++ b/docs/resources/destination_redis.md @@ -19,18 +19,22 @@ resource "airbyte_destination_redis" "my_destination_redis" { destination_type = "redis" host = "localhost,127.0.0.1" password = "...my_password..." - port = 4 - ssl = true + port = 10 + ssl = false ssl_mode = { - mode = "disable" + destination_redis_ssl_modes_disable = { + mode = "disable" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_redis_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Joy.Swaniawski95" + username = "Americo_Weber" } - name = "Ms. Cheryl Hane" - workspace_id = "ebfd0e9f-e6c6-432c-a3ae-d0117996312f" + name = "Gene Sauer" + workspace_id = "2ca3aed0-1179-4963-92fd-e04771778ff6" } ``` diff --git a/docs/resources/destination_redshift.md b/docs/resources/destination_redshift.md index 2dfd87210..560b99a4e 100644 --- a/docs/resources/destination_redshift.md +++ b/docs/resources/destination_redshift.md @@ -23,27 +23,33 @@ resource "airbyte_destination_redshift" "my_destination_redshift" { port = 5439 schema = "public" tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_redshift_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } uploading_method = { - access_key_id = "...my_access_key_id..." - encryption = { - encryption_type = "aes_cbc_envelope" - key_encrypting_key = "...my_key_encrypting_key..." + destination_redshift_uploading_method_s3_staging = { + access_key_id = "...my_access_key_id..." + encryption = { + destination_redshift_uploading_method_s3_staging_encryption_aes_cbc_envelope_encryption = { + encryption_type = "aes_cbc_envelope" + key_encrypting_key = "...my_key_encrypting_key..." + } + } + file_buffer_count = 10 + file_name_pattern = "{date}" + method = "S3 Staging" + purge_staging_data = false + s3_bucket_name = "airbyte.staging" + s3_bucket_path = "data_sync/test" + s3_bucket_region = "ap-southeast-1" + secret_access_key = "...my_secret_access_key..." } - file_buffer_count = 10 - file_name_pattern = "{date}" - method = "S3 Staging" - purge_staging_data = false - s3_bucket_name = "airbyte.staging" - s3_bucket_path = "data_sync/test" - s3_bucket_region = "ap-southeast-1" - secret_access_key = "...my_secret_access_key..." } - username = "Jaqueline.Buckridge" + username = "Donavon.Koch" } - name = "Emilio Wisoky PhD" - workspace_id = "01747636-0a15-4db6-a660-659a1adeaab5" + name = "Mrs. Melissa Osinski" + workspace_id = "b6a66065-9a1a-4dea-ab58-51d6c645b08b" } ``` diff --git a/docs/resources/destination_rockset.md b/docs/resources/destination_rockset.md index d29da292a..8b24493d8 100644 --- a/docs/resources/destination_rockset.md +++ b/docs/resources/destination_rockset.md @@ -18,10 +18,10 @@ resource "airbyte_destination_rockset" "my_destination_rockset" { api_key = "...my_api_key..." api_server = "...my_api_server..." destination_type = "rockset" - workspace = "my_workspace" + workspace = "commons" } - name = "Gloria Skiles" - workspace_id = "645b08b6-1891-4baa-8fe1-ade008e6f8c5" + name = "Miss Nora Moen" + workspace_id = "a0fe1ade-008e-46f8-85f3-50d8cdb5a341" } ``` diff --git a/docs/resources/destination_s3.md b/docs/resources/destination_s3.md index 5c8b94e96..db3733d8d 100644 --- a/docs/resources/destination_s3.md +++ b/docs/resources/destination_s3.md @@ -17,22 +17,26 @@ resource "airbyte_destination_s3" "my_destination_s3" { configuration = { access_key_id = "A012345678910EXAMPLE" destination_type = "s3" - file_name_pattern = "{sync_id}" + file_name_pattern = "{timestamp}" format = { - compression_codec = { - codec = "bzip2" + destination_s3_output_format_avro_apache_avro = { + compression_codec = { + destination_s3_output_format_avro_apache_avro_compression_codec_bzip2 = { + codec = "bzip2" + } + } + format_type = "Avro" } - format_type = "Avro" } s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "us-west-2" + s3_bucket_region = "us-east-2" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Dorothy Stanton" - workspace_id = "db5a3418-1430-4104-a181-3d5208ece7e2" + name = "Mr. Carmen Altenwerth" + workspace_id = "21813d52-08ec-4e7e-a53b-668451c6c6e2" } ``` diff --git a/docs/resources/destination_s3_glue.md b/docs/resources/destination_s3_glue.md index a6c41f8b9..0de54bfa4 100644 --- a/docs/resources/destination_s3_glue.md +++ b/docs/resources/destination_s3_glue.md @@ -17,25 +17,29 @@ resource "airbyte_destination_s3_glue" "my_destination_s3glue" { configuration = { access_key_id = "A012345678910EXAMPLE" destination_type = "s3-glue" - file_name_pattern = "{date:yyyy_MM}" + file_name_pattern = "{date}" format = { - compression = { - compression_type = "GZIP" + destination_s3_glue_output_format_json_lines_newline_delimited_json = { + compression = { + destination_s3_glue_output_format_json_lines_newline_delimited_json_compression_gzip = { + compression_type = "GZIP" + } + } + flattening = "No flattening" + format_type = "JSONL" } - flattening = "No flattening" - format_type = "JSONL" } glue_database = "airbyte_database" glue_serialization_library = "org.apache.hive.hcatalog.data.JsonSerDe" s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "ap-southeast-1" + s3_bucket_region = "us-east-2" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Jennie Gutkowski DDS" - workspace_id = "6c6e205e-16de-4ab3-bec9-578a64584273" + name = "Teri Thiel" + workspace_id = "3fec9578-a645-4842-b3a8-418d162309fb" } ``` diff --git a/docs/resources/destination_scylla.md b/docs/resources/destination_scylla.md index 7b1aeb315..0d8a4f44b 100644 --- a/docs/resources/destination_scylla.md +++ b/docs/resources/destination_scylla.md @@ -15,16 +15,16 @@ DestinationScylla Resource ```terraform resource "airbyte_destination_scylla" "my_destination_scylla" { configuration = { - address = "520 Stark Corners" + address = "61561 Marques Trafficway" destination_type = "scylla" keyspace = "...my_keyspace..." password = "...my_password..." - port = 4 - replication = 1 - username = "Daron_Beahan" + port = 10 + replication = 7 + username = "Leola50" } - name = "John Monahan" - workspace_id = "921aefb9-f58c-44d8-ae68-e4be056013f5" + name = "Oscar Smith" + workspace_id = "e68e4be0-5601-43f5-9da7-57a59ecfef66" } ``` diff --git a/docs/resources/destination_sftp_json.md b/docs/resources/destination_sftp_json.md index e9c9e2962..007676331 100644 --- a/docs/resources/destination_sftp_json.md +++ b/docs/resources/destination_sftp_json.md @@ -20,10 +20,10 @@ resource "airbyte_destination_sftp_json" "my_destination_sftpjson" { host = "...my_host..." password = "...my_password..." port = 22 - username = "Ryder.Nolan" + username = "Virginie_Bergnaum67" } - name = "Monique Harvey" - workspace_id = "cfef66ef-1caa-4338-bc2b-eb477373c8d7" + name = "Shannon Lind" + workspace_id = "2beb4773-73c8-4d72-b64d-1db1f2c43106" } ``` diff --git a/docs/resources/destination_snowflake.md b/docs/resources/destination_snowflake.md index ea1526d9b..e82b775c5 100644 --- a/docs/resources/destination_snowflake.md +++ b/docs/resources/destination_snowflake.md @@ -16,25 +16,29 @@ DestinationSnowflake Resource resource "airbyte_destination_snowflake" "my_destination_snowflake" { configuration = { credentials = { - auth_type = "Key Pair Authentication" - private_key = "...my_private_key..." - private_key_password = "...my_private_key_password..." + destination_snowflake_authorization_method_key_pair_authentication = { + auth_type = "Key Pair Authentication" + private_key = "...my_private_key..." + private_key_password = "...my_private_key_password..." + } } database = "AIRBYTE_DATABASE" destination_type = "snowflake" file_buffer_count = 10 - host = "accountname.snowflakecomputing.com" + host = "accountname.us-east-2.aws.snowflakecomputing.com" jdbc_url_params = "...my_jdbc_url_params..." loading_method = { - method = "Internal Staging" + destination_snowflake_data_staging_method_recommended_internal_staging = { + method = "Internal Staging" + } } role = "AIRBYTE_ROLE" schema = "AIRBYTE_SCHEMA" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - name = "Juan Wolf" - workspace_id = "4310661e-9634-49e1-8f9e-06e3a437000a" + name = "Miss Katrina Weber" + workspace_id = "9e06e3a4-3700-40ae-ab6b-c9b8f759eac5" } ``` diff --git a/docs/resources/destination_typesense.md b/docs/resources/destination_typesense.md index c88d5ff70..c95183dcd 100644 --- a/docs/resources/destination_typesense.md +++ b/docs/resources/destination_typesense.md @@ -22,8 +22,8 @@ resource "airbyte_destination_typesense" "my_destination_typesense" { port = "...my_port..." protocol = "...my_protocol..." } - name = "Angel Pouros" - workspace_id = "c9b8f759-eac5-45a9-b41d-311352965bb8" + name = "Jodi Mueller" + workspace_id = "1d311352-965b-4b8a-b202-611435e139db" } ``` diff --git a/docs/resources/destination_vertica.md b/docs/resources/destination_vertica.md index fbb6fb96c..a2ab585ac 100644 --- a/docs/resources/destination_vertica.md +++ b/docs/resources/destination_vertica.md @@ -23,12 +23,14 @@ resource "airbyte_destination_vertica" "my_destination_vertica" { port = 5433 schema = "...my_schema..." tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_vertica_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jeff16" + username = "Carlos_Cronin" } - name = "Anna Bergnaum" - workspace_id = "5e139dbc-2259-4b1a-bda8-c070e1084cb0" + name = "Gerald Ondricka" + workspace_id = "a8c070e1-084c-4b06-b2d1-ad879eeb9665" } ``` diff --git a/docs/resources/source_aircall.md b/docs/resources/source_aircall.md index 00e865672..7e1026376 100644 --- a/docs/resources/source_aircall.md +++ b/docs/resources/source_aircall.md @@ -20,8 +20,9 @@ resource "airbyte_source_aircall" "my_source_aircall" { source_type = "aircall" start_date = "2022-03-01T00:00:00.000Z" } - name = "Krystal Breitenberg" - workspace_id = "879eeb96-65b8-45ef-bd02-bae0be2d7822" + name = "Cecelia Wiza" + secret_id = "...my_secretId..." + workspace_id = "02bae0be-2d78-4225-9e3e-a4b5197f9244" } ``` diff --git a/docs/resources/source_airtable.md b/docs/resources/source_airtable.md index fcbe4fe84..fbf57fdd0 100644 --- a/docs/resources/source_airtable.md +++ b/docs/resources/source_airtable.md @@ -16,17 +16,20 @@ SourceAirtable Resource resource "airbyte_source_airtable" "my_source_airtable" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-05-19T03:53:46.149Z" + source_airtable_authentication_o_auth2_0 = { + access_token = "...my_access_token..." + auth_method = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2022-02-16T03:38:31.705Z" + } } source_type = "airtable" } - name = "Jeff Walker" - workspace_id = "b5197f92-443d-4a7c-a52b-895c537c6454" + name = "Cody Rowe" + secret_id = "...my_secretId..." + workspace_id = "2b895c53-7c64-454e-bb0b-34896c3ca5ac" } ``` diff --git a/docs/resources/source_alloydb.md b/docs/resources/source_alloydb.md index fd3ef277c..aa3456d71 100644 --- a/docs/resources/source_alloydb.md +++ b/docs/resources/source_alloydb.md @@ -21,27 +21,34 @@ resource "airbyte_source_alloydb" "my_source_alloydb" { password = "...my_password..." port = 5432 replication_method = { - initial_waiting_seconds = 10 - lsn_commit_behaviour = "After loading Data in the destination" - method = "CDC" - plugin = "pgoutput" - publication = "...my_publication..." - replication_slot = "...my_replication_slot..." + source_alloydb_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 8 + lsn_commit_behaviour = "After loading Data in the destination" + method = "CDC" + plugin = "pgoutput" + publication = "...my_publication..." + replication_slot = "...my_replication_slot..." + } } schemas = [ "...", ] source_type = "alloydb" ssl_mode = { - mode = "allow" + source_alloydb_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_alloydb_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Alvis28" + username = "Bruce.Zieme44" } - name = "Sergio Hirthe" - workspace_id = "ca5acfbe-2fd5-4707-9779-29177deac646" + name = "Viola Hane" + secret_id = "...my_secretId..." + workspace_id = "929177de-ac64-46ec-b573-409e3eb1e5a2" } ``` diff --git a/docs/resources/source_amazon_ads.md b/docs/resources/source_amazon_ads.md index 127aad12f..8f3404f49 100644 --- a/docs/resources/source_amazon_ads.md +++ b/docs/resources/source_amazon_ads.md @@ -20,21 +20,22 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { client_secret = "...my_client_secret..." look_back_window = 10 profiles = [ - 7, + 1, ] refresh_token = "...my_refresh_token..." - region = "EU" + region = "FE" report_record_types = [ - "asins_targets", + "keywords", ] source_type = "amazon-ads" start_date = "2022-10-10" state_filter = [ - "enabled", + "paused", ] } - name = "Bobbie Terry" - workspace_id = "b1e5a2b1-2eb0-47f1-96db-99545fc95fa8" + name = "Harold Boyer" + secret_id = "...my_secretId..." + workspace_id = "b99545fc-95fa-4889-b0e1-89dbb30fcb33" } ``` diff --git a/docs/resources/source_amazon_sqs.md b/docs/resources/source_amazon_sqs.md index 7aa5fe046..850632db6 100644 --- a/docs/resources/source_amazon_sqs.md +++ b/docs/resources/source_amazon_sqs.md @@ -21,13 +21,14 @@ resource "airbyte_source_amazon_sqs" "my_source_amazonsqs" { max_batch_size = 5 max_wait_time = 5 queue_url = "https://sqs.eu-west-1.amazonaws.com/1234567890/my-example-queue" - region = "us-east-2" + region = "ap-northeast-2" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" source_type = "amazon-sqs" visibility_timeout = 15 } - name = "Billie Morar" - workspace_id = "b30fcb33-ea05-45b1-97cd-44e2f52d82d3" + name = "Roger McDermott" + secret_id = "...my_secretId..." + workspace_id = "d44e2f52-d82d-4351-bbb6-f48b656bcdb3" } ``` diff --git a/docs/resources/source_amplitude.md b/docs/resources/source_amplitude.md index eb59b1bd3..1622d4e04 100644 --- a/docs/resources/source_amplitude.md +++ b/docs/resources/source_amplitude.md @@ -17,13 +17,14 @@ resource "airbyte_source_amplitude" "my_source_amplitude" { configuration = { api_key = "...my_api_key..." data_region = "Standard Server" - request_time_range = 0 + request_time_range = 10 secret_key = "...my_secret_key..." source_type = "amplitude" start_date = "2021-01-25T00:00:00Z" } - name = "Flora Renner" - workspace_id = "48b656bc-db35-4ff2-a4b2-7537a8cd9e73" + name = "Russell Toy" + secret_id = "...my_secretId..." + workspace_id = "27537a8c-d9e7-4319-8177-d525f77b114e" } ``` diff --git a/docs/resources/source_apify_dataset.md b/docs/resources/source_apify_dataset.md index bb2421c78..384cdf446 100644 --- a/docs/resources/source_apify_dataset.md +++ b/docs/resources/source_apify_dataset.md @@ -19,8 +19,9 @@ resource "airbyte_source_apify_dataset" "my_source_apifydataset" { dataset_id = "...my_datasetId..." source_type = "apify-dataset" } - name = "Sherman Brown" - workspace_id = "d525f77b-114e-4eb5-aff7-85fc37814d4c" + name = "Leo Dare" + secret_id = "...my_secretId..." + workspace_id = "785fc378-14d4-4c98-a0c2-bb89eb75dad6" } ``` diff --git a/docs/resources/source_asana.md b/docs/resources/source_asana.md index 7eae60caf..6bd93088a 100644 --- a/docs/resources/source_asana.md +++ b/docs/resources/source_asana.md @@ -16,15 +16,18 @@ SourceAsana Resource resource "airbyte_source_asana" "my_source_asana" { configuration = { credentials = { - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - option_title = "OAuth Credentials" - refresh_token = "...my_refresh_token..." + source_asana_authentication_mechanism_authenticate_via_asana_oauth_ = { + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + option_title = "OAuth Credentials" + refresh_token = "...my_refresh_token..." + } } source_type = "asana" } - name = "Dr. Armando Waelchi" - workspace_id = "bb89eb75-dad6-436c-a005-03d8bb31180f" + name = "Gertrude Russel Jr." + secret_id = "...my_secretId..." + workspace_id = "503d8bb3-1180-4f73-9ae9-e057eb809e28" } ``` diff --git a/docs/resources/source_auth0.md b/docs/resources/source_auth0.md index 1aa1df78a..e51457525 100644 --- a/docs/resources/source_auth0.md +++ b/docs/resources/source_auth0.md @@ -17,13 +17,16 @@ resource "airbyte_source_auth0" "my_source_auth0" { configuration = { base_url = "https://dev-yourOrg.us.auth0.com/" credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2_access_token" + source_auth0_authentication_method_o_auth2_access_token = { + access_token = "...my_access_token..." + auth_type = "oauth2_access_token" + } } source_type = "auth0" } - name = "Wendy McKenzie" - workspace_id = "9e057eb8-09e2-4810-b31f-3981d4c700b6" + name = "Sandra Frami DVM" + secret_id = "...my_secretId..." + workspace_id = "3981d4c7-00b6-407f-bc93-c73b9da3f2ce" } ``` diff --git a/docs/resources/source_aws_cloudtrail.md b/docs/resources/source_aws_cloudtrail.md index 8060a5f72..68a78cdaf 100644 --- a/docs/resources/source_aws_cloudtrail.md +++ b/docs/resources/source_aws_cloudtrail.md @@ -21,8 +21,9 @@ resource "airbyte_source_aws_cloudtrail" "my_source_awscloudtrail" { source_type = "aws-cloudtrail" start_date = "2021-01-01" } - name = "Jacob Sawayn" - workspace_id = "c73b9da3-f2ce-4da7-a23f-2257411faf4b" + name = "Leigh Denesik" + secret_id = "...my_secretId..." + workspace_id = "2257411f-af4b-4754-8e47-2e802857a5b4" } ``` diff --git a/docs/resources/source_azure_blob_storage.md b/docs/resources/source_azure_blob_storage.md index a540b94bb..d4a9f7f43 100644 --- a/docs/resources/source_azure_blob_storage.md +++ b/docs/resources/source_azure_blob_storage.md @@ -22,12 +22,15 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { azure_blob_storage_endpoint = "blob.core.windows.net" azure_blob_storage_schema_inference_limit = 500 format = { - format_type = "JSONL" + source_azure_blob_storage_input_format_json_lines_newline_delimited_json = { + format_type = "JSONL" + } } source_type = "azure-blob-storage" } - name = "Lucille Funk" - workspace_id = "72e80285-7a5b-4404-a3a7-d575f1400e76" + name = "Natalie Dooley" + secret_id = "...my_secretId..." + workspace_id = "d575f140-0e76-44ad-b334-ec1b781b36a0" } ``` diff --git a/docs/resources/source_azure_table.md b/docs/resources/source_azure_table.md index 857505037..a309d9336 100644 --- a/docs/resources/source_azure_table.md +++ b/docs/resources/source_azure_table.md @@ -18,10 +18,11 @@ resource "airbyte_source_azure_table" "my_source_azuretable" { source_type = "azure-table" storage_access_key = "...my_storage_access_key..." storage_account_name = "...my_storage_account_name..." - storage_endpoint_suffix = "core.windows.net" + storage_endpoint_suffix = "core.chinacloudapi.cn" } - name = "Woodrow Klein" - workspace_id = "4ec1b781-b36a-4080-88d1-00efada200ef" + name = "Brandy Langosh Jr." + secret_id = "...my_secretId..." + workspace_id = "0efada20-0ef0-4422-ab21-64cf9ab8366c" } ``` diff --git a/docs/resources/source_bamboo_hr.md b/docs/resources/source_bamboo_hr.md index bae752112..b95a00116 100644 --- a/docs/resources/source_bamboo_hr.md +++ b/docs/resources/source_bamboo_hr.md @@ -21,8 +21,9 @@ resource "airbyte_source_bamboo_hr" "my_source_bamboohr" { source_type = "bamboo-hr" subdomain = "...my_subdomain..." } - name = "Phyllis Denesik" - workspace_id = "2164cf9a-b836-46c7-a3ff-da9e06bee482" + name = "Thelma Wisoky" + secret_id = "...my_secretId..." + workspace_id = "a9e06bee-4825-4c1f-80e1-15c80bff9185" } ``` diff --git a/docs/resources/source_bigcommerce.md b/docs/resources/source_bigcommerce.md index 2b70385d0..857cd69d5 100644 --- a/docs/resources/source_bigcommerce.md +++ b/docs/resources/source_bigcommerce.md @@ -20,8 +20,9 @@ resource "airbyte_source_bigcommerce" "my_source_bigcommerce" { start_date = "2021-01-01" store_hash = "...my_store_hash..." } - name = "Adrienne Carter" - workspace_id = "0e115c80-bff9-4185-84ec-42defcce8f19" + name = "Emma Ward" + secret_id = "...my_secretId..." + workspace_id = "2defcce8-f197-4777-be63-562a7b408f05" } ``` diff --git a/docs/resources/source_bigquery.md b/docs/resources/source_bigquery.md index 6e3abd3c2..1a895c096 100644 --- a/docs/resources/source_bigquery.md +++ b/docs/resources/source_bigquery.md @@ -20,8 +20,9 @@ resource "airbyte_source_bigquery" "my_source_bigquery" { project_id = "...my_project_id..." source_type = "bigquery" } - name = "Joy Kessler" - workspace_id = "e63562a7-b408-4f05-a3d4-8fdaf313a1f5" + name = "Luis Schumm" + secret_id = "...my_secretId..." + workspace_id = "fdaf313a-1f5f-4d94-a59c-0b36f25ea944" } ``` diff --git a/docs/resources/source_bing_ads.md b/docs/resources/source_bing_ads.md index e6c4733b3..b4862e553 100644 --- a/docs/resources/source_bing_ads.md +++ b/docs/resources/source_bing_ads.md @@ -21,12 +21,13 @@ resource "airbyte_source_bing_ads" "my_source_bingads" { developer_token = "...my_developer_token..." lookback_window = 10 refresh_token = "...my_refresh_token..." - reports_start_date = "2021-03-11" + reports_start_date = "2022-04-10" source_type = "bing-ads" tenant_id = "...my_tenant_id..." } - name = "Rose Hills" - workspace_id = "0b36f25e-a944-4f3b-b56c-11f6c37a5126" + name = "Lorraine Jacobson Sr." + secret_id = "...my_secretId..." + workspace_id = "f6c37a51-2624-4383-9bbc-05a23a45cefc" } ``` diff --git a/docs/resources/source_braintree.md b/docs/resources/source_braintree.md index 3cf09297d..73c491c2c 100644 --- a/docs/resources/source_braintree.md +++ b/docs/resources/source_braintree.md @@ -15,15 +15,16 @@ SourceBraintree Resource ```terraform resource "airbyte_source_braintree" "my_source_braintree" { configuration = { - environment = "Sandbox" + environment = "Production" merchant_id = "...my_merchant_id..." private_key = "...my_private_key..." public_key = "...my_public_key..." source_type = "braintree" - start_date = "2020" + start_date = "2020-11-22 20:20:05" } - name = "Kristy Quigley II" - workspace_id = "a23a45ce-fc5f-4de1-8a0c-e2169e510019" + name = "Molly Beier" + secret_id = "...my_secretId..." + workspace_id = "2169e510-019c-46dc-9e34-762799bfbbe6" } ``` diff --git a/docs/resources/source_braze.md b/docs/resources/source_braze.md index 1e7a099e4..42a0e4f28 100644 --- a/docs/resources/source_braze.md +++ b/docs/resources/source_braze.md @@ -17,11 +17,12 @@ resource "airbyte_source_braze" "my_source_braze" { configuration = { api_key = "...my_api_key..." source_type = "braze" - start_date = "2021-09-11" + start_date = "2022-06-22" url = "...my_url..." } - name = "Jermaine Hettinger" - workspace_id = "4762799b-fbbe-4694-9fb2-bb4ecae6c3d5" + name = "Irvin Rippin" + secret_id = "...my_secretId..." + workspace_id = "b4ecae6c-3d5d-4b3a-9ebd-5daea4c506a8" } ``` diff --git a/docs/resources/source_chargebee.md b/docs/resources/source_chargebee.md index a14af8f5e..02249321a 100644 --- a/docs/resources/source_chargebee.md +++ b/docs/resources/source_chargebee.md @@ -21,8 +21,9 @@ resource "airbyte_source_chargebee" "my_source_chargebee" { source_type = "chargebee" start_date = "2021-01-25T00:00:00Z" } - name = "Kristopher Walter" - workspace_id = "5daea4c5-06a8-4aa9-8c02-644cf5e9d9a4" + name = "Roxanne Aufderhar" + secret_id = "...my_secretId..." + workspace_id = "44cf5e9d-9a45-478a-9c1a-c600dec001ac" } ``` diff --git a/docs/resources/source_chartmogul.md b/docs/resources/source_chartmogul.md index c27a1702f..7369800a3 100644 --- a/docs/resources/source_chartmogul.md +++ b/docs/resources/source_chartmogul.md @@ -16,12 +16,13 @@ SourceChartmogul Resource resource "airbyte_source_chartmogul" "my_source_chartmogul" { configuration = { api_key = "...my_api_key..." - interval = "week" + interval = "month" source_type = "chartmogul" start_date = "2017-01-25T00:00:00Z" } - name = "Miss Carroll Rutherford" - workspace_id = "600dec00-1ac8-402e-aec0-9ff8f0f816ff" + name = "Louis Treutel V" + secret_id = "...my_secretId..." + workspace_id = "ff8f0f81-6ff3-4477-813e-902c14125b09" } ``` diff --git a/docs/resources/source_clickhouse.md b/docs/resources/source_clickhouse.md index b8ae1b91f..5f58e9f9c 100644 --- a/docs/resources/source_clickhouse.md +++ b/docs/resources/source_clickhouse.md @@ -21,12 +21,15 @@ resource "airbyte_source_clickhouse" "my_source_clickhouse" { port = 8123 source_type = "clickhouse" tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_clickhouse_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Deven_Koch" + username = "Alfonzo.OReilly" } - name = "Crystal Terry I" - workspace_id = "c14125b0-960a-4668-951a-472af923c594" + name = "Miss Peter Hermiston" + secret_id = "...my_secretId..." + workspace_id = "72af923c-5949-4f83-b350-cf876ffb901c" } ``` diff --git a/docs/resources/source_clickup_api.md b/docs/resources/source_clickup_api.md index 17d345036..5158d1a2d 100644 --- a/docs/resources/source_clickup_api.md +++ b/docs/resources/source_clickup_api.md @@ -23,8 +23,9 @@ resource "airbyte_source_clickup_api" "my_source_clickupapi" { space_id = "...my_space_id..." team_id = "...my_team_id..." } - name = "Dwight Frami" - workspace_id = "50cf876f-fb90-41c6-acbb-4e243cf789ff" + name = "Lowell Rippin" + secret_id = "...my_secretId..." + workspace_id = "e243cf78-9ffa-4fed-a53e-5ae6e0ac184c" } ``` diff --git a/docs/resources/source_close_com.md b/docs/resources/source_close_com.md index bee3d92a0..f27bd6113 100644 --- a/docs/resources/source_close_com.md +++ b/docs/resources/source_close_com.md @@ -19,8 +19,9 @@ resource "airbyte_source_close_com" "my_source_closecom" { source_type = "close-com" start_date = "2021-01-01" } - name = "Drew Nolan" - workspace_id = "e5ae6e0a-c184-4c2b-9c24-7c88373a40e1" + name = "Kim Crist" + secret_id = "...my_secretId..." + workspace_id = "c88373a4-0e19-442f-b2e5-5055756f5d56" } ``` diff --git a/docs/resources/source_coda.md b/docs/resources/source_coda.md index cfdfa4a02..7ed004599 100644 --- a/docs/resources/source_coda.md +++ b/docs/resources/source_coda.md @@ -18,8 +18,9 @@ resource "airbyte_source_coda" "my_source_coda" { auth_token = "...my_auth_token..." source_type = "coda" } - name = "Micheal Cassin" - workspace_id = "2e550557-56f5-4d56-90bd-0af2dfe13db4" + name = "Paul Powlowski MD" + secret_id = "...my_secretId..." + workspace_id = "f2dfe13d-b4f6-42cb-a3f8-941aebc0b80a" } ``` diff --git a/docs/resources/source_coin_api.md b/docs/resources/source_coin_api.md index 86f7d6f23..ba5c4ee3b 100644 --- a/docs/resources/source_coin_api.md +++ b/docs/resources/source_coin_api.md @@ -17,15 +17,16 @@ resource "airbyte_source_coin_api" "my_source_coinapi" { configuration = { api_key = "...my_api_key..." end_date = "2019-01-01T00:00:00" - environment = "production" - limit = 4 + environment = "sandbox" + limit = 6 period = "5SEC" source_type = "coin-api" start_date = "2019-01-01T00:00:00" symbol_id = "...my_symbol_id..." } - name = "Dominic Pagac" - workspace_id = "8941aebc-0b80-4a69-a4d3-b2ecfcc8f895" + name = "Marcella Ernser" + secret_id = "...my_secretId..." + workspace_id = "ecfcc8f8-9501-40f5-9d3d-6fa1804e54c8" } ``` diff --git a/docs/resources/source_coinmarketcap.md b/docs/resources/source_coinmarketcap.md index 9ef543c6f..33ed45ae4 100644 --- a/docs/resources/source_coinmarketcap.md +++ b/docs/resources/source_coinmarketcap.md @@ -22,8 +22,9 @@ resource "airbyte_source_coinmarketcap" "my_source_coinmarketcap" { "...", ] } - name = "Susan Wyman" - workspace_id = "d3d6fa18-04e5-44c8-af16-8a363c8873e4" + name = "Walter Jacobs" + secret_id = "...my_secretId..." + workspace_id = "363c8873-e484-4380-b1f6-b8ca275a60a0" } ``` diff --git a/docs/resources/source_configcat.md b/docs/resources/source_configcat.md index 95d9cd60c..c53fa5f1a 100644 --- a/docs/resources/source_configcat.md +++ b/docs/resources/source_configcat.md @@ -17,10 +17,11 @@ resource "airbyte_source_configcat" "my_source_configcat" { configuration = { password = "...my_password..." source_type = "configcat" - username = "Joana53" + username = "Elena61" } - name = "Olivia Boehm" - workspace_id = "b8ca275a-60a0-44c4-95cc-699171b51c1b" + name = "Lynne Schroeder" + secret_id = "...my_secretId..." + workspace_id = "9171b51c-1bdb-41cf-8b88-8ebdfc4ccca9" } ``` diff --git a/docs/resources/source_confluence.md b/docs/resources/source_confluence.md index ff4f8fea5..7de0ec1a9 100644 --- a/docs/resources/source_confluence.md +++ b/docs/resources/source_confluence.md @@ -20,8 +20,9 @@ resource "airbyte_source_confluence" "my_source_confluence" { email = "abc@example.com" source_type = "confluence" } - name = "Byron Ledner" - workspace_id = "bdfc4ccc-a99b-4c7f-80b2-dce10873e42b" + name = "Edward Roberts" + secret_id = "...my_secretId..." + workspace_id = "ce10873e-42b0-406d-a788-78ba8581a582" } ``` diff --git a/docs/resources/source_datascope.md b/docs/resources/source_datascope.md index 10961e9fb..7cbed01ba 100644 --- a/docs/resources/source_datascope.md +++ b/docs/resources/source_datascope.md @@ -19,8 +19,9 @@ resource "airbyte_source_datascope" "my_source_datascope" { source_type = "datascope" start_date = "dd/mm/YYYY HH:MM" } - name = "Sandra Keeling" - workspace_id = "78878ba8-581a-4582-88c5-4fefa9c95f2e" + name = "Dianne Schroeder" + secret_id = "...my_secretId..." + workspace_id = "fefa9c95-f2ea-4c55-a5d3-07cfee81206e" } ``` diff --git a/docs/resources/source_delighted.md b/docs/resources/source_delighted.md index 43ee6d70a..6cb09cc5b 100644 --- a/docs/resources/source_delighted.md +++ b/docs/resources/source_delighted.md @@ -16,11 +16,12 @@ SourceDelighted Resource resource "airbyte_source_delighted" "my_source_delighted" { configuration = { api_key = "...my_api_key..." - since = "2022-05-30 04:50:23" + since = "2022-05-30T04:50:23Z" source_type = "delighted" } - name = "Natalie Hickle" - workspace_id = "07cfee81-206e-4281-bfa4-a41c480d3f21" + name = "Lucia Pacocha" + secret_id = "...my_secretId..." + workspace_id = "41c480d3-f213-42af-8310-2d514f4cc6f1" } ``` diff --git a/docs/resources/source_dixa.md b/docs/resources/source_dixa.md index 681916692..33c6a1c32 100644 --- a/docs/resources/source_dixa.md +++ b/docs/resources/source_dixa.md @@ -16,12 +16,13 @@ SourceDixa Resource resource "airbyte_source_dixa" "my_source_dixa" { configuration = { api_token = "...my_api_token..." - batch_size = 1 + batch_size = 31 source_type = "dixa" start_date = "YYYY-MM-DD" } - name = "Moses Beatty Jr." - workspace_id = "2d514f4c-c6f1-48bf-9621-a6a4f77a87ee" + name = "Marshall Hyatt V" + secret_id = "...my_secretId..." + workspace_id = "6a4f77a8-7ee3-4e4b-a752-c65b34418e3b" } ``` diff --git a/docs/resources/source_dockerhub.md b/docs/resources/source_dockerhub.md index e9f549a15..8d32b9c01 100644 --- a/docs/resources/source_dockerhub.md +++ b/docs/resources/source_dockerhub.md @@ -18,8 +18,9 @@ resource "airbyte_source_dockerhub" "my_source_dockerhub" { docker_username = "airbyte" source_type = "dockerhub" } - name = "Rochelle Gislason" - workspace_id = "752c65b3-4418-4e3b-b91c-8d975e0e8419" + name = "Nick Blanda" + secret_id = "...my_secretId..." + workspace_id = "d975e0e8-419d-48f8-8f14-4f3e07edcc4a" } ``` diff --git a/docs/resources/source_dremio.md b/docs/resources/source_dremio.md index ab4eed1f6..d2a19eddd 100644 --- a/docs/resources/source_dremio.md +++ b/docs/resources/source_dremio.md @@ -19,8 +19,9 @@ resource "airbyte_source_dremio" "my_source_dremio" { base_url = "...my_base_url..." source_type = "dremio" } - name = "Wallace Wiegand" - workspace_id = "f144f3e0-7edc-4c4a-a5f3-cabd905a972e" + name = "Lloyd Witting" + secret_id = "...my_secretId..." + workspace_id = "abd905a9-72e0-4567-a822-7b2d309470bf" } ``` diff --git a/docs/resources/source_dynamodb.md b/docs/resources/source_dynamodb.md index 483e0211b..ecd6b43fd 100644 --- a/docs/resources/source_dynamodb.md +++ b/docs/resources/source_dynamodb.md @@ -17,13 +17,14 @@ resource "airbyte_source_dynamodb" "my_source_dynamodb" { configuration = { access_key_id = "A012345678910EXAMPLE" endpoint = "https://{aws_dynamo_db_url}.com" - region = "" + region = "ap-southeast-2" reserved_attribute_names = "name, field_name, field-name" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" source_type = "dynamodb" } - name = "Sue Krajcik" - workspace_id = "227b2d30-9470-4bf7-a4fa-87cf535a6fae" + name = "Tom Wintheiser" + secret_id = "...my_secretId..." + workspace_id = "7cf535a6-fae5-44eb-b60c-321f023b75d2" } ``` diff --git a/docs/resources/source_e2e_test_cloud.md b/docs/resources/source_e2e_test_cloud.md index fd01aa1d0..b6657d5d8 100644 --- a/docs/resources/source_e2e_test_cloud.md +++ b/docs/resources/source_e2e_test_cloud.md @@ -15,18 +15,21 @@ SourceE2eTestCloud Resource ```terraform resource "airbyte_source_e2e_test_cloud" "my_source_e2etestcloud" { configuration = { - max_messages = 3 - message_interval_ms = 2 + max_messages = 2 + message_interval_ms = 4 mock_catalog = { - stream_schemas = "...my_stream_schemas..." - type = "MULTI_STREAM" + source_e2e_test_cloud_mock_catalog_multi_schema = { + stream_schemas = "...my_stream_schemas..." + type = "MULTI_STREAM" + } } seed = 42 source_type = "e2e-test-cloud" type = "CONTINUOUS_FEED" } - name = "Miss Cary Howe" - workspace_id = "21f023b7-5d23-467f-a1a0-cc8df79f0a39" + name = "Percy Buckridge DDS" + secret_id = "...my_secretId..." + workspace_id = "c8df79f0-a396-4d90-8364-b7c15dfbace1" } ``` diff --git a/docs/resources/source_emailoctopus.md b/docs/resources/source_emailoctopus.md index 7d1be1034..7a709083e 100644 --- a/docs/resources/source_emailoctopus.md +++ b/docs/resources/source_emailoctopus.md @@ -18,8 +18,9 @@ resource "airbyte_source_emailoctopus" "my_source_emailoctopus" { api_key = "...my_api_key..." source_type = "emailoctopus" } - name = "Miss Estelle Mills" - workspace_id = "64b7c15d-fbac-4e18-8b1c-4ee2c8c6ce61" + name = "Miss Nelson Robel" + secret_id = "...my_secretId..." + workspace_id = "ee2c8c6c-e611-4fee-b1c7-cbdb6eec7437" } ``` diff --git a/docs/resources/source_exchange_rates.md b/docs/resources/source_exchange_rates.md index a13080e0d..e41d56850 100644 --- a/docs/resources/source_exchange_rates.md +++ b/docs/resources/source_exchange_rates.md @@ -16,13 +16,14 @@ SourceExchangeRates Resource resource "airbyte_source_exchange_rates" "my_source_exchangerates" { configuration = { access_key = "...my_access_key..." - base = "EUR" + base = "USD" ignore_weekends = true source_type = "exchange-rates" start_date = "YYYY-MM-DD" } - name = "Gregory Satterfield" - workspace_id = "bdb6eec7-4378-4ba2-9317-747dc915ad2c" + name = "Annie Breitenberg" + secret_id = "...my_secretId..." + workspace_id = "47dc915a-d2ca-4f5d-9672-3dc0f5ae2f3a" } ``` diff --git a/docs/resources/source_facebook_marketing.md b/docs/resources/source_facebook_marketing.md index fb6ea61f4..a40443903 100644 --- a/docs/resources/source_facebook_marketing.md +++ b/docs/resources/source_facebook_marketing.md @@ -21,33 +21,34 @@ resource "airbyte_source_facebook_marketing" "my_source_facebookmarketing" { custom_insights = [ { action_breakdowns = [ - "action_video_type", + "action_target_id", ] breakdowns = [ - "frequency_value", + "image_asset", ] end_date = "2017-01-26T00:00:00Z" fields = [ - "cpm", + "estimated_ad_recallers_lower_bound", ] insights_lookback_window = 5 - level = "ad" - name = "Dr. Mona Ruecker" + level = "campaign" + name = "Mrs. Dolores Kertzmann" start_date = "2017-01-25T00:00:00Z" - time_increment = 1 + time_increment = 7 }, ] end_date = "2017-01-26T00:00:00Z" fetch_thumbnail_images = false include_deleted = false insights_lookback_window = 7 - max_batch_size = 5 - page_size = 0 + max_batch_size = 4 + page_size = 3 source_type = "facebook-marketing" start_date = "2017-01-25T00:00:00Z" } - name = "Naomi Krajcik" - workspace_id = "143f5a6c-98b5-4555-8080-d40bcacc6cbd" + name = "Dr. Dorothy Lockman" + secret_id = "...my_secretId..." + workspace_id = "0bcacc6c-bd6b-45f3-ac90-9304f926bad2" } ``` diff --git a/docs/resources/source_facebook_pages.md b/docs/resources/source_facebook_pages.md index ddbb7fa4a..7afad48f3 100644 --- a/docs/resources/source_facebook_pages.md +++ b/docs/resources/source_facebook_pages.md @@ -19,8 +19,9 @@ resource "airbyte_source_facebook_pages" "my_source_facebookpages" { page_id = "...my_page_id..." source_type = "facebook-pages" } - name = "Antoinette Halvorson" - workspace_id = "ec909304-f926-4bad-a553-819b474b0ed2" + name = "Bernice Donnelly V" + secret_id = "...my_secretId..." + workspace_id = "b474b0ed-20e5-4624-8fff-639a910abdca" } ``` diff --git a/docs/resources/source_faker.md b/docs/resources/source_faker.md index 8d9386013..8f546abfa 100644 --- a/docs/resources/source_faker.md +++ b/docs/resources/source_faker.md @@ -15,15 +15,16 @@ SourceFaker Resource ```terraform resource "airbyte_source_faker" "my_source_faker" { configuration = { - count = 0 - parallelism = 10 - records_per_slice = 3 + count = 8 + parallelism = 4 + records_per_slice = 1 records_per_sync = 4 - seed = 1 + seed = 4 source_type = "faker" } - name = "Vickie Welch" - workspace_id = "639a910a-bdca-4b62-a766-96e1ec00221b" + name = "Beth McKenzie" + secret_id = "...my_secretId..." + workspace_id = "1ec00221-b335-4d89-acb3-ecfda8d0c549" } ``` diff --git a/docs/resources/source_fauna.md b/docs/resources/source_fauna.md index 5533d6daf..b33c4047f 100644 --- a/docs/resources/source_fauna.md +++ b/docs/resources/source_fauna.md @@ -17,18 +17,21 @@ resource "airbyte_source_fauna" "my_source_fauna" { configuration = { collection = { deletions = { - deletion_mode = "ignore" + source_fauna_collection_deletion_mode_disabled = { + deletion_mode = "ignore" + } } - page_size = 2 + page_size = 9 } domain = "...my_domain..." - port = 2 + port = 10 scheme = "...my_scheme..." secret = "...my_secret..." source_type = "fauna" } - name = "Angel Lakin" - workspace_id = "cb3ecfda-8d0c-4549-af03-004978a61fa1" + name = "Mrs. Edna Abbott" + secret_id = "...my_secretId..." + workspace_id = "78a61fa1-cf20-4688-b77c-1ffc71dca163" } ``` diff --git a/docs/resources/source_file_secure.md b/docs/resources/source_file_secure.md index f2667eb6f..a1be1b3ec 100644 --- a/docs/resources/source_file_secure.md +++ b/docs/resources/source_file_secure.md @@ -16,19 +16,22 @@ SourceFileSecure Resource resource "airbyte_source_file_secure" "my_source_filesecure" { configuration = { dataset_name = "...my_dataset_name..." - format = "parquet" + format = "yaml" provider = { - sas_token = "...my_sas_token..." - shared_key = "...my_shared_key..." - storage = "AzBlob" - storage_account = "...my_storage_account..." + source_file_secure_storage_provider_az_blob_azure_blob_storage = { + sas_token = "...my_sas_token..." + shared_key = "...my_shared_key..." + storage = "AzBlob" + storage_account = "...my_storage_account..." + } } - reader_options = "{\"sep\": \"\t\", \"header\": 0, \"names\": [\"column1\", \"column2\"] }" + reader_options = "{}" source_type = "file-secure" - url = "https://storage.googleapis.com/covid19-open-data/v2/latest/epidemiology.csv" + url = "gs://my-google-bucket/data.csv" } - name = "Lucy Lind" - workspace_id = "77c1ffc7-1dca-4163-b2a3-c80a97ff334c" + name = "Miss Sheri Legros" + secret_id = "...my_secretId..." + workspace_id = "7ff334cd-df85-47a9-a618-76c6ab21d29d" } ``` diff --git a/docs/resources/source_firebolt.md b/docs/resources/source_firebolt.md index fa924ba8a..d8ef5c889 100644 --- a/docs/resources/source_firebolt.md +++ b/docs/resources/source_firebolt.md @@ -23,8 +23,9 @@ resource "airbyte_source_firebolt" "my_source_firebolt" { source_type = "firebolt" username = "username@email.com" } - name = "Kayla Mertz" - workspace_id = "1876c6ab-21d2-49df-894d-6fecd7993900" + name = "Hector Yundt" + secret_id = "...my_secretId..." + workspace_id = "d7993900-66a6-4d2d-8003-55338cec086f" } ``` diff --git a/docs/resources/source_freshcaller.md b/docs/resources/source_freshcaller.md index 08626afdf..b616cd597 100644 --- a/docs/resources/source_freshcaller.md +++ b/docs/resources/source_freshcaller.md @@ -17,13 +17,14 @@ resource "airbyte_source_freshcaller" "my_source_freshcaller" { configuration = { api_key = "...my_api_key..." domain = "snaptravel" - requests_per_minute = 4 + requests_per_minute = 7 source_type = "freshcaller" start_date = "2022-01-01T12:00:00Z" - sync_lag_minutes = 4 + sync_lag_minutes = 9 } - name = "Mr. Roy Stehr I" - workspace_id = "55338cec-086f-4a21-a915-2cb3119167b8" + name = "Keith Hills" + secret_id = "...my_secretId..." + workspace_id = "b3119167-b8e3-4c8d-b034-08d6d364ffd4" } ``` diff --git a/docs/resources/source_freshdesk.md b/docs/resources/source_freshdesk.md index 13816a3ae..2448840bf 100644 --- a/docs/resources/source_freshdesk.md +++ b/docs/resources/source_freshdesk.md @@ -17,12 +17,13 @@ resource "airbyte_source_freshdesk" "my_source_freshdesk" { configuration = { api_key = "...my_api_key..." domain = "myaccount.freshdesk.com" - requests_per_minute = 9 + requests_per_minute = 3 source_type = "freshdesk" start_date = "2020-12-01T00:00:00Z" } - name = "Mrs. Gilberto Raynor" - workspace_id = "08d6d364-ffd4-4559-86d1-263d48e935c2" + name = "Mr. Tara Sporer" + secret_id = "...my_secretId..." + workspace_id = "3d48e935-c2c9-4e81-b30b-e3e43202d721" } ``` diff --git a/docs/resources/source_freshsales.md b/docs/resources/source_freshsales.md index 9e755dc0e..9412498b8 100644 --- a/docs/resources/source_freshsales.md +++ b/docs/resources/source_freshsales.md @@ -19,8 +19,9 @@ resource "airbyte_source_freshsales" "my_source_freshsales" { domain_name = "mydomain.myfreshworks.com" source_type = "freshsales" } - name = "Salvador Walter DVM" - workspace_id = "30be3e43-202d-4721-a576-506641870d9d" + name = "Geraldine Kling" + secret_id = "...my_secretId..." + workspace_id = "06641870-d9d2-41f9-ad03-0c4ecc11a083" } ``` diff --git a/docs/resources/source_freshservice.md b/docs/resources/source_freshservice.md index eaac7fe44..1d400e710 100644 --- a/docs/resources/source_freshservice.md +++ b/docs/resources/source_freshservice.md @@ -20,8 +20,9 @@ resource "airbyte_source_freshservice" "my_source_freshservice" { source_type = "freshservice" start_date = "2020-10-01T00:00:00Z" } - name = "Stephanie Wolf" - workspace_id = "d030c4ec-c11a-4083-a429-068b8502a55e" + name = "Anita Dare III" + secret_id = "...my_secretId..." + workspace_id = "8b8502a5-5e7f-473b-8845-e320a319f4ba" } ``` diff --git a/docs/resources/source_gcs.md b/docs/resources/source_gcs.md index e8379cc1a..64e451f9c 100644 --- a/docs/resources/source_gcs.md +++ b/docs/resources/source_gcs.md @@ -20,8 +20,9 @@ resource "airbyte_source_gcs" "my_source_gcs" { service_account = "{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }" source_type = "gcs" } - name = "Miranda Koelpin" - workspace_id = "c845e320-a319-4f4b-adf9-47c9a867bc42" + name = "Darin Mante" + secret_id = "...my_secretId..." + workspace_id = "c9a867bc-4242-4666-9816-ddca8ef51fcb" } ``` diff --git a/docs/resources/source_getlago.md b/docs/resources/source_getlago.md index 58e655fd5..494ca4989 100644 --- a/docs/resources/source_getlago.md +++ b/docs/resources/source_getlago.md @@ -18,8 +18,9 @@ resource "airbyte_source_getlago" "my_source_getlago" { api_key = "...my_api_key..." source_type = "getlago" } - name = "Jacqueline Jacobs" - workspace_id = "5816ddca-8ef5-41fc-b4c5-93ec12cdaad0" + name = "Myra Hills" + secret_id = "...my_secretId..." + workspace_id = "ec12cdaa-d0ec-47af-adbd-80df448a47f9" } ``` diff --git a/docs/resources/source_github.md b/docs/resources/source_github.md index 1fd5ccbd2..f834d30c4 100644 --- a/docs/resources/source_github.md +++ b/docs/resources/source_github.md @@ -17,16 +17,19 @@ resource "airbyte_source_github" "my_source_github" { configuration = { branch = "airbytehq/airbyte/master airbytehq/airbyte/my-branch" credentials = { - access_token = "...my_access_token..." - option_title = "OAuth Credentials" + source_github_authentication_o_auth = { + access_token = "...my_access_token..." + option_title = "OAuth Credentials" + } } - repository = "airbytehq/airbyte" - requests_per_hour = 8 + repository = "airbytehq/airbyte airbytehq/another-repo" + requests_per_hour = 6 source_type = "github" start_date = "2021-03-01T00:00:00Z" } - name = "Bert Schultz" - workspace_id = "80df448a-47f9-4390-8588-80983dabf9ef" + name = "Brandy Kuvalis V" + secret_id = "...my_secretId..." + workspace_id = "83dabf9e-f3ff-4dd9-b7f0-79af4d35724c" } ``` diff --git a/docs/resources/source_gitlab.md b/docs/resources/source_gitlab.md index 3c23879ae..8b76f5c6f 100644 --- a/docs/resources/source_gitlab.md +++ b/docs/resources/source_gitlab.md @@ -17,20 +17,23 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { configuration = { api_url = "gitlab.com" credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-01-16T05:28:22.895Z" + source_gitlab_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2020-10-08T09:18:50.076Z" + } } groups = "airbyte.io" projects = "airbyte.io/documentation" source_type = "gitlab" start_date = "2021-03-01T00:00:00Z" } - name = "Arturo Wisoky" - workspace_id = "079af4d3-5724-4cdb-8f4d-281187d56844" + name = "Eula Daugherty Sr." + secret_id = "...my_secretId..." + workspace_id = "87d56844-eded-485a-9065-e628bdfc2032" } ``` diff --git a/docs/resources/source_glassfrog.md b/docs/resources/source_glassfrog.md index 628bfe802..2b6489b13 100644 --- a/docs/resources/source_glassfrog.md +++ b/docs/resources/source_glassfrog.md @@ -18,8 +18,9 @@ resource "airbyte_source_glassfrog" "my_source_glassfrog" { api_key = "...my_api_key..." source_type = "glassfrog" } - name = "Drew Waelchi" - workspace_id = "5a9065e6-28bd-4fc2-832b-6c879923b7e1" + name = "Hector Satterfield" + secret_id = "...my_secretId..." + workspace_id = "9923b7e1-3584-4f7a-a12c-6891f82ce115" } ``` diff --git a/docs/resources/source_gnews.md b/docs/resources/source_gnews.md index c75869e33..3e3ed052b 100644 --- a/docs/resources/source_gnews.md +++ b/docs/resources/source_gnews.md @@ -16,24 +16,25 @@ SourceGnews Resource resource "airbyte_source_gnews" "my_source_gnews" { configuration = { api_key = "...my_api_key..." - country = "de" + country = "nl" end_date = "2022-08-21 16:27:09" in = [ "title", ] - language = "ml" + language = "ja" nullable = [ "title", ] - query = "Intel AND (i7 OR i9)" + query = "Apple OR Microsoft" sortby = "publishedAt" source_type = "gnews" start_date = "2022-08-21 16:27:09" - top_headlines_query = "(Windows 7) AND (Windows 10)" - top_headlines_topic = "health" + top_headlines_query = "Apple OR Microsoft" + top_headlines_topic = "nation" } - name = "Lois Rutherford" - workspace_id = "91f82ce1-1571-4723-8537-7dcfa89df975" + name = "Allison Streich" + secret_id = "...my_secretId..." + workspace_id = "a89df975-e356-4686-892e-9c3ddc5f111d" } ``` diff --git a/docs/resources/source_google_ads.md b/docs/resources/source_google_ads.md index 7159ce882..cf6e303a2 100644 --- a/docs/resources/source_google_ads.md +++ b/docs/resources/source_google_ads.md @@ -35,8 +35,9 @@ resource "airbyte_source_google_ads" "my_source_googleads" { source_type = "google-ads" start_date = "2017-01-25" } - name = "Gilbert Bayer" - workspace_id = "e9c3ddc5-f111-4dea-9026-d541a4d190fe" + name = "Freda Hamill MD" + secret_id = "...my_secretId..." + workspace_id = "4d190feb-2178-40bc-8c0d-bbddb484708f" } ``` diff --git a/docs/resources/source_google_analytics_data_api.md b/docs/resources/source_google_analytics_data_api.md index a64ae45cd..5ea61a782 100644 --- a/docs/resources/source_google_analytics_data_api.md +++ b/docs/resources/source_google_analytics_data_api.md @@ -16,20 +16,23 @@ SourceGoogleAnalyticsDataAPI Resource resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsdataapi" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_analytics_data_api_credentials_authenticate_via_google_oauth_ = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." - date_ranges_start_date = "2022-09-08" + date_ranges_start_date = "2022-05-22" property_id = "...my_property_id..." source_type = "google-analytics-data-api" - window_in_days = 30 + window_in_days = 364 } - name = "Jose Raynor" - workspace_id = "c0dbbddb-4847-408f-b4e3-91e6bc158c4c" + name = "Andrew Torphy" + secret_id = "...my_secretId..." + workspace_id = "c158c4c4-e545-499e-a342-260e9b200ce7" } ``` diff --git a/docs/resources/source_google_analytics_v4.md b/docs/resources/source_google_analytics_v4.md index 5e0e975d8..673e7eea9 100644 --- a/docs/resources/source_google_analytics_v4.md +++ b/docs/resources/source_google_analytics_v4.md @@ -16,20 +16,23 @@ SourceGoogleAnalyticsV4 Resource resource "airbyte_source_google_analytics_v4" "my_source_googleanalyticsv4" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_analytics_v4_credentials_authenticate_via_google_oauth_ = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." source_type = "google-analytics-v4" start_date = "2020-06-01" view_id = "...my_view_id..." - window_in_days = 60 + window_in_days = 120 } - name = "Carrie Haley" - workspace_id = "ea342260-e9b2-400c-a78a-1bd8fb7a0a11" + name = "Mamie Spinka" + secret_id = "...my_secretId..." + workspace_id = "b7a0a116-ce72-43d4-897f-a30e9af725b2" } ``` diff --git a/docs/resources/source_google_directory.md b/docs/resources/source_google_directory.md index d48b89d4f..ca67f51fa 100644 --- a/docs/resources/source_google_directory.md +++ b/docs/resources/source_google_directory.md @@ -16,11 +16,12 @@ SourceGoogleDirectory Resource resource "airbyte_source_google_directory" "my_source_googledirectory" { configuration = { credentials_json = "...my_credentials_json..." - email = "Niko.Torp@yahoo.com" + email = "Blaze0@yahoo.com" source_type = "google-directory" } - name = "Miss Elena Hahn" - workspace_id = "fa30e9af-725b-4291-a203-0d83f5aeb779" + name = "Elizabeth Stehr" + secret_id = "...my_secretId..." + workspace_id = "f5aeb779-9d22-4e8c-9f84-93825fdc42c8" } ``` diff --git a/docs/resources/source_google_pagespeed_insights.md b/docs/resources/source_google_pagespeed_insights.md index 270a84303..db1cd031e 100644 --- a/docs/resources/source_google_pagespeed_insights.md +++ b/docs/resources/source_google_pagespeed_insights.md @@ -21,14 +21,15 @@ resource "airbyte_source_google_pagespeed_insights" "my_source_googlepagespeedin ] source_type = "google-pagespeed-insights" strategies = [ - "mobile", + "desktop", ] urls = [ "...", ] } - name = "Theresa Terry" - workspace_id = "1f849382-5fdc-442c-876c-2c2dfb4cfc1c" + name = "Jeremy Schiller" + secret_id = "...my_secretId..." + workspace_id = "fb4cfc1c-7623-40f8-81fb-1bd23fdb14db" } ``` diff --git a/docs/resources/source_google_search_console.md b/docs/resources/source_google_search_console.md index 445f1b2e7..ad7140a33 100644 --- a/docs/resources/source_google_search_console.md +++ b/docs/resources/source_google_search_console.md @@ -16,11 +16,13 @@ SourceGoogleSearchConsole Resource resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" { configuration = { authorization = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_search_console_authentication_type_o_auth = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." data_state = "final" @@ -31,8 +33,9 @@ resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" source_type = "google-search-console" start_date = "2021-01-01" } - name = "Johanna Lueilwitz DVM" - workspace_id = "b1bd23fd-b14d-4b6b-a5a6-85998e22ae20" + name = "Glen Larson" + secret_id = "...my_secretId..." + workspace_id = "98e22ae2-0da1-46fc-ab27-1a289c57e854" } ``` diff --git a/docs/resources/source_google_sheets.md b/docs/resources/source_google_sheets.md index b9dd83255..6f6dd31f7 100644 --- a/docs/resources/source_google_sheets.md +++ b/docs/resources/source_google_sheets.md @@ -16,17 +16,20 @@ SourceGoogleSheets Resource resource "airbyte_source_google_sheets" "my_source_googlesheets" { configuration = { credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_sheets_authentication_authenticate_via_google_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } - row_batch_size = 9 + row_batch_size = 10 source_type = "google-sheets" spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit" } - name = "Scott Johns" - workspace_id = "2b271a28-9c57-4e85-8e90-439d22246569" + name = "Jeffrey Gutmann" + secret_id = "...my_secretId..." + workspace_id = "d2224656-9462-4407-884f-7ab37cef0222" } ``` diff --git a/docs/resources/source_google_webfonts.md b/docs/resources/source_google_webfonts.md index 0c7775bf4..bb2ed7255 100644 --- a/docs/resources/source_google_webfonts.md +++ b/docs/resources/source_google_webfonts.md @@ -21,8 +21,9 @@ resource "airbyte_source_google_webfonts" "my_source_googlewebfonts" { sort = "...my_sort..." source_type = "google-webfonts" } - name = "Sue Cole IV" - workspace_id = "084f7ab3-7cef-4022-a519-4db55410adc6" + name = "Jean Mayert" + secret_id = "...my_secretId..." + workspace_id = "b55410ad-c669-4af9-8a26-c7cdc981f068" } ``` diff --git a/docs/resources/source_google_workspace_admin_reports.md b/docs/resources/source_google_workspace_admin_reports.md index 3771417e3..03979c44f 100644 --- a/docs/resources/source_google_workspace_admin_reports.md +++ b/docs/resources/source_google_workspace_admin_reports.md @@ -16,12 +16,13 @@ SourceGoogleWorkspaceAdminReports Resource resource "airbyte_source_google_workspace_admin_reports" "my_source_googleworkspaceadminreports" { configuration = { credentials_json = "...my_credentials_json..." - email = "Kian_Orn0@yahoo.com" + email = "Karlee.Berge73@yahoo.com" lookback = 7 source_type = "google-workspace-admin-reports" } - name = "Stacey Satterfield" - workspace_id = "dc981f06-8981-4d6b-b33c-faa348c31bf4" + name = "Sylvia Schimmel" + secret_id = "...my_secretId..." + workspace_id = "a348c31b-f407-4ee4-bcf0-c42b78f15626" } ``` diff --git a/docs/resources/source_greenhouse.md b/docs/resources/source_greenhouse.md index cac236768..06c8a5756 100644 --- a/docs/resources/source_greenhouse.md +++ b/docs/resources/source_greenhouse.md @@ -18,8 +18,9 @@ resource "airbyte_source_greenhouse" "my_source_greenhouse" { api_key = "...my_api_key..." source_type = "greenhouse" } - name = "Dora Watsica" - workspace_id = "fcf0c42b-78f1-4562-a398-a0dc766324cc" + name = "Miriam Lowe PhD" + secret_id = "...my_secretId..." + workspace_id = "c766324c-cb06-4c8c-a12d-02529270b8d5" } ``` diff --git a/docs/resources/source_gridly.md b/docs/resources/source_gridly.md index 83c6b9def..a0ab9079b 100644 --- a/docs/resources/source_gridly.md +++ b/docs/resources/source_gridly.md @@ -19,8 +19,9 @@ resource "airbyte_source_gridly" "my_source_gridly" { grid_id = "...my_grid_id..." source_type = "gridly" } - name = "Edward Jast" - workspace_id = "ca12d025-2927-40b8-9572-2dd895b8bcf2" + name = "Theresa Collier" + secret_id = "...my_secretId..." + workspace_id = "895b8bcf-24db-4959-a933-52f74533994d" } ``` diff --git a/docs/resources/source_harvest.md b/docs/resources/source_harvest.md index 7251d1a2c..8bc642237 100644 --- a/docs/resources/source_harvest.md +++ b/docs/resources/source_harvest.md @@ -17,17 +17,20 @@ resource "airbyte_source_harvest" "my_source_harvest" { configuration = { account_id = "...my_account_id..." credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_harvest_authentication_mechanism_authenticate_via_harvest_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" source_type = "harvest" } - name = "Cora Hyatt" - workspace_id = "352f7453-3994-4d78-9e3b-6e9389f5abb7" + name = "Verna Kautzer" + secret_id = "...my_secretId..." + workspace_id = "389f5abb-7f66-4255-8a28-382ac483afd2" } ``` diff --git a/docs/resources/source_hubplanner.md b/docs/resources/source_hubplanner.md index 2fb7a56f2..47e4abbcf 100644 --- a/docs/resources/source_hubplanner.md +++ b/docs/resources/source_hubplanner.md @@ -18,8 +18,9 @@ resource "airbyte_source_hubplanner" "my_source_hubplanner" { api_key = "...my_api_key..." source_type = "hubplanner" } - name = "Rafael Johns" - workspace_id = "50a28382-ac48-43af-9231-5bba650164e0" + name = "Stephanie Hansen" + secret_id = "...my_secretId..." + workspace_id = "a650164e-06f5-4bf6-ae59-1bc8bdef3612" } ``` diff --git a/docs/resources/source_hubspot.md b/docs/resources/source_hubspot.md index cd2fd281a..0365b23f0 100644 --- a/docs/resources/source_hubspot.md +++ b/docs/resources/source_hubspot.md @@ -16,16 +16,19 @@ SourceHubspot Resource resource "airbyte_source_hubspot" "my_source_hubspot" { configuration = { credentials = { - client_id = "123456789000" - client_secret = "secret" - credentials_title = "OAuth Credentials" - refresh_token = "refresh_token" + source_hubspot_authentication_o_auth = { + client_id = "123456789000" + client_secret = "secret" + credentials_title = "OAuth Credentials" + refresh_token = "refresh_token" + } } source_type = "hubspot" start_date = "2017-01-25T00:00:00Z" } - name = "Yvette Zboncak" - workspace_id = "e591bc8b-def3-4612-b63c-205fda840774" + name = "Mrs. Sadie Dare" + secret_id = "...my_secretId..." + workspace_id = "da840774-a68a-49a3-9d08-6b6f66fef020" } ``` diff --git a/docs/resources/source_insightly.md b/docs/resources/source_insightly.md index d3d4f4fff..7d9aed3ad 100644 --- a/docs/resources/source_insightly.md +++ b/docs/resources/source_insightly.md @@ -19,8 +19,9 @@ resource "airbyte_source_insightly" "my_source_insightly" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - name = "Elmer Lind" - workspace_id = "a35d086b-6f66-4fef-820e-9f443b4257b9" + name = "Eduardo Wolff" + secret_id = "...my_secretId..." + workspace_id = "3b4257b9-92c8-4dbd-a6a6-1efa2198258f" } ``` diff --git a/docs/resources/source_instagram.md b/docs/resources/source_instagram.md index 99d33952a..77394c338 100644 --- a/docs/resources/source_instagram.md +++ b/docs/resources/source_instagram.md @@ -19,8 +19,9 @@ resource "airbyte_source_instagram" "my_source_instagram" { source_type = "instagram" start_date = "2017-01-25T00:00:00Z" } - name = "Sidney Simonis" - workspace_id = "a6a61efa-2198-4258-bd0a-9eba47f7d3ef" + name = "Joey Upton" + secret_id = "...my_secretId..." + workspace_id = "47f7d3ef-0496-440d-aa18-31c87adf596f" } ``` diff --git a/docs/resources/source_instatus.md b/docs/resources/source_instatus.md index a004bf979..54024d1df 100644 --- a/docs/resources/source_instatus.md +++ b/docs/resources/source_instatus.md @@ -18,8 +18,9 @@ resource "airbyte_source_instatus" "my_source_instatus" { api_key = "...my_api_key..." source_type = "instatus" } - name = "Bertha Marks" - workspace_id = "0d6a1831-c87a-4df5-96fd-f1ad837ae80c" + name = "Winston Bergstrom" + secret_id = "...my_secretId..." + workspace_id = "837ae80c-1c19-4c95-ba99-8678fa3f6969" } ``` diff --git a/docs/resources/source_intercom.md b/docs/resources/source_intercom.md index 54a7c4a1d..0650beb3f 100644 --- a/docs/resources/source_intercom.md +++ b/docs/resources/source_intercom.md @@ -19,8 +19,9 @@ resource "airbyte_source_intercom" "my_source_intercom" { source_type = "intercom" start_date = "2020-11-16T00:00:00Z" } - name = "Bobbie Rosenbaum" - workspace_id = "ba998678-fa3f-4696-991a-f388ce036144" + name = "Randal Fadel" + secret_id = "...my_secretId..." + workspace_id = "ce036144-48c7-4977-a0ef-2f536028efee" } ``` diff --git a/docs/resources/source_ip2whois.md b/docs/resources/source_ip2whois.md index ac2c53b1b..76393f5df 100644 --- a/docs/resources/source_ip2whois.md +++ b/docs/resources/source_ip2whois.md @@ -16,11 +16,12 @@ SourceIp2whois Resource resource "airbyte_source_ip2whois" "my_source_ip2whois" { configuration = { api_key = "...my_api_key..." - domain = "www.google.com" + domain = "www.facebook.com" source_type = "ip2whois" } - name = "Sylvester Kling" - workspace_id = "7a0ef2f5-3602-48ef-aef9-34152ed7e253" + name = "Mrs. Travis Gutmann" + secret_id = "...my_secretId..." + workspace_id = "ed7e253f-4c15-47de-aa71-70f445accf66" } ``` diff --git a/docs/resources/source_iterable.md b/docs/resources/source_iterable.md index cb5f7c628..70d921f31 100644 --- a/docs/resources/source_iterable.md +++ b/docs/resources/source_iterable.md @@ -19,8 +19,9 @@ resource "airbyte_source_iterable" "my_source_iterable" { source_type = "iterable" start_date = "2021-04-01T00:00:00Z" } - name = "Ralph Hermann" - workspace_id = "eaa7170f-445a-4ccf-a67a-af9bbad185fe" + name = "Emanuel McKenzie" + secret_id = "...my_secretId..." + workspace_id = "ad185fe4-31d6-4bf5-8838-fbb8c20cb67f" } ``` diff --git a/docs/resources/source_jira.md b/docs/resources/source_jira.md index bc3c8f627..aa4bdde06 100644 --- a/docs/resources/source_jira.md +++ b/docs/resources/source_jira.md @@ -16,19 +16,20 @@ SourceJira Resource resource "airbyte_source_jira" "my_source_jira" { configuration = { api_token = "...my_api_token..." - domain = ".atlassian.net" - email = "Annabelle_Sporer@gmail.com" - enable_experimental_streams = false - expand_issue_changelog = true + domain = "jira..com" + email = "Michele33@gmail.com" + enable_experimental_streams = true + expand_issue_changelog = false projects = [ "...", ] - render_fields = true + render_fields = false source_type = "jira" start_date = "2021-03-01T00:00:00Z" } - name = "Emilio Ratke" - workspace_id = "c20cb67f-c4b4-425e-99e6-234c9f7b79df" + name = "Grace Goyette" + secret_id = "...my_secretId..." + workspace_id = "f7b79dfe-b77a-45c3-8d4b-af91e506ef89" } ``` diff --git a/docs/resources/source_k6_cloud.md b/docs/resources/source_k6_cloud.md index ca3f33b86..2e42e6e66 100644 --- a/docs/resources/source_k6_cloud.md +++ b/docs/resources/source_k6_cloud.md @@ -18,8 +18,9 @@ resource "airbyte_source_k6_cloud" "my_source_k6cloud" { api_token = "...my_api_token..." source_type = "k6-cloud" } - name = "Rudolph Kshlerin" - workspace_id = "5c38d4ba-f91e-4506-af89-0a54b475f16f" + name = "Lee Hegmann" + secret_id = "...my_secretId..." + workspace_id = "475f16f5-6d38-45a3-84ac-631b99e26ced" } ``` diff --git a/docs/resources/source_klarna.md b/docs/resources/source_klarna.md index d756f5fc1..1c22de699 100644 --- a/docs/resources/source_klarna.md +++ b/docs/resources/source_klarna.md @@ -16,13 +16,14 @@ SourceKlarna Resource resource "airbyte_source_klarna" "my_source_klarna" { configuration = { password = "...my_password..." - playground = false - region = "us" + playground = true + region = "oc" source_type = "klarna" - username = "Reina.Dooley" + username = "Lillian_Williamson56" } - name = "Earl Schoen" - workspace_id = "c631b99e-26ce-4d8f-9fdb-9410f63bbf81" + name = "Catherine Bashirian" + secret_id = "...my_secretId..." + workspace_id = "3bbf8178-37b0-41af-9d78-8624189eb448" } ``` diff --git a/docs/resources/source_klaviyo.md b/docs/resources/source_klaviyo.md index a2d646596..ba12df494 100644 --- a/docs/resources/source_klaviyo.md +++ b/docs/resources/source_klaviyo.md @@ -19,8 +19,9 @@ resource "airbyte_source_klaviyo" "my_source_klaviyo" { source_type = "klaviyo" start_date = "2017-01-25T00:00:00Z" } - name = "Mr. Nellie Reichert" - workspace_id = "fdd78862-4189-4eb4-8873-f5033f19dbf1" + name = "Alvin Bartoletti" + secret_id = "...my_secretId..." + workspace_id = "f19dbf12-5ce4-4152-aab9-cd7e5224a6a0" } ``` diff --git a/docs/resources/source_kustomer_singer.md b/docs/resources/source_kustomer_singer.md index a61ce285d..938177429 100644 --- a/docs/resources/source_kustomer_singer.md +++ b/docs/resources/source_kustomer_singer.md @@ -19,8 +19,9 @@ resource "airbyte_source_kustomer_singer" "my_source_kustomersinger" { source_type = "kustomer-singer" start_date = "2019-01-01T00:00:00Z" } - name = "Vivian Rolfson" - workspace_id = "152eab9c-d7e5-4224-a6a0-e123b7847ec5" + name = "Andrew Cassin" + secret_id = "...my_secretId..." + workspace_id = "7847ec59-e1f6-47f3-84cc-e4b6d7696ff3" } ``` diff --git a/docs/resources/source_launchdarkly.md b/docs/resources/source_launchdarkly.md index 03ffe8bd8..1c28ccf3b 100644 --- a/docs/resources/source_launchdarkly.md +++ b/docs/resources/source_launchdarkly.md @@ -18,8 +18,9 @@ resource "airbyte_source_launchdarkly" "my_source_launchdarkly" { access_token = "...my_access_token..." source_type = "launchdarkly" } - name = "Rolando Brakus" - workspace_id = "7f3c4cce-4b6d-4769-aff3-c5747501357e" + name = "Pedro Kovacek" + secret_id = "...my_secretId..." + workspace_id = "501357e4-4f51-4f8b-884c-3197e193a245" } ``` diff --git a/docs/resources/source_lemlist.md b/docs/resources/source_lemlist.md index 366db114a..ca9a9eca8 100644 --- a/docs/resources/source_lemlist.md +++ b/docs/resources/source_lemlist.md @@ -18,8 +18,9 @@ resource "airbyte_source_lemlist" "my_source_lemlist" { api_key = "...my_api_key..." source_type = "lemlist" } - name = "Danielle Wunsch DVM" - workspace_id = "8b084c31-97e1-493a-a454-67f94874c2d5" + name = "Jeanette Kutch" + secret_id = "...my_secretId..." + workspace_id = "4874c2d5-cc49-4722-b3e6-6bd8fe5d00b9" } ``` diff --git a/docs/resources/source_linkedin_ads.md b/docs/resources/source_linkedin_ads.md index d482276cd..a0b707872 100644 --- a/docs/resources/source_linkedin_ads.md +++ b/docs/resources/source_linkedin_ads.md @@ -16,17 +16,20 @@ SourceLinkedinAds Resource resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { configuration = { account_ids = [ - 8, + 5, ] credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_linkedin_ads_authentication_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } source_type = "linkedin-ads" start_date = "2021-05-17" } - name = "Kelly Deckow" - workspace_id = "3e66bd8f-e5d0-40b9-b9ef-20387320590c" + name = "Martin Bahringer" + secret_id = "...my_secretId..." + workspace_id = "7320590c-cc10-4964-8031-3b3e5044f65f" } ``` diff --git a/docs/resources/source_linkedin_pages.md b/docs/resources/source_linkedin_pages.md index ffbdccb99..bb9f98762 100644 --- a/docs/resources/source_linkedin_pages.md +++ b/docs/resources/source_linkedin_pages.md @@ -16,14 +16,17 @@ SourceLinkedinPages Resource resource "airbyte_source_linkedin_pages" "my_source_linkedinpages" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_linkedin_pages_authentication_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } org_id = "123456789" source_type = "linkedin-pages" } - name = "Ms. Garrett Bradtke" - workspace_id = "400313b3-e504-44f6-9fe7-2dc4077d0cc3" + name = "Mitchell Davis" + secret_id = "...my_secretId..." + workspace_id = "4077d0cc-3f40-48ef-815c-eb4d6e1eae0f" } ``` diff --git a/docs/resources/source_linnworks.md b/docs/resources/source_linnworks.md index 599544658..2627de402 100644 --- a/docs/resources/source_linnworks.md +++ b/docs/resources/source_linnworks.md @@ -18,11 +18,12 @@ resource "airbyte_source_linnworks" "my_source_linnworks" { application_id = "...my_application_id..." application_secret = "...my_application_secret..." source_type = "linnworks" - start_date = "2022-03-30T06:35:02.930Z" + start_date = "2022-09-01T15:55:01.348Z" token = "...my_token..." } - name = "Carole Watsica" - workspace_id = "15ceb4d6-e1ea-4e0f-b5ae-df2acab58b99" + name = "Percy Schuster" + secret_id = "...my_secretId..." + workspace_id = "acab58b9-91c9-426d-9b58-9461e7421cbe" } ``` diff --git a/docs/resources/source_lokalise.md b/docs/resources/source_lokalise.md index bf5d4756d..822fe32e9 100644 --- a/docs/resources/source_lokalise.md +++ b/docs/resources/source_lokalise.md @@ -19,8 +19,9 @@ resource "airbyte_source_lokalise" "my_source_lokalise" { project_id = "...my_project_id..." source_type = "lokalise" } - name = "Adrienne Mills" - workspace_id = "ddb58946-1e74-421c-be6d-9502f0ea930b" + name = "Marcella McKenzie Sr." + secret_id = "...my_secretId..." + workspace_id = "f0ea930b-69f7-4ac2-b72f-885009049116" } ``` diff --git a/docs/resources/source_mailchimp.md b/docs/resources/source_mailchimp.md index 87dc2f6e9..610069f21 100644 --- a/docs/resources/source_mailchimp.md +++ b/docs/resources/source_mailchimp.md @@ -17,13 +17,16 @@ resource "airbyte_source_mailchimp" "my_source_mailchimp" { configuration = { campaign_id = "...my_campaign_id..." credentials = { - apikey = "...my_apikey..." - auth_type = "apikey" + source_mailchimp_authentication_api_key = { + apikey = "...my_apikey..." + auth_type = "apikey" + } } source_type = "mailchimp" } - name = "Bobbie Wolff" - workspace_id = "c2f72f88-5009-4049-9160-8207888ec661" + name = "Ms. Tracey D'Amore" + secret_id = "...my_secretId..." + workspace_id = "88ec6618-3bfe-4965-9eb4-0ec16faf75b0" } ``` diff --git a/docs/resources/source_mailgun.md b/docs/resources/source_mailgun.md index 406ca63e1..e7400b85b 100644 --- a/docs/resources/source_mailgun.md +++ b/docs/resources/source_mailgun.md @@ -20,8 +20,9 @@ resource "airbyte_source_mailgun" "my_source_mailgun" { source_type = "mailgun" start_date = "2020-10-01 00:00:00" } - name = "Irvin Treutel" - workspace_id = "59eb40ec-16fa-4f75-b0b5-32a4da37cbaa" + name = "Lois Ondricka" + secret_id = "...my_secretId..." + workspace_id = "a37cbaaf-4452-4c48-82c9-b2ad32dafe81" } ``` diff --git a/docs/resources/source_mailjet_sms.md b/docs/resources/source_mailjet_sms.md index 4e04cc166..b40bb95b4 100644 --- a/docs/resources/source_mailjet_sms.md +++ b/docs/resources/source_mailjet_sms.md @@ -20,8 +20,9 @@ resource "airbyte_source_mailjet_sms" "my_source_mailjetsms" { start_date = 1666261656 token = "...my_token..." } - name = "Lauren Cremin" - workspace_id = "842c9b2a-d32d-4afe-81a8-8f4444573fec" + name = "Darrin Graham" + secret_id = "...my_secretId..." + workspace_id = "4573fecd-4735-43f6-bc82-09379aa69cd5" } ``` diff --git a/docs/resources/source_marketo.md b/docs/resources/source_marketo.md index a67c90462..4d4358af0 100644 --- a/docs/resources/source_marketo.md +++ b/docs/resources/source_marketo.md @@ -21,8 +21,9 @@ resource "airbyte_source_marketo" "my_source_marketo" { source_type = "marketo" start_date = "2020-09-25T00:00:00Z" } - name = "Victoria Hilll" - workspace_id = "63c82093-79aa-469c-95fb-cf79da18a782" + name = "Darrin Kohler" + secret_id = "...my_secretId..." + workspace_id = "a18a7822-bf95-4894-a686-1adb55f9e5d7" } ``` diff --git a/docs/resources/source_metabase.md b/docs/resources/source_metabase.md index 3cb2ca7d5..71a0d19f5 100644 --- a/docs/resources/source_metabase.md +++ b/docs/resources/source_metabase.md @@ -19,10 +19,11 @@ resource "airbyte_source_metabase" "my_source_metabase" { password = "...my_password..." session_token = "...my_session_token..." source_type = "metabase" - username = "Chasity_Pfeffer33" + username = "Flavio_Bode98" } - name = "Nick Haag" - workspace_id = "861adb55-f9e5-4d75-9c9f-e8f7502bfdc3" + name = "Wallace Wilderman" + secret_id = "...my_secretId..." + workspace_id = "02bfdc34-5084-41f1-b644-56379f3fb27e" } ``` diff --git a/docs/resources/source_microsoft_teams.md b/docs/resources/source_microsoft_teams.md index 63166609e..3853cab38 100644 --- a/docs/resources/source_microsoft_teams.md +++ b/docs/resources/source_microsoft_teams.md @@ -16,16 +16,19 @@ SourceMicrosoftTeams Resource resource "airbyte_source_microsoft_teams" "my_source_microsoftteams" { configuration = { credentials = { - auth_type = "Token" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - tenant_id = "...my_tenant_id..." + source_microsoft_teams_authentication_mechanism_authenticate_via_microsoft = { + auth_type = "Token" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + tenant_id = "...my_tenant_id..." + } } period = "D7" source_type = "microsoft-teams" } - name = "Veronica Abshire" - workspace_id = "1f176445-6379-4f3f-b27e-21f862657b36" + name = "Stephanie Yundt" + secret_id = "...my_secretId..." + workspace_id = "2657b36f-c6b9-4f58-bce5-25c67641a831" } ``` diff --git a/docs/resources/source_mixpanel.md b/docs/resources/source_mixpanel.md index 621e81a6a..3400ef1d8 100644 --- a/docs/resources/source_mixpanel.md +++ b/docs/resources/source_mixpanel.md @@ -15,22 +15,25 @@ SourceMixpanel Resource ```terraform resource "airbyte_source_mixpanel" "my_source_mixpanel" { configuration = { - attribution_window = 10 + attribution_window = 1 credentials = { - api_secret = "...my_api_secret..." - option_title = "Project Secret" + source_mixpanel_authentication_wildcard_project_secret = { + api_secret = "...my_api_secret..." + option_title = "Project Secret" + } } - date_window_size = 8 + date_window_size = 9 end_date = "2021-11-16" - project_id = 6 - project_timezone = "UTC" - region = "US" + project_id = 3 + project_timezone = "US/Pacific" + region = "EU" select_properties_by_default = true source_type = "mixpanel" start_date = "2021-11-16" } - name = "Leon Cummings" - workspace_id = "67641a83-12e5-4047-b4c2-1ccb423abcdc" + name = "Robyn Runte" + secret_id = "...my_secretId..." + workspace_id = "23abcdc9-1faa-4bdd-88e7-1f6c48252d77" } ``` diff --git a/docs/resources/source_monday.md b/docs/resources/source_monday.md index 44794ee44..4fb23759d 100644 --- a/docs/resources/source_monday.md +++ b/docs/resources/source_monday.md @@ -16,13 +16,16 @@ SourceMonday Resource resource "airbyte_source_monday" "my_source_monday" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" + source_monday_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + } } source_type = "monday" } - name = "Carl Weimann" - workspace_id = "bdd88e71-f6c4-4825-ad77-71e7fd074009" + name = "Frances Vandervort" + secret_id = "...my_secretId..." + workspace_id = "d074009e-f8d2-49de-9dd7-097b5da08c57" } ``` diff --git a/docs/resources/source_mongodb.md b/docs/resources/source_mongodb.md index e518aca28..8f85047be 100644 --- a/docs/resources/source_mongodb.md +++ b/docs/resources/source_mongodb.md @@ -18,15 +18,18 @@ resource "airbyte_source_mongodb" "my_source_mongodb" { auth_source = "admin" database = "...my_database..." instance_type = { - cluster_url = "...my_cluster_url..." - instance = "atlas" + source_mongodb_mongo_db_instance_type_mongo_db_atlas = { + cluster_url = "...my_cluster_url..." + instance = "atlas" + } } password = "...my_password..." source_type = "mongodb" user = "...my_user..." } - name = "Emanuel Lemke" - workspace_id = "9de1dd70-97b5-4da0-8c57-fa6c78a216e1" + name = "Alfonso Keeling" + secret_id = "...my_secretId..." + workspace_id = "8a216e19-bafe-4ca6-9914-98140b64ff8a" } ``` diff --git a/docs/resources/source_mssql.md b/docs/resources/source_mssql.md index 882954b04..cfceb8679 100644 --- a/docs/resources/source_mssql.md +++ b/docs/resources/source_mssql.md @@ -21,25 +21,32 @@ resource "airbyte_source_mssql" "my_source_mssql" { password = "...my_password..." port = 1433 replication_method = { - data_to_sync = "New Changes Only" - initial_waiting_seconds = 7 - method = "CDC" - snapshot_isolation = "Read Committed" + source_mssql_replication_method_logical_replication_cdc_ = { + data_to_sync = "Existing and New" + initial_waiting_seconds = 4 + method = "CDC" + snapshot_isolation = "Snapshot" + } } schemas = [ "...", ] source_type = "mssql" ssl_method = { - ssl_method = "encrypted_trust_server_certificate" + source_mssql_ssl_method_encrypted_trust_server_certificate_ = { + ssl_method = "encrypted_trust_server_certificate" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_mssql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Theresa.Schinner" + username = "Tomas22" } - name = "Mae Boehm" - workspace_id = "8140b64f-f8ae-4170-af03-b5f37e4aa868" + name = "Jon Wilkinson" + secret_id = "...my_secretId..." + workspace_id = "e4aa8685-5596-4673-aaa5-dcb6682cb70f" } ``` diff --git a/docs/resources/source_my_hours.md b/docs/resources/source_my_hours.md index 751c65b24..95160dca1 100644 --- a/docs/resources/source_my_hours.md +++ b/docs/resources/source_my_hours.md @@ -21,8 +21,9 @@ resource "airbyte_source_my_hours" "my_source_myhours" { source_type = "my-hours" start_date = "%Y-%m-%d" } - name = "Sara O'Kon" - workspace_id = "dcb6682c-b70f-48cf-95fb-6e91b9a9f748" + name = "Tracy Buckridge" + secret_id = "...my_secretId..." + workspace_id = "a9f74846-e2c3-4309-9b05-36d9e75ca006" } ``` diff --git a/docs/resources/source_mysql.md b/docs/resources/source_mysql.md index 54e85fa99..628a0630e 100644 --- a/docs/resources/source_mysql.md +++ b/docs/resources/source_mysql.md @@ -21,21 +21,28 @@ resource "airbyte_source_mysql" "my_source_mysql" { password = "...my_password..." port = 3306 replication_method = { - initial_waiting_seconds = 4 - method = "CDC" - server_time_zone = "...my_server_time_zone..." + source_mysql_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 3 + method = "CDC" + server_time_zone = "...my_server_time_zone..." + } } source_type = "mysql" ssl_mode = { - mode = "preferred" + source_mysql_ssl_modes_preferred = { + mode = "preferred" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_mysql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Terrence.Collins20" + username = "Coty77" } - name = "Velma Sipes II" - workspace_id = "36d9e75c-a006-4f53-92c1-1a25a8bf92f9" + name = "Debra Ortiz" + secret_id = "...my_secretId..." + workspace_id = "a8bf92f9-7428-4ad9-a9f8-bf8221125359" } ``` diff --git a/docs/resources/source_netsuite.md b/docs/resources/source_netsuite.md index 53a6fdc9d..101d808a6 100644 --- a/docs/resources/source_netsuite.md +++ b/docs/resources/source_netsuite.md @@ -25,10 +25,11 @@ resource "airbyte_source_netsuite" "my_source_netsuite" { start_datetime = "2017-01-25T00:00:00Z" token_key = "...my_token_key..." token_secret = "...my_token_secret..." - window_in_days = 5 + window_in_days = 9 } - name = "Judy MacGyver" - workspace_id = "9a9f8bf8-2211-4253-99d9-8387f7a79cd7" + name = "Guy Feest" + secret_id = "...my_secretId..." + workspace_id = "f7a79cd7-2cd2-4484-9a21-729f2ac41ef5" } ``` diff --git a/docs/resources/source_notion.md b/docs/resources/source_notion.md index cfa170eae..b3cbc1ab5 100644 --- a/docs/resources/source_notion.md +++ b/docs/resources/source_notion.md @@ -16,14 +16,17 @@ SourceNotion Resource resource "airbyte_source_notion" "my_source_notion" { configuration = { credentials = { - auth_type = "token" - token = "...my_token..." + source_notion_authenticate_using_access_token = { + auth_type = "token" + token = "...my_token..." + } } source_type = "notion" start_date = "2020-11-16T00:00:00.000Z" } - name = "Victor Gleason" - workspace_id = "da21729f-2ac4-41ef-9725-f1169ac1e41d" + name = "Ms. Elisa Carroll" + secret_id = "...my_secretId..." + workspace_id = "ac1e41d8-a23c-423e-b4f2-dfa4a197f6de" } ``` diff --git a/docs/resources/source_nytimes.md b/docs/resources/source_nytimes.md index 7e49f4b8f..fa01c9031 100644 --- a/docs/resources/source_nytimes.md +++ b/docs/resources/source_nytimes.md @@ -20,10 +20,11 @@ resource "airbyte_source_nytimes" "my_source_nytimes" { period = "1" share_type = "facebook" source_type = "nytimes" - start_date = "1851-01" + start_date = "2022-08" } - name = "Allen Grant" - workspace_id = "dfa4a197-f6de-4922-951f-e1712099853e" + name = "Mr. Willie Kirlin V" + secret_id = "...my_secretId..." + workspace_id = "9853e9f5-43d8-4544-b9ee-224460443bc1" } ``` diff --git a/docs/resources/source_okta.md b/docs/resources/source_okta.md index f3a212298..482f17e60 100644 --- a/docs/resources/source_okta.md +++ b/docs/resources/source_okta.md @@ -16,15 +16,18 @@ SourceOkta Resource resource "airbyte_source_okta" "my_source_okta" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" + source_okta_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + } } domain = "...my_domain..." source_type = "okta" start_date = "2022-07-22T00:00:00Z" } - name = "Dominick Hayes" - workspace_id = "d854439e-e224-4460-843b-c154188c2f56" + name = "Danielle Bruen" + secret_id = "...my_secretId..." + workspace_id = "c2f56e85-da78-432e-abd6-17c3b0d51a44" } ``` diff --git a/docs/resources/source_omnisend.md b/docs/resources/source_omnisend.md index 737eaab4d..b8933571d 100644 --- a/docs/resources/source_omnisend.md +++ b/docs/resources/source_omnisend.md @@ -18,8 +18,9 @@ resource "airbyte_source_omnisend" "my_source_omnisend" { api_key = "...my_api_key..." source_type = "omnisend" } - name = "Everett Hills" - workspace_id = "7832eabd-617c-43b0-951a-44bf01bad870" + name = "Miss Domingo Bahringer" + secret_id = "...my_secretId..." + workspace_id = "d8706d46-082b-4fbd-841f-f5d4e2ae4fb5" } ``` diff --git a/docs/resources/source_onesignal.md b/docs/resources/source_onesignal.md index 4c0f96b94..d052faed6 100644 --- a/docs/resources/source_onesignal.md +++ b/docs/resources/source_onesignal.md @@ -27,8 +27,9 @@ resource "airbyte_source_onesignal" "my_source_onesignal" { start_date = "2020-11-16T00:00:00Z" user_auth_key = "...my_user_auth_key..." } - name = "Rosemary Abshire" - workspace_id = "bfbdc41f-f5d4-4e2a-a4fb-5cb35d17638f" + name = "Ms. Regina Steuber" + secret_id = "...my_secretId..." + workspace_id = "38f1edb7-8359-4ecc-9cb8-60f8cd580ba7" } ``` diff --git a/docs/resources/source_openweather.md b/docs/resources/source_openweather.md index 20ad3f972..1c592bda6 100644 --- a/docs/resources/source_openweather.md +++ b/docs/resources/source_openweather.md @@ -16,14 +16,15 @@ SourceOpenweather Resource resource "airbyte_source_openweather" "my_source_openweather" { configuration = { appid = "...my_appid..." - lang = "en" + lang = "fr" lat = "-21.249107858038816" - lon = "-70.39482074115321" + lon = "4.835659" source_type = "openweather" - units = "imperial" + units = "standard" } - name = "Penny Feest" - workspace_id = "ecc5cb86-0f8c-4d58-8ba7-3810e4fe4447" + name = "Alex Zulauf" + secret_id = "...my_secretId..." + workspace_id = "447297cd-3b1d-4d3b-bce2-47b7684eff50" } ``` diff --git a/docs/resources/source_oracle.md b/docs/resources/source_oracle.md index a16c96954..c527c4b9c 100644 --- a/docs/resources/source_oracle.md +++ b/docs/resources/source_oracle.md @@ -16,28 +16,35 @@ SourceOracle Resource resource "airbyte_source_oracle" "my_source_oracle" { configuration = { connection_data = { - connection_type = "service_name" - service_name = "...my_service_name..." + source_oracle_connect_by_service_name = { + connection_type = "service_name" + service_name = "...my_service_name..." + } } encryption = { - encryption_algorithm = "AES256" - encryption_method = "client_nne" + source_oracle_encryption_native_network_encryption_nne_ = { + encryption_algorithm = "AES256" + encryption_method = "client_nne" + } } host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." - port = 6 + port = 2 schemas = [ "...", ] source_type = "oracle" tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_oracle_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jada.Runolfsson70" + username = "Gilda.Spencer" } - name = "Angel Stokes" - workspace_id = "bce247b7-684e-4ff5-8126-d71cffbd0eb7" + name = "Courtney Wiegand" + secret_id = "...my_secretId..." + workspace_id = "0eb74b84-2195-43b4-8bd3-c43159d33e59" } ``` diff --git a/docs/resources/source_orb.md b/docs/resources/source_orb.md index 1645b4fdb..16cfb2005 100644 --- a/docs/resources/source_orb.md +++ b/docs/resources/source_orb.md @@ -28,8 +28,9 @@ resource "airbyte_source_orb" "my_source_orb" { ] subscription_usage_grouping_key = "...my_subscription_usage_grouping_key..." } - name = "Nelson Hagenes V" - workspace_id = "53b44bd3-c431-459d-b3e5-953c00113986" + name = "Mr. Traci Adams I" + secret_id = "...my_secretId..." + workspace_id = "9863aa41-e6c3-41cc-af1f-cb51c9a41ffb" } ``` diff --git a/docs/resources/source_orbit.md b/docs/resources/source_orbit.md index 98e7f54f6..5f0cb2911 100644 --- a/docs/resources/source_orbit.md +++ b/docs/resources/source_orbit.md @@ -20,8 +20,9 @@ resource "airbyte_source_orbit" "my_source_orbit" { start_date = "...my_start_date..." workspace = "...my_workspace..." } - name = "Molly Parker DVM" - workspace_id = "6c31cc2f-1fcb-451c-9a41-ffbe9cbd795e" + name = "Jackie Schmitt" + secret_id = "...my_secretId..." + workspace_id = "795ee65e-076c-4c7a-bf61-6ea5c7164193" } ``` diff --git a/docs/resources/source_outreach.md b/docs/resources/source_outreach.md index 45fc1b01f..f95d275cd 100644 --- a/docs/resources/source_outreach.md +++ b/docs/resources/source_outreach.md @@ -22,8 +22,9 @@ resource "airbyte_source_outreach" "my_source_outreach" { source_type = "outreach" start_date = "2020-11-16T00:00:00Z" } - name = "Leslie Hartmann IV" - workspace_id = "6cc7abf6-16ea-45c7-9641-934b90f2e09d" + name = "Dr. Latoya McClure" + secret_id = "...my_secretId..." + workspace_id = "e09d19d2-fc2f-49e2-a105-944b935d237a" } ``` diff --git a/docs/resources/source_paypal_transaction.md b/docs/resources/source_paypal_transaction.md index e9785a44c..b69a248d0 100644 --- a/docs/resources/source_paypal_transaction.md +++ b/docs/resources/source_paypal_transaction.md @@ -20,10 +20,11 @@ resource "airbyte_source_paypal_transaction" "my_source_paypaltransaction" { is_sandbox = true refresh_token = "...my_refresh_token..." source_type = "paypal-transaction" - start_date = "2021-06-11T23:59:59+00:00" + start_date = "2021-06-11T23:59:59" } - name = "Rodolfo Champlin" - workspace_id = "e2e10594-4b93-45d2-b7a7-2f90849d6aed" + name = "Mattie Gutkowski" + secret_id = "...my_secretId..." + workspace_id = "6aed4aec-b753-47cd-9222-c9ff57491aab" } ``` diff --git a/docs/resources/source_paystack.md b/docs/resources/source_paystack.md index 0034129af..7b32a33fc 100644 --- a/docs/resources/source_paystack.md +++ b/docs/resources/source_paystack.md @@ -15,13 +15,14 @@ SourcePaystack Resource ```terraform resource "airbyte_source_paystack" "my_source_paystack" { configuration = { - lookback_window_days = 3 + lookback_window_days = 10 secret_key = "...my_secret_key..." source_type = "paystack" start_date = "2017-01-25T00:00:00Z" } - name = "Dominic Kunde" - workspace_id = "7cd9222c-9ff5-4749-9aab-fa2e761f0ca4" + name = "Dr. Darren Kemmer DDS" + secret_id = "...my_secretId..." + workspace_id = "a4d456ef-1031-4e68-99f0-c2001e22cd55" } ``` diff --git a/docs/resources/source_pendo.md b/docs/resources/source_pendo.md index 0b5ae1313..892f43150 100644 --- a/docs/resources/source_pendo.md +++ b/docs/resources/source_pendo.md @@ -18,8 +18,9 @@ resource "airbyte_source_pendo" "my_source_pendo" { api_key = "...my_api_key..." source_type = "pendo" } - name = "Francisco Hauck" - workspace_id = "f1031e68-99f0-4c20-81e2-2cd55cc0584a" + name = "Forrest Abshire" + secret_id = "...my_secretId..." + workspace_id = "4a184d76-d971-4fc8-a0c6-5b037bb8e0cc" } ``` diff --git a/docs/resources/source_persistiq.md b/docs/resources/source_persistiq.md index 71328200a..78ca6d63d 100644 --- a/docs/resources/source_persistiq.md +++ b/docs/resources/source_persistiq.md @@ -18,8 +18,9 @@ resource "airbyte_source_persistiq" "my_source_persistiq" { api_key = "...my_api_key..." source_type = "persistiq" } - name = "Lena Goyette" - workspace_id = "6d971fc8-20c6-45b0-b7bb-8e0cc885187e" + name = "Ms. Daryl Hermiston" + secret_id = "...my_secretId..." + workspace_id = "e4de04af-28c5-4ddd-b46a-a1cfd6d828da" } ``` diff --git a/docs/resources/source_pexels_api.md b/docs/resources/source_pexels_api.md index db9bdf29b..f5d75ef72 100644 --- a/docs/resources/source_pexels_api.md +++ b/docs/resources/source_pexels_api.md @@ -17,14 +17,15 @@ resource "airbyte_source_pexels_api" "my_source_pexelsapi" { configuration = { api_key = "...my_api_key..." color = "red" - locale = "pt-BR" - orientation = "landscape" + locale = "en-US" + orientation = "square" query = "people" - size = "large" + size = "small" source_type = "pexels-api" } - name = "Terrell Cremin" - workspace_id = "5dddb46a-a1cf-4d6d-828d-a01319112964" + name = "Jean Denesik" + secret_id = "...my_secretId..." + workspace_id = "46645c1d-81f2-4904-af56-9b7aff0ea221" } ``` diff --git a/docs/resources/source_pinterest.md b/docs/resources/source_pinterest.md index 018646d66..86ff54fb0 100644 --- a/docs/resources/source_pinterest.md +++ b/docs/resources/source_pinterest.md @@ -16,17 +16,20 @@ SourcePinterest Resource resource "airbyte_source_pinterest" "my_source_pinterest" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_pinterest_authorization_method_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } source_type = "pinterest" start_date = "2022-07-28" status = [ - "ACTIVE", + "ARCHIVED", ] } - name = "Myra Bernier" - workspace_id = "1f29042f-569b-47af-b0ea-2216cbe071bc" + name = "Miss Larry Kunde" + secret_id = "...my_secretId..." + workspace_id = "163e279a-3b08-44da-9925-7d04f40847a7" } ``` diff --git a/docs/resources/source_pipedrive.md b/docs/resources/source_pipedrive.md index d53d76094..a690df9ca 100644 --- a/docs/resources/source_pipedrive.md +++ b/docs/resources/source_pipedrive.md @@ -22,8 +22,9 @@ resource "airbyte_source_pipedrive" "my_source_pipedrive" { replication_start_date = "2017-01-25T00:00:00Z" source_type = "pipedrive" } - name = "Rochelle Cormier" - workspace_id = "a3b084da-9925-47d0-8f40-847a742d8449" + name = "Clayton Graham" + secret_id = "...my_secretId..." + workspace_id = "6cbdeecf-6b99-4bc6-b562-ebfdf55c294c" } ``` diff --git a/docs/resources/source_pocket.md b/docs/resources/source_pocket.md index 84fb4d6eb..b6b249c40 100644 --- a/docs/resources/source_pocket.md +++ b/docs/resources/source_pocket.md @@ -17,19 +17,20 @@ resource "airbyte_source_pocket" "my_source_pocket" { configuration = { access_token = "...my_access_token..." consumer_key = "...my_consumer_key..." - content_type = "video" - detail_type = "complete" + content_type = "article" + detail_type = "simple" domain = "...my_domain..." favorite = false search = "...my_search..." since = "2022-10-20 14:14:14" - sort = "site" + sort = "title" source_type = "pocket" - state = "all" + state = "unread" tag = "...my_tag..." } - name = "Edmund Witting" - workspace_id = "99bc6356-2ebf-4df5-9c29-4c060b06a128" + name = "Janie Bogisich" + secret_id = "...my_secretId..." + workspace_id = "7764eef6-d0c6-4d6e-99c7-3dd634571509" } ``` diff --git a/docs/resources/source_pokeapi.md b/docs/resources/source_pokeapi.md index aad2eb80d..b95441260 100644 --- a/docs/resources/source_pokeapi.md +++ b/docs/resources/source_pokeapi.md @@ -15,11 +15,12 @@ SourcePokeapi Resource ```terraform resource "airbyte_source_pokeapi" "my_source_pokeapi" { configuration = { - pokemon_name = "luxray" + pokemon_name = "snorlax" source_type = "pokeapi" } - name = "Stacey Fritsch" - workspace_id = "f6d0c6d6-ed9c-473d-9634-571509a8e870" + name = "Lamar Lesch PhD" + secret_id = "...my_secretId..." + workspace_id = "3c5a1f9c-242c-47b6-aa1f-30c73df5b671" } ``` diff --git a/docs/resources/source_polygon_stock_api.md b/docs/resources/source_polygon_stock_api.md index 8004afc2a..4db378322 100644 --- a/docs/resources/source_polygon_stock_api.md +++ b/docs/resources/source_polygon_stock_api.md @@ -23,11 +23,12 @@ resource "airbyte_source_polygon_stock_api" "my_source_polygonstockapi" { sort = "desc" source_type = "polygon-stock-api" start_date = "2020-10-14" - stocks_ticker = "IBM" + stocks_ticker = "MSFT" timespan = "day" } - name = "Rosalie Kuhlman" - workspace_id = "6a1f30c7-3df5-4b67-9989-0f42a4bb438d" + name = "Sylvia Lindgren" + secret_id = "...my_secretId..." + workspace_id = "5b260591-d745-4e3c-a059-c9c3f567e0e2" } ``` diff --git a/docs/resources/source_postgres.md b/docs/resources/source_postgres.md index eed1dd99f..d5a42960c 100644 --- a/docs/resources/source_postgres.md +++ b/docs/resources/source_postgres.md @@ -21,28 +21,35 @@ resource "airbyte_source_postgres" "my_source_postgres" { password = "...my_password..." port = 5432 replication_method = { - initial_waiting_seconds = 3 - lsn_commit_behaviour = "After loading Data in the destination" - method = "CDC" - plugin = "pgoutput" - publication = "...my_publication..." - queue_size = 1 - replication_slot = "...my_replication_slot..." + source_postgres_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 1 + lsn_commit_behaviour = "While reading Data" + method = "CDC" + plugin = "pgoutput" + publication = "...my_publication..." + queue_size = 4 + replication_slot = "...my_replication_slot..." + } } schemas = [ "...", ] source_type = "postgres" ssl_mode = { - mode = "allow" + source_postgres_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_postgres_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Gina59" + username = "Euna83" } - name = "Krystal Kiehn" - workspace_id = "e3c2059c-9c3f-4567-a0e2-52765b1d62fc" + name = "Kathryn Windler" + secret_id = "...my_secretId..." + workspace_id = "ace1f012-16ce-4223-9e8f-25cd0d19d959" } ``` diff --git a/docs/resources/source_posthog.md b/docs/resources/source_posthog.md index 6878eeb2a..3f73d6a8f 100644 --- a/docs/resources/source_posthog.md +++ b/docs/resources/source_posthog.md @@ -20,8 +20,9 @@ resource "airbyte_source_posthog" "my_source_posthog" { source_type = "posthog" start_date = "2021-01-01T00:00:00Z" } - name = "Doyle Bradtke Sr." - workspace_id = "216ce223-9e8f-425c-90d1-9d959f439e39" + name = "Ada Tromp" + secret_id = "...my_secretId..." + workspace_id = "266cbd95-f7aa-42b2-8113-695d1e6698fc" } ``` diff --git a/docs/resources/source_postmarkapp.md b/docs/resources/source_postmarkapp.md index 7112129b0..4ac042d72 100644 --- a/docs/resources/source_postmarkapp.md +++ b/docs/resources/source_postmarkapp.md @@ -19,8 +19,9 @@ resource "airbyte_source_postmarkapp" "my_source_postmarkapp" { x_postmark_account_token = "...my_X-Postmark-Account-Token..." x_postmark_server_token = "...my_X-Postmark-Server-Token..." } - name = "Sue Jerde" - workspace_id = "d95f7aa2-b241-4136-95d1-e6698fcc4596" + name = "Jon Harris" + secret_id = "...my_secretId..." + workspace_id = "217c2977-6763-4342-9403-8bfb5971e981" } ``` diff --git a/docs/resources/source_prestashop.md b/docs/resources/source_prestashop.md index c01093685..7cab1784c 100644 --- a/docs/resources/source_prestashop.md +++ b/docs/resources/source_prestashop.md @@ -20,8 +20,9 @@ resource "airbyte_source_prestashop" "my_source_prestashop" { start_date = "2022-01-01" url = "...my_url..." } - name = "Kendra D'Amore" - workspace_id = "76763342-5403-48bf-b597-1e9819055738" + name = "Samantha Krajcik" + secret_id = "...my_secretId..." + workspace_id = "9cedbac7-fda3-4959-8d66-bc2ae480632b" } ``` diff --git a/docs/resources/source_public_apis.md b/docs/resources/source_public_apis.md index caad4c9c0..3cbfa4be4 100644 --- a/docs/resources/source_public_apis.md +++ b/docs/resources/source_public_apis.md @@ -17,8 +17,9 @@ resource "airbyte_source_public_apis" "my_source_publicapis" { configuration = { source_type = "public-apis" } - name = "Benny Ward" - workspace_id = "ac7fda39-594d-466b-82ae-480632b9954b" + name = "Marion Hamill" + secret_id = "...my_secretId..." + workspace_id = "6fa22063-6982-4855-bcb1-0006bef4921e" } ``` diff --git a/docs/resources/source_punk_api.md b/docs/resources/source_punk_api.md index 490a54ffd..e4e270e10 100644 --- a/docs/resources/source_punk_api.md +++ b/docs/resources/source_punk_api.md @@ -17,11 +17,12 @@ resource "airbyte_source_punk_api" "my_source_punkapi" { configuration = { brewed_after = "MM-YYYY" brewed_before = "MM-YYYY" - id = 1 + id = 22 source_type = "punk-api" } - name = "Betty Hirthe" - workspace_id = "749366ac-8ee0-4f2b-b195-88d40d03f3de" + name = "Faith Doyle" + secret_id = "...my_secretId..." + workspace_id = "ba297be3-e90b-4c40-9f86-8fd52405cb33" } ``` diff --git a/docs/resources/source_pypi.md b/docs/resources/source_pypi.md index 55c0fcbe6..ce815faca 100644 --- a/docs/resources/source_pypi.md +++ b/docs/resources/source_pypi.md @@ -19,8 +19,9 @@ resource "airbyte_source_pypi" "my_source_pypi" { source_type = "pypi" version = "1.2.0" } - name = "Ernesto Crist" - workspace_id = "be3e90bc-40df-4868-bd52-405cb331d492" + name = "Mercedes Fritsch" + secret_id = "...my_secretId..." + workspace_id = "f4f127fb-0e0b-4f1f-8217-978d0acca77a" } ``` diff --git a/docs/resources/source_qualaroo.md b/docs/resources/source_qualaroo.md index 58ca147aa..564e6be3c 100644 --- a/docs/resources/source_qualaroo.md +++ b/docs/resources/source_qualaroo.md @@ -23,8 +23,9 @@ resource "airbyte_source_qualaroo" "my_source_qualaroo" { ] token = "...my_token..." } - name = "Mr. Joel Yost" - workspace_id = "fb0e0bf1-f821-4797-8d0a-cca77aeb7b70" + name = "Geoffrey Kling" + secret_id = "...my_secretId..." + workspace_id = "021a5204-6b64-4e99-bb0e-67e094fdfed5" } ``` diff --git a/docs/resources/source_quickbooks.md b/docs/resources/source_quickbooks.md index 895ad68d3..42e0a1464 100644 --- a/docs/resources/source_quickbooks.md +++ b/docs/resources/source_quickbooks.md @@ -16,20 +16,23 @@ SourceQuickbooks Resource resource "airbyte_source_quickbooks" "my_source_quickbooks" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - realm_id = "...my_realm_id..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-11-25T12:48:18.221Z" + source_quickbooks_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + realm_id = "...my_realm_id..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2022-09-15T16:38:10.985Z" + } } sandbox = false source_type = "quickbooks" start_date = "2021-03-20T00:00:00+00:00" } - name = "Gail Hoppe" - workspace_id = "4e99fb0e-67e0-494f-9fed-5540ef53a34a" + name = "Gladys O'Hara" + secret_id = "...my_secretId..." + workspace_id = "a1b8fe99-731a-4dc0-9d85-ae2dfb70fb38" } ``` diff --git a/docs/resources/source_railz.md b/docs/resources/source_railz.md index 0417510bc..8cdadc96a 100644 --- a/docs/resources/source_railz.md +++ b/docs/resources/source_railz.md @@ -20,8 +20,9 @@ resource "airbyte_source_railz" "my_source_railz" { source_type = "railz" start_date = "...my_start_date..." } - name = "Olivia Kuvalis" - workspace_id = "99731adc-05d8-45ae-adfb-70fb3874290d" + name = "Elaine Cummerata PhD" + secret_id = "...my_secretId..." + workspace_id = "336561ec-a16e-4f89-851b-d76eeeb518c4" } ``` diff --git a/docs/resources/source_recharge.md b/docs/resources/source_recharge.md index 358cb244b..255fe654e 100644 --- a/docs/resources/source_recharge.md +++ b/docs/resources/source_recharge.md @@ -19,8 +19,9 @@ resource "airbyte_source_recharge" "my_source_recharge" { source_type = "recharge" start_date = "2021-05-14T00:00:00Z" } - name = "Dr. Beatrice Keeling" - workspace_id = "a16ef894-51bd-476e-aeb5-18c4da1fad35" + name = "Ollie Osinski" + secret_id = "...my_secretId..." + workspace_id = "5512f06d-4e5b-472f-8f54-8568a0424e00" } ``` diff --git a/docs/resources/source_recreation.md b/docs/resources/source_recreation.md index 7aacc353c..e8f91fe4c 100644 --- a/docs/resources/source_recreation.md +++ b/docs/resources/source_recreation.md @@ -19,8 +19,9 @@ resource "airbyte_source_recreation" "my_source_recreation" { query_campsites = "...my_query_campsites..." source_type = "recreation" } - name = "Ann Connelly III" - workspace_id = "d4e5b72f-0f54-4856-8a04-24e00a1d6eb9" + name = "Joe Stamm" + secret_id = "...my_secretId..." + workspace_id = "b9434645-d030-484f-bba5-cceff5cb01fe" } ``` diff --git a/docs/resources/source_recruitee.md b/docs/resources/source_recruitee.md index 0918aa119..e570d5f72 100644 --- a/docs/resources/source_recruitee.md +++ b/docs/resources/source_recruitee.md @@ -16,11 +16,12 @@ SourceRecruitee Resource resource "airbyte_source_recruitee" "my_source_recruitee" { configuration = { api_key = "...my_api_key..." - company_id = 2 + company_id = 3 source_type = "recruitee" } - name = "Suzanne Jenkins" - workspace_id = "d03084fb-ba5c-4cef-b5cb-01fe51e528a4" + name = "Eloise Hintz" + secret_id = "...my_secretId..." + workspace_id = "a45ac82b-85f8-4bc2-8aba-8da4127dd597" } ``` diff --git a/docs/resources/source_recurly.md b/docs/resources/source_recurly.md index 256db7311..5c6205371 100644 --- a/docs/resources/source_recurly.md +++ b/docs/resources/source_recurly.md @@ -20,8 +20,9 @@ resource "airbyte_source_recurly" "my_source_recurly" { end_time = "2021-12-01T00:00:00" source_type = "recurly" } - name = "Iris Schimmel MD" - workspace_id = "85f8bc2c-aba8-4da4-927d-d597ff4711aa" + name = "Darrin Gislason Jr." + secret_id = "...my_secretId..." + workspace_id = "aa1bc74b-86ce-4cc7-8f77-b4848bd6a6f0" } ``` diff --git a/docs/resources/source_redshift.md b/docs/resources/source_redshift.md index 6cbe4fa8c..653b35289 100644 --- a/docs/resources/source_redshift.md +++ b/docs/resources/source_redshift.md @@ -24,10 +24,11 @@ resource "airbyte_source_redshift" "my_source_redshift" { "...", ] source_type = "redshift" - username = "Miguel.Sauer" + username = "Elmer.Bradtke80" } - name = "Alberto Hyatt" - workspace_id = "cc74f77b-4848-4bd6-a6f0-441d2c3b8080" + name = "Ms. Shelia Luettgen V" + secret_id = "...my_secretId..." + workspace_id = "4373e060-459b-4ebb-ad02-f2586bcf1525" } ``` diff --git a/docs/resources/source_retently.md b/docs/resources/source_retently.md index 30368aa4a..6f39f19e3 100644 --- a/docs/resources/source_retently.md +++ b/docs/resources/source_retently.md @@ -16,15 +16,18 @@ SourceRetently Resource resource "airbyte_source_retently" "my_source_retently" { configuration = { credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_retently_authentication_mechanism_authenticate_via_retently_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } source_type = "retently" } - name = "Alex Douglas" - workspace_id = "e060459b-ebba-4d02-b258-6bcf152558da" + name = "Myrtle Spinka" + secret_id = "...my_secretId..." + workspace_id = "95be6cd0-2756-4c35-8aa4-32b47e1763c5" } ``` diff --git a/docs/resources/source_rki_covid.md b/docs/resources/source_rki_covid.md index e8818f395..b0e2683b4 100644 --- a/docs/resources/source_rki_covid.md +++ b/docs/resources/source_rki_covid.md @@ -18,8 +18,9 @@ resource "airbyte_source_rki_covid" "my_source_rkicovid" { source_type = "rki-covid" start_date = "...my_start_date..." } - name = "Andy Herzog" - workspace_id = "6cd02756-c354-4aa4-b2b4-7e1763c5208c" + name = "Patricia Kuvalis" + secret_id = "...my_secretId..." + workspace_id = "3e9802d8-2f0d-445e-b4a8-b674ee5cfc18" } ``` diff --git a/docs/resources/source_rss.md b/docs/resources/source_rss.md index 22f710737..cf2c0486f 100644 --- a/docs/resources/source_rss.md +++ b/docs/resources/source_rss.md @@ -18,8 +18,9 @@ resource "airbyte_source_rss" "my_source_rss" { source_type = "rss" url = "...my_url..." } - name = "Cindy Walter" - workspace_id = "02d82f0d-45eb-44a8-b674-ee5cfc18edc7" + name = "Sammy Ruecker" + secret_id = "...my_secretId..." + workspace_id = "787e32e0-4b3d-43ed-8c56-70ef42bd3c9f" } ``` diff --git a/docs/resources/source_s3.md b/docs/resources/source_s3.md index 0cb35698a..97d607439 100644 --- a/docs/resources/source_s3.md +++ b/docs/resources/source_s3.md @@ -17,9 +17,11 @@ resource "airbyte_source_s3" "my_source_s3" { configuration = { dataset = "...my_dataset..." format = { - filetype = "avro" + source_s3_file_format_avro = { + filetype = "avro" + } } - path_pattern = "myFolder/myTableFiles/*.csv|myFolder/myOtherTableFiles/*.csv" + path_pattern = "**" provider = { aws_access_key_id = "...my_aws_access_key_id..." aws_secret_access_key = "...my_aws_secret_access_key..." @@ -31,8 +33,9 @@ resource "airbyte_source_s3" "my_source_s3" { schema = "{\"column_1\": \"number\", \"column_2\": \"string\", \"column_3\": \"array\", \"column_4\": \"object\", \"column_5\": \"boolean\"}" source_type = "s3" } - name = "Lila Ferry" - workspace_id = "04b3d3ed-0c56-470e-b42b-d3c9f1cc503f" + name = "Sarah Feeney" + secret_id = "...my_secretId..." + workspace_id = "c39bcd0a-6290-4f95-bf38-5189ad7ef807" } ``` diff --git a/docs/resources/source_salesforce.md b/docs/resources/source_salesforce.md index 9a01f542a..e47710041 100644 --- a/docs/resources/source_salesforce.md +++ b/docs/resources/source_salesforce.md @@ -18,19 +18,20 @@ resource "airbyte_source_salesforce" "my_source_salesforce" { auth_type = "Client" client_id = "...my_client_id..." client_secret = "...my_client_secret..." - is_sandbox = false + is_sandbox = true refresh_token = "...my_refresh_token..." source_type = "salesforce" start_date = "2021-07-25T00:00:00Z" streams_criteria = [ { - criteria = "ends not with" + criteria = "ends with" value = "...my_value..." }, ] } - name = "Kristopher Abernathy" - workspace_id = "290f957f-3851-489a-97ef-807aae03f33c" + name = "Leonard Fisher" + secret_id = "...my_secretId..." + workspace_id = "79fb9de4-032b-4a26-bd36-8ba9216bcb41" } ``` diff --git a/docs/resources/source_salesforce_singer.md b/docs/resources/source_salesforce_singer.md index 0f6249dce..bd0293719 100644 --- a/docs/resources/source_salesforce_singer.md +++ b/docs/resources/source_salesforce_singer.md @@ -15,18 +15,19 @@ SourceSalesforceSinger Resource ```terraform resource "airbyte_source_salesforce_singer" "my_source_salesforcesinger" { configuration = { - api_type = "REST" + api_type = "BULK" client_id = "...my_client_id..." client_secret = "...my_client_secret..." is_sandbox = true - quota_percent_per_run = 60.36 - quota_percent_total = 99.22 + quota_percent_per_run = 20.41 + quota_percent_total = 33.56 refresh_token = "...my_refresh_token..." source_type = "salesforce-singer" start_date = "2017-01-25T00:00:00Z" } - name = "Rene Stehr" - workspace_id = "032ba26f-d368-4ba9-a16b-cb415835c736" + name = "Claude Fisher" + secret_id = "...my_secretId..." + workspace_id = "1723133e-dc04-46bc-9163-bbca49227c42" } ``` diff --git a/docs/resources/source_salesloft.md b/docs/resources/source_salesloft.md index 8f4578394..7e0bac8a0 100644 --- a/docs/resources/source_salesloft.md +++ b/docs/resources/source_salesloft.md @@ -16,14 +16,17 @@ SourceSalesloft Resource resource "airbyte_source_salesloft" "my_source_salesloft" { configuration = { credentials = { - api_key = "...my_api_key..." - auth_type = "api_key" + source_salesloft_credentials_authenticate_via_api_key = { + api_key = "...my_api_key..." + auth_type = "api_key" + } } source_type = "salesloft" start_date = "2020-11-16T00:00:00Z" } - name = "Mrs. Marilyn Dicki" - workspace_id = "edc046bc-5163-4bbc-a492-27c42c22c553" + name = "Bethany Hansen" + secret_id = "...my_secretId..." + workspace_id = "50495c5d-bb3c-457c-9e49-81e8aa257ddc" } ``` diff --git a/docs/resources/source_sap_fieldglass.md b/docs/resources/source_sap_fieldglass.md index 7b1af127a..ac9e60487 100644 --- a/docs/resources/source_sap_fieldglass.md +++ b/docs/resources/source_sap_fieldglass.md @@ -18,8 +18,9 @@ resource "airbyte_source_sap_fieldglass" "my_source_sapfieldglass" { api_key = "...my_api_key..." source_type = "sap-fieldglass" } - name = "Donna Gottlieb" - workspace_id = "c5dbb3c5-7c1e-4498-9e8a-a257ddc1912e" + name = "Bobbie Block" + secret_id = "...my_secretId..." + workspace_id = "bde64bfc-c546-49d4-815d-fa796206bef2" } ``` diff --git a/docs/resources/source_secoda.md b/docs/resources/source_secoda.md index 60423a594..d03fa224c 100644 --- a/docs/resources/source_secoda.md +++ b/docs/resources/source_secoda.md @@ -18,8 +18,9 @@ resource "airbyte_source_secoda" "my_source_secoda" { api_key = "...my_api_key..." source_type = "secoda" } - name = "Josh Tremblay" - workspace_id = "bfcc5469-d401-45df-a796-206bef2b0a3e" + name = "Jason O'Kon" + secret_id = "...my_secretId..." + workspace_id = "42c1aa01-0e9a-4ac2-a913-5586d18f9f97" } ``` diff --git a/docs/resources/source_sendgrid.md b/docs/resources/source_sendgrid.md index 14f71621e..10a463c7e 100644 --- a/docs/resources/source_sendgrid.md +++ b/docs/resources/source_sendgrid.md @@ -17,10 +17,11 @@ resource "airbyte_source_sendgrid" "my_source_sendgrid" { configuration = { apikey = "...my_apikey..." source_type = "sendgrid" - start_time = "2020-01-01T01:01:01Z" + start_time = "2020-01-01T01:01:01.000001Z" } - name = "Mr. Iris Pfannerstill PhD" - workspace_id = "9aac2e91-3558-46d1-8f9f-97a4bfad2bf7" + name = "Horace Schumm" + secret_id = "...my_secretId..." + workspace_id = "f7d67ca8-4ad9-49b4-9d61-243531870cf6" } ``` diff --git a/docs/resources/source_sendinblue.md b/docs/resources/source_sendinblue.md index babfe2b9a..0f8153e14 100644 --- a/docs/resources/source_sendinblue.md +++ b/docs/resources/source_sendinblue.md @@ -18,8 +18,9 @@ resource "airbyte_source_sendinblue" "my_source_sendinblue" { api_key = "...my_api_key..." source_type = "sendinblue" } - name = "Nathaniel Kozey" - workspace_id = "84ad99b4-1d61-4243-9318-70cf68b03ad4" + name = "Willis Bechtelar" + secret_id = "...my_secretId..." + workspace_id = "d421bd43-d1f0-4cb0-a000-3eb22d9b3a70" } ``` diff --git a/docs/resources/source_senseforce.md b/docs/resources/source_senseforce.md index a17dd8855..89ff4f721 100644 --- a/docs/resources/source_senseforce.md +++ b/docs/resources/source_senseforce.md @@ -18,12 +18,13 @@ resource "airbyte_source_senseforce" "my_source_senseforce" { access_token = "...my_access_token..." backend_url = "https://galaxyapi.senseforce.io" dataset_id = "8f418098-ca28-4df5-9498-0df9fe78eda7" - slice_range = 3 + slice_range = 360 source_type = "senseforce" start_date = "2017-01-25" } - name = "Dr. Emily Schumm DDS" - workspace_id = "b0a0003e-b22d-49b3-a70d-94faa741c57d" + name = "Kenny Kessler DDS" + secret_id = "...my_secretId..." + workspace_id = "57d1fedc-2050-4d38-9c3c-e185472f9ee6" } ``` diff --git a/docs/resources/source_sentry.md b/docs/resources/source_sentry.md index 8f4b265e6..ec1619ae8 100644 --- a/docs/resources/source_sentry.md +++ b/docs/resources/source_sentry.md @@ -19,13 +19,14 @@ resource "airbyte_source_sentry" "my_source_sentry" { discover_fields = [ "{ \"see\": \"documentation\" }", ] - hostname = "chubby-waterwheel.org" + hostname = "pesky-boon.info" organization = "...my_organization..." project = "...my_project..." source_type = "sentry" } - name = "Mrs. Leland Crooks PhD" - workspace_id = "38dc3ce1-8547-42f9-ae69-166a8be3444e" + name = "Isabel Leuschke" + secret_id = "...my_secretId..." + workspace_id = "3444eac8-b3a2-4875-86c1-fe606d07d2a9" } ``` diff --git a/docs/resources/source_sftp.md b/docs/resources/source_sftp.md index 86c566d0f..36c9ae789 100644 --- a/docs/resources/source_sftp.md +++ b/docs/resources/source_sftp.md @@ -16,8 +16,10 @@ SourceSftp Resource resource "airbyte_source_sftp" "my_source_sftp" { configuration = { credentials = { - auth_method = "SSH_PASSWORD_AUTH" - auth_user_password = "...my_auth_user_password..." + source_sftp_authentication_wildcard_password_authentication = { + auth_method = "SSH_PASSWORD_AUTH" + auth_user_password = "...my_auth_user_password..." + } } file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_types = "csv" @@ -27,8 +29,9 @@ resource "airbyte_source_sftp" "my_source_sftp" { source_type = "sftp" user = "...my_user..." } - name = "Earl Osinski" - workspace_id = "75c6c1fe-606d-407d-aa9c-87ae50c16661" + name = "Miss Cornelius Hilll III" + secret_id = "...my_secretId..." + workspace_id = "661a1d91-36a7-4e8d-9321-3f3f658752db" } ``` diff --git a/docs/resources/source_sftp_bulk.md b/docs/resources/source_sftp_bulk.md index 0acaad016..325ef23c4 100644 --- a/docs/resources/source_sftp_bulk.md +++ b/docs/resources/source_sftp_bulk.md @@ -19,7 +19,7 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_type = "csv" folder_path = "/logs/2022" - host = "192.0.2.1" + host = "www.host.com" password = "...my_password..." port = 22 private_key = "...my_private_key..." @@ -27,10 +27,11 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { source_type = "sftp-bulk" start_date = "2017-01-25T00:00:00Z" stream_name = "ftp_contacts" - username = "Hunter_Murazik" + username = "Yasmine.Baumbach" } - name = "Woodrow Hansen" - workspace_id = "13f3f658-752d-4b76-8c59-f0a56cebcada" + name = "Nichole Treutel" + secret_id = "...my_secretId..." + workspace_id = "ada29ca7-9181-4c95-a716-63c530b56651" } ``` diff --git a/docs/resources/source_shopify.md b/docs/resources/source_shopify.md index fccc66bf0..8cb2605f0 100644 --- a/docs/resources/source_shopify.md +++ b/docs/resources/source_shopify.md @@ -16,15 +16,18 @@ SourceShopify Resource resource "airbyte_source_shopify" "my_source_shopify" { configuration = { credentials = { - api_password = "...my_api_password..." - auth_method = "api_password" + source_shopify_shopify_authorization_method_api_password = { + api_password = "...my_api_password..." + auth_method = "api_password" + } } shop = "...my_shop..." source_type = "shopify" start_date = "2021-01-01" } - name = "Homer Kshlerin IV" - workspace_id = "1c956716-63c5-430b-9665-163a3638512a" + name = "Alfred Hoppe" + secret_id = "...my_secretId..." + workspace_id = "512ab252-1b9f-42e0-b246-7b8a40bc05fa" } ``` diff --git a/docs/resources/source_shortio.md b/docs/resources/source_shortio.md index ec8036f9d..84e798796 100644 --- a/docs/resources/source_shortio.md +++ b/docs/resources/source_shortio.md @@ -20,8 +20,9 @@ resource "airbyte_source_shortio" "my_source_shortio" { source_type = "shortio" start_date = "...my_start_date..." } - name = "Billy Heathcote MD" - workspace_id = "9f2e0724-67b8-4a40-bc05-fab0d650edf2" + name = "Kenneth Swaniawski" + secret_id = "...my_secretId..." + workspace_id = "0edf22a9-4d20-4ec9-8ea4-1d1f465e8515" } ``` diff --git a/docs/resources/source_slack.md b/docs/resources/source_slack.md index bbb2c6e66..a01733641 100644 --- a/docs/resources/source_slack.md +++ b/docs/resources/source_slack.md @@ -19,16 +19,19 @@ resource "airbyte_source_slack" "my_source_slack" { "...", ] credentials = { - api_token = "...my_api_token..." - option_title = "API Token Credentials" + source_slack_authentication_mechanism_api_token = { + api_token = "...my_api_token..." + option_title = "API Token Credentials" + } } join_channels = false lookback_window = 14 source_type = "slack" start_date = "2017-01-25T00:00:00Z" } - name = "Deborah Waters" - workspace_id = "0ea41d1f-465e-4851-96ff-f73fdf54fdd5" + name = "Camille Smith" + secret_id = "...my_secretId..." + workspace_id = "4fdd5ea9-5433-498d-afb4-2a8d63388e4d" } ``` diff --git a/docs/resources/source_smaily.md b/docs/resources/source_smaily.md index bbeca0e36..946e6d00c 100644 --- a/docs/resources/source_smaily.md +++ b/docs/resources/source_smaily.md @@ -20,8 +20,9 @@ resource "airbyte_source_smaily" "my_source_smaily" { api_username = "...my_api_username..." source_type = "smaily" } - name = "Doug Marvin" - workspace_id = "3398dafb-42a8-4d63-b88e-4d8039ea5f9b" + name = "David Dooley" + secret_id = "...my_secretId..." + workspace_id = "a5f9b18a-244f-4d61-9039-dacd38ed0dc6" } ``` diff --git a/docs/resources/source_smartengage.md b/docs/resources/source_smartengage.md index ab14957ba..466bea2dc 100644 --- a/docs/resources/source_smartengage.md +++ b/docs/resources/source_smartengage.md @@ -18,8 +18,9 @@ resource "airbyte_source_smartengage" "my_source_smartengage" { api_key = "...my_api_key..." source_type = "smartengage" } - name = "Leah Murphy" - workspace_id = "4fd61903-9dac-4d38-ad0d-c671dc7f1e3a" + name = "Catherine Smith" + secret_id = "...my_secretId..." + workspace_id = "f1e3af15-920c-490d-9b49-01f2bd89c8a3" } ``` diff --git a/docs/resources/source_smartsheets.md b/docs/resources/source_smartsheets.md index 864deaa99..4b487dd47 100644 --- a/docs/resources/source_smartsheets.md +++ b/docs/resources/source_smartsheets.md @@ -16,15 +16,18 @@ SourceSmartsheets Resource resource "airbyte_source_smartsheets" "my_source_smartsheets" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "access_token" + source_smartsheets_authorization_method_api_access_token = { + access_token = "...my_access_token..." + auth_type = "access_token" + } } source_type = "smartsheets" spreadsheet_id = "...my_spreadsheet_id..." - start_datetime = "2000-01-01T13:00:00-07:00" + start_datetime = "2000-01-01T13:00:00" } - name = "Carlos Armstrong" - workspace_id = "0d1b4901-f2bd-489c-8a32-639da5b7b690" + name = "Dewey Murphy" + secret_id = "...my_secretId..." + workspace_id = "7b6902b8-81a9-44f6-8366-4a8f0af8c691" } ``` diff --git a/docs/resources/source_snapchat_marketing.md b/docs/resources/source_snapchat_marketing.md index 8e9022cf3..84b47d337 100644 --- a/docs/resources/source_snapchat_marketing.md +++ b/docs/resources/source_snapchat_marketing.md @@ -22,8 +22,9 @@ resource "airbyte_source_snapchat_marketing" "my_source_snapchatmarketing" { source_type = "snapchat-marketing" start_date = "2022-01-01" } - name = "Sonya McLaughlin" - workspace_id = "643664a8-f0af-48c6-91d7-32d9fbaf9476" + name = "Seth Wyman" + secret_id = "...my_secretId..." + workspace_id = "f9476a2a-e8dc-4c50-88a3-512c73784893" } ``` diff --git a/docs/resources/source_snowflake.md b/docs/resources/source_snowflake.md index ff55b96f7..56350d203 100644 --- a/docs/resources/source_snowflake.md +++ b/docs/resources/source_snowflake.md @@ -16,11 +16,13 @@ SourceSnowflake Resource resource "airbyte_source_snowflake" "my_source_snowflake" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "OAuth" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_snowflake_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "OAuth" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } database = "AIRBYTE_DATABASE" host = "accountname.us-east-2.aws.snowflakecomputing.com" @@ -30,8 +32,9 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { source_type = "snowflake" warehouse = "AIRBYTE_WAREHOUSE" } - name = "Shawn O'Kon" - workspace_id = "dcc50c8a-3512-4c73-b848-930750a00e96" + name = "Miss Stella Hansen Jr." + secret_id = "...my_secretId..." + workspace_id = "e966ec73-6d43-4194-b98c-783c92398ed3" } ``` diff --git a/docs/resources/source_sonar_cloud.md b/docs/resources/source_sonar_cloud.md index 5ace0540c..c52a7d4db 100644 --- a/docs/resources/source_sonar_cloud.md +++ b/docs/resources/source_sonar_cloud.md @@ -24,8 +24,9 @@ resource "airbyte_source_sonar_cloud" "my_source_sonarcloud" { start_date = "YYYY-MM-DD" user_token = "...my_user_token..." } - name = "Natalie Schuster" - workspace_id = "194398c7-83c9-4239-8ed3-d3ab7ca3c5ca" + name = "Chelsea Ortiz" + secret_id = "...my_secretId..." + workspace_id = "5ca8649a-70cf-4d5d-a989-b7206451077d" } ``` diff --git a/docs/resources/source_spacex_api.md b/docs/resources/source_spacex_api.md index 7ecc53857..9cceb1e37 100644 --- a/docs/resources/source_spacex_api.md +++ b/docs/resources/source_spacex_api.md @@ -15,12 +15,13 @@ SourceSpacexAPI Resource ```terraform resource "airbyte_source_spacex_api" "my_source_spacexapi" { configuration = { - id = "8649a70c-fd5d-4698-9b72-06451077d19e" + id = "19ea83d4-92ed-414b-8a2c-1954545e955d" options = "...my_options..." source_type = "spacex-api" } - name = "Ken Dibbert" - workspace_id = "92ed14b8-a2c1-4954-945e-955dcc185ea4" + name = "Noel Borer" + secret_id = "...my_secretId..." + workspace_id = "ea4901c7-c43a-4d2d-aa78-4aba3d230edf" } ``` diff --git a/docs/resources/source_square.md b/docs/resources/source_square.md index a0b687c74..fd96de131 100644 --- a/docs/resources/source_square.md +++ b/docs/resources/source_square.md @@ -16,16 +16,19 @@ SourceSquare Resource resource "airbyte_source_square" "my_source_square" { configuration = { credentials = { - api_key = "...my_api_key..." - auth_type = "API Key" + source_square_authentication_api_key = { + api_key = "...my_api_key..." + auth_type = "API Key" + } } include_deleted_objects = true is_sandbox = false source_type = "square" - start_date = "2022-03-30" + start_date = "2022-10-16" } - name = "Erma Hagenes" - workspace_id = "d2daa784-aba3-4d23-8edf-73811a115382" + name = "Mrs. Maggie Breitenberg" + secret_id = "...my_secretId..." + workspace_id = "82bd7ed5-6507-4621-858f-4d7396564c20" } ``` diff --git a/docs/resources/source_strava.md b/docs/resources/source_strava.md index 9dd2e7cc7..5eb8613cd 100644 --- a/docs/resources/source_strava.md +++ b/docs/resources/source_strava.md @@ -23,8 +23,9 @@ resource "airbyte_source_strava" "my_source_strava" { source_type = "strava" start_date = "2021-03-01T00:00:00Z" } - name = "Levi Haley" - workspace_id = "07621c58-f4d7-4396-964c-20a0711a961d" + name = "Marie Murphy" + secret_id = "...my_secretId..." + workspace_id = "1d24a7db-b8f5-432d-892c-f7812cb512c8" } ``` diff --git a/docs/resources/source_stripe.md b/docs/resources/source_stripe.md index 19a224b82..f348649e2 100644 --- a/docs/resources/source_stripe.md +++ b/docs/resources/source_stripe.md @@ -17,13 +17,14 @@ resource "airbyte_source_stripe" "my_source_stripe" { configuration = { account_id = "...my_account_id..." client_secret = "...my_client_secret..." - lookback_window_days = 1 - slice_range = 3 + lookback_window_days = 5 + slice_range = 30 source_type = "stripe" start_date = "2017-01-25T00:00:00Z" } - name = "Wm Little" - workspace_id = "32d892cf-7812-4cb5-92c8-78240bf548f8" + name = "Marlon Herzog" + secret_id = "...my_secretId..." + workspace_id = "f88f8f1b-f0bc-48e1-b206-d5d831d00810" } ``` diff --git a/docs/resources/source_survey_sparrow.md b/docs/resources/source_survey_sparrow.md index 9aa33f5d3..51c3e3071 100644 --- a/docs/resources/source_survey_sparrow.md +++ b/docs/resources/source_survey_sparrow.md @@ -17,15 +17,18 @@ resource "airbyte_source_survey_sparrow" "my_source_surveysparrow" { configuration = { access_token = "...my_access_token..." region = { - url_base = "https://eu-api.surveysparrow.com/v3" + source_survey_sparrow_base_url_eu_based_account = { + url_base = "https://eu-api.surveysparrow.com/v3" + } } source_type = "survey-sparrow" survey_id = [ "{ \"see\": \"documentation\" }", ] } - name = "Alberta Jakubowski DDS" - workspace_id = "5768dce7-4240-49a2-95e0-8601489a5f63" + name = "Anita MacGyver" + secret_id = "...my_secretId..." + workspace_id = "5f63e3af-3dd9-4dda-b3dc-d63483e4a7a9" } ``` diff --git a/docs/resources/source_surveymonkey.md b/docs/resources/source_surveymonkey.md index 4fe41e032..5d2dcd9dc 100644 --- a/docs/resources/source_surveymonkey.md +++ b/docs/resources/source_surveymonkey.md @@ -28,8 +28,9 @@ resource "airbyte_source_surveymonkey" "my_source_surveymonkey" { "...", ] } - name = "Henry Pollich DDS" - workspace_id = "c8e1f206-d5d8-431d-8081-090f6706673f" + name = "Marcia Berge" + secret_id = "...my_secretId..." + workspace_id = "73f3a681-c576-48dc-a742-409a215e0860" } ``` diff --git a/docs/resources/source_tempo.md b/docs/resources/source_tempo.md index b1e998e49..63c97c2f4 100644 --- a/docs/resources/source_tempo.md +++ b/docs/resources/source_tempo.md @@ -18,8 +18,9 @@ resource "airbyte_source_tempo" "my_source_tempo" { api_token = "...my_api_token..." source_type = "tempo" } - name = "Luis O'Connell" - workspace_id = "dd9dda33-dcd6-4348-be4a-7a98e4df37e4" + name = "Elias Glover" + secret_id = "...my_secretId..." + workspace_id = "37e45b89-55d4-413e-93a4-82310907bd35" } ``` diff --git a/docs/resources/source_the_guardian_api.md b/docs/resources/source_the_guardian_api.md index e8d44ce91..c91d0652f 100644 --- a/docs/resources/source_the_guardian_api.md +++ b/docs/resources/source_the_guardian_api.md @@ -21,10 +21,11 @@ resource "airbyte_source_the_guardian_api" "my_source_theguardianapi" { section = "housing-network" source_type = "the-guardian-api" start_date = "YYYY-MM-DD" - tag = "environment/plasticbags" + tag = "environment/recycling" } - name = "Jerome Heaney" - workspace_id = "13e13a48-2310-4907-bd35-4c092bd734f0" + name = "Jeremy Pfeffer" + secret_id = "...my_secretId..." + workspace_id = "34f02449-d86f-44bb-a0fe-5d911cbfe749" } ``` diff --git a/docs/resources/source_tiktok_marketing.md b/docs/resources/source_tiktok_marketing.md index a7c51be5f..9146efe9f 100644 --- a/docs/resources/source_tiktok_marketing.md +++ b/docs/resources/source_tiktok_marketing.md @@ -15,20 +15,23 @@ SourceTiktokMarketing Resource ```terraform resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { configuration = { - attribution_window = 1 + attribution_window = 8 credentials = { - access_token = "...my_access_token..." - advertiser_id = "...my_advertiser_id..." - app_id = "...my_app_id..." - auth_type = "oauth2.0" - secret = "...my_secret..." + source_tiktok_marketing_authentication_method_o_auth2_0 = { + access_token = "...my_access_token..." + advertiser_id = "...my_advertiser_id..." + app_id = "...my_app_id..." + auth_type = "oauth2.0" + secret = "...my_secret..." + } } - end_date = "2022-09-30" + end_date = "2021-01-19" source_type = "tiktok-marketing" - start_date = "2021-04-07" + start_date = "2022-09-08" } - name = "Cecil Wintheiser" - workspace_id = "b20fe5d9-11cb-4fe7-89ca-f45a27f69e2c" + name = "Jeremy Krajcik" + secret_id = "...my_secretId..." + workspace_id = "9e2c9e6d-10e9-4db3-ad4c-6b03108d9c33" } ``` diff --git a/docs/resources/source_todoist.md b/docs/resources/source_todoist.md index c0ac39045..001dbc597 100644 --- a/docs/resources/source_todoist.md +++ b/docs/resources/source_todoist.md @@ -18,8 +18,9 @@ resource "airbyte_source_todoist" "my_source_todoist" { source_type = "todoist" token = "...my_token..." } - name = "Merle Keebler Jr." - workspace_id = "e9db3ad4-c6b0-4310-8d9c-337473082b94" + name = "Pauline Kozey IV" + secret_id = "...my_secretId..." + workspace_id = "2b94f2ab-1fd5-4671-a9c3-26350a467143" } ``` diff --git a/docs/resources/source_trello.md b/docs/resources/source_trello.md index e150b14e5..4c272e1fb 100644 --- a/docs/resources/source_trello.md +++ b/docs/resources/source_trello.md @@ -23,8 +23,9 @@ resource "airbyte_source_trello" "my_source_trello" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - name = "Preston Carter" - workspace_id = "5671e9c3-2635-40a4-a714-3789ce0e9915" + name = "Dr. Devin Waters" + secret_id = "...my_secretId..." + workspace_id = "91594d93-a74c-4025-afe3-b4b4db8b778e" } ``` diff --git a/docs/resources/source_trustpilot.md b/docs/resources/source_trustpilot.md index 9d5fd237a..b2c84e5ff 100644 --- a/docs/resources/source_trustpilot.md +++ b/docs/resources/source_trustpilot.md @@ -19,14 +19,17 @@ resource "airbyte_source_trustpilot" "my_source_trustpilot" { "...", ] credentials = { - auth_type = "apikey" - client_id = "...my_client_id..." + source_trustpilot_authorization_method_api_key = { + auth_type = "apikey" + client_id = "...my_client_id..." + } } source_type = "trustpilot" start_date = "%Y-%m-%dT%H:%M:%S" } - name = "Jesus Smith" - workspace_id = "a74c0252-fe3b-44b4-9b8b-778ebb6e1d2c" + name = "Marco Hudson PhD" + secret_id = "...my_secretId..." + workspace_id = "2cf502ba-fb2c-4bc4-a35d-5e65da028c3e" } ``` diff --git a/docs/resources/source_tvmaze_schedule.md b/docs/resources/source_tvmaze_schedule.md index 4c75e208a..486ec70da 100644 --- a/docs/resources/source_tvmaze_schedule.md +++ b/docs/resources/source_tvmaze_schedule.md @@ -21,8 +21,9 @@ resource "airbyte_source_tvmaze_schedule" "my_source_tvmazeschedule" { start_date = "...my_start_date..." web_schedule_country_code = "US" } - name = "Judy Rath" - workspace_id = "b2cbc463-5d5e-465d-a028-c3e951a1e30f" + name = "Angie Bogan" + secret_id = "...my_secretId..." + workspace_id = "0fda9664-89d7-4b78-a73e-13a12a6b9924" } ``` diff --git a/docs/resources/source_twilio.md b/docs/resources/source_twilio.md index f6512d836..cae950b00 100644 --- a/docs/resources/source_twilio.md +++ b/docs/resources/source_twilio.md @@ -21,8 +21,9 @@ resource "airbyte_source_twilio" "my_source_twilio" { source_type = "twilio" start_date = "2020-10-01T00:00:00Z" } - name = "Lucy Gutkowski" - workspace_id = "d7b78673-e13a-412a-ab99-2494594487f5" + name = "Bradley Goodwin" + secret_id = "...my_secretId..." + workspace_id = "f5c84383-6b86-4b3c-9f64-15b0449f9df1" } ``` diff --git a/docs/resources/source_twilio_taskrouter.md b/docs/resources/source_twilio_taskrouter.md index eca6c3701..56f942f25 100644 --- a/docs/resources/source_twilio_taskrouter.md +++ b/docs/resources/source_twilio_taskrouter.md @@ -19,8 +19,9 @@ resource "airbyte_source_twilio_taskrouter" "my_source_twiliotaskrouter" { auth_token = "...my_auth_token..." source_type = "twilio-taskrouter" } - name = "Dwayne Graham" - workspace_id = "36b86b3c-df64-415b-8449-f9df13f4eedb" + name = "Marta Graham" + secret_id = "...my_secretId..." + workspace_id = "dbe78bf6-0682-4589-8ea7-63d5c72795b7" } ``` diff --git a/docs/resources/source_twitter.md b/docs/resources/source_twitter.md index 9d36ce775..5250a23dc 100644 --- a/docs/resources/source_twitter.md +++ b/docs/resources/source_twitter.md @@ -16,13 +16,14 @@ SourceTwitter Resource resource "airbyte_source_twitter" "my_source_twitter" { configuration = { api_key = "...my_api_key..." - end_date = "2021-08-26T23:34:52.732Z" + end_date = "2022-04-23T00:58:34.496Z" query = "...my_query..." source_type = "twitter" - start_date = "2021-07-13T14:46:12.099Z" + start_date = "2022-09-13T06:52:49.792Z" } - name = "Rafael Balistreri" - workspace_id = "25894ea7-63d5-4c72-b95b-785148d6d549" + name = "Drew Kemmer" + secret_id = "...my_secretId..." + workspace_id = "49e5635b-33bc-40f9-b0c4-2fc9f4844225" } ``` diff --git a/docs/resources/source_typeform.md b/docs/resources/source_typeform.md index ed8a068fd..a91ad1fcf 100644 --- a/docs/resources/source_typeform.md +++ b/docs/resources/source_typeform.md @@ -22,8 +22,9 @@ resource "airbyte_source_typeform" "my_source_typeform" { start_date = "2020-01-01T00:00:00Z" token = "...my_token..." } - name = "Kim Hegmann" - workspace_id = "3bc0f970-c42f-4c9f-8844-225e75b79606" + name = "Lula Kuphal" + secret_id = "...my_secretId..." + workspace_id = "065c0efa-6f93-4b90-a1b8-c95be1254b73" } ``` diff --git a/docs/resources/source_us_census.md b/docs/resources/source_us_census.md index 1e008edb6..90e13cc7a 100644 --- a/docs/resources/source_us_census.md +++ b/docs/resources/source_us_census.md @@ -16,12 +16,13 @@ SourceUsCensus Resource resource "airbyte_source_us_census" "my_source_uscensus" { configuration = { api_key = "...my_api_key..." - query_params = "get=NAME,NAICS2017_LABEL,LFO_LABEL,EMPSZES_LABEL,ESTAB,PAYANN,PAYQTR1,EMP&for=us:*&NAICS2017=72&LFO=001&EMPSZES=001" + query_params = "get=MOVEDIN,GEOID1,GEOID2,MOVEDOUT,FULL1_NAME,FULL2_NAME,MOVEDNET&for=county:*" query_path = "data/timeseries/healthins/sahie" source_type = "us-census" } - name = "Sonja Weimann" - workspace_id = "f93b90a1-b8c9-45be-9254-b739f4fe7721" + name = "Camille Upton" + secret_id = "...my_secretId..." + workspace_id = "210d1f65-58c9-49c7-a2d2-bc0f94087d9c" } ``` diff --git a/docs/resources/source_vantage.md b/docs/resources/source_vantage.md index 7a5fec7db..bac4f0f63 100644 --- a/docs/resources/source_vantage.md +++ b/docs/resources/source_vantage.md @@ -18,8 +18,9 @@ resource "airbyte_source_vantage" "my_source_vantage" { access_token = "...my_access_token..." source_type = "vantage" } - name = "Muriel Carroll" - workspace_id = "558c99c7-22d2-4bc0-b940-87d9caae042d" + name = "Mrs. Gerard Walter" + secret_id = "...my_secretId..." + workspace_id = "dd7caac9-b4ca-4a1c-be9e-15df903907f3" } ``` diff --git a/docs/resources/source_webflow.md b/docs/resources/source_webflow.md index 6b0c59be8..98c3fa97e 100644 --- a/docs/resources/source_webflow.md +++ b/docs/resources/source_webflow.md @@ -19,8 +19,9 @@ resource "airbyte_source_webflow" "my_source_webflow" { site_id = "a relatively long hex sequence" source_type = "webflow" } - name = "Adrian Schulist" - workspace_id = "c9b4caa1-cfe9-4e15-9f90-3907f3783198" + name = "Ms. Nina Fadel" + secret_id = "...my_secretId..." + workspace_id = "3d42e54a-8546-4659-bc50-233c1471d51a" } ``` diff --git a/docs/resources/source_whisky_hunter.md b/docs/resources/source_whisky_hunter.md index 48ae7b207..31be34ca7 100644 --- a/docs/resources/source_whisky_hunter.md +++ b/docs/resources/source_whisky_hunter.md @@ -17,8 +17,9 @@ resource "airbyte_source_whisky_hunter" "my_source_whiskyhunter" { configuration = { source_type = "whisky-hunter" } - name = "Ginger Gislason" - workspace_id = "54a85466-597c-4502-b3c1-471d51aaa6dd" + name = "Shaun Johnston" + secret_id = "...my_secretId..." + workspace_id = "f5abd648-7c5f-4c2b-862a-00bef69e1001" } ``` diff --git a/docs/resources/source_wikipedia_pageviews.md b/docs/resources/source_wikipedia_pageviews.md index e0936f418..473e71caf 100644 --- a/docs/resources/source_wikipedia_pageviews.md +++ b/docs/resources/source_wikipedia_pageviews.md @@ -15,17 +15,18 @@ SourceWikipediaPageviews Resource ```terraform resource "airbyte_source_wikipedia_pageviews" "my_source_wikipediapageviews" { configuration = { - access = "mobile-web" + access = "desktop" agent = "user" article = "Are_You_the_One%3F" - country = "IN" + country = "FR" end = "...my_end..." - project = "commons.wikimedia.org" + project = "en.wikipedia.org" source_type = "wikipedia-pageviews" start = "...my_start..." } - name = "Esther Littel" - workspace_id = "5fc2b862-a00b-4ef6-9e10-0157630bda7a" + name = "Taylor Paucek" + secret_id = "...my_secretId..." + workspace_id = "fded84a3-5a41-4238-a1a7-35ac26ae33be" } ``` diff --git a/docs/resources/source_woocommerce.md b/docs/resources/source_woocommerce.md index c1dad1896..810e534ac 100644 --- a/docs/resources/source_woocommerce.md +++ b/docs/resources/source_woocommerce.md @@ -21,8 +21,9 @@ resource "airbyte_source_woocommerce" "my_source_woocommerce" { source_type = "woocommerce" start_date = "2021-01-01" } - name = "Dallas Kutch" - workspace_id = "35a41238-e1a7-435a-826a-e33bef971a8f" + name = "Katherine Ondricka" + secret_id = "...my_secretId..." + workspace_id = "46bca110-6fe9-465b-b11d-08cf88ec9f7b" } ``` diff --git a/docs/resources/source_xero.md b/docs/resources/source_xero.md index e10eb6fb6..003a03fdb 100644 --- a/docs/resources/source_xero.md +++ b/docs/resources/source_xero.md @@ -26,8 +26,9 @@ resource "airbyte_source_xero" "my_source_xero" { start_date = "2022-03-01T00:00:00Z" tenant_id = "...my_tenant_id..." } - name = "Mr. Clark O'Hara III" - workspace_id = "fe965b71-1d08-4cf8-8ec9-f7b99a550a65" + name = "Miss Maurice Hauck" + secret_id = "...my_secretId..." + workspace_id = "56ed333b-b0ce-48aa-a543-2a986eb7e14c" } ``` diff --git a/docs/resources/source_xkcd.md b/docs/resources/source_xkcd.md index 039be9e2d..282fd90bf 100644 --- a/docs/resources/source_xkcd.md +++ b/docs/resources/source_xkcd.md @@ -17,8 +17,9 @@ resource "airbyte_source_xkcd" "my_source_xkcd" { configuration = { source_type = "xkcd" } - name = "Tricia Senger" - workspace_id = "3bb0ce8a-a654-432a-986e-b7e14ca56408" + name = "Roberto Jones IV" + secret_id = "...my_secretId..." + workspace_id = "91500970-19a4-48f8-8ece-7bf904e01105" } ``` diff --git a/docs/resources/source_yandex_metrica.md b/docs/resources/source_yandex_metrica.md index 5ae59035e..78aceccbc 100644 --- a/docs/resources/source_yandex_metrica.md +++ b/docs/resources/source_yandex_metrica.md @@ -21,8 +21,9 @@ resource "airbyte_source_yandex_metrica" "my_source_yandexmetrica" { source_type = "yandex-metrica" start_date = "2022-01-01" } - name = "Mr. Ada Kozey" - workspace_id = "a48f88ec-e7bf-4904-a011-05d38908162c" + name = "Nina Boyle" + secret_id = "...my_secretId..." + workspace_id = "c6beb68a-0f65-47b7-903a-1480f8de30f0" } ``` diff --git a/docs/resources/source_yotpo.md b/docs/resources/source_yotpo.md index 2b2501361..d856a7878 100644 --- a/docs/resources/source_yotpo.md +++ b/docs/resources/source_yotpo.md @@ -17,12 +17,13 @@ resource "airbyte_source_yotpo" "my_source_yotpo" { configuration = { access_token = "...my_access_token..." app_key = "...my_app_key..." - email = "Morton.Walter50@yahoo.com" + email = "Lacy.Steuber@yahoo.com" source_type = "yotpo" start_date = "2022-03-01T00:00:00.000Z" } - name = "Duane Hamill" - workspace_id = "7d03a148-0f8d-4e30-b069-d810618d97e1" + name = "Kay Smith" + secret_id = "...my_secretId..." + workspace_id = "e1522975-10da-4803-9229-2cc61c2a702b" } ``` diff --git a/docs/resources/source_younium.md b/docs/resources/source_younium.md index cc8dd7130..0c3783835 100644 --- a/docs/resources/source_younium.md +++ b/docs/resources/source_younium.md @@ -17,12 +17,13 @@ resource "airbyte_source_younium" "my_source_younium" { configuration = { legal_entity = "...my_legal_entity..." password = "...my_password..." - playground = false + playground = true source_type = "younium" - username = "Carley.Cole" + username = "Kimberly_Kuhlman9" } - name = "Catherine Balistreri" - workspace_id = "80312292-cc61-4c2a-b02b-b97ee102da2d" + name = "Bonnie Steuber" + secret_id = "...my_secretId..." + workspace_id = "de35f8e0-1bf3-43ea-ab45-402ac1704bf1" } ``` diff --git a/docs/resources/source_youtube_analytics.md b/docs/resources/source_youtube_analytics.md index 0f3eab04d..cef7cb298 100644 --- a/docs/resources/source_youtube_analytics.md +++ b/docs/resources/source_youtube_analytics.md @@ -22,8 +22,9 @@ resource "airbyte_source_youtube_analytics" "my_source_youtubeanalytics" { } source_type = "youtube-analytics" } - name = "Mike Hansen" - workspace_id = "e01bf33e-aab4-4540-aac1-704bf1cc9fc6" + name = "Clark McGlynn" + secret_id = "...my_secretId..." + workspace_id = "61aae5eb-5f0c-4492-b574-4d08a2267aae" } ``` diff --git a/docs/resources/source_zendesk_chat.md b/docs/resources/source_zendesk_chat.md index abc364733..db5a2bd40 100644 --- a/docs/resources/source_zendesk_chat.md +++ b/docs/resources/source_zendesk_chat.md @@ -16,15 +16,18 @@ SourceZendeskChat Resource resource "airbyte_source_zendesk_chat" "my_source_zendeskchat" { configuration = { credentials = { - access_token = "...my_access_token..." - credentials = "access_token" + source_zendesk_chat_authorization_method_access_token = { + access_token = "...my_access_token..." + credentials = "access_token" + } } source_type = "zendesk-chat" start_date = "2021-02-01T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Percy Hane" - workspace_id = "5f0c492b-5744-4d08-a226-7aaee79e3c71" + name = "Phil Emmerich" + secret_id = "...my_secretId..." + workspace_id = "1ad31bec-b83d-4237-8ae3-bfc23d9450a9" } ``` diff --git a/docs/resources/source_zendesk_sunshine.md b/docs/resources/source_zendesk_sunshine.md index 61b67aa18..744f1016b 100644 --- a/docs/resources/source_zendesk_sunshine.md +++ b/docs/resources/source_zendesk_sunshine.md @@ -16,16 +16,19 @@ SourceZendeskSunshine Resource resource "airbyte_source_zendesk_sunshine" "my_source_zendesksunshine" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_method = "api_token" - email = "Raoul73@hotmail.com" + source_zendesk_sunshine_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_method = "api_token" + email = "Hoyt61@yahoo.com" + } } source_type = "zendesk-sunshine" start_date = "2021-01-01T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Benny Raynor" - workspace_id = "d2378ae3-bfc2-43d9-850a-986a495bac70" + name = "Bridget Pagac" + secret_id = "...my_secretId..." + workspace_id = "07f06b28-ecc8-4649-a386-f62c969c4cc6" } ``` diff --git a/docs/resources/source_zendesk_support.md b/docs/resources/source_zendesk_support.md index f57821145..926f3eb3a 100644 --- a/docs/resources/source_zendesk_support.md +++ b/docs/resources/source_zendesk_support.md @@ -16,17 +16,20 @@ SourceZendeskSupport Resource resource "airbyte_source_zendesk_support" "my_source_zendesksupport" { configuration = { credentials = { - api_token = "...my_api_token..." - credentials = "api_token" - email = "Urban_Bechtelar@yahoo.com" + source_zendesk_support_authentication_api_token = { + api_token = "...my_api_token..." + credentials = "api_token" + email = "Ignacio_Langosh@hotmail.com" + } } - ignore_pagination = false + ignore_pagination = true source_type = "zendesk-support" start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Gregg Littel" - workspace_id = "92386f62-c969-4c4c-86b7-8890a3fd3c81" + name = "Dallas Douglas" + secret_id = "...my_secretId..." + workspace_id = "1da10f8c-23df-4931-9a3e-db51fad94acc" } ``` diff --git a/docs/resources/source_zendesk_talk.md b/docs/resources/source_zendesk_talk.md index 627fb000d..97ccb2d6e 100644 --- a/docs/resources/source_zendesk_talk.md +++ b/docs/resources/source_zendesk_talk.md @@ -16,16 +16,19 @@ SourceZendeskTalk Resource resource "airbyte_source_zendesk_talk" "my_source_zendesktalk" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" - email = "Lori99@hotmail.com" + source_zendesk_talk_authentication_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + email = "Elliott.Feeney@yahoo.com" + } } source_type = "zendesk-talk" start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Ethel Stehr" - workspace_id = "31da3edb-51fa-4d94-acc9-435137726d15" + name = "Sara Jast II" + secret_id = "...my_secretId..." + workspace_id = "321b832a-56d6-4918-8ff6-0eb9a6658e69" } ``` diff --git a/docs/resources/source_zenloop.md b/docs/resources/source_zenloop.md index 22fe26f12..7125e5f92 100644 --- a/docs/resources/source_zenloop.md +++ b/docs/resources/source_zenloop.md @@ -21,8 +21,9 @@ resource "airbyte_source_zenloop" "my_source_zenloop" { survey_group_id = "...my_survey_group_id..." survey_id = "...my_survey_id..." } - name = "Marilyn Carter" - workspace_id = "32a56d69-180f-4f60-ab9a-6658e69a4b84" + name = "Kyle Reichert" + secret_id = "...my_secretId..." + workspace_id = "3d382dbe-c75c-468c-a065-9468ce304d88" } ``` diff --git a/docs/resources/source_zoho_crm.md b/docs/resources/source_zoho_crm.md index 86c81af5f..2c0e349c7 100644 --- a/docs/resources/source_zoho_crm.md +++ b/docs/resources/source_zoho_crm.md @@ -18,14 +18,15 @@ resource "airbyte_source_zoho_crm" "my_source_zohocrm" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." dc_region = "AU" - edition = "Ultimate" - environment = "Production" + edition = "Professional" + environment = "Sandbox" refresh_token = "...my_refresh_token..." source_type = "zoho-crm" - start_datetime = "2000-01-01 13:00:00" + start_datetime = "2000-01-01T13:00:00-07:00" } - name = "Bradford Sauer" - workspace_id = "c68c6065-9468-4ce3-84d8-849bf8214c33" + name = "Amber Rosenbaum" + secret_id = "...my_secretId..." + workspace_id = "7f96bb0c-69e3-472d-b134-4ba9f78a5c0e" } ``` diff --git a/docs/resources/source_zoom.md b/docs/resources/source_zoom.md index 51449905f..1ceeaf80b 100644 --- a/docs/resources/source_zoom.md +++ b/docs/resources/source_zoom.md @@ -18,8 +18,9 @@ resource "airbyte_source_zoom" "my_source_zoom" { jwt_token = "...my_jwt_token..." source_type = "zoom" } - name = "May McClure" - workspace_id = "b0c69e37-2db1-4344-ba9f-78a5c0ed7aab" + name = "Ron Padberg" + secret_id = "...my_secretId..." + workspace_id = "62e97261-fb0c-458d-a7b5-1996b5b4b50e" } ``` diff --git a/docs/resources/source_zuora.md b/docs/resources/source_zuora.md index d29783ab0..d8c528eee 100644 --- a/docs/resources/source_zuora.md +++ b/docs/resources/source_zuora.md @@ -17,14 +17,15 @@ resource "airbyte_source_zuora" "my_source_zuora" { configuration = { client_id = "...my_client_id..." client_secret = "...my_client_secret..." - data_query = "Live" + data_query = "Unlimited" source_type = "zuora" start_date = "...my_start_date..." - tenant_endpoint = "US Cloud Production" - window_in_days = "364" + tenant_endpoint = "EU Central Sandbox" + window_in_days = "60" } - name = "Mathew Cole DVM" - workspace_id = "b0c58d27-b519-496b-9b4b-50eef712b7a7" + name = "Christina Rice" + secret_id = "...my_secretId..." + workspace_id = "7ab0344b-1710-4688-9eeb-ef897f3dd0cc" } ``` diff --git a/docs/resources/workspace.md b/docs/resources/workspace.md index 8c807e869..d7ea483c5 100644 --- a/docs/resources/workspace.md +++ b/docs/resources/workspace.md @@ -14,7 +14,7 @@ Workspace Resource ```terraform resource "airbyte_workspace" "my_workspace" { - name = "Malcolm Bartoletti" + name = "Curtis Fahey Sr." } ``` diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index fa612a030..eebc4b0da 100755 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.2.0" + version = "0.2.1" } } } diff --git a/examples/resources/airbyte_connection/resource.tf b/examples/resources/airbyte_connection/resource.tf index 6a3b92bae..a4b0ce78d 100755 --- a/examples/resources/airbyte_connection/resource.tf +++ b/examples/resources/airbyte_connection/resource.tf @@ -1,5 +1,32 @@ resource "airbyte_connection" "my_connection" { - destination_id = "89bd9d8d-69a6-474e-8f46-7cc8796ed151" - namespace_format = SOURCE_NAMESPACE - source_id = "a05dfc2d-df7c-4c78-8a1b-a928fc816742" + configurations = { + streams = [ + { + cursor_field = [ + "...", + ] + name = "Terrence Rau" + primary_key = [ + [ + "...", + ], + ] + sync_mode = "incremental_deduped_history" + }, + ] + } + data_residency = "us" + destination_id = "d69a674e-0f46-47cc-8796-ed151a05dfc2" + name = "Wilfred Wolff" + namespace_definition = "custom_format" + namespace_format = SOURCE_NAMESPACE + non_breaking_schema_updates_behavior = "ignore" + prefix = "...my_prefix..." + schedule = { + basic_timing = "...my_basicTiming..." + cron_expression = "...my_cronExpression..." + schedule_type = "cron" + } + source_id = "ca1ba928-fc81-4674-acb7-39205929396f" + status = "deprecated" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_amazon_sqs/resource.tf b/examples/resources/airbyte_destination_amazon_sqs/resource.tf index 20c409b83..4f237da8d 100755 --- a/examples/resources/airbyte_destination_amazon_sqs/resource.tf +++ b/examples/resources/airbyte_destination_amazon_sqs/resource.tf @@ -6,9 +6,9 @@ resource "airbyte_destination_amazon_sqs" "my_destination_amazonsqs" { message_delay = 15 message_group_id = "my-fifo-group" queue_url = "https://sqs.eu-west-1.amazonaws.com/1234567890/my-example-queue" - region = "eu-west-1" + region = "ap-southeast-2" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" } - name = "Edna Mante II" - workspace_id = "929396fe-a759-46eb-90fa-aa2352c59559" + name = "Sheryl Kertzmann" + workspace_id = "10faaa23-52c5-4955-907a-ff1a3a2fa946" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_aws_datalake/resource.tf b/examples/resources/airbyte_destination_aws_datalake/resource.tf index f0be20084..3c7344544 100755 --- a/examples/resources/airbyte_destination_aws_datalake/resource.tf +++ b/examples/resources/airbyte_destination_aws_datalake/resource.tf @@ -4,22 +4,26 @@ resource "airbyte_destination_aws_datalake" "my_destination_awsdatalake" { bucket_name = "...my_bucket_name..." bucket_prefix = "...my_bucket_prefix..." credentials = { - credentials_title = "IAM Role" - role_arn = "...my_role_arn..." + destination_aws_datalake_authentication_mode_iam_role = { + credentials_title = "IAM Role" + role_arn = "...my_role_arn..." + } } destination_type = "aws-datalake" format = { - compression_codec = "UNCOMPRESSED" - format_type = "JSONL" + destination_aws_datalake_output_format_wildcard_json_lines_newline_delimited_json = { + compression_codec = "UNCOMPRESSED" + format_type = "JSONL" + } } glue_catalog_float_as_decimal = false lakeformation_database_default_tag_key = "pii_level" lakeformation_database_default_tag_values = "private,public" lakeformation_database_name = "...my_lakeformation_database_name..." - lakeformation_governed_tables = true - partitioning = "YEAR/MONTH/DAY" - region = "us-gov-east-1" + lakeformation_governed_tables = false + partitioning = "DAY" + region = "us-west-2" } - name = "Angie Durgan" - workspace_id = "fa946773-9251-4aa5-ac3f-5ad019da1ffe" + name = "Gloria Padberg" + workspace_id = "2c3f5ad0-19da-41ff-a78f-097b0074f154" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_azure_blob_storage/resource.tf b/examples/resources/airbyte_destination_azure_blob_storage/resource.tf index 2776d0a64..8235bac96 100755 --- a/examples/resources/airbyte_destination_azure_blob_storage/resource.tf +++ b/examples/resources/airbyte_destination_azure_blob_storage/resource.tf @@ -8,10 +8,12 @@ resource "airbyte_destination_azure_blob_storage" "my_destination_azureblobstora azure_blob_storage_spill_size = 500 destination_type = "azure-blob-storage" format = { - flattening = "Root level flattening" - format_type = "CSV" + destination_azure_blob_storage_output_format_csv_comma_separated_values = { + flattening = "Root level flattening" + format_type = "CSV" + } } } - name = "Geneva Klein Jr." - workspace_id = "74f15471-b5e6-4e13-b99d-488e1e91e450" + name = "Sophia Jerde I" + workspace_id = "b99d488e-1e91-4e45-8ad2-abd44269802d" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_bigquery/resource.tf b/examples/resources/airbyte_destination_bigquery/resource.tf index 5565b2ab8..188a001d1 100755 --- a/examples/resources/airbyte_destination_bigquery/resource.tf +++ b/examples/resources/airbyte_destination_bigquery/resource.tf @@ -3,23 +3,27 @@ resource "airbyte_destination_bigquery" "my_destination_bigquery" { big_query_client_buffer_size_mb = 15 credentials_json = "...my_credentials_json..." dataset_id = "...my_dataset_id..." - dataset_location = "us-east3" + dataset_location = "US" destination_type = "bigquery" loading_method = { - credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_bigquery_loading_method_gcs_staging = { + credential = { + destination_bigquery_loading_method_gcs_staging_credential_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } + } + file_buffer_count = 10 + gcs_bucket_name = "airbyte_sync" + gcs_bucket_path = "data_sync/test" + keep_files_in_gcs_bucket = "Keep all tmp files in GCS" + method = "GCS Staging" } - file_buffer_count = 10 - gcs_bucket_name = "airbyte_sync" - gcs_bucket_path = "data_sync/test" - keep_files_in_gcs_bucket = "Keep all tmp files in GCS" - method = "GCS Staging" } project_id = "...my_project_id..." transformation_priority = "batch" } - name = "Francisco Gleason" - workspace_id = "9802d502-a94b-4b4f-a3c9-69e9a3efa77d" + name = "Olivia Rice" + workspace_id = "63c969e9-a3ef-4a77-9fb1-4cd66ae395ef" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_bigquery_denormalized/resource.tf b/examples/resources/airbyte_destination_bigquery_denormalized/resource.tf index 837e88ce1..64ebb3056 100755 --- a/examples/resources/airbyte_destination_bigquery_denormalized/resource.tf +++ b/examples/resources/airbyte_destination_bigquery_denormalized/resource.tf @@ -3,22 +3,26 @@ resource "airbyte_destination_bigquery_denormalized" "my_destination_bigqueryden big_query_client_buffer_size_mb = 15 credentials_json = "...my_credentials_json..." dataset_id = "...my_dataset_id..." - dataset_location = "northamerica-northeast2" + dataset_location = "europe-west8" destination_type = "bigquery-denormalized" loading_method = { - credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_bigquery_denormalized_loading_method_gcs_staging = { + credential = { + destination_bigquery_denormalized_loading_method_gcs_staging_credential_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } + } + file_buffer_count = 10 + gcs_bucket_name = "airbyte_sync" + gcs_bucket_path = "data_sync/test" + keep_files_in_gcs_bucket = "Keep all tmp files in GCS" + method = "GCS Staging" } - file_buffer_count = 10 - gcs_bucket_name = "airbyte_sync" - gcs_bucket_path = "data_sync/test" - keep_files_in_gcs_bucket = "Delete all tmp files from GCS" - method = "GCS Staging" } project_id = "...my_project_id..." } - name = "Irving Jenkins" - workspace_id = "e395efb9-ba88-4f3a-a699-7074ba4469b6" + name = "Jaime Will" + workspace_id = "66997074-ba44-469b-ae21-41959890afa5" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_cassandra/resource.tf b/examples/resources/airbyte_destination_cassandra/resource.tf index f3b729bae..4e25a9046 100755 --- a/examples/resources/airbyte_destination_cassandra/resource.tf +++ b/examples/resources/airbyte_destination_cassandra/resource.tf @@ -5,10 +5,10 @@ resource "airbyte_destination_cassandra" "my_destination_cassandra" { destination_type = "cassandra" keyspace = "...my_keyspace..." password = "...my_password..." - port = 6 - replication = 6 - username = "Kiley_Bartoletti" + port = 9 + replication = 2 + username = "Rachel.Lind10" } - name = "Tommy Kemmer" - workspace_id = "2516fe4c-8b71-41e5-b7fd-2ed028921cdd" + name = "Elvira Herman" + workspace_id = "fd2ed028-921c-4ddc-a926-01fb576b0d5f" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_clickhouse/resource.tf b/examples/resources/airbyte_destination_clickhouse/resource.tf index d2529d165..34fc31cad 100755 --- a/examples/resources/airbyte_destination_clickhouse/resource.tf +++ b/examples/resources/airbyte_destination_clickhouse/resource.tf @@ -7,10 +7,12 @@ resource "airbyte_destination_clickhouse" "my_destination_clickhouse" { password = "...my_password..." port = 8123 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_clickhouse_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Hannah40" + username = "Russ76" } - name = "Virginia Wunsch" - workspace_id = "76b0d5f0-d30c-45fb-b258-7053202c73d5" + name = "Mindy Renner" + workspace_id = "58705320-2c73-4d5f-a9b9-0c28909b3fe4" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_convex/resource.tf b/examples/resources/airbyte_destination_convex/resource.tf index f67326ad1..ff7d47c81 100755 --- a/examples/resources/airbyte_destination_convex/resource.tf +++ b/examples/resources/airbyte_destination_convex/resource.tf @@ -4,6 +4,6 @@ resource "airbyte_destination_convex" "my_destination_convex" { deployment_url = "https://cluttered-owl-337.convex.cloud" destination_type = "convex" } - name = "Alejandro Purdy DDS" - workspace_id = "28909b3f-e49a-48d9-8bf4-8633323f9b77" + name = "Casey Stracke" + workspace_id = "bf486333-23f9-4b77-b3a4-100674ebf692" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_cumulio/resource.tf b/examples/resources/airbyte_destination_cumulio/resource.tf index ba0aa1c33..ad681f4ba 100755 --- a/examples/resources/airbyte_destination_cumulio/resource.tf +++ b/examples/resources/airbyte_destination_cumulio/resource.tf @@ -5,6 +5,6 @@ resource "airbyte_destination_cumulio" "my_destination_cumulio" { api_token = "...my_api_token..." destination_type = "cumulio" } - name = "Allen Parisian Jr." - workspace_id = "0674ebf6-9280-4d1b-a77a-89ebf737ae42" + name = "Miss Paul Steuber" + workspace_id = "77a89ebf-737a-4e42-83ce-5e6a95d8a0d4" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_databend/resource.tf b/examples/resources/airbyte_destination_databend/resource.tf index 04c764ddc..5088d2379 100755 --- a/examples/resources/airbyte_destination_databend/resource.tf +++ b/examples/resources/airbyte_destination_databend/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_destination_databend" "my_destination_databend" { password = "...my_password..." port = 443 table = "default" - username = "Daphne.Rosenbaum90" + username = "Herminia.Schmeler67" } - name = "Rosie McKenzie" - workspace_id = "8a0d446c-e2af-47a7-bcf3-be453f870b32" + name = "Cory Pfeffer" + workspace_id = "cf3be453-f870-4b32-ab5a-73429cdb1a84" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_databricks/resource.tf b/examples/resources/airbyte_destination_databricks/resource.tf index 22e487d7c..58670b76f 100755 --- a/examples/resources/airbyte_destination_databricks/resource.tf +++ b/examples/resources/airbyte_destination_databricks/resource.tf @@ -1,8 +1,10 @@ resource "airbyte_destination_databricks" "my_destination_databricks" { configuration = { - accept_terms = false + accept_terms = true data_source = { - data_source_type = "MANAGED_TABLES_STORAGE" + destination_databricks_data_source_recommended_managed_tables = { + data_source_type = "MANAGED_TABLES_STORAGE" + } } database = "...my_database..." databricks_http_path = "sql/protocolvx/o/1234567489/0000-1111111-abcd90" @@ -10,9 +12,9 @@ resource "airbyte_destination_databricks" "my_destination_databricks" { databricks_port = "443" databricks_server_hostname = "abc-12345678-wxyz.cloud.databricks.com" destination_type = "databricks" - purge_staging_data = true + purge_staging_data = false schema = "default" } - name = "Joanna Kohler" - workspace_id = "29cdb1a8-422b-4b67-9d23-22715bf0cbb1" + name = "Cesar Hyatt" + workspace_id = "d2322715-bf0c-4bb1-a31b-8b90f3443a11" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_dev_null/resource.tf b/examples/resources/airbyte_destination_dev_null/resource.tf index 04cfda5e5..4eb66ae52 100755 --- a/examples/resources/airbyte_destination_dev_null/resource.tf +++ b/examples/resources/airbyte_destination_dev_null/resource.tf @@ -2,9 +2,11 @@ resource "airbyte_destination_dev_null" "my_destination_devnull" { configuration = { destination_type = "dev-null" test_destination = { - test_destination_type = "SILENT" + destination_dev_null_test_destination_silent = { + test_destination_type = "SILENT" + } } } - name = "Dale Boehm" - workspace_id = "b90f3443-a110-48e0-adcf-4b921879fce9" + name = "Miss Billie Ward" + workspace_id = "cf4b9218-79fc-4e95-bf73-ef7fbc7abd74" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_dynamodb/resource.tf b/examples/resources/airbyte_destination_dynamodb/resource.tf index 2d1f34ff5..7e519583a 100755 --- a/examples/resources/airbyte_destination_dynamodb/resource.tf +++ b/examples/resources/airbyte_destination_dynamodb/resource.tf @@ -3,10 +3,10 @@ resource "airbyte_destination_dynamodb" "my_destination_dynamodb" { access_key_id = "A012345678910EXAMPLE" destination_type = "dynamodb" dynamodb_endpoint = "http://localhost:9000" - dynamodb_region = "ap-northeast-1" + dynamodb_region = "eu-west-3" dynamodb_table_name_prefix = "airbyte_sync" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Dixie Klocko" - workspace_id = "f7fbc7ab-d74d-4d39-80f5-d2cff7c70a45" + name = "Earl Mosciski DVM" + workspace_id = "5d2cff7c-70a4-4562-ad43-6813f16d9f5f" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_elasticsearch/resource.tf b/examples/resources/airbyte_destination_elasticsearch/resource.tf index bf9c2c1e2..6f44f5c92 100755 --- a/examples/resources/airbyte_destination_elasticsearch/resource.tf +++ b/examples/resources/airbyte_destination_elasticsearch/resource.tf @@ -1,15 +1,17 @@ resource "airbyte_destination_elasticsearch" "my_destination_elasticsearch" { configuration = { authentication_method = { - api_key_id = "...my_apiKeyId..." - api_key_secret = "...my_apiKeySecret..." - method = "secret" + destination_elasticsearch_authentication_method_api_key_secret = { + api_key_id = "...my_apiKeyId..." + api_key_secret = "...my_apiKeySecret..." + method = "secret" + } } ca_certificate = "...my_ca_certificate..." destination_type = "elasticsearch" endpoint = "...my_endpoint..." - upsert = true + upsert = false } - name = "Jessie Schuster" - workspace_id = "6813f16d-9f5f-4ce6-8556-146c3e250fb0" + name = "Nathaniel Ryan" + workspace_id = "6146c3e2-50fb-4008-842e-141aac366c8d" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_firebolt/resource.tf b/examples/resources/airbyte_destination_firebolt/resource.tf index a8ff57f6f..5068247db 100755 --- a/examples/resources/airbyte_destination_firebolt/resource.tf +++ b/examples/resources/airbyte_destination_firebolt/resource.tf @@ -6,15 +6,17 @@ resource "airbyte_destination_firebolt" "my_destination_firebolt" { engine = "...my_engine..." host = "api.app.firebolt.io" loading_method = { - aws_key_id = "...my_aws_key_id..." - aws_key_secret = "...my_aws_key_secret..." - method = "S3" - s3_bucket = "...my_s3_bucket..." - s3_region = "us-east-1" + destination_firebolt_loading_method_external_table_via_s3 = { + aws_key_id = "...my_aws_key_id..." + aws_key_secret = "...my_aws_key_secret..." + method = "S3" + s3_bucket = "...my_s3_bucket..." + s3_region = "us-east-1" + } } password = "...my_password..." username = "username@email.com" } - name = "Miss Dennis Friesen" - workspace_id = "c366c8dd-6b14-4429-8747-4778a7bd466d" + name = "Ms. Janice McLaughlin" + workspace_id = "74778a7b-d466-4d28-810a-b3cdca425190" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_firestore/resource.tf b/examples/resources/airbyte_destination_firestore/resource.tf index 68838bb95..daa2bbbdf 100755 --- a/examples/resources/airbyte_destination_firestore/resource.tf +++ b/examples/resources/airbyte_destination_firestore/resource.tf @@ -4,6 +4,6 @@ resource "airbyte_destination_firestore" "my_destination_firestore" { destination_type = "firestore" project_id = "...my_project_id..." } - name = "Mr. Irma Schaefer" - workspace_id = "b3cdca42-5190-44e5-a3c7-e0bc7178e479" + name = "Henrietta Hilpert" + workspace_id = "c7e0bc71-78e4-4796-b2a7-0c688282aa48" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_gcs/resource.tf b/examples/resources/airbyte_destination_gcs/resource.tf index eb56be1ef..aad5b667a 100755 --- a/examples/resources/airbyte_destination_gcs/resource.tf +++ b/examples/resources/airbyte_destination_gcs/resource.tf @@ -1,21 +1,27 @@ resource "airbyte_destination_gcs" "my_destination_gcs" { configuration = { credential = { - credential_type = "HMAC_KEY" - hmac_key_access_id = "1234567890abcdefghij1234" - hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + destination_gcs_authentication_hmac_key = { + credential_type = "HMAC_KEY" + hmac_key_access_id = "1234567890abcdefghij1234" + hmac_key_secret = "1234567890abcdefghij1234567890ABCDEFGHIJ" + } } destination_type = "gcs" format = { - compression_codec = { - codec = "bzip2" + destination_gcs_output_format_avro_apache_avro = { + compression_codec = { + destination_gcs_output_format_avro_apache_avro_compression_codec_bzip2 = { + codec = "bzip2" + } + } + format_type = "Avro" } - format_type = "Avro" } gcs_bucket_name = "airbyte_sync" gcs_bucket_path = "data_sync/test" - gcs_bucket_region = "europe-west2" + gcs_bucket_region = "us-east4" } - name = "Todd Oberbrunner DDS" - workspace_id = "688282aa-4825-462f-a22e-9817ee17cbe6" + name = "Sue Corkery" + workspace_id = "22e9817e-e17c-4be6-9e6b-7b95bc0ab3c2" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_google_sheets/resource.tf b/examples/resources/airbyte_destination_google_sheets/resource.tf index b4d9b8f23..8f76cdcbf 100755 --- a/examples/resources/airbyte_destination_google_sheets/resource.tf +++ b/examples/resources/airbyte_destination_google_sheets/resource.tf @@ -8,6 +8,6 @@ resource "airbyte_destination_google_sheets" "my_destination_googlesheets" { destination_type = "google-sheets" spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit" } - name = "Jenna Kautzer" - workspace_id = "b95bc0ab-3c20-4c4f-b789-fd871f99dd2e" + name = "Sadie Hackett" + workspace_id = "789fd871-f99d-4d2e-bd12-1aa6f1e674bd" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_keen/resource.tf b/examples/resources/airbyte_destination_keen/resource.tf index ac5f4eb5b..83466c936 100755 --- a/examples/resources/airbyte_destination_keen/resource.tf +++ b/examples/resources/airbyte_destination_keen/resource.tf @@ -5,6 +5,6 @@ resource "airbyte_destination_keen" "my_destination_keen" { infer_timestamp = true project_id = "58b4acc22ba938934e888322e" } - name = "Miss Peter Cronin" - workspace_id = "6f1e674b-db04-4f15-b560-82d68ea19f1d" + name = "Mrs. Michele Williamson" + workspace_id = "56082d68-ea19-4f1d-9705-1339d08086a1" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_kinesis/resource.tf b/examples/resources/airbyte_destination_kinesis/resource.tf index 1ebf9d70c..b6cc64abb 100755 --- a/examples/resources/airbyte_destination_kinesis/resource.tf +++ b/examples/resources/airbyte_destination_kinesis/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_destination_kinesis" "my_destination_kinesis" { configuration = { access_key = "...my_accessKey..." - buffer_size = 1 + buffer_size = 5 destination_type = "kinesis" endpoint = "kinesis.us‑west‑1.amazonaws.com" private_key = "...my_privateKey..." region = "us‑west‑1" - shard_count = 4 + shard_count = 2 } - name = "Joann Bogan" - workspace_id = "9d08086a-1840-4394-8260-71f93f5f0642" + name = "Carmen McClure" + workspace_id = "26071f93-f5f0-4642-9ac7-af515cc413aa" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_mariadb_columnstore/resource.tf b/examples/resources/airbyte_destination_mariadb_columnstore/resource.tf index 17648fbfb..9b118ca61 100755 --- a/examples/resources/airbyte_destination_mariadb_columnstore/resource.tf +++ b/examples/resources/airbyte_destination_mariadb_columnstore/resource.tf @@ -7,10 +7,12 @@ resource "airbyte_destination_mariadb_columnstore" "my_destination_mariadbcolumn password = "...my_password..." port = 3306 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mariadb_columnstore_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Loyce_Schoen" + username = "Delaney_Nader" } - name = "Vernon Bergnaum" - workspace_id = "c413aa63-aae8-4d67-864d-bb675fd5e60b" + name = "Nicolas Kassulke" + workspace_id = "64dbb675-fd5e-460b-b75e-d4f6fbee41f3" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_meilisearch/resource.tf b/examples/resources/airbyte_destination_meilisearch/resource.tf index 8cf645517..0eef54be8 100755 --- a/examples/resources/airbyte_destination_meilisearch/resource.tf +++ b/examples/resources/airbyte_destination_meilisearch/resource.tf @@ -4,6 +4,6 @@ resource "airbyte_destination_meilisearch" "my_destination_meilisearch" { destination_type = "meilisearch" host = "...my_host..." } - name = "Arlene Heidenreich" - workspace_id = "4f6fbee4-1f33-4317-be35-b60eb1ea4265" + name = "Wendy Breitenberg" + workspace_id = "e35b60eb-1ea4-4265-95ba-3c28744ed53b" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_mongodb/resource.tf b/examples/resources/airbyte_destination_mongodb/resource.tf index 73698d471..a18d37ed5 100755 --- a/examples/resources/airbyte_destination_mongodb/resource.tf +++ b/examples/resources/airbyte_destination_mongodb/resource.tf @@ -1,20 +1,26 @@ resource "airbyte_destination_mongodb" "my_destination_mongodb" { configuration = { auth_type = { - authorization = "login/password" - password = "...my_password..." - username = "Garland_Hane23" + destination_mongodb_authorization_type_login_password = { + authorization = "login/password" + password = "...my_password..." + username = "Jimmy.Luettgen63" + } } database = "...my_database..." destination_type = "mongodb" instance_type = { - cluster_url = "...my_cluster_url..." - instance = "atlas" + destination_mongodb_mongo_db_instance_type_mongo_db_atlas = { + cluster_url = "...my_cluster_url..." + instance = "atlas" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mongodb_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } } - name = "Ernest Labadie" - workspace_id = "4ed53b88-f3a8-4d8f-9c0b-2f2fb7b194a2" + name = "Dewey Leannon" + workspace_id = "c0b2f2fb-7b19-44a2-b6b2-6916fe1f08f4" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_mssql/resource.tf b/examples/resources/airbyte_destination_mssql/resource.tf index 58a695f79..b11b61b49 100755 --- a/examples/resources/airbyte_destination_mssql/resource.tf +++ b/examples/resources/airbyte_destination_mssql/resource.tf @@ -8,13 +8,17 @@ resource "airbyte_destination_mssql" "my_destination_mssql" { port = 1433 schema = "public" ssl_method = { - ssl_method = "encrypted_trust_server_certificate" + destination_mssql_ssl_method_encrypted_trust_server_certificate_ = { + ssl_method = "encrypted_trust_server_certificate" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mssql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Haylie37" + username = "Laron.Gerlach40" } - name = "Joe Hoppe" - workspace_id = "1f08f429-4e36-498f-847f-603e8b445e80" + name = "Isaac Wolf" + workspace_id = "7f603e8b-445e-480c-a55e-fd20e457e185" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_mysql/resource.tf b/examples/resources/airbyte_destination_mysql/resource.tf index ffb9a95c7..2cccfad39 100755 --- a/examples/resources/airbyte_destination_mysql/resource.tf +++ b/examples/resources/airbyte_destination_mysql/resource.tf @@ -7,10 +7,12 @@ resource "airbyte_destination_mysql" "my_destination_mysql" { password = "...my_password..." port = 3306 tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_mysql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Lisa92" + username = "Nadia_Howe62" } - name = "Dr. Jody Cummings" - workspace_id = "57e1858b-6a89-4fbe-ba5a-a8e4824d0ab4" + name = "Rudolph Trantow" + workspace_id = "5aa8e482-4d0a-4b40-b508-8e51862065e9" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_oracle/resource.tf b/examples/resources/airbyte_destination_oracle/resource.tf index 664efa0c1..eaf1856b5 100755 --- a/examples/resources/airbyte_destination_oracle/resource.tf +++ b/examples/resources/airbyte_destination_oracle/resource.tf @@ -8,10 +8,12 @@ resource "airbyte_destination_oracle" "my_destination_oracle" { schema = "airbyte" sid = "...my_sid..." tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_oracle_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jaiden53" + username = "Duncan69" } - name = "Ms. Lamar Hessel" - workspace_id = "2065e904-f3b1-4194-b8ab-f603a79f9dfe" + name = "Diane Mayer" + workspace_id = "8abf603a-79f9-4dfe-8ab7-da8a50ce187f" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_postgres/resource.tf b/examples/resources/airbyte_destination_postgres/resource.tf index ba92b2adc..5229098ed 100755 --- a/examples/resources/airbyte_destination_postgres/resource.tf +++ b/examples/resources/airbyte_destination_postgres/resource.tf @@ -8,13 +8,17 @@ resource "airbyte_destination_postgres" "my_destination_postgres" { port = 5432 schema = "public" ssl_mode = { - mode = "allow" + destination_postgres_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_postgres_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Marc_Predovic" + username = "Gerald.Powlowski46" } - name = "Max O'Connell DDS" - workspace_id = "e187f86b-c173-4d68-9eee-9526f8d986e8" + name = "Angelina Jenkins" + workspace_id = "eee9526f-8d98-46e8-81ea-d4f0e1012563" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_pubsub/resource.tf b/examples/resources/airbyte_destination_pubsub/resource.tf index 15e2b481a..cd3f028ac 100755 --- a/examples/resources/airbyte_destination_pubsub/resource.tf +++ b/examples/resources/airbyte_destination_pubsub/resource.tf @@ -1,15 +1,15 @@ resource "airbyte_destination_pubsub" "my_destination_pubsub" { configuration = { - batching_delay_threshold = 5 - batching_element_count_threshold = 1 - batching_enabled = true - batching_request_bytes_threshold = 7 + batching_delay_threshold = 10 + batching_element_count_threshold = 6 + batching_enabled = false + batching_request_bytes_threshold = 9 credentials_json = "...my_credentials_json..." destination_type = "pubsub" - ordering_enabled = true + ordering_enabled = false project_id = "...my_project_id..." topic_id = "...my_topic_id..." } - name = "Lela Baumbach Jr." - workspace_id = "12563f94-e29e-4973-a922-a57a15be3e06" + name = "Frankie Metz" + workspace_id = "e922a57a-15be-43e0-a080-7e2b6e3ab884" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_pulsar/resource.tf b/examples/resources/airbyte_destination_pulsar/resource.tf index ff64071d4..a0440e86d 100755 --- a/examples/resources/airbyte_destination_pulsar/resource.tf +++ b/examples/resources/airbyte_destination_pulsar/resource.tf @@ -1,24 +1,24 @@ resource "airbyte_destination_pulsar" "my_destination_pulsar" { configuration = { - batching_enabled = true - batching_max_messages = 5 + batching_enabled = false + batching_max_messages = 10 batching_max_publish_delay = 0 - block_if_queue_full = true + block_if_queue_full = false brokers = "broker1:6650,broker2:6650" - compression_type = "SNAPPY" + compression_type = "ZLIB" destination_type = "pulsar" - max_pending_messages = 2 - max_pending_messages_across_partitions = 8 + max_pending_messages = 5 + max_pending_messages_across_partitions = 7 producer_name = "airbyte-producer" producer_sync = false - send_timeout_ms = 9 + send_timeout_ms = 0 topic_namespace = "default" - topic_pattern = "sample.topic" + topic_pattern = "{namespace}.{stream}.sample" topic_tenant = "public" topic_test = "test.topic" topic_type = "non-persistent" use_tls = true } - name = "Jordan Haag" - workspace_id = "0597a60f-f2a5-44a3-9e94-764a3e865e79" + name = "Warren Greenholt" + workspace_id = "1e94764a-3e86-45e7-956f-9251a5a9da66" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_rabbitmq/resource.tf b/examples/resources/airbyte_destination_rabbitmq/resource.tf index ca1dd8ce4..19e4d3b19 100755 --- a/examples/resources/airbyte_destination_rabbitmq/resource.tf +++ b/examples/resources/airbyte_destination_rabbitmq/resource.tf @@ -4,12 +4,12 @@ resource "airbyte_destination_rabbitmq" "my_destination_rabbitmq" { exchange = "...my_exchange..." host = "...my_host..." password = "...my_password..." - port = 3 + port = 0 routing_key = "...my_routing_key..." - ssl = false - username = "Walker35" + ssl = true + username = "Winfield_Herman" virtual_host = "...my_virtual_host..." } - name = "Lynda Heathcote" - workspace_id = "da660ff5-7bfa-4ad4-b9ef-c1b4512c1032" + name = "Oliver Osinski" + workspace_id = "f9efc1b4-512c-4103-a648-dc2f615199eb" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_redis/resource.tf b/examples/resources/airbyte_destination_redis/resource.tf index 5dca23954..056664ba9 100755 --- a/examples/resources/airbyte_destination_redis/resource.tf +++ b/examples/resources/airbyte_destination_redis/resource.tf @@ -4,16 +4,20 @@ resource "airbyte_destination_redis" "my_destination_redis" { destination_type = "redis" host = "localhost,127.0.0.1" password = "...my_password..." - port = 4 - ssl = true + port = 10 + ssl = false ssl_mode = { - mode = "disable" + destination_redis_ssl_modes_disable = { + mode = "disable" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_redis_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Joy.Swaniawski95" + username = "Americo_Weber" } - name = "Ms. Cheryl Hane" - workspace_id = "ebfd0e9f-e6c6-432c-a3ae-d0117996312f" + name = "Gene Sauer" + workspace_id = "2ca3aed0-1179-4963-92fd-e04771778ff6" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_redshift/resource.tf b/examples/resources/airbyte_destination_redshift/resource.tf index 2e1ddbf8f..2ea93cc3a 100755 --- a/examples/resources/airbyte_destination_redshift/resource.tf +++ b/examples/resources/airbyte_destination_redshift/resource.tf @@ -8,25 +8,31 @@ resource "airbyte_destination_redshift" "my_destination_redshift" { port = 5439 schema = "public" tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_redshift_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } uploading_method = { - access_key_id = "...my_access_key_id..." - encryption = { - encryption_type = "aes_cbc_envelope" - key_encrypting_key = "...my_key_encrypting_key..." + destination_redshift_uploading_method_s3_staging = { + access_key_id = "...my_access_key_id..." + encryption = { + destination_redshift_uploading_method_s3_staging_encryption_aes_cbc_envelope_encryption = { + encryption_type = "aes_cbc_envelope" + key_encrypting_key = "...my_key_encrypting_key..." + } + } + file_buffer_count = 10 + file_name_pattern = "{date}" + method = "S3 Staging" + purge_staging_data = false + s3_bucket_name = "airbyte.staging" + s3_bucket_path = "data_sync/test" + s3_bucket_region = "ap-southeast-1" + secret_access_key = "...my_secret_access_key..." } - file_buffer_count = 10 - file_name_pattern = "{date}" - method = "S3 Staging" - purge_staging_data = false - s3_bucket_name = "airbyte.staging" - s3_bucket_path = "data_sync/test" - s3_bucket_region = "ap-southeast-1" - secret_access_key = "...my_secret_access_key..." } - username = "Jaqueline.Buckridge" + username = "Donavon.Koch" } - name = "Emilio Wisoky PhD" - workspace_id = "01747636-0a15-4db6-a660-659a1adeaab5" + name = "Mrs. Melissa Osinski" + workspace_id = "b6a66065-9a1a-4dea-ab58-51d6c645b08b" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_rockset/resource.tf b/examples/resources/airbyte_destination_rockset/resource.tf index 42a1a391b..760cd2ceb 100755 --- a/examples/resources/airbyte_destination_rockset/resource.tf +++ b/examples/resources/airbyte_destination_rockset/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_destination_rockset" "my_destination_rockset" { api_key = "...my_api_key..." api_server = "...my_api_server..." destination_type = "rockset" - workspace = "my_workspace" + workspace = "commons" } - name = "Gloria Skiles" - workspace_id = "645b08b6-1891-4baa-8fe1-ade008e6f8c5" + name = "Miss Nora Moen" + workspace_id = "a0fe1ade-008e-46f8-85f3-50d8cdb5a341" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_s3/resource.tf b/examples/resources/airbyte_destination_s3/resource.tf index 20834fb62..7668db3b0 100755 --- a/examples/resources/airbyte_destination_s3/resource.tf +++ b/examples/resources/airbyte_destination_s3/resource.tf @@ -2,20 +2,24 @@ resource "airbyte_destination_s3" "my_destination_s3" { configuration = { access_key_id = "A012345678910EXAMPLE" destination_type = "s3" - file_name_pattern = "{sync_id}" + file_name_pattern = "{timestamp}" format = { - compression_codec = { - codec = "bzip2" + destination_s3_output_format_avro_apache_avro = { + compression_codec = { + destination_s3_output_format_avro_apache_avro_compression_codec_bzip2 = { + codec = "bzip2" + } + } + format_type = "Avro" } - format_type = "Avro" } s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "us-west-2" + s3_bucket_region = "us-east-2" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Dorothy Stanton" - workspace_id = "db5a3418-1430-4104-a181-3d5208ece7e2" + name = "Mr. Carmen Altenwerth" + workspace_id = "21813d52-08ec-4e7e-a53b-668451c6c6e2" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_s3_glue/resource.tf b/examples/resources/airbyte_destination_s3_glue/resource.tf index 90e229a7e..8c6708169 100755 --- a/examples/resources/airbyte_destination_s3_glue/resource.tf +++ b/examples/resources/airbyte_destination_s3_glue/resource.tf @@ -2,23 +2,27 @@ resource "airbyte_destination_s3_glue" "my_destination_s3glue" { configuration = { access_key_id = "A012345678910EXAMPLE" destination_type = "s3-glue" - file_name_pattern = "{date:yyyy_MM}" + file_name_pattern = "{date}" format = { - compression = { - compression_type = "GZIP" + destination_s3_glue_output_format_json_lines_newline_delimited_json = { + compression = { + destination_s3_glue_output_format_json_lines_newline_delimited_json_compression_gzip = { + compression_type = "GZIP" + } + } + flattening = "No flattening" + format_type = "JSONL" } - flattening = "No flattening" - format_type = "JSONL" } glue_database = "airbyte_database" glue_serialization_library = "org.apache.hive.hcatalog.data.JsonSerDe" s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "ap-southeast-1" + s3_bucket_region = "us-east-2" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - name = "Jennie Gutkowski DDS" - workspace_id = "6c6e205e-16de-4ab3-bec9-578a64584273" + name = "Teri Thiel" + workspace_id = "3fec9578-a645-4842-b3a8-418d162309fb" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_scylla/resource.tf b/examples/resources/airbyte_destination_scylla/resource.tf index 04ed31a79..ad369eb1b 100755 --- a/examples/resources/airbyte_destination_scylla/resource.tf +++ b/examples/resources/airbyte_destination_scylla/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_destination_scylla" "my_destination_scylla" { configuration = { - address = "520 Stark Corners" + address = "61561 Marques Trafficway" destination_type = "scylla" keyspace = "...my_keyspace..." password = "...my_password..." - port = 4 - replication = 1 - username = "Daron_Beahan" + port = 10 + replication = 7 + username = "Leola50" } - name = "John Monahan" - workspace_id = "921aefb9-f58c-44d8-ae68-e4be056013f5" + name = "Oscar Smith" + workspace_id = "e68e4be0-5601-43f5-9da7-57a59ecfef66" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_sftp_json/resource.tf b/examples/resources/airbyte_destination_sftp_json/resource.tf index 1aad26c46..8bee64bf9 100755 --- a/examples/resources/airbyte_destination_sftp_json/resource.tf +++ b/examples/resources/airbyte_destination_sftp_json/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_destination_sftp_json" "my_destination_sftpjson" { host = "...my_host..." password = "...my_password..." port = 22 - username = "Ryder.Nolan" + username = "Virginie_Bergnaum67" } - name = "Monique Harvey" - workspace_id = "cfef66ef-1caa-4338-bc2b-eb477373c8d7" + name = "Shannon Lind" + workspace_id = "2beb4773-73c8-4d72-b64d-1db1f2c43106" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_snowflake/resource.tf b/examples/resources/airbyte_destination_snowflake/resource.tf index f1df502cd..753e77c5f 100755 --- a/examples/resources/airbyte_destination_snowflake/resource.tf +++ b/examples/resources/airbyte_destination_snowflake/resource.tf @@ -1,23 +1,27 @@ resource "airbyte_destination_snowflake" "my_destination_snowflake" { configuration = { credentials = { - auth_type = "Key Pair Authentication" - private_key = "...my_private_key..." - private_key_password = "...my_private_key_password..." + destination_snowflake_authorization_method_key_pair_authentication = { + auth_type = "Key Pair Authentication" + private_key = "...my_private_key..." + private_key_password = "...my_private_key_password..." + } } database = "AIRBYTE_DATABASE" destination_type = "snowflake" file_buffer_count = 10 - host = "accountname.snowflakecomputing.com" + host = "accountname.us-east-2.aws.snowflakecomputing.com" jdbc_url_params = "...my_jdbc_url_params..." loading_method = { - method = "Internal Staging" + destination_snowflake_data_staging_method_recommended_internal_staging = { + method = "Internal Staging" + } } role = "AIRBYTE_ROLE" schema = "AIRBYTE_SCHEMA" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - name = "Juan Wolf" - workspace_id = "4310661e-9634-49e1-8f9e-06e3a437000a" + name = "Miss Katrina Weber" + workspace_id = "9e06e3a4-3700-40ae-ab6b-c9b8f759eac5" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_typesense/resource.tf b/examples/resources/airbyte_destination_typesense/resource.tf index 533cddb0f..56bb5ee6d 100755 --- a/examples/resources/airbyte_destination_typesense/resource.tf +++ b/examples/resources/airbyte_destination_typesense/resource.tf @@ -7,6 +7,6 @@ resource "airbyte_destination_typesense" "my_destination_typesense" { port = "...my_port..." protocol = "...my_protocol..." } - name = "Angel Pouros" - workspace_id = "c9b8f759-eac5-45a9-b41d-311352965bb8" + name = "Jodi Mueller" + workspace_id = "1d311352-965b-4b8a-b202-611435e139db" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_vertica/resource.tf b/examples/resources/airbyte_destination_vertica/resource.tf index e42a79b94..0c1af4add 100755 --- a/examples/resources/airbyte_destination_vertica/resource.tf +++ b/examples/resources/airbyte_destination_vertica/resource.tf @@ -8,10 +8,12 @@ resource "airbyte_destination_vertica" "my_destination_vertica" { port = 5433 schema = "...my_schema..." tunnel_method = { - tunnel_method = "NO_TUNNEL" + destination_vertica_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jeff16" + username = "Carlos_Cronin" } - name = "Anna Bergnaum" - workspace_id = "5e139dbc-2259-4b1a-bda8-c070e1084cb0" + name = "Gerald Ondricka" + workspace_id = "a8c070e1-084c-4b06-b2d1-ad879eeb9665" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_aircall/resource.tf b/examples/resources/airbyte_source_aircall/resource.tf index 9cec06188..d23dec3a0 100755 --- a/examples/resources/airbyte_source_aircall/resource.tf +++ b/examples/resources/airbyte_source_aircall/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_aircall" "my_source_aircall" { source_type = "aircall" start_date = "2022-03-01T00:00:00.000Z" } - name = "Krystal Breitenberg" - workspace_id = "879eeb96-65b8-45ef-bd02-bae0be2d7822" + name = "Cecelia Wiza" + secret_id = "...my_secretId..." + workspace_id = "02bae0be-2d78-4225-9e3e-a4b5197f9244" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_airtable/resource.tf b/examples/resources/airbyte_source_airtable/resource.tf index c3a99de4c..6360f3028 100755 --- a/examples/resources/airbyte_source_airtable/resource.tf +++ b/examples/resources/airbyte_source_airtable/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_airtable" "my_source_airtable" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-05-19T03:53:46.149Z" + source_airtable_authentication_o_auth2_0 = { + access_token = "...my_access_token..." + auth_method = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2022-02-16T03:38:31.705Z" + } } source_type = "airtable" } - name = "Jeff Walker" - workspace_id = "b5197f92-443d-4a7c-a52b-895c537c6454" + name = "Cody Rowe" + secret_id = "...my_secretId..." + workspace_id = "2b895c53-7c64-454e-bb0b-34896c3ca5ac" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_alloydb/resource.tf b/examples/resources/airbyte_source_alloydb/resource.tf index fb3e82c33..bc25e41be 100755 --- a/examples/resources/airbyte_source_alloydb/resource.tf +++ b/examples/resources/airbyte_source_alloydb/resource.tf @@ -6,25 +6,32 @@ resource "airbyte_source_alloydb" "my_source_alloydb" { password = "...my_password..." port = 5432 replication_method = { - initial_waiting_seconds = 10 - lsn_commit_behaviour = "After loading Data in the destination" - method = "CDC" - plugin = "pgoutput" - publication = "...my_publication..." - replication_slot = "...my_replication_slot..." + source_alloydb_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 8 + lsn_commit_behaviour = "After loading Data in the destination" + method = "CDC" + plugin = "pgoutput" + publication = "...my_publication..." + replication_slot = "...my_replication_slot..." + } } schemas = [ "...", ] source_type = "alloydb" ssl_mode = { - mode = "allow" + source_alloydb_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_alloydb_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Alvis28" + username = "Bruce.Zieme44" } - name = "Sergio Hirthe" - workspace_id = "ca5acfbe-2fd5-4707-9779-29177deac646" + name = "Viola Hane" + secret_id = "...my_secretId..." + workspace_id = "929177de-ac64-46ec-b573-409e3eb1e5a2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_amazon_ads/resource.tf b/examples/resources/airbyte_source_amazon_ads/resource.tf index efc9aa3e0..f9d8a8112 100755 --- a/examples/resources/airbyte_source_amazon_ads/resource.tf +++ b/examples/resources/airbyte_source_amazon_ads/resource.tf @@ -5,19 +5,20 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { client_secret = "...my_client_secret..." look_back_window = 10 profiles = [ - 7, + 1, ] refresh_token = "...my_refresh_token..." - region = "EU" + region = "FE" report_record_types = [ - "asins_targets", + "keywords", ] source_type = "amazon-ads" start_date = "2022-10-10" state_filter = [ - "enabled", + "paused", ] } - name = "Bobbie Terry" - workspace_id = "b1e5a2b1-2eb0-47f1-96db-99545fc95fa8" + name = "Harold Boyer" + secret_id = "...my_secretId..." + workspace_id = "b99545fc-95fa-4889-b0e1-89dbb30fcb33" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_amazon_sqs/resource.tf b/examples/resources/airbyte_source_amazon_sqs/resource.tf index 4d54ef93e..f1c00f211 100755 --- a/examples/resources/airbyte_source_amazon_sqs/resource.tf +++ b/examples/resources/airbyte_source_amazon_sqs/resource.tf @@ -6,11 +6,12 @@ resource "airbyte_source_amazon_sqs" "my_source_amazonsqs" { max_batch_size = 5 max_wait_time = 5 queue_url = "https://sqs.eu-west-1.amazonaws.com/1234567890/my-example-queue" - region = "us-east-2" + region = "ap-northeast-2" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" source_type = "amazon-sqs" visibility_timeout = 15 } - name = "Billie Morar" - workspace_id = "b30fcb33-ea05-45b1-97cd-44e2f52d82d3" + name = "Roger McDermott" + secret_id = "...my_secretId..." + workspace_id = "d44e2f52-d82d-4351-bbb6-f48b656bcdb3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_amplitude/resource.tf b/examples/resources/airbyte_source_amplitude/resource.tf index 4b30d4835..bbaa6e791 100755 --- a/examples/resources/airbyte_source_amplitude/resource.tf +++ b/examples/resources/airbyte_source_amplitude/resource.tf @@ -2,11 +2,12 @@ resource "airbyte_source_amplitude" "my_source_amplitude" { configuration = { api_key = "...my_api_key..." data_region = "Standard Server" - request_time_range = 0 + request_time_range = 10 secret_key = "...my_secret_key..." source_type = "amplitude" start_date = "2021-01-25T00:00:00Z" } - name = "Flora Renner" - workspace_id = "48b656bc-db35-4ff2-a4b2-7537a8cd9e73" + name = "Russell Toy" + secret_id = "...my_secretId..." + workspace_id = "27537a8c-d9e7-4319-8177-d525f77b114e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_apify_dataset/resource.tf b/examples/resources/airbyte_source_apify_dataset/resource.tf index 7e53346c9..7efff1c1a 100755 --- a/examples/resources/airbyte_source_apify_dataset/resource.tf +++ b/examples/resources/airbyte_source_apify_dataset/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_apify_dataset" "my_source_apifydataset" { dataset_id = "...my_datasetId..." source_type = "apify-dataset" } - name = "Sherman Brown" - workspace_id = "d525f77b-114e-4eb5-aff7-85fc37814d4c" + name = "Leo Dare" + secret_id = "...my_secretId..." + workspace_id = "785fc378-14d4-4c98-a0c2-bb89eb75dad6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_asana/resource.tf b/examples/resources/airbyte_source_asana/resource.tf index 9e9417045..6f6ae3e23 100755 --- a/examples/resources/airbyte_source_asana/resource.tf +++ b/examples/resources/airbyte_source_asana/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_asana" "my_source_asana" { configuration = { credentials = { - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - option_title = "OAuth Credentials" - refresh_token = "...my_refresh_token..." + source_asana_authentication_mechanism_authenticate_via_asana_oauth_ = { + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + option_title = "OAuth Credentials" + refresh_token = "...my_refresh_token..." + } } source_type = "asana" } - name = "Dr. Armando Waelchi" - workspace_id = "bb89eb75-dad6-436c-a005-03d8bb31180f" + name = "Gertrude Russel Jr." + secret_id = "...my_secretId..." + workspace_id = "503d8bb3-1180-4f73-9ae9-e057eb809e28" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_auth0/resource.tf b/examples/resources/airbyte_source_auth0/resource.tf index c22f0915c..8750be94f 100755 --- a/examples/resources/airbyte_source_auth0/resource.tf +++ b/examples/resources/airbyte_source_auth0/resource.tf @@ -2,11 +2,14 @@ resource "airbyte_source_auth0" "my_source_auth0" { configuration = { base_url = "https://dev-yourOrg.us.auth0.com/" credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2_access_token" + source_auth0_authentication_method_o_auth2_access_token = { + access_token = "...my_access_token..." + auth_type = "oauth2_access_token" + } } source_type = "auth0" } - name = "Wendy McKenzie" - workspace_id = "9e057eb8-09e2-4810-b31f-3981d4c700b6" + name = "Sandra Frami DVM" + secret_id = "...my_secretId..." + workspace_id = "3981d4c7-00b6-407f-bc93-c73b9da3f2ce" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_aws_cloudtrail/resource.tf b/examples/resources/airbyte_source_aws_cloudtrail/resource.tf index 3ffaab2c3..75c1bd55e 100755 --- a/examples/resources/airbyte_source_aws_cloudtrail/resource.tf +++ b/examples/resources/airbyte_source_aws_cloudtrail/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_aws_cloudtrail" "my_source_awscloudtrail" { source_type = "aws-cloudtrail" start_date = "2021-01-01" } - name = "Jacob Sawayn" - workspace_id = "c73b9da3-f2ce-4da7-a23f-2257411faf4b" + name = "Leigh Denesik" + secret_id = "...my_secretId..." + workspace_id = "2257411f-af4b-4754-8e47-2e802857a5b4" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_azure_blob_storage/resource.tf b/examples/resources/airbyte_source_azure_blob_storage/resource.tf index d9f5f1623..811728651 100755 --- a/examples/resources/airbyte_source_azure_blob_storage/resource.tf +++ b/examples/resources/airbyte_source_azure_blob_storage/resource.tf @@ -7,10 +7,13 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { azure_blob_storage_endpoint = "blob.core.windows.net" azure_blob_storage_schema_inference_limit = 500 format = { - format_type = "JSONL" + source_azure_blob_storage_input_format_json_lines_newline_delimited_json = { + format_type = "JSONL" + } } source_type = "azure-blob-storage" } - name = "Lucille Funk" - workspace_id = "72e80285-7a5b-4404-a3a7-d575f1400e76" + name = "Natalie Dooley" + secret_id = "...my_secretId..." + workspace_id = "d575f140-0e76-44ad-b334-ec1b781b36a0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_azure_table/resource.tf b/examples/resources/airbyte_source_azure_table/resource.tf index a245ec88f..654310f08 100755 --- a/examples/resources/airbyte_source_azure_table/resource.tf +++ b/examples/resources/airbyte_source_azure_table/resource.tf @@ -3,8 +3,9 @@ resource "airbyte_source_azure_table" "my_source_azuretable" { source_type = "azure-table" storage_access_key = "...my_storage_access_key..." storage_account_name = "...my_storage_account_name..." - storage_endpoint_suffix = "core.windows.net" + storage_endpoint_suffix = "core.chinacloudapi.cn" } - name = "Woodrow Klein" - workspace_id = "4ec1b781-b36a-4080-88d1-00efada200ef" + name = "Brandy Langosh Jr." + secret_id = "...my_secretId..." + workspace_id = "0efada20-0ef0-4422-ab21-64cf9ab8366c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_bamboo_hr/resource.tf b/examples/resources/airbyte_source_bamboo_hr/resource.tf index f58f92884..d295b203d 100755 --- a/examples/resources/airbyte_source_bamboo_hr/resource.tf +++ b/examples/resources/airbyte_source_bamboo_hr/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_bamboo_hr" "my_source_bamboohr" { source_type = "bamboo-hr" subdomain = "...my_subdomain..." } - name = "Phyllis Denesik" - workspace_id = "2164cf9a-b836-46c7-a3ff-da9e06bee482" + name = "Thelma Wisoky" + secret_id = "...my_secretId..." + workspace_id = "a9e06bee-4825-4c1f-80e1-15c80bff9185" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_bigcommerce/resource.tf b/examples/resources/airbyte_source_bigcommerce/resource.tf index bdeb035a2..99924ffff 100755 --- a/examples/resources/airbyte_source_bigcommerce/resource.tf +++ b/examples/resources/airbyte_source_bigcommerce/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_bigcommerce" "my_source_bigcommerce" { start_date = "2021-01-01" store_hash = "...my_store_hash..." } - name = "Adrienne Carter" - workspace_id = "0e115c80-bff9-4185-84ec-42defcce8f19" + name = "Emma Ward" + secret_id = "...my_secretId..." + workspace_id = "2defcce8-f197-4777-be63-562a7b408f05" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_bigquery/resource.tf b/examples/resources/airbyte_source_bigquery/resource.tf index 3899ae615..bd11f720f 100755 --- a/examples/resources/airbyte_source_bigquery/resource.tf +++ b/examples/resources/airbyte_source_bigquery/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_bigquery" "my_source_bigquery" { project_id = "...my_project_id..." source_type = "bigquery" } - name = "Joy Kessler" - workspace_id = "e63562a7-b408-4f05-a3d4-8fdaf313a1f5" + name = "Luis Schumm" + secret_id = "...my_secretId..." + workspace_id = "fdaf313a-1f5f-4d94-a59c-0b36f25ea944" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_bing_ads/resource.tf b/examples/resources/airbyte_source_bing_ads/resource.tf index aef4c26e3..78cd6db22 100755 --- a/examples/resources/airbyte_source_bing_ads/resource.tf +++ b/examples/resources/airbyte_source_bing_ads/resource.tf @@ -6,10 +6,11 @@ resource "airbyte_source_bing_ads" "my_source_bingads" { developer_token = "...my_developer_token..." lookback_window = 10 refresh_token = "...my_refresh_token..." - reports_start_date = "2021-03-11" + reports_start_date = "2022-04-10" source_type = "bing-ads" tenant_id = "...my_tenant_id..." } - name = "Rose Hills" - workspace_id = "0b36f25e-a944-4f3b-b56c-11f6c37a5126" + name = "Lorraine Jacobson Sr." + secret_id = "...my_secretId..." + workspace_id = "f6c37a51-2624-4383-9bbc-05a23a45cefc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_braintree/resource.tf b/examples/resources/airbyte_source_braintree/resource.tf index 046e13a14..ed7f05fba 100755 --- a/examples/resources/airbyte_source_braintree/resource.tf +++ b/examples/resources/airbyte_source_braintree/resource.tf @@ -1,12 +1,13 @@ resource "airbyte_source_braintree" "my_source_braintree" { configuration = { - environment = "Sandbox" + environment = "Production" merchant_id = "...my_merchant_id..." private_key = "...my_private_key..." public_key = "...my_public_key..." source_type = "braintree" - start_date = "2020" + start_date = "2020-11-22 20:20:05" } - name = "Kristy Quigley II" - workspace_id = "a23a45ce-fc5f-4de1-8a0c-e2169e510019" + name = "Molly Beier" + secret_id = "...my_secretId..." + workspace_id = "2169e510-019c-46dc-9e34-762799bfbbe6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_braze/resource.tf b/examples/resources/airbyte_source_braze/resource.tf index a0bbcb5b8..94a7da34f 100755 --- a/examples/resources/airbyte_source_braze/resource.tf +++ b/examples/resources/airbyte_source_braze/resource.tf @@ -2,9 +2,10 @@ resource "airbyte_source_braze" "my_source_braze" { configuration = { api_key = "...my_api_key..." source_type = "braze" - start_date = "2021-09-11" + start_date = "2022-06-22" url = "...my_url..." } - name = "Jermaine Hettinger" - workspace_id = "4762799b-fbbe-4694-9fb2-bb4ecae6c3d5" + name = "Irvin Rippin" + secret_id = "...my_secretId..." + workspace_id = "b4ecae6c-3d5d-4b3a-9ebd-5daea4c506a8" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_chargebee/resource.tf b/examples/resources/airbyte_source_chargebee/resource.tf index 4773a274b..79ea922a1 100755 --- a/examples/resources/airbyte_source_chargebee/resource.tf +++ b/examples/resources/airbyte_source_chargebee/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_chargebee" "my_source_chargebee" { source_type = "chargebee" start_date = "2021-01-25T00:00:00Z" } - name = "Kristopher Walter" - workspace_id = "5daea4c5-06a8-4aa9-8c02-644cf5e9d9a4" + name = "Roxanne Aufderhar" + secret_id = "...my_secretId..." + workspace_id = "44cf5e9d-9a45-478a-9c1a-c600dec001ac" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_chartmogul/resource.tf b/examples/resources/airbyte_source_chartmogul/resource.tf index 6bd8e8665..8b49f4e16 100755 --- a/examples/resources/airbyte_source_chartmogul/resource.tf +++ b/examples/resources/airbyte_source_chartmogul/resource.tf @@ -1,10 +1,11 @@ resource "airbyte_source_chartmogul" "my_source_chartmogul" { configuration = { api_key = "...my_api_key..." - interval = "week" + interval = "month" source_type = "chartmogul" start_date = "2017-01-25T00:00:00Z" } - name = "Miss Carroll Rutherford" - workspace_id = "600dec00-1ac8-402e-aec0-9ff8f0f816ff" + name = "Louis Treutel V" + secret_id = "...my_secretId..." + workspace_id = "ff8f0f81-6ff3-4477-813e-902c14125b09" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_clickhouse/resource.tf b/examples/resources/airbyte_source_clickhouse/resource.tf index fdc5770e5..45fdc6279 100755 --- a/examples/resources/airbyte_source_clickhouse/resource.tf +++ b/examples/resources/airbyte_source_clickhouse/resource.tf @@ -6,10 +6,13 @@ resource "airbyte_source_clickhouse" "my_source_clickhouse" { port = 8123 source_type = "clickhouse" tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_clickhouse_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Deven_Koch" + username = "Alfonzo.OReilly" } - name = "Crystal Terry I" - workspace_id = "c14125b0-960a-4668-951a-472af923c594" + name = "Miss Peter Hermiston" + secret_id = "...my_secretId..." + workspace_id = "72af923c-5949-4f83-b350-cf876ffb901c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_clickup_api/resource.tf b/examples/resources/airbyte_source_clickup_api/resource.tf index 6ea1f6cca..61e9e98bb 100755 --- a/examples/resources/airbyte_source_clickup_api/resource.tf +++ b/examples/resources/airbyte_source_clickup_api/resource.tf @@ -8,6 +8,7 @@ resource "airbyte_source_clickup_api" "my_source_clickupapi" { space_id = "...my_space_id..." team_id = "...my_team_id..." } - name = "Dwight Frami" - workspace_id = "50cf876f-fb90-41c6-acbb-4e243cf789ff" + name = "Lowell Rippin" + secret_id = "...my_secretId..." + workspace_id = "e243cf78-9ffa-4fed-a53e-5ae6e0ac184c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_close_com/resource.tf b/examples/resources/airbyte_source_close_com/resource.tf index ebc91a86d..44d6f612c 100755 --- a/examples/resources/airbyte_source_close_com/resource.tf +++ b/examples/resources/airbyte_source_close_com/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_close_com" "my_source_closecom" { source_type = "close-com" start_date = "2021-01-01" } - name = "Drew Nolan" - workspace_id = "e5ae6e0a-c184-4c2b-9c24-7c88373a40e1" + name = "Kim Crist" + secret_id = "...my_secretId..." + workspace_id = "c88373a4-0e19-442f-b2e5-5055756f5d56" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_coda/resource.tf b/examples/resources/airbyte_source_coda/resource.tf index b45702845..537043d7d 100755 --- a/examples/resources/airbyte_source_coda/resource.tf +++ b/examples/resources/airbyte_source_coda/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_coda" "my_source_coda" { auth_token = "...my_auth_token..." source_type = "coda" } - name = "Micheal Cassin" - workspace_id = "2e550557-56f5-4d56-90bd-0af2dfe13db4" + name = "Paul Powlowski MD" + secret_id = "...my_secretId..." + workspace_id = "f2dfe13d-b4f6-42cb-a3f8-941aebc0b80a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_coin_api/resource.tf b/examples/resources/airbyte_source_coin_api/resource.tf index 2fa2fcb5a..83b8574aa 100755 --- a/examples/resources/airbyte_source_coin_api/resource.tf +++ b/examples/resources/airbyte_source_coin_api/resource.tf @@ -2,13 +2,14 @@ resource "airbyte_source_coin_api" "my_source_coinapi" { configuration = { api_key = "...my_api_key..." end_date = "2019-01-01T00:00:00" - environment = "production" - limit = 4 + environment = "sandbox" + limit = 6 period = "5SEC" source_type = "coin-api" start_date = "2019-01-01T00:00:00" symbol_id = "...my_symbol_id..." } - name = "Dominic Pagac" - workspace_id = "8941aebc-0b80-4a69-a4d3-b2ecfcc8f895" + name = "Marcella Ernser" + secret_id = "...my_secretId..." + workspace_id = "ecfcc8f8-9501-40f5-9d3d-6fa1804e54c8" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_coinmarketcap/resource.tf b/examples/resources/airbyte_source_coinmarketcap/resource.tf index c48bef2a1..90d2b285a 100755 --- a/examples/resources/airbyte_source_coinmarketcap/resource.tf +++ b/examples/resources/airbyte_source_coinmarketcap/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_coinmarketcap" "my_source_coinmarketcap" { "...", ] } - name = "Susan Wyman" - workspace_id = "d3d6fa18-04e5-44c8-af16-8a363c8873e4" + name = "Walter Jacobs" + secret_id = "...my_secretId..." + workspace_id = "363c8873-e484-4380-b1f6-b8ca275a60a0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_configcat/resource.tf b/examples/resources/airbyte_source_configcat/resource.tf index e1ac17718..5e1d2fcba 100755 --- a/examples/resources/airbyte_source_configcat/resource.tf +++ b/examples/resources/airbyte_source_configcat/resource.tf @@ -2,8 +2,9 @@ resource "airbyte_source_configcat" "my_source_configcat" { configuration = { password = "...my_password..." source_type = "configcat" - username = "Joana53" + username = "Elena61" } - name = "Olivia Boehm" - workspace_id = "b8ca275a-60a0-44c4-95cc-699171b51c1b" + name = "Lynne Schroeder" + secret_id = "...my_secretId..." + workspace_id = "9171b51c-1bdb-41cf-8b88-8ebdfc4ccca9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_confluence/resource.tf b/examples/resources/airbyte_source_confluence/resource.tf index 253d1f141..cc0bb67e9 100755 --- a/examples/resources/airbyte_source_confluence/resource.tf +++ b/examples/resources/airbyte_source_confluence/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_confluence" "my_source_confluence" { email = "abc@example.com" source_type = "confluence" } - name = "Byron Ledner" - workspace_id = "bdfc4ccc-a99b-4c7f-80b2-dce10873e42b" + name = "Edward Roberts" + secret_id = "...my_secretId..." + workspace_id = "ce10873e-42b0-406d-a788-78ba8581a582" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_datascope/resource.tf b/examples/resources/airbyte_source_datascope/resource.tf index 1839fec95..4f2cb4f10 100755 --- a/examples/resources/airbyte_source_datascope/resource.tf +++ b/examples/resources/airbyte_source_datascope/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_datascope" "my_source_datascope" { source_type = "datascope" start_date = "dd/mm/YYYY HH:MM" } - name = "Sandra Keeling" - workspace_id = "78878ba8-581a-4582-88c5-4fefa9c95f2e" + name = "Dianne Schroeder" + secret_id = "...my_secretId..." + workspace_id = "fefa9c95-f2ea-4c55-a5d3-07cfee81206e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_delighted/resource.tf b/examples/resources/airbyte_source_delighted/resource.tf index 2443470c7..0d3611faf 100755 --- a/examples/resources/airbyte_source_delighted/resource.tf +++ b/examples/resources/airbyte_source_delighted/resource.tf @@ -1,9 +1,10 @@ resource "airbyte_source_delighted" "my_source_delighted" { configuration = { api_key = "...my_api_key..." - since = "2022-05-30 04:50:23" + since = "2022-05-30T04:50:23Z" source_type = "delighted" } - name = "Natalie Hickle" - workspace_id = "07cfee81-206e-4281-bfa4-a41c480d3f21" + name = "Lucia Pacocha" + secret_id = "...my_secretId..." + workspace_id = "41c480d3-f213-42af-8310-2d514f4cc6f1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_dixa/resource.tf b/examples/resources/airbyte_source_dixa/resource.tf index 28b9c89cc..1e2627766 100755 --- a/examples/resources/airbyte_source_dixa/resource.tf +++ b/examples/resources/airbyte_source_dixa/resource.tf @@ -1,10 +1,11 @@ resource "airbyte_source_dixa" "my_source_dixa" { configuration = { api_token = "...my_api_token..." - batch_size = 1 + batch_size = 31 source_type = "dixa" start_date = "YYYY-MM-DD" } - name = "Moses Beatty Jr." - workspace_id = "2d514f4c-c6f1-48bf-9621-a6a4f77a87ee" + name = "Marshall Hyatt V" + secret_id = "...my_secretId..." + workspace_id = "6a4f77a8-7ee3-4e4b-a752-c65b34418e3b" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_dockerhub/resource.tf b/examples/resources/airbyte_source_dockerhub/resource.tf index b2e7bb164..4dbf56e69 100755 --- a/examples/resources/airbyte_source_dockerhub/resource.tf +++ b/examples/resources/airbyte_source_dockerhub/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_dockerhub" "my_source_dockerhub" { docker_username = "airbyte" source_type = "dockerhub" } - name = "Rochelle Gislason" - workspace_id = "752c65b3-4418-4e3b-b91c-8d975e0e8419" + name = "Nick Blanda" + secret_id = "...my_secretId..." + workspace_id = "d975e0e8-419d-48f8-8f14-4f3e07edcc4a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_dremio/resource.tf b/examples/resources/airbyte_source_dremio/resource.tf index 343be034f..0ba914a31 100755 --- a/examples/resources/airbyte_source_dremio/resource.tf +++ b/examples/resources/airbyte_source_dremio/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_dremio" "my_source_dremio" { base_url = "...my_base_url..." source_type = "dremio" } - name = "Wallace Wiegand" - workspace_id = "f144f3e0-7edc-4c4a-a5f3-cabd905a972e" + name = "Lloyd Witting" + secret_id = "...my_secretId..." + workspace_id = "abd905a9-72e0-4567-a822-7b2d309470bf" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_dynamodb/resource.tf b/examples/resources/airbyte_source_dynamodb/resource.tf index d0408494c..c949ed081 100755 --- a/examples/resources/airbyte_source_dynamodb/resource.tf +++ b/examples/resources/airbyte_source_dynamodb/resource.tf @@ -2,11 +2,12 @@ resource "airbyte_source_dynamodb" "my_source_dynamodb" { configuration = { access_key_id = "A012345678910EXAMPLE" endpoint = "https://{aws_dynamo_db_url}.com" - region = "" + region = "ap-southeast-2" reserved_attribute_names = "name, field_name, field-name" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" source_type = "dynamodb" } - name = "Sue Krajcik" - workspace_id = "227b2d30-9470-4bf7-a4fa-87cf535a6fae" + name = "Tom Wintheiser" + secret_id = "...my_secretId..." + workspace_id = "7cf535a6-fae5-44eb-b60c-321f023b75d2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_e2e_test_cloud/resource.tf b/examples/resources/airbyte_source_e2e_test_cloud/resource.tf index d94bab7bd..47be99275 100755 --- a/examples/resources/airbyte_source_e2e_test_cloud/resource.tf +++ b/examples/resources/airbyte_source_e2e_test_cloud/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_e2e_test_cloud" "my_source_e2etestcloud" { configuration = { - max_messages = 3 - message_interval_ms = 2 + max_messages = 2 + message_interval_ms = 4 mock_catalog = { - stream_schemas = "...my_stream_schemas..." - type = "MULTI_STREAM" + source_e2e_test_cloud_mock_catalog_multi_schema = { + stream_schemas = "...my_stream_schemas..." + type = "MULTI_STREAM" + } } seed = 42 source_type = "e2e-test-cloud" type = "CONTINUOUS_FEED" } - name = "Miss Cary Howe" - workspace_id = "21f023b7-5d23-467f-a1a0-cc8df79f0a39" + name = "Percy Buckridge DDS" + secret_id = "...my_secretId..." + workspace_id = "c8df79f0-a396-4d90-8364-b7c15dfbace1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_emailoctopus/resource.tf b/examples/resources/airbyte_source_emailoctopus/resource.tf index 826c7846c..cdd7431ff 100755 --- a/examples/resources/airbyte_source_emailoctopus/resource.tf +++ b/examples/resources/airbyte_source_emailoctopus/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_emailoctopus" "my_source_emailoctopus" { api_key = "...my_api_key..." source_type = "emailoctopus" } - name = "Miss Estelle Mills" - workspace_id = "64b7c15d-fbac-4e18-8b1c-4ee2c8c6ce61" + name = "Miss Nelson Robel" + secret_id = "...my_secretId..." + workspace_id = "ee2c8c6c-e611-4fee-b1c7-cbdb6eec7437" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_exchange_rates/resource.tf b/examples/resources/airbyte_source_exchange_rates/resource.tf index ebe944c12..0caa6df42 100755 --- a/examples/resources/airbyte_source_exchange_rates/resource.tf +++ b/examples/resources/airbyte_source_exchange_rates/resource.tf @@ -1,11 +1,12 @@ resource "airbyte_source_exchange_rates" "my_source_exchangerates" { configuration = { access_key = "...my_access_key..." - base = "EUR" + base = "USD" ignore_weekends = true source_type = "exchange-rates" start_date = "YYYY-MM-DD" } - name = "Gregory Satterfield" - workspace_id = "bdb6eec7-4378-4ba2-9317-747dc915ad2c" + name = "Annie Breitenberg" + secret_id = "...my_secretId..." + workspace_id = "47dc915a-d2ca-4f5d-9672-3dc0f5ae2f3a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_facebook_marketing/resource.tf b/examples/resources/airbyte_source_facebook_marketing/resource.tf index fba7fe2f6..36d6a3c40 100755 --- a/examples/resources/airbyte_source_facebook_marketing/resource.tf +++ b/examples/resources/airbyte_source_facebook_marketing/resource.tf @@ -6,31 +6,32 @@ resource "airbyte_source_facebook_marketing" "my_source_facebookmarketing" { custom_insights = [ { action_breakdowns = [ - "action_video_type", + "action_target_id", ] breakdowns = [ - "frequency_value", + "image_asset", ] end_date = "2017-01-26T00:00:00Z" fields = [ - "cpm", + "estimated_ad_recallers_lower_bound", ] insights_lookback_window = 5 - level = "ad" - name = "Dr. Mona Ruecker" + level = "campaign" + name = "Mrs. Dolores Kertzmann" start_date = "2017-01-25T00:00:00Z" - time_increment = 1 + time_increment = 7 }, ] end_date = "2017-01-26T00:00:00Z" fetch_thumbnail_images = false include_deleted = false insights_lookback_window = 7 - max_batch_size = 5 - page_size = 0 + max_batch_size = 4 + page_size = 3 source_type = "facebook-marketing" start_date = "2017-01-25T00:00:00Z" } - name = "Naomi Krajcik" - workspace_id = "143f5a6c-98b5-4555-8080-d40bcacc6cbd" + name = "Dr. Dorothy Lockman" + secret_id = "...my_secretId..." + workspace_id = "0bcacc6c-bd6b-45f3-ac90-9304f926bad2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_facebook_pages/resource.tf b/examples/resources/airbyte_source_facebook_pages/resource.tf index d07538233..1b1ac2946 100755 --- a/examples/resources/airbyte_source_facebook_pages/resource.tf +++ b/examples/resources/airbyte_source_facebook_pages/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_facebook_pages" "my_source_facebookpages" { page_id = "...my_page_id..." source_type = "facebook-pages" } - name = "Antoinette Halvorson" - workspace_id = "ec909304-f926-4bad-a553-819b474b0ed2" + name = "Bernice Donnelly V" + secret_id = "...my_secretId..." + workspace_id = "b474b0ed-20e5-4624-8fff-639a910abdca" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_faker/resource.tf b/examples/resources/airbyte_source_faker/resource.tf index 2848ff60b..94080ec31 100755 --- a/examples/resources/airbyte_source_faker/resource.tf +++ b/examples/resources/airbyte_source_faker/resource.tf @@ -1,12 +1,13 @@ resource "airbyte_source_faker" "my_source_faker" { configuration = { - count = 0 - parallelism = 10 - records_per_slice = 3 + count = 8 + parallelism = 4 + records_per_slice = 1 records_per_sync = 4 - seed = 1 + seed = 4 source_type = "faker" } - name = "Vickie Welch" - workspace_id = "639a910a-bdca-4b62-a766-96e1ec00221b" + name = "Beth McKenzie" + secret_id = "...my_secretId..." + workspace_id = "1ec00221-b335-4d89-acb3-ecfda8d0c549" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_fauna/resource.tf b/examples/resources/airbyte_source_fauna/resource.tf index 60550466f..e1e04dc0b 100755 --- a/examples/resources/airbyte_source_fauna/resource.tf +++ b/examples/resources/airbyte_source_fauna/resource.tf @@ -2,16 +2,19 @@ resource "airbyte_source_fauna" "my_source_fauna" { configuration = { collection = { deletions = { - deletion_mode = "ignore" + source_fauna_collection_deletion_mode_disabled = { + deletion_mode = "ignore" + } } - page_size = 2 + page_size = 9 } domain = "...my_domain..." - port = 2 + port = 10 scheme = "...my_scheme..." secret = "...my_secret..." source_type = "fauna" } - name = "Angel Lakin" - workspace_id = "cb3ecfda-8d0c-4549-af03-004978a61fa1" + name = "Mrs. Edna Abbott" + secret_id = "...my_secretId..." + workspace_id = "78a61fa1-cf20-4688-b77c-1ffc71dca163" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_file_secure/resource.tf b/examples/resources/airbyte_source_file_secure/resource.tf index 61aabb9cd..b83a101a6 100755 --- a/examples/resources/airbyte_source_file_secure/resource.tf +++ b/examples/resources/airbyte_source_file_secure/resource.tf @@ -1,17 +1,20 @@ resource "airbyte_source_file_secure" "my_source_filesecure" { configuration = { dataset_name = "...my_dataset_name..." - format = "parquet" + format = "yaml" provider = { - sas_token = "...my_sas_token..." - shared_key = "...my_shared_key..." - storage = "AzBlob" - storage_account = "...my_storage_account..." + source_file_secure_storage_provider_az_blob_azure_blob_storage = { + sas_token = "...my_sas_token..." + shared_key = "...my_shared_key..." + storage = "AzBlob" + storage_account = "...my_storage_account..." + } } - reader_options = "{\"sep\": \"\t\", \"header\": 0, \"names\": [\"column1\", \"column2\"] }" + reader_options = "{}" source_type = "file-secure" - url = "https://storage.googleapis.com/covid19-open-data/v2/latest/epidemiology.csv" + url = "gs://my-google-bucket/data.csv" } - name = "Lucy Lind" - workspace_id = "77c1ffc7-1dca-4163-b2a3-c80a97ff334c" + name = "Miss Sheri Legros" + secret_id = "...my_secretId..." + workspace_id = "7ff334cd-df85-47a9-a618-76c6ab21d29d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_firebolt/resource.tf b/examples/resources/airbyte_source_firebolt/resource.tf index 6527dc643..ce5820ed4 100755 --- a/examples/resources/airbyte_source_firebolt/resource.tf +++ b/examples/resources/airbyte_source_firebolt/resource.tf @@ -8,6 +8,7 @@ resource "airbyte_source_firebolt" "my_source_firebolt" { source_type = "firebolt" username = "username@email.com" } - name = "Kayla Mertz" - workspace_id = "1876c6ab-21d2-49df-894d-6fecd7993900" + name = "Hector Yundt" + secret_id = "...my_secretId..." + workspace_id = "d7993900-66a6-4d2d-8003-55338cec086f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_freshcaller/resource.tf b/examples/resources/airbyte_source_freshcaller/resource.tf index 7008fd16e..8b3c2ddfa 100755 --- a/examples/resources/airbyte_source_freshcaller/resource.tf +++ b/examples/resources/airbyte_source_freshcaller/resource.tf @@ -2,11 +2,12 @@ resource "airbyte_source_freshcaller" "my_source_freshcaller" { configuration = { api_key = "...my_api_key..." domain = "snaptravel" - requests_per_minute = 4 + requests_per_minute = 7 source_type = "freshcaller" start_date = "2022-01-01T12:00:00Z" - sync_lag_minutes = 4 + sync_lag_minutes = 9 } - name = "Mr. Roy Stehr I" - workspace_id = "55338cec-086f-4a21-a915-2cb3119167b8" + name = "Keith Hills" + secret_id = "...my_secretId..." + workspace_id = "b3119167-b8e3-4c8d-b034-08d6d364ffd4" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_freshdesk/resource.tf b/examples/resources/airbyte_source_freshdesk/resource.tf index 6fe594779..3859d62c1 100755 --- a/examples/resources/airbyte_source_freshdesk/resource.tf +++ b/examples/resources/airbyte_source_freshdesk/resource.tf @@ -2,10 +2,11 @@ resource "airbyte_source_freshdesk" "my_source_freshdesk" { configuration = { api_key = "...my_api_key..." domain = "myaccount.freshdesk.com" - requests_per_minute = 9 + requests_per_minute = 3 source_type = "freshdesk" start_date = "2020-12-01T00:00:00Z" } - name = "Mrs. Gilberto Raynor" - workspace_id = "08d6d364-ffd4-4559-86d1-263d48e935c2" + name = "Mr. Tara Sporer" + secret_id = "...my_secretId..." + workspace_id = "3d48e935-c2c9-4e81-b30b-e3e43202d721" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_freshsales/resource.tf b/examples/resources/airbyte_source_freshsales/resource.tf index 0922236e3..e21ca7c01 100755 --- a/examples/resources/airbyte_source_freshsales/resource.tf +++ b/examples/resources/airbyte_source_freshsales/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_freshsales" "my_source_freshsales" { domain_name = "mydomain.myfreshworks.com" source_type = "freshsales" } - name = "Salvador Walter DVM" - workspace_id = "30be3e43-202d-4721-a576-506641870d9d" + name = "Geraldine Kling" + secret_id = "...my_secretId..." + workspace_id = "06641870-d9d2-41f9-ad03-0c4ecc11a083" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_freshservice/resource.tf b/examples/resources/airbyte_source_freshservice/resource.tf index e6de3b662..33c7827b1 100755 --- a/examples/resources/airbyte_source_freshservice/resource.tf +++ b/examples/resources/airbyte_source_freshservice/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_freshservice" "my_source_freshservice" { source_type = "freshservice" start_date = "2020-10-01T00:00:00Z" } - name = "Stephanie Wolf" - workspace_id = "d030c4ec-c11a-4083-a429-068b8502a55e" + name = "Anita Dare III" + secret_id = "...my_secretId..." + workspace_id = "8b8502a5-5e7f-473b-8845-e320a319f4ba" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_gcs/resource.tf b/examples/resources/airbyte_source_gcs/resource.tf index 13371e71f..6da3b53c3 100755 --- a/examples/resources/airbyte_source_gcs/resource.tf +++ b/examples/resources/airbyte_source_gcs/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_gcs" "my_source_gcs" { service_account = "{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }" source_type = "gcs" } - name = "Miranda Koelpin" - workspace_id = "c845e320-a319-4f4b-adf9-47c9a867bc42" + name = "Darin Mante" + secret_id = "...my_secretId..." + workspace_id = "c9a867bc-4242-4666-9816-ddca8ef51fcb" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_getlago/resource.tf b/examples/resources/airbyte_source_getlago/resource.tf index 4557699bc..a9e8d42f9 100755 --- a/examples/resources/airbyte_source_getlago/resource.tf +++ b/examples/resources/airbyte_source_getlago/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_getlago" "my_source_getlago" { api_key = "...my_api_key..." source_type = "getlago" } - name = "Jacqueline Jacobs" - workspace_id = "5816ddca-8ef5-41fc-b4c5-93ec12cdaad0" + name = "Myra Hills" + secret_id = "...my_secretId..." + workspace_id = "ec12cdaa-d0ec-47af-adbd-80df448a47f9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_github/resource.tf b/examples/resources/airbyte_source_github/resource.tf index eca70fd4b..10fc5170c 100755 --- a/examples/resources/airbyte_source_github/resource.tf +++ b/examples/resources/airbyte_source_github/resource.tf @@ -2,14 +2,17 @@ resource "airbyte_source_github" "my_source_github" { configuration = { branch = "airbytehq/airbyte/master airbytehq/airbyte/my-branch" credentials = { - access_token = "...my_access_token..." - option_title = "OAuth Credentials" + source_github_authentication_o_auth = { + access_token = "...my_access_token..." + option_title = "OAuth Credentials" + } } - repository = "airbytehq/airbyte" - requests_per_hour = 8 + repository = "airbytehq/airbyte airbytehq/another-repo" + requests_per_hour = 6 source_type = "github" start_date = "2021-03-01T00:00:00Z" } - name = "Bert Schultz" - workspace_id = "80df448a-47f9-4390-8588-80983dabf9ef" + name = "Brandy Kuvalis V" + secret_id = "...my_secretId..." + workspace_id = "83dabf9e-f3ff-4dd9-b7f0-79af4d35724c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_gitlab/resource.tf b/examples/resources/airbyte_source_gitlab/resource.tf index 49adec321..6fd19bb1e 100755 --- a/examples/resources/airbyte_source_gitlab/resource.tf +++ b/examples/resources/airbyte_source_gitlab/resource.tf @@ -2,18 +2,21 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { configuration = { api_url = "gitlab.com" credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-01-16T05:28:22.895Z" + source_gitlab_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2020-10-08T09:18:50.076Z" + } } groups = "airbyte.io" projects = "airbyte.io/documentation" source_type = "gitlab" start_date = "2021-03-01T00:00:00Z" } - name = "Arturo Wisoky" - workspace_id = "079af4d3-5724-4cdb-8f4d-281187d56844" + name = "Eula Daugherty Sr." + secret_id = "...my_secretId..." + workspace_id = "87d56844-eded-485a-9065-e628bdfc2032" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_glassfrog/resource.tf b/examples/resources/airbyte_source_glassfrog/resource.tf index 5f3612e60..6343b332a 100755 --- a/examples/resources/airbyte_source_glassfrog/resource.tf +++ b/examples/resources/airbyte_source_glassfrog/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_glassfrog" "my_source_glassfrog" { api_key = "...my_api_key..." source_type = "glassfrog" } - name = "Drew Waelchi" - workspace_id = "5a9065e6-28bd-4fc2-832b-6c879923b7e1" + name = "Hector Satterfield" + secret_id = "...my_secretId..." + workspace_id = "9923b7e1-3584-4f7a-a12c-6891f82ce115" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_gnews/resource.tf b/examples/resources/airbyte_source_gnews/resource.tf index 5e77060c1..836649941 100755 --- a/examples/resources/airbyte_source_gnews/resource.tf +++ b/examples/resources/airbyte_source_gnews/resource.tf @@ -1,22 +1,23 @@ resource "airbyte_source_gnews" "my_source_gnews" { configuration = { api_key = "...my_api_key..." - country = "de" + country = "nl" end_date = "2022-08-21 16:27:09" in = [ "title", ] - language = "ml" + language = "ja" nullable = [ "title", ] - query = "Intel AND (i7 OR i9)" + query = "Apple OR Microsoft" sortby = "publishedAt" source_type = "gnews" start_date = "2022-08-21 16:27:09" - top_headlines_query = "(Windows 7) AND (Windows 10)" - top_headlines_topic = "health" + top_headlines_query = "Apple OR Microsoft" + top_headlines_topic = "nation" } - name = "Lois Rutherford" - workspace_id = "91f82ce1-1571-4723-8537-7dcfa89df975" + name = "Allison Streich" + secret_id = "...my_secretId..." + workspace_id = "a89df975-e356-4686-892e-9c3ddc5f111d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_ads/resource.tf b/examples/resources/airbyte_source_google_ads/resource.tf index e30dfd506..f482859ce 100755 --- a/examples/resources/airbyte_source_google_ads/resource.tf +++ b/examples/resources/airbyte_source_google_ads/resource.tf @@ -20,6 +20,7 @@ resource "airbyte_source_google_ads" "my_source_googleads" { source_type = "google-ads" start_date = "2017-01-25" } - name = "Gilbert Bayer" - workspace_id = "e9c3ddc5-f111-4dea-9026-d541a4d190fe" + name = "Freda Hamill MD" + secret_id = "...my_secretId..." + workspace_id = "4d190feb-2178-40bc-8c0d-bbddb484708f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_analytics_data_api/resource.tf b/examples/resources/airbyte_source_google_analytics_data_api/resource.tf index be8a288ac..4659e4523 100755 --- a/examples/resources/airbyte_source_google_analytics_data_api/resource.tf +++ b/examples/resources/airbyte_source_google_analytics_data_api/resource.tf @@ -1,18 +1,21 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsdataapi" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_analytics_data_api_credentials_authenticate_via_google_oauth_ = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." - date_ranges_start_date = "2022-09-08" + date_ranges_start_date = "2022-05-22" property_id = "...my_property_id..." source_type = "google-analytics-data-api" - window_in_days = 30 + window_in_days = 364 } - name = "Jose Raynor" - workspace_id = "c0dbbddb-4847-408f-b4e3-91e6bc158c4c" + name = "Andrew Torphy" + secret_id = "...my_secretId..." + workspace_id = "c158c4c4-e545-499e-a342-260e9b200ce7" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_analytics_v4/resource.tf b/examples/resources/airbyte_source_google_analytics_v4/resource.tf index be72690a4..0736e2555 100755 --- a/examples/resources/airbyte_source_google_analytics_v4/resource.tf +++ b/examples/resources/airbyte_source_google_analytics_v4/resource.tf @@ -1,18 +1,21 @@ resource "airbyte_source_google_analytics_v4" "my_source_googleanalyticsv4" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_analytics_v4_credentials_authenticate_via_google_oauth_ = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." source_type = "google-analytics-v4" start_date = "2020-06-01" view_id = "...my_view_id..." - window_in_days = 60 + window_in_days = 120 } - name = "Carrie Haley" - workspace_id = "ea342260-e9b2-400c-a78a-1bd8fb7a0a11" + name = "Mamie Spinka" + secret_id = "...my_secretId..." + workspace_id = "b7a0a116-ce72-43d4-897f-a30e9af725b2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_directory/resource.tf b/examples/resources/airbyte_source_google_directory/resource.tf index e9d50f975..fa52392ff 100755 --- a/examples/resources/airbyte_source_google_directory/resource.tf +++ b/examples/resources/airbyte_source_google_directory/resource.tf @@ -1,9 +1,10 @@ resource "airbyte_source_google_directory" "my_source_googledirectory" { configuration = { credentials_json = "...my_credentials_json..." - email = "Niko.Torp@yahoo.com" + email = "Blaze0@yahoo.com" source_type = "google-directory" } - name = "Miss Elena Hahn" - workspace_id = "fa30e9af-725b-4291-a203-0d83f5aeb779" + name = "Elizabeth Stehr" + secret_id = "...my_secretId..." + workspace_id = "f5aeb779-9d22-4e8c-9f84-93825fdc42c8" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf b/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf index 74a6377cf..b7a509a0a 100755 --- a/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf +++ b/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf @@ -6,12 +6,13 @@ resource "airbyte_source_google_pagespeed_insights" "my_source_googlepagespeedin ] source_type = "google-pagespeed-insights" strategies = [ - "mobile", + "desktop", ] urls = [ "...", ] } - name = "Theresa Terry" - workspace_id = "1f849382-5fdc-442c-876c-2c2dfb4cfc1c" + name = "Jeremy Schiller" + secret_id = "...my_secretId..." + workspace_id = "fb4cfc1c-7623-40f8-81fb-1bd23fdb14db" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_search_console/resource.tf b/examples/resources/airbyte_source_google_search_console/resource.tf index 6ae12cb66..929c92712 100755 --- a/examples/resources/airbyte_source_google_search_console/resource.tf +++ b/examples/resources/airbyte_source_google_search_console/resource.tf @@ -1,11 +1,13 @@ resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" { configuration = { authorization = { - access_token = "...my_access_token..." - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_search_console_authentication_type_o_auth = { + access_token = "...my_access_token..." + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } custom_reports = "...my_custom_reports..." data_state = "final" @@ -16,6 +18,7 @@ resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" source_type = "google-search-console" start_date = "2021-01-01" } - name = "Johanna Lueilwitz DVM" - workspace_id = "b1bd23fd-b14d-4b6b-a5a6-85998e22ae20" + name = "Glen Larson" + secret_id = "...my_secretId..." + workspace_id = "98e22ae2-0da1-46fc-ab27-1a289c57e854" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_sheets/resource.tf b/examples/resources/airbyte_source_google_sheets/resource.tf index fc66cce61..6f9a426eb 100755 --- a/examples/resources/airbyte_source_google_sheets/resource.tf +++ b/examples/resources/airbyte_source_google_sheets/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_google_sheets" "my_source_googlesheets" { configuration = { credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_google_sheets_authentication_authenticate_via_google_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } - row_batch_size = 9 + row_batch_size = 10 source_type = "google-sheets" spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit" } - name = "Scott Johns" - workspace_id = "2b271a28-9c57-4e85-8e90-439d22246569" + name = "Jeffrey Gutmann" + secret_id = "...my_secretId..." + workspace_id = "d2224656-9462-4407-884f-7ab37cef0222" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_webfonts/resource.tf b/examples/resources/airbyte_source_google_webfonts/resource.tf index 53ae95c5a..8ce4167f0 100755 --- a/examples/resources/airbyte_source_google_webfonts/resource.tf +++ b/examples/resources/airbyte_source_google_webfonts/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_google_webfonts" "my_source_googlewebfonts" { sort = "...my_sort..." source_type = "google-webfonts" } - name = "Sue Cole IV" - workspace_id = "084f7ab3-7cef-4022-a519-4db55410adc6" + name = "Jean Mayert" + secret_id = "...my_secretId..." + workspace_id = "b55410ad-c669-4af9-8a26-c7cdc981f068" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_workspace_admin_reports/resource.tf b/examples/resources/airbyte_source_google_workspace_admin_reports/resource.tf index 69cd82089..918b2c3dc 100755 --- a/examples/resources/airbyte_source_google_workspace_admin_reports/resource.tf +++ b/examples/resources/airbyte_source_google_workspace_admin_reports/resource.tf @@ -1,10 +1,11 @@ resource "airbyte_source_google_workspace_admin_reports" "my_source_googleworkspaceadminreports" { configuration = { credentials_json = "...my_credentials_json..." - email = "Kian_Orn0@yahoo.com" + email = "Karlee.Berge73@yahoo.com" lookback = 7 source_type = "google-workspace-admin-reports" } - name = "Stacey Satterfield" - workspace_id = "dc981f06-8981-4d6b-b33c-faa348c31bf4" + name = "Sylvia Schimmel" + secret_id = "...my_secretId..." + workspace_id = "a348c31b-f407-4ee4-bcf0-c42b78f15626" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_greenhouse/resource.tf b/examples/resources/airbyte_source_greenhouse/resource.tf index 72e72d069..95fca79df 100755 --- a/examples/resources/airbyte_source_greenhouse/resource.tf +++ b/examples/resources/airbyte_source_greenhouse/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_greenhouse" "my_source_greenhouse" { api_key = "...my_api_key..." source_type = "greenhouse" } - name = "Dora Watsica" - workspace_id = "fcf0c42b-78f1-4562-a398-a0dc766324cc" + name = "Miriam Lowe PhD" + secret_id = "...my_secretId..." + workspace_id = "c766324c-cb06-4c8c-a12d-02529270b8d5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_gridly/resource.tf b/examples/resources/airbyte_source_gridly/resource.tf index 0fd3afad9..035989592 100755 --- a/examples/resources/airbyte_source_gridly/resource.tf +++ b/examples/resources/airbyte_source_gridly/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_gridly" "my_source_gridly" { grid_id = "...my_grid_id..." source_type = "gridly" } - name = "Edward Jast" - workspace_id = "ca12d025-2927-40b8-9572-2dd895b8bcf2" + name = "Theresa Collier" + secret_id = "...my_secretId..." + workspace_id = "895b8bcf-24db-4959-a933-52f74533994d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_harvest/resource.tf b/examples/resources/airbyte_source_harvest/resource.tf index 49bb8f257..6a09e9086 100755 --- a/examples/resources/airbyte_source_harvest/resource.tf +++ b/examples/resources/airbyte_source_harvest/resource.tf @@ -2,15 +2,18 @@ resource "airbyte_source_harvest" "my_source_harvest" { configuration = { account_id = "...my_account_id..." credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_harvest_authentication_mechanism_authenticate_via_harvest_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" source_type = "harvest" } - name = "Cora Hyatt" - workspace_id = "352f7453-3994-4d78-9e3b-6e9389f5abb7" + name = "Verna Kautzer" + secret_id = "...my_secretId..." + workspace_id = "389f5abb-7f66-4255-8a28-382ac483afd2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_hubplanner/resource.tf b/examples/resources/airbyte_source_hubplanner/resource.tf index 7c3ebfc62..1a1b7af50 100755 --- a/examples/resources/airbyte_source_hubplanner/resource.tf +++ b/examples/resources/airbyte_source_hubplanner/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_hubplanner" "my_source_hubplanner" { api_key = "...my_api_key..." source_type = "hubplanner" } - name = "Rafael Johns" - workspace_id = "50a28382-ac48-43af-9231-5bba650164e0" + name = "Stephanie Hansen" + secret_id = "...my_secretId..." + workspace_id = "a650164e-06f5-4bf6-ae59-1bc8bdef3612" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_hubspot/resource.tf b/examples/resources/airbyte_source_hubspot/resource.tf index c71d7affa..d7c53b18f 100755 --- a/examples/resources/airbyte_source_hubspot/resource.tf +++ b/examples/resources/airbyte_source_hubspot/resource.tf @@ -1,14 +1,17 @@ resource "airbyte_source_hubspot" "my_source_hubspot" { configuration = { credentials = { - client_id = "123456789000" - client_secret = "secret" - credentials_title = "OAuth Credentials" - refresh_token = "refresh_token" + source_hubspot_authentication_o_auth = { + client_id = "123456789000" + client_secret = "secret" + credentials_title = "OAuth Credentials" + refresh_token = "refresh_token" + } } source_type = "hubspot" start_date = "2017-01-25T00:00:00Z" } - name = "Yvette Zboncak" - workspace_id = "e591bc8b-def3-4612-b63c-205fda840774" + name = "Mrs. Sadie Dare" + secret_id = "...my_secretId..." + workspace_id = "da840774-a68a-49a3-9d08-6b6f66fef020" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_insightly/resource.tf b/examples/resources/airbyte_source_insightly/resource.tf index b785c0e89..95a83852a 100755 --- a/examples/resources/airbyte_source_insightly/resource.tf +++ b/examples/resources/airbyte_source_insightly/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_insightly" "my_source_insightly" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - name = "Elmer Lind" - workspace_id = "a35d086b-6f66-4fef-820e-9f443b4257b9" + name = "Eduardo Wolff" + secret_id = "...my_secretId..." + workspace_id = "3b4257b9-92c8-4dbd-a6a6-1efa2198258f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_instagram/resource.tf b/examples/resources/airbyte_source_instagram/resource.tf index 192907625..1385830a7 100755 --- a/examples/resources/airbyte_source_instagram/resource.tf +++ b/examples/resources/airbyte_source_instagram/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_instagram" "my_source_instagram" { source_type = "instagram" start_date = "2017-01-25T00:00:00Z" } - name = "Sidney Simonis" - workspace_id = "a6a61efa-2198-4258-bd0a-9eba47f7d3ef" + name = "Joey Upton" + secret_id = "...my_secretId..." + workspace_id = "47f7d3ef-0496-440d-aa18-31c87adf596f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_instatus/resource.tf b/examples/resources/airbyte_source_instatus/resource.tf index f93778013..24a36ec10 100755 --- a/examples/resources/airbyte_source_instatus/resource.tf +++ b/examples/resources/airbyte_source_instatus/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_instatus" "my_source_instatus" { api_key = "...my_api_key..." source_type = "instatus" } - name = "Bertha Marks" - workspace_id = "0d6a1831-c87a-4df5-96fd-f1ad837ae80c" + name = "Winston Bergstrom" + secret_id = "...my_secretId..." + workspace_id = "837ae80c-1c19-4c95-ba99-8678fa3f6969" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_intercom/resource.tf b/examples/resources/airbyte_source_intercom/resource.tf index 5a427277c..a3e4041e7 100755 --- a/examples/resources/airbyte_source_intercom/resource.tf +++ b/examples/resources/airbyte_source_intercom/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_intercom" "my_source_intercom" { source_type = "intercom" start_date = "2020-11-16T00:00:00Z" } - name = "Bobbie Rosenbaum" - workspace_id = "ba998678-fa3f-4696-991a-f388ce036144" + name = "Randal Fadel" + secret_id = "...my_secretId..." + workspace_id = "ce036144-48c7-4977-a0ef-2f536028efee" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_ip2whois/resource.tf b/examples/resources/airbyte_source_ip2whois/resource.tf index c33d0e526..f633ee184 100755 --- a/examples/resources/airbyte_source_ip2whois/resource.tf +++ b/examples/resources/airbyte_source_ip2whois/resource.tf @@ -1,9 +1,10 @@ resource "airbyte_source_ip2whois" "my_source_ip2whois" { configuration = { api_key = "...my_api_key..." - domain = "www.google.com" + domain = "www.facebook.com" source_type = "ip2whois" } - name = "Sylvester Kling" - workspace_id = "7a0ef2f5-3602-48ef-aef9-34152ed7e253" + name = "Mrs. Travis Gutmann" + secret_id = "...my_secretId..." + workspace_id = "ed7e253f-4c15-47de-aa71-70f445accf66" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_iterable/resource.tf b/examples/resources/airbyte_source_iterable/resource.tf index 8e9422994..9e24cc197 100755 --- a/examples/resources/airbyte_source_iterable/resource.tf +++ b/examples/resources/airbyte_source_iterable/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_iterable" "my_source_iterable" { source_type = "iterable" start_date = "2021-04-01T00:00:00Z" } - name = "Ralph Hermann" - workspace_id = "eaa7170f-445a-4ccf-a67a-af9bbad185fe" + name = "Emanuel McKenzie" + secret_id = "...my_secretId..." + workspace_id = "ad185fe4-31d6-4bf5-8838-fbb8c20cb67f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_jira/resource.tf b/examples/resources/airbyte_source_jira/resource.tf index 5383f8a4b..04aad9d21 100755 --- a/examples/resources/airbyte_source_jira/resource.tf +++ b/examples/resources/airbyte_source_jira/resource.tf @@ -1,17 +1,18 @@ resource "airbyte_source_jira" "my_source_jira" { configuration = { api_token = "...my_api_token..." - domain = ".atlassian.net" - email = "Annabelle_Sporer@gmail.com" - enable_experimental_streams = false - expand_issue_changelog = true + domain = "jira..com" + email = "Michele33@gmail.com" + enable_experimental_streams = true + expand_issue_changelog = false projects = [ "...", ] - render_fields = true + render_fields = false source_type = "jira" start_date = "2021-03-01T00:00:00Z" } - name = "Emilio Ratke" - workspace_id = "c20cb67f-c4b4-425e-99e6-234c9f7b79df" + name = "Grace Goyette" + secret_id = "...my_secretId..." + workspace_id = "f7b79dfe-b77a-45c3-8d4b-af91e506ef89" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_k6_cloud/resource.tf b/examples/resources/airbyte_source_k6_cloud/resource.tf index 9f86a9bdf..8b08fce26 100755 --- a/examples/resources/airbyte_source_k6_cloud/resource.tf +++ b/examples/resources/airbyte_source_k6_cloud/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_k6_cloud" "my_source_k6cloud" { api_token = "...my_api_token..." source_type = "k6-cloud" } - name = "Rudolph Kshlerin" - workspace_id = "5c38d4ba-f91e-4506-af89-0a54b475f16f" + name = "Lee Hegmann" + secret_id = "...my_secretId..." + workspace_id = "475f16f5-6d38-45a3-84ac-631b99e26ced" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_klarna/resource.tf b/examples/resources/airbyte_source_klarna/resource.tf index 6b646b546..1c14ad195 100755 --- a/examples/resources/airbyte_source_klarna/resource.tf +++ b/examples/resources/airbyte_source_klarna/resource.tf @@ -1,11 +1,12 @@ resource "airbyte_source_klarna" "my_source_klarna" { configuration = { password = "...my_password..." - playground = false - region = "us" + playground = true + region = "oc" source_type = "klarna" - username = "Reina.Dooley" + username = "Lillian_Williamson56" } - name = "Earl Schoen" - workspace_id = "c631b99e-26ce-4d8f-9fdb-9410f63bbf81" + name = "Catherine Bashirian" + secret_id = "...my_secretId..." + workspace_id = "3bbf8178-37b0-41af-9d78-8624189eb448" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_klaviyo/resource.tf b/examples/resources/airbyte_source_klaviyo/resource.tf index e2da94bf0..f06bf8c2c 100755 --- a/examples/resources/airbyte_source_klaviyo/resource.tf +++ b/examples/resources/airbyte_source_klaviyo/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_klaviyo" "my_source_klaviyo" { source_type = "klaviyo" start_date = "2017-01-25T00:00:00Z" } - name = "Mr. Nellie Reichert" - workspace_id = "fdd78862-4189-4eb4-8873-f5033f19dbf1" + name = "Alvin Bartoletti" + secret_id = "...my_secretId..." + workspace_id = "f19dbf12-5ce4-4152-aab9-cd7e5224a6a0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_kustomer_singer/resource.tf b/examples/resources/airbyte_source_kustomer_singer/resource.tf index 1e35702dc..6c48d8221 100755 --- a/examples/resources/airbyte_source_kustomer_singer/resource.tf +++ b/examples/resources/airbyte_source_kustomer_singer/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_kustomer_singer" "my_source_kustomersinger" { source_type = "kustomer-singer" start_date = "2019-01-01T00:00:00Z" } - name = "Vivian Rolfson" - workspace_id = "152eab9c-d7e5-4224-a6a0-e123b7847ec5" + name = "Andrew Cassin" + secret_id = "...my_secretId..." + workspace_id = "7847ec59-e1f6-47f3-84cc-e4b6d7696ff3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_launchdarkly/resource.tf b/examples/resources/airbyte_source_launchdarkly/resource.tf index 975e245df..696ce7208 100755 --- a/examples/resources/airbyte_source_launchdarkly/resource.tf +++ b/examples/resources/airbyte_source_launchdarkly/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_launchdarkly" "my_source_launchdarkly" { access_token = "...my_access_token..." source_type = "launchdarkly" } - name = "Rolando Brakus" - workspace_id = "7f3c4cce-4b6d-4769-aff3-c5747501357e" + name = "Pedro Kovacek" + secret_id = "...my_secretId..." + workspace_id = "501357e4-4f51-4f8b-884c-3197e193a245" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_lemlist/resource.tf b/examples/resources/airbyte_source_lemlist/resource.tf index 6b65023f3..72c6ff318 100755 --- a/examples/resources/airbyte_source_lemlist/resource.tf +++ b/examples/resources/airbyte_source_lemlist/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_lemlist" "my_source_lemlist" { api_key = "...my_api_key..." source_type = "lemlist" } - name = "Danielle Wunsch DVM" - workspace_id = "8b084c31-97e1-493a-a454-67f94874c2d5" + name = "Jeanette Kutch" + secret_id = "...my_secretId..." + workspace_id = "4874c2d5-cc49-4722-b3e6-6bd8fe5d00b9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_linkedin_ads/resource.tf b/examples/resources/airbyte_source_linkedin_ads/resource.tf index 180c01e77..91f9f871e 100755 --- a/examples/resources/airbyte_source_linkedin_ads/resource.tf +++ b/examples/resources/airbyte_source_linkedin_ads/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { configuration = { account_ids = [ - 8, + 5, ] credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_linkedin_ads_authentication_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } source_type = "linkedin-ads" start_date = "2021-05-17" } - name = "Kelly Deckow" - workspace_id = "3e66bd8f-e5d0-40b9-b9ef-20387320590c" + name = "Martin Bahringer" + secret_id = "...my_secretId..." + workspace_id = "7320590c-cc10-4964-8031-3b3e5044f65f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_linkedin_pages/resource.tf b/examples/resources/airbyte_source_linkedin_pages/resource.tf index 8b2e6939b..fa0e5556b 100755 --- a/examples/resources/airbyte_source_linkedin_pages/resource.tf +++ b/examples/resources/airbyte_source_linkedin_pages/resource.tf @@ -1,12 +1,15 @@ resource "airbyte_source_linkedin_pages" "my_source_linkedinpages" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_linkedin_pages_authentication_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } org_id = "123456789" source_type = "linkedin-pages" } - name = "Ms. Garrett Bradtke" - workspace_id = "400313b3-e504-44f6-9fe7-2dc4077d0cc3" + name = "Mitchell Davis" + secret_id = "...my_secretId..." + workspace_id = "4077d0cc-3f40-48ef-815c-eb4d6e1eae0f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_linnworks/resource.tf b/examples/resources/airbyte_source_linnworks/resource.tf index 9da26f096..1ac81dcf7 100755 --- a/examples/resources/airbyte_source_linnworks/resource.tf +++ b/examples/resources/airbyte_source_linnworks/resource.tf @@ -3,9 +3,10 @@ resource "airbyte_source_linnworks" "my_source_linnworks" { application_id = "...my_application_id..." application_secret = "...my_application_secret..." source_type = "linnworks" - start_date = "2022-03-30T06:35:02.930Z" + start_date = "2022-09-01T15:55:01.348Z" token = "...my_token..." } - name = "Carole Watsica" - workspace_id = "15ceb4d6-e1ea-4e0f-b5ae-df2acab58b99" + name = "Percy Schuster" + secret_id = "...my_secretId..." + workspace_id = "acab58b9-91c9-426d-9b58-9461e7421cbe" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_lokalise/resource.tf b/examples/resources/airbyte_source_lokalise/resource.tf index 6f4c935e6..c2de233b2 100755 --- a/examples/resources/airbyte_source_lokalise/resource.tf +++ b/examples/resources/airbyte_source_lokalise/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_lokalise" "my_source_lokalise" { project_id = "...my_project_id..." source_type = "lokalise" } - name = "Adrienne Mills" - workspace_id = "ddb58946-1e74-421c-be6d-9502f0ea930b" + name = "Marcella McKenzie Sr." + secret_id = "...my_secretId..." + workspace_id = "f0ea930b-69f7-4ac2-b72f-885009049116" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mailchimp/resource.tf b/examples/resources/airbyte_source_mailchimp/resource.tf index de2908e60..61d87bf1e 100755 --- a/examples/resources/airbyte_source_mailchimp/resource.tf +++ b/examples/resources/airbyte_source_mailchimp/resource.tf @@ -2,11 +2,14 @@ resource "airbyte_source_mailchimp" "my_source_mailchimp" { configuration = { campaign_id = "...my_campaign_id..." credentials = { - apikey = "...my_apikey..." - auth_type = "apikey" + source_mailchimp_authentication_api_key = { + apikey = "...my_apikey..." + auth_type = "apikey" + } } source_type = "mailchimp" } - name = "Bobbie Wolff" - workspace_id = "c2f72f88-5009-4049-9160-8207888ec661" + name = "Ms. Tracey D'Amore" + secret_id = "...my_secretId..." + workspace_id = "88ec6618-3bfe-4965-9eb4-0ec16faf75b0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mailgun/resource.tf b/examples/resources/airbyte_source_mailgun/resource.tf index 1b65b665e..ca4305bfc 100755 --- a/examples/resources/airbyte_source_mailgun/resource.tf +++ b/examples/resources/airbyte_source_mailgun/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_mailgun" "my_source_mailgun" { source_type = "mailgun" start_date = "2020-10-01 00:00:00" } - name = "Irvin Treutel" - workspace_id = "59eb40ec-16fa-4f75-b0b5-32a4da37cbaa" + name = "Lois Ondricka" + secret_id = "...my_secretId..." + workspace_id = "a37cbaaf-4452-4c48-82c9-b2ad32dafe81" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mailjet_sms/resource.tf b/examples/resources/airbyte_source_mailjet_sms/resource.tf index 10ba1361a..cbade949d 100755 --- a/examples/resources/airbyte_source_mailjet_sms/resource.tf +++ b/examples/resources/airbyte_source_mailjet_sms/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_mailjet_sms" "my_source_mailjetsms" { start_date = 1666261656 token = "...my_token..." } - name = "Lauren Cremin" - workspace_id = "842c9b2a-d32d-4afe-81a8-8f4444573fec" + name = "Darrin Graham" + secret_id = "...my_secretId..." + workspace_id = "4573fecd-4735-43f6-bc82-09379aa69cd5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_marketo/resource.tf b/examples/resources/airbyte_source_marketo/resource.tf index a0df253d3..5385c592d 100755 --- a/examples/resources/airbyte_source_marketo/resource.tf +++ b/examples/resources/airbyte_source_marketo/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_marketo" "my_source_marketo" { source_type = "marketo" start_date = "2020-09-25T00:00:00Z" } - name = "Victoria Hilll" - workspace_id = "63c82093-79aa-469c-95fb-cf79da18a782" + name = "Darrin Kohler" + secret_id = "...my_secretId..." + workspace_id = "a18a7822-bf95-4894-a686-1adb55f9e5d7" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_metabase/resource.tf b/examples/resources/airbyte_source_metabase/resource.tf index e44914b56..2521ed679 100755 --- a/examples/resources/airbyte_source_metabase/resource.tf +++ b/examples/resources/airbyte_source_metabase/resource.tf @@ -4,8 +4,9 @@ resource "airbyte_source_metabase" "my_source_metabase" { password = "...my_password..." session_token = "...my_session_token..." source_type = "metabase" - username = "Chasity_Pfeffer33" + username = "Flavio_Bode98" } - name = "Nick Haag" - workspace_id = "861adb55-f9e5-4d75-9c9f-e8f7502bfdc3" + name = "Wallace Wilderman" + secret_id = "...my_secretId..." + workspace_id = "02bfdc34-5084-41f1-b644-56379f3fb27e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_microsoft_teams/resource.tf b/examples/resources/airbyte_source_microsoft_teams/resource.tf index 6ec375b27..e00b19733 100755 --- a/examples/resources/airbyte_source_microsoft_teams/resource.tf +++ b/examples/resources/airbyte_source_microsoft_teams/resource.tf @@ -1,14 +1,17 @@ resource "airbyte_source_microsoft_teams" "my_source_microsoftteams" { configuration = { credentials = { - auth_type = "Token" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - tenant_id = "...my_tenant_id..." + source_microsoft_teams_authentication_mechanism_authenticate_via_microsoft = { + auth_type = "Token" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + tenant_id = "...my_tenant_id..." + } } period = "D7" source_type = "microsoft-teams" } - name = "Veronica Abshire" - workspace_id = "1f176445-6379-4f3f-b27e-21f862657b36" + name = "Stephanie Yundt" + secret_id = "...my_secretId..." + workspace_id = "2657b36f-c6b9-4f58-bce5-25c67641a831" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mixpanel/resource.tf b/examples/resources/airbyte_source_mixpanel/resource.tf index 73ed19efa..dd4f8a6ee 100755 --- a/examples/resources/airbyte_source_mixpanel/resource.tf +++ b/examples/resources/airbyte_source_mixpanel/resource.tf @@ -1,19 +1,22 @@ resource "airbyte_source_mixpanel" "my_source_mixpanel" { configuration = { - attribution_window = 10 + attribution_window = 1 credentials = { - api_secret = "...my_api_secret..." - option_title = "Project Secret" + source_mixpanel_authentication_wildcard_project_secret = { + api_secret = "...my_api_secret..." + option_title = "Project Secret" + } } - date_window_size = 8 + date_window_size = 9 end_date = "2021-11-16" - project_id = 6 - project_timezone = "UTC" - region = "US" + project_id = 3 + project_timezone = "US/Pacific" + region = "EU" select_properties_by_default = true source_type = "mixpanel" start_date = "2021-11-16" } - name = "Leon Cummings" - workspace_id = "67641a83-12e5-4047-b4c2-1ccb423abcdc" + name = "Robyn Runte" + secret_id = "...my_secretId..." + workspace_id = "23abcdc9-1faa-4bdd-88e7-1f6c48252d77" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_monday/resource.tf b/examples/resources/airbyte_source_monday/resource.tf index b9a94a3e1..d6a3ef12d 100755 --- a/examples/resources/airbyte_source_monday/resource.tf +++ b/examples/resources/airbyte_source_monday/resource.tf @@ -1,11 +1,14 @@ resource "airbyte_source_monday" "my_source_monday" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" + source_monday_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + } } source_type = "monday" } - name = "Carl Weimann" - workspace_id = "bdd88e71-f6c4-4825-ad77-71e7fd074009" + name = "Frances Vandervort" + secret_id = "...my_secretId..." + workspace_id = "d074009e-f8d2-49de-9dd7-097b5da08c57" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mongodb/resource.tf b/examples/resources/airbyte_source_mongodb/resource.tf index e7fc1205b..2a91733b0 100755 --- a/examples/resources/airbyte_source_mongodb/resource.tf +++ b/examples/resources/airbyte_source_mongodb/resource.tf @@ -3,13 +3,16 @@ resource "airbyte_source_mongodb" "my_source_mongodb" { auth_source = "admin" database = "...my_database..." instance_type = { - cluster_url = "...my_cluster_url..." - instance = "atlas" + source_mongodb_mongo_db_instance_type_mongo_db_atlas = { + cluster_url = "...my_cluster_url..." + instance = "atlas" + } } password = "...my_password..." source_type = "mongodb" user = "...my_user..." } - name = "Emanuel Lemke" - workspace_id = "9de1dd70-97b5-4da0-8c57-fa6c78a216e1" + name = "Alfonso Keeling" + secret_id = "...my_secretId..." + workspace_id = "8a216e19-bafe-4ca6-9914-98140b64ff8a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mssql/resource.tf b/examples/resources/airbyte_source_mssql/resource.tf index dad8da6a6..c3881ad60 100755 --- a/examples/resources/airbyte_source_mssql/resource.tf +++ b/examples/resources/airbyte_source_mssql/resource.tf @@ -6,23 +6,30 @@ resource "airbyte_source_mssql" "my_source_mssql" { password = "...my_password..." port = 1433 replication_method = { - data_to_sync = "New Changes Only" - initial_waiting_seconds = 7 - method = "CDC" - snapshot_isolation = "Read Committed" + source_mssql_replication_method_logical_replication_cdc_ = { + data_to_sync = "Existing and New" + initial_waiting_seconds = 4 + method = "CDC" + snapshot_isolation = "Snapshot" + } } schemas = [ "...", ] source_type = "mssql" ssl_method = { - ssl_method = "encrypted_trust_server_certificate" + source_mssql_ssl_method_encrypted_trust_server_certificate_ = { + ssl_method = "encrypted_trust_server_certificate" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_mssql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Theresa.Schinner" + username = "Tomas22" } - name = "Mae Boehm" - workspace_id = "8140b64f-f8ae-4170-af03-b5f37e4aa868" + name = "Jon Wilkinson" + secret_id = "...my_secretId..." + workspace_id = "e4aa8685-5596-4673-aaa5-dcb6682cb70f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_my_hours/resource.tf b/examples/resources/airbyte_source_my_hours/resource.tf index 52f2852a9..76fe39982 100755 --- a/examples/resources/airbyte_source_my_hours/resource.tf +++ b/examples/resources/airbyte_source_my_hours/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_my_hours" "my_source_myhours" { source_type = "my-hours" start_date = "%Y-%m-%d" } - name = "Sara O'Kon" - workspace_id = "dcb6682c-b70f-48cf-95fb-6e91b9a9f748" + name = "Tracy Buckridge" + secret_id = "...my_secretId..." + workspace_id = "a9f74846-e2c3-4309-9b05-36d9e75ca006" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mysql/resource.tf b/examples/resources/airbyte_source_mysql/resource.tf index 10cbe93b7..0d00c7cb4 100755 --- a/examples/resources/airbyte_source_mysql/resource.tf +++ b/examples/resources/airbyte_source_mysql/resource.tf @@ -6,19 +6,26 @@ resource "airbyte_source_mysql" "my_source_mysql" { password = "...my_password..." port = 3306 replication_method = { - initial_waiting_seconds = 4 - method = "CDC" - server_time_zone = "...my_server_time_zone..." + source_mysql_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 3 + method = "CDC" + server_time_zone = "...my_server_time_zone..." + } } source_type = "mysql" ssl_mode = { - mode = "preferred" + source_mysql_ssl_modes_preferred = { + mode = "preferred" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_mysql_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Terrence.Collins20" + username = "Coty77" } - name = "Velma Sipes II" - workspace_id = "36d9e75c-a006-4f53-92c1-1a25a8bf92f9" + name = "Debra Ortiz" + secret_id = "...my_secretId..." + workspace_id = "a8bf92f9-7428-4ad9-a9f8-bf8221125359" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_netsuite/resource.tf b/examples/resources/airbyte_source_netsuite/resource.tf index 5f86b046e..9819ab77c 100755 --- a/examples/resources/airbyte_source_netsuite/resource.tf +++ b/examples/resources/airbyte_source_netsuite/resource.tf @@ -10,8 +10,9 @@ resource "airbyte_source_netsuite" "my_source_netsuite" { start_datetime = "2017-01-25T00:00:00Z" token_key = "...my_token_key..." token_secret = "...my_token_secret..." - window_in_days = 5 + window_in_days = 9 } - name = "Judy MacGyver" - workspace_id = "9a9f8bf8-2211-4253-99d9-8387f7a79cd7" + name = "Guy Feest" + secret_id = "...my_secretId..." + workspace_id = "f7a79cd7-2cd2-4484-9a21-729f2ac41ef5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_notion/resource.tf b/examples/resources/airbyte_source_notion/resource.tf index 0b450b373..66b60e18f 100755 --- a/examples/resources/airbyte_source_notion/resource.tf +++ b/examples/resources/airbyte_source_notion/resource.tf @@ -1,12 +1,15 @@ resource "airbyte_source_notion" "my_source_notion" { configuration = { credentials = { - auth_type = "token" - token = "...my_token..." + source_notion_authenticate_using_access_token = { + auth_type = "token" + token = "...my_token..." + } } source_type = "notion" start_date = "2020-11-16T00:00:00.000Z" } - name = "Victor Gleason" - workspace_id = "da21729f-2ac4-41ef-9725-f1169ac1e41d" + name = "Ms. Elisa Carroll" + secret_id = "...my_secretId..." + workspace_id = "ac1e41d8-a23c-423e-b4f2-dfa4a197f6de" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_nytimes/resource.tf b/examples/resources/airbyte_source_nytimes/resource.tf index c650782b1..a6eee1770 100755 --- a/examples/resources/airbyte_source_nytimes/resource.tf +++ b/examples/resources/airbyte_source_nytimes/resource.tf @@ -5,8 +5,9 @@ resource "airbyte_source_nytimes" "my_source_nytimes" { period = "1" share_type = "facebook" source_type = "nytimes" - start_date = "1851-01" + start_date = "2022-08" } - name = "Allen Grant" - workspace_id = "dfa4a197-f6de-4922-951f-e1712099853e" + name = "Mr. Willie Kirlin V" + secret_id = "...my_secretId..." + workspace_id = "9853e9f5-43d8-4544-b9ee-224460443bc1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_okta/resource.tf b/examples/resources/airbyte_source_okta/resource.tf index 16a53a042..cf44b5fb3 100755 --- a/examples/resources/airbyte_source_okta/resource.tf +++ b/examples/resources/airbyte_source_okta/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_okta" "my_source_okta" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" + source_okta_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + } } domain = "...my_domain..." source_type = "okta" start_date = "2022-07-22T00:00:00Z" } - name = "Dominick Hayes" - workspace_id = "d854439e-e224-4460-843b-c154188c2f56" + name = "Danielle Bruen" + secret_id = "...my_secretId..." + workspace_id = "c2f56e85-da78-432e-abd6-17c3b0d51a44" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_omnisend/resource.tf b/examples/resources/airbyte_source_omnisend/resource.tf index fb8afba05..11b59faea 100755 --- a/examples/resources/airbyte_source_omnisend/resource.tf +++ b/examples/resources/airbyte_source_omnisend/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_omnisend" "my_source_omnisend" { api_key = "...my_api_key..." source_type = "omnisend" } - name = "Everett Hills" - workspace_id = "7832eabd-617c-43b0-951a-44bf01bad870" + name = "Miss Domingo Bahringer" + secret_id = "...my_secretId..." + workspace_id = "d8706d46-082b-4fbd-841f-f5d4e2ae4fb5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_onesignal/resource.tf b/examples/resources/airbyte_source_onesignal/resource.tf index 890c91b27..c1ed4c597 100755 --- a/examples/resources/airbyte_source_onesignal/resource.tf +++ b/examples/resources/airbyte_source_onesignal/resource.tf @@ -12,6 +12,7 @@ resource "airbyte_source_onesignal" "my_source_onesignal" { start_date = "2020-11-16T00:00:00Z" user_auth_key = "...my_user_auth_key..." } - name = "Rosemary Abshire" - workspace_id = "bfbdc41f-f5d4-4e2a-a4fb-5cb35d17638f" + name = "Ms. Regina Steuber" + secret_id = "...my_secretId..." + workspace_id = "38f1edb7-8359-4ecc-9cb8-60f8cd580ba7" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_openweather/resource.tf b/examples/resources/airbyte_source_openweather/resource.tf index 4d8b93080..2f91f983e 100755 --- a/examples/resources/airbyte_source_openweather/resource.tf +++ b/examples/resources/airbyte_source_openweather/resource.tf @@ -1,12 +1,13 @@ resource "airbyte_source_openweather" "my_source_openweather" { configuration = { appid = "...my_appid..." - lang = "en" + lang = "fr" lat = "-21.249107858038816" - lon = "-70.39482074115321" + lon = "4.835659" source_type = "openweather" - units = "imperial" + units = "standard" } - name = "Penny Feest" - workspace_id = "ecc5cb86-0f8c-4d58-8ba7-3810e4fe4447" + name = "Alex Zulauf" + secret_id = "...my_secretId..." + workspace_id = "447297cd-3b1d-4d3b-bce2-47b7684eff50" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_oracle/resource.tf b/examples/resources/airbyte_source_oracle/resource.tf index 723a32c22..a78a3f713 100755 --- a/examples/resources/airbyte_source_oracle/resource.tf +++ b/examples/resources/airbyte_source_oracle/resource.tf @@ -1,26 +1,33 @@ resource "airbyte_source_oracle" "my_source_oracle" { configuration = { connection_data = { - connection_type = "service_name" - service_name = "...my_service_name..." + source_oracle_connect_by_service_name = { + connection_type = "service_name" + service_name = "...my_service_name..." + } } encryption = { - encryption_algorithm = "AES256" - encryption_method = "client_nne" + source_oracle_encryption_native_network_encryption_nne_ = { + encryption_algorithm = "AES256" + encryption_method = "client_nne" + } } host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." - port = 6 + port = 2 schemas = [ "...", ] source_type = "oracle" tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_oracle_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Jada.Runolfsson70" + username = "Gilda.Spencer" } - name = "Angel Stokes" - workspace_id = "bce247b7-684e-4ff5-8126-d71cffbd0eb7" + name = "Courtney Wiegand" + secret_id = "...my_secretId..." + workspace_id = "0eb74b84-2195-43b4-8bd3-c43159d33e59" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_orb/resource.tf b/examples/resources/airbyte_source_orb/resource.tf index 49b1497cd..18fc8a6f6 100755 --- a/examples/resources/airbyte_source_orb/resource.tf +++ b/examples/resources/airbyte_source_orb/resource.tf @@ -13,6 +13,7 @@ resource "airbyte_source_orb" "my_source_orb" { ] subscription_usage_grouping_key = "...my_subscription_usage_grouping_key..." } - name = "Nelson Hagenes V" - workspace_id = "53b44bd3-c431-459d-b3e5-953c00113986" + name = "Mr. Traci Adams I" + secret_id = "...my_secretId..." + workspace_id = "9863aa41-e6c3-41cc-af1f-cb51c9a41ffb" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_orbit/resource.tf b/examples/resources/airbyte_source_orbit/resource.tf index d554300ee..600ab14cf 100755 --- a/examples/resources/airbyte_source_orbit/resource.tf +++ b/examples/resources/airbyte_source_orbit/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_orbit" "my_source_orbit" { start_date = "...my_start_date..." workspace = "...my_workspace..." } - name = "Molly Parker DVM" - workspace_id = "6c31cc2f-1fcb-451c-9a41-ffbe9cbd795e" + name = "Jackie Schmitt" + secret_id = "...my_secretId..." + workspace_id = "795ee65e-076c-4c7a-bf61-6ea5c7164193" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_outreach/resource.tf b/examples/resources/airbyte_source_outreach/resource.tf index 3dfcb9aff..8ef120dd2 100755 --- a/examples/resources/airbyte_source_outreach/resource.tf +++ b/examples/resources/airbyte_source_outreach/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_outreach" "my_source_outreach" { source_type = "outreach" start_date = "2020-11-16T00:00:00Z" } - name = "Leslie Hartmann IV" - workspace_id = "6cc7abf6-16ea-45c7-9641-934b90f2e09d" + name = "Dr. Latoya McClure" + secret_id = "...my_secretId..." + workspace_id = "e09d19d2-fc2f-49e2-a105-944b935d237a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_paypal_transaction/resource.tf b/examples/resources/airbyte_source_paypal_transaction/resource.tf index 871f42823..b970604c5 100755 --- a/examples/resources/airbyte_source_paypal_transaction/resource.tf +++ b/examples/resources/airbyte_source_paypal_transaction/resource.tf @@ -5,8 +5,9 @@ resource "airbyte_source_paypal_transaction" "my_source_paypaltransaction" { is_sandbox = true refresh_token = "...my_refresh_token..." source_type = "paypal-transaction" - start_date = "2021-06-11T23:59:59+00:00" + start_date = "2021-06-11T23:59:59" } - name = "Rodolfo Champlin" - workspace_id = "e2e10594-4b93-45d2-b7a7-2f90849d6aed" + name = "Mattie Gutkowski" + secret_id = "...my_secretId..." + workspace_id = "6aed4aec-b753-47cd-9222-c9ff57491aab" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_paystack/resource.tf b/examples/resources/airbyte_source_paystack/resource.tf index e59a73b45..7b8d616fe 100755 --- a/examples/resources/airbyte_source_paystack/resource.tf +++ b/examples/resources/airbyte_source_paystack/resource.tf @@ -1,10 +1,11 @@ resource "airbyte_source_paystack" "my_source_paystack" { configuration = { - lookback_window_days = 3 + lookback_window_days = 10 secret_key = "...my_secret_key..." source_type = "paystack" start_date = "2017-01-25T00:00:00Z" } - name = "Dominic Kunde" - workspace_id = "7cd9222c-9ff5-4749-9aab-fa2e761f0ca4" + name = "Dr. Darren Kemmer DDS" + secret_id = "...my_secretId..." + workspace_id = "a4d456ef-1031-4e68-99f0-c2001e22cd55" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pendo/resource.tf b/examples/resources/airbyte_source_pendo/resource.tf index 31ba2cb15..add78635b 100755 --- a/examples/resources/airbyte_source_pendo/resource.tf +++ b/examples/resources/airbyte_source_pendo/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_pendo" "my_source_pendo" { api_key = "...my_api_key..." source_type = "pendo" } - name = "Francisco Hauck" - workspace_id = "f1031e68-99f0-4c20-81e2-2cd55cc0584a" + name = "Forrest Abshire" + secret_id = "...my_secretId..." + workspace_id = "4a184d76-d971-4fc8-a0c6-5b037bb8e0cc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_persistiq/resource.tf b/examples/resources/airbyte_source_persistiq/resource.tf index 51eefd515..39e5abc66 100755 --- a/examples/resources/airbyte_source_persistiq/resource.tf +++ b/examples/resources/airbyte_source_persistiq/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_persistiq" "my_source_persistiq" { api_key = "...my_api_key..." source_type = "persistiq" } - name = "Lena Goyette" - workspace_id = "6d971fc8-20c6-45b0-b7bb-8e0cc885187e" + name = "Ms. Daryl Hermiston" + secret_id = "...my_secretId..." + workspace_id = "e4de04af-28c5-4ddd-b46a-a1cfd6d828da" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pexels_api/resource.tf b/examples/resources/airbyte_source_pexels_api/resource.tf index 4a9a7a2fd..b9d45604a 100755 --- a/examples/resources/airbyte_source_pexels_api/resource.tf +++ b/examples/resources/airbyte_source_pexels_api/resource.tf @@ -2,12 +2,13 @@ resource "airbyte_source_pexels_api" "my_source_pexelsapi" { configuration = { api_key = "...my_api_key..." color = "red" - locale = "pt-BR" - orientation = "landscape" + locale = "en-US" + orientation = "square" query = "people" - size = "large" + size = "small" source_type = "pexels-api" } - name = "Terrell Cremin" - workspace_id = "5dddb46a-a1cf-4d6d-828d-a01319112964" + name = "Jean Denesik" + secret_id = "...my_secretId..." + workspace_id = "46645c1d-81f2-4904-af56-9b7aff0ea221" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pinterest/resource.tf b/examples/resources/airbyte_source_pinterest/resource.tf index b0e8b9aee..2762ca293 100755 --- a/examples/resources/airbyte_source_pinterest/resource.tf +++ b/examples/resources/airbyte_source_pinterest/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_pinterest" "my_source_pinterest" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_method = "access_token" + source_pinterest_authorization_method_access_token = { + access_token = "...my_access_token..." + auth_method = "access_token" + } } source_type = "pinterest" start_date = "2022-07-28" status = [ - "ACTIVE", + "ARCHIVED", ] } - name = "Myra Bernier" - workspace_id = "1f29042f-569b-47af-b0ea-2216cbe071bc" + name = "Miss Larry Kunde" + secret_id = "...my_secretId..." + workspace_id = "163e279a-3b08-44da-9925-7d04f40847a7" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pipedrive/resource.tf b/examples/resources/airbyte_source_pipedrive/resource.tf index a7c26a99e..a1c01845a 100755 --- a/examples/resources/airbyte_source_pipedrive/resource.tf +++ b/examples/resources/airbyte_source_pipedrive/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_pipedrive" "my_source_pipedrive" { replication_start_date = "2017-01-25T00:00:00Z" source_type = "pipedrive" } - name = "Rochelle Cormier" - workspace_id = "a3b084da-9925-47d0-8f40-847a742d8449" + name = "Clayton Graham" + secret_id = "...my_secretId..." + workspace_id = "6cbdeecf-6b99-4bc6-b562-ebfdf55c294c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pocket/resource.tf b/examples/resources/airbyte_source_pocket/resource.tf index f6258c343..5ee70af09 100755 --- a/examples/resources/airbyte_source_pocket/resource.tf +++ b/examples/resources/airbyte_source_pocket/resource.tf @@ -2,17 +2,18 @@ resource "airbyte_source_pocket" "my_source_pocket" { configuration = { access_token = "...my_access_token..." consumer_key = "...my_consumer_key..." - content_type = "video" - detail_type = "complete" + content_type = "article" + detail_type = "simple" domain = "...my_domain..." favorite = false search = "...my_search..." since = "2022-10-20 14:14:14" - sort = "site" + sort = "title" source_type = "pocket" - state = "all" + state = "unread" tag = "...my_tag..." } - name = "Edmund Witting" - workspace_id = "99bc6356-2ebf-4df5-9c29-4c060b06a128" + name = "Janie Bogisich" + secret_id = "...my_secretId..." + workspace_id = "7764eef6-d0c6-4d6e-99c7-3dd634571509" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pokeapi/resource.tf b/examples/resources/airbyte_source_pokeapi/resource.tf index 01eef02a8..f0467108a 100755 --- a/examples/resources/airbyte_source_pokeapi/resource.tf +++ b/examples/resources/airbyte_source_pokeapi/resource.tf @@ -1,8 +1,9 @@ resource "airbyte_source_pokeapi" "my_source_pokeapi" { configuration = { - pokemon_name = "luxray" + pokemon_name = "snorlax" source_type = "pokeapi" } - name = "Stacey Fritsch" - workspace_id = "f6d0c6d6-ed9c-473d-9634-571509a8e870" + name = "Lamar Lesch PhD" + secret_id = "...my_secretId..." + workspace_id = "3c5a1f9c-242c-47b6-aa1f-30c73df5b671" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_polygon_stock_api/resource.tf b/examples/resources/airbyte_source_polygon_stock_api/resource.tf index da15f3306..33a82606d 100755 --- a/examples/resources/airbyte_source_polygon_stock_api/resource.tf +++ b/examples/resources/airbyte_source_polygon_stock_api/resource.tf @@ -8,9 +8,10 @@ resource "airbyte_source_polygon_stock_api" "my_source_polygonstockapi" { sort = "desc" source_type = "polygon-stock-api" start_date = "2020-10-14" - stocks_ticker = "IBM" + stocks_ticker = "MSFT" timespan = "day" } - name = "Rosalie Kuhlman" - workspace_id = "6a1f30c7-3df5-4b67-9989-0f42a4bb438d" + name = "Sylvia Lindgren" + secret_id = "...my_secretId..." + workspace_id = "5b260591-d745-4e3c-a059-c9c3f567e0e2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_postgres/resource.tf b/examples/resources/airbyte_source_postgres/resource.tf index 323a4b32b..acb92e168 100755 --- a/examples/resources/airbyte_source_postgres/resource.tf +++ b/examples/resources/airbyte_source_postgres/resource.tf @@ -6,26 +6,33 @@ resource "airbyte_source_postgres" "my_source_postgres" { password = "...my_password..." port = 5432 replication_method = { - initial_waiting_seconds = 3 - lsn_commit_behaviour = "After loading Data in the destination" - method = "CDC" - plugin = "pgoutput" - publication = "...my_publication..." - queue_size = 1 - replication_slot = "...my_replication_slot..." + source_postgres_replication_method_logical_replication_cdc_ = { + initial_waiting_seconds = 1 + lsn_commit_behaviour = "While reading Data" + method = "CDC" + plugin = "pgoutput" + publication = "...my_publication..." + queue_size = 4 + replication_slot = "...my_replication_slot..." + } } schemas = [ "...", ] source_type = "postgres" ssl_mode = { - mode = "allow" + source_postgres_ssl_modes_allow = { + mode = "allow" + } } tunnel_method = { - tunnel_method = "NO_TUNNEL" + source_postgres_ssh_tunnel_method_no_tunnel = { + tunnel_method = "NO_TUNNEL" + } } - username = "Gina59" + username = "Euna83" } - name = "Krystal Kiehn" - workspace_id = "e3c2059c-9c3f-4567-a0e2-52765b1d62fc" + name = "Kathryn Windler" + secret_id = "...my_secretId..." + workspace_id = "ace1f012-16ce-4223-9e8f-25cd0d19d959" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_posthog/resource.tf b/examples/resources/airbyte_source_posthog/resource.tf index 716df508f..8e349229b 100755 --- a/examples/resources/airbyte_source_posthog/resource.tf +++ b/examples/resources/airbyte_source_posthog/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_posthog" "my_source_posthog" { source_type = "posthog" start_date = "2021-01-01T00:00:00Z" } - name = "Doyle Bradtke Sr." - workspace_id = "216ce223-9e8f-425c-90d1-9d959f439e39" + name = "Ada Tromp" + secret_id = "...my_secretId..." + workspace_id = "266cbd95-f7aa-42b2-8113-695d1e6698fc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_postmarkapp/resource.tf b/examples/resources/airbyte_source_postmarkapp/resource.tf index 8573ca0f5..54b6c8aa2 100755 --- a/examples/resources/airbyte_source_postmarkapp/resource.tf +++ b/examples/resources/airbyte_source_postmarkapp/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_postmarkapp" "my_source_postmarkapp" { x_postmark_account_token = "...my_X-Postmark-Account-Token..." x_postmark_server_token = "...my_X-Postmark-Server-Token..." } - name = "Sue Jerde" - workspace_id = "d95f7aa2-b241-4136-95d1-e6698fcc4596" + name = "Jon Harris" + secret_id = "...my_secretId..." + workspace_id = "217c2977-6763-4342-9403-8bfb5971e981" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_prestashop/resource.tf b/examples/resources/airbyte_source_prestashop/resource.tf index ea1aefd73..00294593b 100755 --- a/examples/resources/airbyte_source_prestashop/resource.tf +++ b/examples/resources/airbyte_source_prestashop/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_prestashop" "my_source_prestashop" { start_date = "2022-01-01" url = "...my_url..." } - name = "Kendra D'Amore" - workspace_id = "76763342-5403-48bf-b597-1e9819055738" + name = "Samantha Krajcik" + secret_id = "...my_secretId..." + workspace_id = "9cedbac7-fda3-4959-8d66-bc2ae480632b" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_public_apis/resource.tf b/examples/resources/airbyte_source_public_apis/resource.tf index d0948f0ea..3d8de3d49 100755 --- a/examples/resources/airbyte_source_public_apis/resource.tf +++ b/examples/resources/airbyte_source_public_apis/resource.tf @@ -2,6 +2,7 @@ resource "airbyte_source_public_apis" "my_source_publicapis" { configuration = { source_type = "public-apis" } - name = "Benny Ward" - workspace_id = "ac7fda39-594d-466b-82ae-480632b9954b" + name = "Marion Hamill" + secret_id = "...my_secretId..." + workspace_id = "6fa22063-6982-4855-bcb1-0006bef4921e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_punk_api/resource.tf b/examples/resources/airbyte_source_punk_api/resource.tf index a4452c17b..c1faf6ec1 100755 --- a/examples/resources/airbyte_source_punk_api/resource.tf +++ b/examples/resources/airbyte_source_punk_api/resource.tf @@ -2,9 +2,10 @@ resource "airbyte_source_punk_api" "my_source_punkapi" { configuration = { brewed_after = "MM-YYYY" brewed_before = "MM-YYYY" - id = 1 + id = 22 source_type = "punk-api" } - name = "Betty Hirthe" - workspace_id = "749366ac-8ee0-4f2b-b195-88d40d03f3de" + name = "Faith Doyle" + secret_id = "...my_secretId..." + workspace_id = "ba297be3-e90b-4c40-9f86-8fd52405cb33" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_pypi/resource.tf b/examples/resources/airbyte_source_pypi/resource.tf index d92a55d7e..12443f931 100755 --- a/examples/resources/airbyte_source_pypi/resource.tf +++ b/examples/resources/airbyte_source_pypi/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_pypi" "my_source_pypi" { source_type = "pypi" version = "1.2.0" } - name = "Ernesto Crist" - workspace_id = "be3e90bc-40df-4868-bd52-405cb331d492" + name = "Mercedes Fritsch" + secret_id = "...my_secretId..." + workspace_id = "f4f127fb-0e0b-4f1f-8217-978d0acca77a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_qualaroo/resource.tf b/examples/resources/airbyte_source_qualaroo/resource.tf index e40d4ff26..0a806441a 100755 --- a/examples/resources/airbyte_source_qualaroo/resource.tf +++ b/examples/resources/airbyte_source_qualaroo/resource.tf @@ -8,6 +8,7 @@ resource "airbyte_source_qualaroo" "my_source_qualaroo" { ] token = "...my_token..." } - name = "Mr. Joel Yost" - workspace_id = "fb0e0bf1-f821-4797-8d0a-cca77aeb7b70" + name = "Geoffrey Kling" + secret_id = "...my_secretId..." + workspace_id = "021a5204-6b64-4e99-bb0e-67e094fdfed5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_quickbooks/resource.tf b/examples/resources/airbyte_source_quickbooks/resource.tf index 3ff27cc07..1c1e1bcd6 100755 --- a/examples/resources/airbyte_source_quickbooks/resource.tf +++ b/examples/resources/airbyte_source_quickbooks/resource.tf @@ -1,18 +1,21 @@ resource "airbyte_source_quickbooks" "my_source_quickbooks" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "oauth2.0" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - realm_id = "...my_realm_id..." - refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-11-25T12:48:18.221Z" + source_quickbooks_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "oauth2.0" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + realm_id = "...my_realm_id..." + refresh_token = "...my_refresh_token..." + token_expiry_date = "2022-09-15T16:38:10.985Z" + } } sandbox = false source_type = "quickbooks" start_date = "2021-03-20T00:00:00+00:00" } - name = "Gail Hoppe" - workspace_id = "4e99fb0e-67e0-494f-9fed-5540ef53a34a" + name = "Gladys O'Hara" + secret_id = "...my_secretId..." + workspace_id = "a1b8fe99-731a-4dc0-9d85-ae2dfb70fb38" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_railz/resource.tf b/examples/resources/airbyte_source_railz/resource.tf index dc71cb573..69fd10ab1 100755 --- a/examples/resources/airbyte_source_railz/resource.tf +++ b/examples/resources/airbyte_source_railz/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_railz" "my_source_railz" { source_type = "railz" start_date = "...my_start_date..." } - name = "Olivia Kuvalis" - workspace_id = "99731adc-05d8-45ae-adfb-70fb3874290d" + name = "Elaine Cummerata PhD" + secret_id = "...my_secretId..." + workspace_id = "336561ec-a16e-4f89-851b-d76eeeb518c4" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_recharge/resource.tf b/examples/resources/airbyte_source_recharge/resource.tf index a5b41fbd4..fe7e189fa 100755 --- a/examples/resources/airbyte_source_recharge/resource.tf +++ b/examples/resources/airbyte_source_recharge/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_recharge" "my_source_recharge" { source_type = "recharge" start_date = "2021-05-14T00:00:00Z" } - name = "Dr. Beatrice Keeling" - workspace_id = "a16ef894-51bd-476e-aeb5-18c4da1fad35" + name = "Ollie Osinski" + secret_id = "...my_secretId..." + workspace_id = "5512f06d-4e5b-472f-8f54-8568a0424e00" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_recreation/resource.tf b/examples/resources/airbyte_source_recreation/resource.tf index a7931d4ec..1a15f7d27 100755 --- a/examples/resources/airbyte_source_recreation/resource.tf +++ b/examples/resources/airbyte_source_recreation/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_recreation" "my_source_recreation" { query_campsites = "...my_query_campsites..." source_type = "recreation" } - name = "Ann Connelly III" - workspace_id = "d4e5b72f-0f54-4856-8a04-24e00a1d6eb9" + name = "Joe Stamm" + secret_id = "...my_secretId..." + workspace_id = "b9434645-d030-484f-bba5-cceff5cb01fe" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_recruitee/resource.tf b/examples/resources/airbyte_source_recruitee/resource.tf index b0b1efc26..bf0ef9349 100755 --- a/examples/resources/airbyte_source_recruitee/resource.tf +++ b/examples/resources/airbyte_source_recruitee/resource.tf @@ -1,9 +1,10 @@ resource "airbyte_source_recruitee" "my_source_recruitee" { configuration = { api_key = "...my_api_key..." - company_id = 2 + company_id = 3 source_type = "recruitee" } - name = "Suzanne Jenkins" - workspace_id = "d03084fb-ba5c-4cef-b5cb-01fe51e528a4" + name = "Eloise Hintz" + secret_id = "...my_secretId..." + workspace_id = "a45ac82b-85f8-4bc2-8aba-8da4127dd597" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_recurly/resource.tf b/examples/resources/airbyte_source_recurly/resource.tf index 373ddd62b..fe8ea053e 100755 --- a/examples/resources/airbyte_source_recurly/resource.tf +++ b/examples/resources/airbyte_source_recurly/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_recurly" "my_source_recurly" { end_time = "2021-12-01T00:00:00" source_type = "recurly" } - name = "Iris Schimmel MD" - workspace_id = "85f8bc2c-aba8-4da4-927d-d597ff4711aa" + name = "Darrin Gislason Jr." + secret_id = "...my_secretId..." + workspace_id = "aa1bc74b-86ce-4cc7-8f77-b4848bd6a6f0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_redshift/resource.tf b/examples/resources/airbyte_source_redshift/resource.tf index b495e9f8b..a7ef52b9a 100755 --- a/examples/resources/airbyte_source_redshift/resource.tf +++ b/examples/resources/airbyte_source_redshift/resource.tf @@ -9,8 +9,9 @@ resource "airbyte_source_redshift" "my_source_redshift" { "...", ] source_type = "redshift" - username = "Miguel.Sauer" + username = "Elmer.Bradtke80" } - name = "Alberto Hyatt" - workspace_id = "cc74f77b-4848-4bd6-a6f0-441d2c3b8080" + name = "Ms. Shelia Luettgen V" + secret_id = "...my_secretId..." + workspace_id = "4373e060-459b-4ebb-ad02-f2586bcf1525" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_retently/resource.tf b/examples/resources/airbyte_source_retently/resource.tf index 1b41a51d5..9beb4d0af 100755 --- a/examples/resources/airbyte_source_retently/resource.tf +++ b/examples/resources/airbyte_source_retently/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_retently" "my_source_retently" { configuration = { credentials = { - auth_type = "Client" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_retently_authentication_mechanism_authenticate_via_retently_o_auth_ = { + auth_type = "Client" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } source_type = "retently" } - name = "Alex Douglas" - workspace_id = "e060459b-ebba-4d02-b258-6bcf152558da" + name = "Myrtle Spinka" + secret_id = "...my_secretId..." + workspace_id = "95be6cd0-2756-4c35-8aa4-32b47e1763c5" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_rki_covid/resource.tf b/examples/resources/airbyte_source_rki_covid/resource.tf index a5c6a2180..6cb3c0841 100755 --- a/examples/resources/airbyte_source_rki_covid/resource.tf +++ b/examples/resources/airbyte_source_rki_covid/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_rki_covid" "my_source_rkicovid" { source_type = "rki-covid" start_date = "...my_start_date..." } - name = "Andy Herzog" - workspace_id = "6cd02756-c354-4aa4-b2b4-7e1763c5208c" + name = "Patricia Kuvalis" + secret_id = "...my_secretId..." + workspace_id = "3e9802d8-2f0d-445e-b4a8-b674ee5cfc18" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_rss/resource.tf b/examples/resources/airbyte_source_rss/resource.tf index cd738e4f1..7e4766ef3 100755 --- a/examples/resources/airbyte_source_rss/resource.tf +++ b/examples/resources/airbyte_source_rss/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_rss" "my_source_rss" { source_type = "rss" url = "...my_url..." } - name = "Cindy Walter" - workspace_id = "02d82f0d-45eb-44a8-b674-ee5cfc18edc7" + name = "Sammy Ruecker" + secret_id = "...my_secretId..." + workspace_id = "787e32e0-4b3d-43ed-8c56-70ef42bd3c9f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_s3/resource.tf b/examples/resources/airbyte_source_s3/resource.tf index 5d3c68779..5c5af500f 100755 --- a/examples/resources/airbyte_source_s3/resource.tf +++ b/examples/resources/airbyte_source_s3/resource.tf @@ -2,9 +2,11 @@ resource "airbyte_source_s3" "my_source_s3" { configuration = { dataset = "...my_dataset..." format = { - filetype = "avro" + source_s3_file_format_avro = { + filetype = "avro" + } } - path_pattern = "myFolder/myTableFiles/*.csv|myFolder/myOtherTableFiles/*.csv" + path_pattern = "**" provider = { aws_access_key_id = "...my_aws_access_key_id..." aws_secret_access_key = "...my_aws_secret_access_key..." @@ -16,6 +18,7 @@ resource "airbyte_source_s3" "my_source_s3" { schema = "{\"column_1\": \"number\", \"column_2\": \"string\", \"column_3\": \"array\", \"column_4\": \"object\", \"column_5\": \"boolean\"}" source_type = "s3" } - name = "Lila Ferry" - workspace_id = "04b3d3ed-0c56-470e-b42b-d3c9f1cc503f" + name = "Sarah Feeney" + secret_id = "...my_secretId..." + workspace_id = "c39bcd0a-6290-4f95-bf38-5189ad7ef807" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_salesforce/resource.tf b/examples/resources/airbyte_source_salesforce/resource.tf index 26eac2d38..f6a304049 100755 --- a/examples/resources/airbyte_source_salesforce/resource.tf +++ b/examples/resources/airbyte_source_salesforce/resource.tf @@ -3,17 +3,18 @@ resource "airbyte_source_salesforce" "my_source_salesforce" { auth_type = "Client" client_id = "...my_client_id..." client_secret = "...my_client_secret..." - is_sandbox = false + is_sandbox = true refresh_token = "...my_refresh_token..." source_type = "salesforce" start_date = "2021-07-25T00:00:00Z" streams_criteria = [ { - criteria = "ends not with" + criteria = "ends with" value = "...my_value..." }, ] } - name = "Kristopher Abernathy" - workspace_id = "290f957f-3851-489a-97ef-807aae03f33c" + name = "Leonard Fisher" + secret_id = "...my_secretId..." + workspace_id = "79fb9de4-032b-4a26-bd36-8ba9216bcb41" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_salesforce_singer/resource.tf b/examples/resources/airbyte_source_salesforce_singer/resource.tf index af5a1d63f..174eda3be 100755 --- a/examples/resources/airbyte_source_salesforce_singer/resource.tf +++ b/examples/resources/airbyte_source_salesforce_singer/resource.tf @@ -1,15 +1,16 @@ resource "airbyte_source_salesforce_singer" "my_source_salesforcesinger" { configuration = { - api_type = "REST" + api_type = "BULK" client_id = "...my_client_id..." client_secret = "...my_client_secret..." is_sandbox = true - quota_percent_per_run = 60.36 - quota_percent_total = 99.22 + quota_percent_per_run = 20.41 + quota_percent_total = 33.56 refresh_token = "...my_refresh_token..." source_type = "salesforce-singer" start_date = "2017-01-25T00:00:00Z" } - name = "Rene Stehr" - workspace_id = "032ba26f-d368-4ba9-a16b-cb415835c736" + name = "Claude Fisher" + secret_id = "...my_secretId..." + workspace_id = "1723133e-dc04-46bc-9163-bbca49227c42" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_salesloft/resource.tf b/examples/resources/airbyte_source_salesloft/resource.tf index 30e294db4..9b93d1364 100755 --- a/examples/resources/airbyte_source_salesloft/resource.tf +++ b/examples/resources/airbyte_source_salesloft/resource.tf @@ -1,12 +1,15 @@ resource "airbyte_source_salesloft" "my_source_salesloft" { configuration = { credentials = { - api_key = "...my_api_key..." - auth_type = "api_key" + source_salesloft_credentials_authenticate_via_api_key = { + api_key = "...my_api_key..." + auth_type = "api_key" + } } source_type = "salesloft" start_date = "2020-11-16T00:00:00Z" } - name = "Mrs. Marilyn Dicki" - workspace_id = "edc046bc-5163-4bbc-a492-27c42c22c553" + name = "Bethany Hansen" + secret_id = "...my_secretId..." + workspace_id = "50495c5d-bb3c-457c-9e49-81e8aa257ddc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sap_fieldglass/resource.tf b/examples/resources/airbyte_source_sap_fieldglass/resource.tf index 55e6a720f..7f89a7101 100755 --- a/examples/resources/airbyte_source_sap_fieldglass/resource.tf +++ b/examples/resources/airbyte_source_sap_fieldglass/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_sap_fieldglass" "my_source_sapfieldglass" { api_key = "...my_api_key..." source_type = "sap-fieldglass" } - name = "Donna Gottlieb" - workspace_id = "c5dbb3c5-7c1e-4498-9e8a-a257ddc1912e" + name = "Bobbie Block" + secret_id = "...my_secretId..." + workspace_id = "bde64bfc-c546-49d4-815d-fa796206bef2" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_secoda/resource.tf b/examples/resources/airbyte_source_secoda/resource.tf index 5d081e799..34e46c6f4 100755 --- a/examples/resources/airbyte_source_secoda/resource.tf +++ b/examples/resources/airbyte_source_secoda/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_secoda" "my_source_secoda" { api_key = "...my_api_key..." source_type = "secoda" } - name = "Josh Tremblay" - workspace_id = "bfcc5469-d401-45df-a796-206bef2b0a3e" + name = "Jason O'Kon" + secret_id = "...my_secretId..." + workspace_id = "42c1aa01-0e9a-4ac2-a913-5586d18f9f97" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sendgrid/resource.tf b/examples/resources/airbyte_source_sendgrid/resource.tf index 1d5f2887e..f946a7d22 100755 --- a/examples/resources/airbyte_source_sendgrid/resource.tf +++ b/examples/resources/airbyte_source_sendgrid/resource.tf @@ -2,8 +2,9 @@ resource "airbyte_source_sendgrid" "my_source_sendgrid" { configuration = { apikey = "...my_apikey..." source_type = "sendgrid" - start_time = "2020-01-01T01:01:01Z" + start_time = "2020-01-01T01:01:01.000001Z" } - name = "Mr. Iris Pfannerstill PhD" - workspace_id = "9aac2e91-3558-46d1-8f9f-97a4bfad2bf7" + name = "Horace Schumm" + secret_id = "...my_secretId..." + workspace_id = "f7d67ca8-4ad9-49b4-9d61-243531870cf6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sendinblue/resource.tf b/examples/resources/airbyte_source_sendinblue/resource.tf index 280116673..a4eddb907 100755 --- a/examples/resources/airbyte_source_sendinblue/resource.tf +++ b/examples/resources/airbyte_source_sendinblue/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_sendinblue" "my_source_sendinblue" { api_key = "...my_api_key..." source_type = "sendinblue" } - name = "Nathaniel Kozey" - workspace_id = "84ad99b4-1d61-4243-9318-70cf68b03ad4" + name = "Willis Bechtelar" + secret_id = "...my_secretId..." + workspace_id = "d421bd43-d1f0-4cb0-a000-3eb22d9b3a70" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_senseforce/resource.tf b/examples/resources/airbyte_source_senseforce/resource.tf index a5c5a1413..2e89da95a 100755 --- a/examples/resources/airbyte_source_senseforce/resource.tf +++ b/examples/resources/airbyte_source_senseforce/resource.tf @@ -3,10 +3,11 @@ resource "airbyte_source_senseforce" "my_source_senseforce" { access_token = "...my_access_token..." backend_url = "https://galaxyapi.senseforce.io" dataset_id = "8f418098-ca28-4df5-9498-0df9fe78eda7" - slice_range = 3 + slice_range = 360 source_type = "senseforce" start_date = "2017-01-25" } - name = "Dr. Emily Schumm DDS" - workspace_id = "b0a0003e-b22d-49b3-a70d-94faa741c57d" + name = "Kenny Kessler DDS" + secret_id = "...my_secretId..." + workspace_id = "57d1fedc-2050-4d38-9c3c-e185472f9ee6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sentry/resource.tf b/examples/resources/airbyte_source_sentry/resource.tf index 41b8dc985..b320a8eaf 100755 --- a/examples/resources/airbyte_source_sentry/resource.tf +++ b/examples/resources/airbyte_source_sentry/resource.tf @@ -4,11 +4,12 @@ resource "airbyte_source_sentry" "my_source_sentry" { discover_fields = [ "{ \"see\": \"documentation\" }", ] - hostname = "chubby-waterwheel.org" + hostname = "pesky-boon.info" organization = "...my_organization..." project = "...my_project..." source_type = "sentry" } - name = "Mrs. Leland Crooks PhD" - workspace_id = "38dc3ce1-8547-42f9-ae69-166a8be3444e" + name = "Isabel Leuschke" + secret_id = "...my_secretId..." + workspace_id = "3444eac8-b3a2-4875-86c1-fe606d07d2a9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sftp/resource.tf b/examples/resources/airbyte_source_sftp/resource.tf index d2e0bde1a..e96c52ffb 100755 --- a/examples/resources/airbyte_source_sftp/resource.tf +++ b/examples/resources/airbyte_source_sftp/resource.tf @@ -1,8 +1,10 @@ resource "airbyte_source_sftp" "my_source_sftp" { configuration = { credentials = { - auth_method = "SSH_PASSWORD_AUTH" - auth_user_password = "...my_auth_user_password..." + source_sftp_authentication_wildcard_password_authentication = { + auth_method = "SSH_PASSWORD_AUTH" + auth_user_password = "...my_auth_user_password..." + } } file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_types = "csv" @@ -12,6 +14,7 @@ resource "airbyte_source_sftp" "my_source_sftp" { source_type = "sftp" user = "...my_user..." } - name = "Earl Osinski" - workspace_id = "75c6c1fe-606d-407d-aa9c-87ae50c16661" + name = "Miss Cornelius Hilll III" + secret_id = "...my_secretId..." + workspace_id = "661a1d91-36a7-4e8d-9321-3f3f658752db" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sftp_bulk/resource.tf b/examples/resources/airbyte_source_sftp_bulk/resource.tf index 6dd52c918..1bf0ffd93 100755 --- a/examples/resources/airbyte_source_sftp_bulk/resource.tf +++ b/examples/resources/airbyte_source_sftp_bulk/resource.tf @@ -4,7 +4,7 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_type = "csv" folder_path = "/logs/2022" - host = "192.0.2.1" + host = "www.host.com" password = "...my_password..." port = 22 private_key = "...my_private_key..." @@ -12,8 +12,9 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { source_type = "sftp-bulk" start_date = "2017-01-25T00:00:00Z" stream_name = "ftp_contacts" - username = "Hunter_Murazik" + username = "Yasmine.Baumbach" } - name = "Woodrow Hansen" - workspace_id = "13f3f658-752d-4b76-8c59-f0a56cebcada" + name = "Nichole Treutel" + secret_id = "...my_secretId..." + workspace_id = "ada29ca7-9181-4c95-a716-63c530b56651" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_shopify/resource.tf b/examples/resources/airbyte_source_shopify/resource.tf index c86b1d5a9..fb2738b0a 100755 --- a/examples/resources/airbyte_source_shopify/resource.tf +++ b/examples/resources/airbyte_source_shopify/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_shopify" "my_source_shopify" { configuration = { credentials = { - api_password = "...my_api_password..." - auth_method = "api_password" + source_shopify_shopify_authorization_method_api_password = { + api_password = "...my_api_password..." + auth_method = "api_password" + } } shop = "...my_shop..." source_type = "shopify" start_date = "2021-01-01" } - name = "Homer Kshlerin IV" - workspace_id = "1c956716-63c5-430b-9665-163a3638512a" + name = "Alfred Hoppe" + secret_id = "...my_secretId..." + workspace_id = "512ab252-1b9f-42e0-b246-7b8a40bc05fa" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_shortio/resource.tf b/examples/resources/airbyte_source_shortio/resource.tf index 6e0e3b43c..ddcdb7758 100755 --- a/examples/resources/airbyte_source_shortio/resource.tf +++ b/examples/resources/airbyte_source_shortio/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_shortio" "my_source_shortio" { source_type = "shortio" start_date = "...my_start_date..." } - name = "Billy Heathcote MD" - workspace_id = "9f2e0724-67b8-4a40-bc05-fab0d650edf2" + name = "Kenneth Swaniawski" + secret_id = "...my_secretId..." + workspace_id = "0edf22a9-4d20-4ec9-8ea4-1d1f465e8515" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_slack/resource.tf b/examples/resources/airbyte_source_slack/resource.tf index 358862c5c..8f1bdbec2 100755 --- a/examples/resources/airbyte_source_slack/resource.tf +++ b/examples/resources/airbyte_source_slack/resource.tf @@ -4,14 +4,17 @@ resource "airbyte_source_slack" "my_source_slack" { "...", ] credentials = { - api_token = "...my_api_token..." - option_title = "API Token Credentials" + source_slack_authentication_mechanism_api_token = { + api_token = "...my_api_token..." + option_title = "API Token Credentials" + } } join_channels = false lookback_window = 14 source_type = "slack" start_date = "2017-01-25T00:00:00Z" } - name = "Deborah Waters" - workspace_id = "0ea41d1f-465e-4851-96ff-f73fdf54fdd5" + name = "Camille Smith" + secret_id = "...my_secretId..." + workspace_id = "4fdd5ea9-5433-498d-afb4-2a8d63388e4d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_smaily/resource.tf b/examples/resources/airbyte_source_smaily/resource.tf index 3d276ed31..acd3e6886 100755 --- a/examples/resources/airbyte_source_smaily/resource.tf +++ b/examples/resources/airbyte_source_smaily/resource.tf @@ -5,6 +5,7 @@ resource "airbyte_source_smaily" "my_source_smaily" { api_username = "...my_api_username..." source_type = "smaily" } - name = "Doug Marvin" - workspace_id = "3398dafb-42a8-4d63-b88e-4d8039ea5f9b" + name = "David Dooley" + secret_id = "...my_secretId..." + workspace_id = "a5f9b18a-244f-4d61-9039-dacd38ed0dc6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_smartengage/resource.tf b/examples/resources/airbyte_source_smartengage/resource.tf index 760f77489..ad16a0fb0 100755 --- a/examples/resources/airbyte_source_smartengage/resource.tf +++ b/examples/resources/airbyte_source_smartengage/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_smartengage" "my_source_smartengage" { api_key = "...my_api_key..." source_type = "smartengage" } - name = "Leah Murphy" - workspace_id = "4fd61903-9dac-4d38-ad0d-c671dc7f1e3a" + name = "Catherine Smith" + secret_id = "...my_secretId..." + workspace_id = "f1e3af15-920c-490d-9b49-01f2bd89c8a3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_smartsheets/resource.tf b/examples/resources/airbyte_source_smartsheets/resource.tf index 8b33af95d..eed0afd98 100755 --- a/examples/resources/airbyte_source_smartsheets/resource.tf +++ b/examples/resources/airbyte_source_smartsheets/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_smartsheets" "my_source_smartsheets" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "access_token" + source_smartsheets_authorization_method_api_access_token = { + access_token = "...my_access_token..." + auth_type = "access_token" + } } source_type = "smartsheets" spreadsheet_id = "...my_spreadsheet_id..." - start_datetime = "2000-01-01T13:00:00-07:00" + start_datetime = "2000-01-01T13:00:00" } - name = "Carlos Armstrong" - workspace_id = "0d1b4901-f2bd-489c-8a32-639da5b7b690" + name = "Dewey Murphy" + secret_id = "...my_secretId..." + workspace_id = "7b6902b8-81a9-44f6-8366-4a8f0af8c691" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_snapchat_marketing/resource.tf b/examples/resources/airbyte_source_snapchat_marketing/resource.tf index db897b59a..15104d9d1 100755 --- a/examples/resources/airbyte_source_snapchat_marketing/resource.tf +++ b/examples/resources/airbyte_source_snapchat_marketing/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_snapchat_marketing" "my_source_snapchatmarketing" { source_type = "snapchat-marketing" start_date = "2022-01-01" } - name = "Sonya McLaughlin" - workspace_id = "643664a8-f0af-48c6-91d7-32d9fbaf9476" + name = "Seth Wyman" + secret_id = "...my_secretId..." + workspace_id = "f9476a2a-e8dc-4c50-88a3-512c73784893" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_snowflake/resource.tf b/examples/resources/airbyte_source_snowflake/resource.tf index e40fa017e..fc526c76e 100755 --- a/examples/resources/airbyte_source_snowflake/resource.tf +++ b/examples/resources/airbyte_source_snowflake/resource.tf @@ -1,11 +1,13 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { configuration = { credentials = { - access_token = "...my_access_token..." - auth_type = "OAuth" - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + source_snowflake_authorization_method_o_auth2_0 = { + access_token = "...my_access_token..." + auth_type = "OAuth" + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + refresh_token = "...my_refresh_token..." + } } database = "AIRBYTE_DATABASE" host = "accountname.us-east-2.aws.snowflakecomputing.com" @@ -15,6 +17,7 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { source_type = "snowflake" warehouse = "AIRBYTE_WAREHOUSE" } - name = "Shawn O'Kon" - workspace_id = "dcc50c8a-3512-4c73-b848-930750a00e96" + name = "Miss Stella Hansen Jr." + secret_id = "...my_secretId..." + workspace_id = "e966ec73-6d43-4194-b98c-783c92398ed3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_sonar_cloud/resource.tf b/examples/resources/airbyte_source_sonar_cloud/resource.tf index a120c04a6..0e9b917f8 100755 --- a/examples/resources/airbyte_source_sonar_cloud/resource.tf +++ b/examples/resources/airbyte_source_sonar_cloud/resource.tf @@ -9,6 +9,7 @@ resource "airbyte_source_sonar_cloud" "my_source_sonarcloud" { start_date = "YYYY-MM-DD" user_token = "...my_user_token..." } - name = "Natalie Schuster" - workspace_id = "194398c7-83c9-4239-8ed3-d3ab7ca3c5ca" + name = "Chelsea Ortiz" + secret_id = "...my_secretId..." + workspace_id = "5ca8649a-70cf-4d5d-a989-b7206451077d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_spacex_api/resource.tf b/examples/resources/airbyte_source_spacex_api/resource.tf index 4f5ed2be1..6d14307d7 100755 --- a/examples/resources/airbyte_source_spacex_api/resource.tf +++ b/examples/resources/airbyte_source_spacex_api/resource.tf @@ -1,9 +1,10 @@ resource "airbyte_source_spacex_api" "my_source_spacexapi" { configuration = { - id = "8649a70c-fd5d-4698-9b72-06451077d19e" + id = "19ea83d4-92ed-414b-8a2c-1954545e955d" options = "...my_options..." source_type = "spacex-api" } - name = "Ken Dibbert" - workspace_id = "92ed14b8-a2c1-4954-945e-955dcc185ea4" + name = "Noel Borer" + secret_id = "...my_secretId..." + workspace_id = "ea4901c7-c43a-4d2d-aa78-4aba3d230edf" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_square/resource.tf b/examples/resources/airbyte_source_square/resource.tf index 48698db5d..7368dd2e8 100755 --- a/examples/resources/airbyte_source_square/resource.tf +++ b/examples/resources/airbyte_source_square/resource.tf @@ -1,14 +1,17 @@ resource "airbyte_source_square" "my_source_square" { configuration = { credentials = { - api_key = "...my_api_key..." - auth_type = "API Key" + source_square_authentication_api_key = { + api_key = "...my_api_key..." + auth_type = "API Key" + } } include_deleted_objects = true is_sandbox = false source_type = "square" - start_date = "2022-03-30" + start_date = "2022-10-16" } - name = "Erma Hagenes" - workspace_id = "d2daa784-aba3-4d23-8edf-73811a115382" + name = "Mrs. Maggie Breitenberg" + secret_id = "...my_secretId..." + workspace_id = "82bd7ed5-6507-4621-858f-4d7396564c20" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_strava/resource.tf b/examples/resources/airbyte_source_strava/resource.tf index 591b9a45d..1928b6a00 100755 --- a/examples/resources/airbyte_source_strava/resource.tf +++ b/examples/resources/airbyte_source_strava/resource.tf @@ -8,6 +8,7 @@ resource "airbyte_source_strava" "my_source_strava" { source_type = "strava" start_date = "2021-03-01T00:00:00Z" } - name = "Levi Haley" - workspace_id = "07621c58-f4d7-4396-964c-20a0711a961d" + name = "Marie Murphy" + secret_id = "...my_secretId..." + workspace_id = "1d24a7db-b8f5-432d-892c-f7812cb512c8" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_stripe/resource.tf b/examples/resources/airbyte_source_stripe/resource.tf index 634d30e29..8c1200205 100755 --- a/examples/resources/airbyte_source_stripe/resource.tf +++ b/examples/resources/airbyte_source_stripe/resource.tf @@ -2,11 +2,12 @@ resource "airbyte_source_stripe" "my_source_stripe" { configuration = { account_id = "...my_account_id..." client_secret = "...my_client_secret..." - lookback_window_days = 1 - slice_range = 3 + lookback_window_days = 5 + slice_range = 30 source_type = "stripe" start_date = "2017-01-25T00:00:00Z" } - name = "Wm Little" - workspace_id = "32d892cf-7812-4cb5-92c8-78240bf548f8" + name = "Marlon Herzog" + secret_id = "...my_secretId..." + workspace_id = "f88f8f1b-f0bc-48e1-b206-d5d831d00810" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_survey_sparrow/resource.tf b/examples/resources/airbyte_source_survey_sparrow/resource.tf index 7da97bd66..e698ffd2a 100755 --- a/examples/resources/airbyte_source_survey_sparrow/resource.tf +++ b/examples/resources/airbyte_source_survey_sparrow/resource.tf @@ -2,13 +2,16 @@ resource "airbyte_source_survey_sparrow" "my_source_surveysparrow" { configuration = { access_token = "...my_access_token..." region = { - url_base = "https://eu-api.surveysparrow.com/v3" + source_survey_sparrow_base_url_eu_based_account = { + url_base = "https://eu-api.surveysparrow.com/v3" + } } source_type = "survey-sparrow" survey_id = [ "{ \"see\": \"documentation\" }", ] } - name = "Alberta Jakubowski DDS" - workspace_id = "5768dce7-4240-49a2-95e0-8601489a5f63" + name = "Anita MacGyver" + secret_id = "...my_secretId..." + workspace_id = "5f63e3af-3dd9-4dda-b3dc-d63483e4a7a9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_surveymonkey/resource.tf b/examples/resources/airbyte_source_surveymonkey/resource.tf index 04d7bc3d9..2d9451f45 100755 --- a/examples/resources/airbyte_source_surveymonkey/resource.tf +++ b/examples/resources/airbyte_source_surveymonkey/resource.tf @@ -13,6 +13,7 @@ resource "airbyte_source_surveymonkey" "my_source_surveymonkey" { "...", ] } - name = "Henry Pollich DDS" - workspace_id = "c8e1f206-d5d8-431d-8081-090f6706673f" + name = "Marcia Berge" + secret_id = "...my_secretId..." + workspace_id = "73f3a681-c576-48dc-a742-409a215e0860" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_tempo/resource.tf b/examples/resources/airbyte_source_tempo/resource.tf index 64d9aacef..436427a47 100755 --- a/examples/resources/airbyte_source_tempo/resource.tf +++ b/examples/resources/airbyte_source_tempo/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_tempo" "my_source_tempo" { api_token = "...my_api_token..." source_type = "tempo" } - name = "Luis O'Connell" - workspace_id = "dd9dda33-dcd6-4348-be4a-7a98e4df37e4" + name = "Elias Glover" + secret_id = "...my_secretId..." + workspace_id = "37e45b89-55d4-413e-93a4-82310907bd35" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_the_guardian_api/resource.tf b/examples/resources/airbyte_source_the_guardian_api/resource.tf index 3c43078ed..75c233088 100755 --- a/examples/resources/airbyte_source_the_guardian_api/resource.tf +++ b/examples/resources/airbyte_source_the_guardian_api/resource.tf @@ -6,8 +6,9 @@ resource "airbyte_source_the_guardian_api" "my_source_theguardianapi" { section = "housing-network" source_type = "the-guardian-api" start_date = "YYYY-MM-DD" - tag = "environment/plasticbags" + tag = "environment/recycling" } - name = "Jerome Heaney" - workspace_id = "13e13a48-2310-4907-bd35-4c092bd734f0" + name = "Jeremy Pfeffer" + secret_id = "...my_secretId..." + workspace_id = "34f02449-d86f-44bb-a0fe-5d911cbfe749" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_tiktok_marketing/resource.tf b/examples/resources/airbyte_source_tiktok_marketing/resource.tf index 665c12bb8..32ab1179e 100755 --- a/examples/resources/airbyte_source_tiktok_marketing/resource.tf +++ b/examples/resources/airbyte_source_tiktok_marketing/resource.tf @@ -1,17 +1,20 @@ resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { configuration = { - attribution_window = 1 + attribution_window = 8 credentials = { - access_token = "...my_access_token..." - advertiser_id = "...my_advertiser_id..." - app_id = "...my_app_id..." - auth_type = "oauth2.0" - secret = "...my_secret..." + source_tiktok_marketing_authentication_method_o_auth2_0 = { + access_token = "...my_access_token..." + advertiser_id = "...my_advertiser_id..." + app_id = "...my_app_id..." + auth_type = "oauth2.0" + secret = "...my_secret..." + } } - end_date = "2022-09-30" + end_date = "2021-01-19" source_type = "tiktok-marketing" - start_date = "2021-04-07" + start_date = "2022-09-08" } - name = "Cecil Wintheiser" - workspace_id = "b20fe5d9-11cb-4fe7-89ca-f45a27f69e2c" + name = "Jeremy Krajcik" + secret_id = "...my_secretId..." + workspace_id = "9e2c9e6d-10e9-4db3-ad4c-6b03108d9c33" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_todoist/resource.tf b/examples/resources/airbyte_source_todoist/resource.tf index 920f7d13c..e74f754d4 100755 --- a/examples/resources/airbyte_source_todoist/resource.tf +++ b/examples/resources/airbyte_source_todoist/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_todoist" "my_source_todoist" { source_type = "todoist" token = "...my_token..." } - name = "Merle Keebler Jr." - workspace_id = "e9db3ad4-c6b0-4310-8d9c-337473082b94" + name = "Pauline Kozey IV" + secret_id = "...my_secretId..." + workspace_id = "2b94f2ab-1fd5-4671-a9c3-26350a467143" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_trello/resource.tf b/examples/resources/airbyte_source_trello/resource.tf index 3b5ffc174..ea95d8d8f 100755 --- a/examples/resources/airbyte_source_trello/resource.tf +++ b/examples/resources/airbyte_source_trello/resource.tf @@ -8,6 +8,7 @@ resource "airbyte_source_trello" "my_source_trello" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - name = "Preston Carter" - workspace_id = "5671e9c3-2635-40a4-a714-3789ce0e9915" + name = "Dr. Devin Waters" + secret_id = "...my_secretId..." + workspace_id = "91594d93-a74c-4025-afe3-b4b4db8b778e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_trustpilot/resource.tf b/examples/resources/airbyte_source_trustpilot/resource.tf index 1479e4e15..79528957f 100755 --- a/examples/resources/airbyte_source_trustpilot/resource.tf +++ b/examples/resources/airbyte_source_trustpilot/resource.tf @@ -4,12 +4,15 @@ resource "airbyte_source_trustpilot" "my_source_trustpilot" { "...", ] credentials = { - auth_type = "apikey" - client_id = "...my_client_id..." + source_trustpilot_authorization_method_api_key = { + auth_type = "apikey" + client_id = "...my_client_id..." + } } source_type = "trustpilot" start_date = "%Y-%m-%dT%H:%M:%S" } - name = "Jesus Smith" - workspace_id = "a74c0252-fe3b-44b4-9b8b-778ebb6e1d2c" + name = "Marco Hudson PhD" + secret_id = "...my_secretId..." + workspace_id = "2cf502ba-fb2c-4bc4-a35d-5e65da028c3e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_tvmaze_schedule/resource.tf b/examples/resources/airbyte_source_tvmaze_schedule/resource.tf index 3de4b49a1..894221181 100755 --- a/examples/resources/airbyte_source_tvmaze_schedule/resource.tf +++ b/examples/resources/airbyte_source_tvmaze_schedule/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_tvmaze_schedule" "my_source_tvmazeschedule" { start_date = "...my_start_date..." web_schedule_country_code = "US" } - name = "Judy Rath" - workspace_id = "b2cbc463-5d5e-465d-a028-c3e951a1e30f" + name = "Angie Bogan" + secret_id = "...my_secretId..." + workspace_id = "0fda9664-89d7-4b78-a73e-13a12a6b9924" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_twilio/resource.tf b/examples/resources/airbyte_source_twilio/resource.tf index 53a76be2f..be736d8c1 100755 --- a/examples/resources/airbyte_source_twilio/resource.tf +++ b/examples/resources/airbyte_source_twilio/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_twilio" "my_source_twilio" { source_type = "twilio" start_date = "2020-10-01T00:00:00Z" } - name = "Lucy Gutkowski" - workspace_id = "d7b78673-e13a-412a-ab99-2494594487f5" + name = "Bradley Goodwin" + secret_id = "...my_secretId..." + workspace_id = "f5c84383-6b86-4b3c-9f64-15b0449f9df1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_twilio_taskrouter/resource.tf b/examples/resources/airbyte_source_twilio_taskrouter/resource.tf index d2203dd8d..2ceec336c 100755 --- a/examples/resources/airbyte_source_twilio_taskrouter/resource.tf +++ b/examples/resources/airbyte_source_twilio_taskrouter/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_twilio_taskrouter" "my_source_twiliotaskrouter" { auth_token = "...my_auth_token..." source_type = "twilio-taskrouter" } - name = "Dwayne Graham" - workspace_id = "36b86b3c-df64-415b-8449-f9df13f4eedb" + name = "Marta Graham" + secret_id = "...my_secretId..." + workspace_id = "dbe78bf6-0682-4589-8ea7-63d5c72795b7" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_twitter/resource.tf b/examples/resources/airbyte_source_twitter/resource.tf index 8d82f06d7..2011c9c4e 100755 --- a/examples/resources/airbyte_source_twitter/resource.tf +++ b/examples/resources/airbyte_source_twitter/resource.tf @@ -1,11 +1,12 @@ resource "airbyte_source_twitter" "my_source_twitter" { configuration = { api_key = "...my_api_key..." - end_date = "2021-08-26T23:34:52.732Z" + end_date = "2022-04-23T00:58:34.496Z" query = "...my_query..." source_type = "twitter" - start_date = "2021-07-13T14:46:12.099Z" + start_date = "2022-09-13T06:52:49.792Z" } - name = "Rafael Balistreri" - workspace_id = "25894ea7-63d5-4c72-b95b-785148d6d549" + name = "Drew Kemmer" + secret_id = "...my_secretId..." + workspace_id = "49e5635b-33bc-40f9-b0c4-2fc9f4844225" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_typeform/resource.tf b/examples/resources/airbyte_source_typeform/resource.tf index 2b795a167..39004804d 100755 --- a/examples/resources/airbyte_source_typeform/resource.tf +++ b/examples/resources/airbyte_source_typeform/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_typeform" "my_source_typeform" { start_date = "2020-01-01T00:00:00Z" token = "...my_token..." } - name = "Kim Hegmann" - workspace_id = "3bc0f970-c42f-4c9f-8844-225e75b79606" + name = "Lula Kuphal" + secret_id = "...my_secretId..." + workspace_id = "065c0efa-6f93-4b90-a1b8-c95be1254b73" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_us_census/resource.tf b/examples/resources/airbyte_source_us_census/resource.tf index 3bbfcee25..2d76eb3d2 100755 --- a/examples/resources/airbyte_source_us_census/resource.tf +++ b/examples/resources/airbyte_source_us_census/resource.tf @@ -1,10 +1,11 @@ resource "airbyte_source_us_census" "my_source_uscensus" { configuration = { api_key = "...my_api_key..." - query_params = "get=NAME,NAICS2017_LABEL,LFO_LABEL,EMPSZES_LABEL,ESTAB,PAYANN,PAYQTR1,EMP&for=us:*&NAICS2017=72&LFO=001&EMPSZES=001" + query_params = "get=MOVEDIN,GEOID1,GEOID2,MOVEDOUT,FULL1_NAME,FULL2_NAME,MOVEDNET&for=county:*" query_path = "data/timeseries/healthins/sahie" source_type = "us-census" } - name = "Sonja Weimann" - workspace_id = "f93b90a1-b8c9-45be-9254-b739f4fe7721" + name = "Camille Upton" + secret_id = "...my_secretId..." + workspace_id = "210d1f65-58c9-49c7-a2d2-bc0f94087d9c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_vantage/resource.tf b/examples/resources/airbyte_source_vantage/resource.tf index 196ee819a..2d7c849e0 100755 --- a/examples/resources/airbyte_source_vantage/resource.tf +++ b/examples/resources/airbyte_source_vantage/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_vantage" "my_source_vantage" { access_token = "...my_access_token..." source_type = "vantage" } - name = "Muriel Carroll" - workspace_id = "558c99c7-22d2-4bc0-b940-87d9caae042d" + name = "Mrs. Gerard Walter" + secret_id = "...my_secretId..." + workspace_id = "dd7caac9-b4ca-4a1c-be9e-15df903907f3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_webflow/resource.tf b/examples/resources/airbyte_source_webflow/resource.tf index bf0f6aa15..d55ea4b97 100755 --- a/examples/resources/airbyte_source_webflow/resource.tf +++ b/examples/resources/airbyte_source_webflow/resource.tf @@ -4,6 +4,7 @@ resource "airbyte_source_webflow" "my_source_webflow" { site_id = "a relatively long hex sequence" source_type = "webflow" } - name = "Adrian Schulist" - workspace_id = "c9b4caa1-cfe9-4e15-9f90-3907f3783198" + name = "Ms. Nina Fadel" + secret_id = "...my_secretId..." + workspace_id = "3d42e54a-8546-4659-bc50-233c1471d51a" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_whisky_hunter/resource.tf b/examples/resources/airbyte_source_whisky_hunter/resource.tf index 6ce752224..b3ed5dbaa 100755 --- a/examples/resources/airbyte_source_whisky_hunter/resource.tf +++ b/examples/resources/airbyte_source_whisky_hunter/resource.tf @@ -2,6 +2,7 @@ resource "airbyte_source_whisky_hunter" "my_source_whiskyhunter" { configuration = { source_type = "whisky-hunter" } - name = "Ginger Gislason" - workspace_id = "54a85466-597c-4502-b3c1-471d51aaa6dd" + name = "Shaun Johnston" + secret_id = "...my_secretId..." + workspace_id = "f5abd648-7c5f-4c2b-862a-00bef69e1001" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf b/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf index 753a344c3..93013606c 100755 --- a/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf +++ b/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf @@ -1,14 +1,15 @@ resource "airbyte_source_wikipedia_pageviews" "my_source_wikipediapageviews" { configuration = { - access = "mobile-web" + access = "desktop" agent = "user" article = "Are_You_the_One%3F" - country = "IN" + country = "FR" end = "...my_end..." - project = "commons.wikimedia.org" + project = "en.wikipedia.org" source_type = "wikipedia-pageviews" start = "...my_start..." } - name = "Esther Littel" - workspace_id = "5fc2b862-a00b-4ef6-9e10-0157630bda7a" + name = "Taylor Paucek" + secret_id = "...my_secretId..." + workspace_id = "fded84a3-5a41-4238-a1a7-35ac26ae33be" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_woocommerce/resource.tf b/examples/resources/airbyte_source_woocommerce/resource.tf index f9ff8ae97..70da142f0 100755 --- a/examples/resources/airbyte_source_woocommerce/resource.tf +++ b/examples/resources/airbyte_source_woocommerce/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_woocommerce" "my_source_woocommerce" { source_type = "woocommerce" start_date = "2021-01-01" } - name = "Dallas Kutch" - workspace_id = "35a41238-e1a7-435a-826a-e33bef971a8f" + name = "Katherine Ondricka" + secret_id = "...my_secretId..." + workspace_id = "46bca110-6fe9-465b-b11d-08cf88ec9f7b" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_xero/resource.tf b/examples/resources/airbyte_source_xero/resource.tf index e04eba182..6e169d3e0 100755 --- a/examples/resources/airbyte_source_xero/resource.tf +++ b/examples/resources/airbyte_source_xero/resource.tf @@ -11,6 +11,7 @@ resource "airbyte_source_xero" "my_source_xero" { start_date = "2022-03-01T00:00:00Z" tenant_id = "...my_tenant_id..." } - name = "Mr. Clark O'Hara III" - workspace_id = "fe965b71-1d08-4cf8-8ec9-f7b99a550a65" + name = "Miss Maurice Hauck" + secret_id = "...my_secretId..." + workspace_id = "56ed333b-b0ce-48aa-a543-2a986eb7e14c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_xkcd/resource.tf b/examples/resources/airbyte_source_xkcd/resource.tf index 2bee89412..6fd8dfbd5 100755 --- a/examples/resources/airbyte_source_xkcd/resource.tf +++ b/examples/resources/airbyte_source_xkcd/resource.tf @@ -2,6 +2,7 @@ resource "airbyte_source_xkcd" "my_source_xkcd" { configuration = { source_type = "xkcd" } - name = "Tricia Senger" - workspace_id = "3bb0ce8a-a654-432a-986e-b7e14ca56408" + name = "Roberto Jones IV" + secret_id = "...my_secretId..." + workspace_id = "91500970-19a4-48f8-8ece-7bf904e01105" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_yandex_metrica/resource.tf b/examples/resources/airbyte_source_yandex_metrica/resource.tf index 162e47dfe..75992f324 100755 --- a/examples/resources/airbyte_source_yandex_metrica/resource.tf +++ b/examples/resources/airbyte_source_yandex_metrica/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_yandex_metrica" "my_source_yandexmetrica" { source_type = "yandex-metrica" start_date = "2022-01-01" } - name = "Mr. Ada Kozey" - workspace_id = "a48f88ec-e7bf-4904-a011-05d38908162c" + name = "Nina Boyle" + secret_id = "...my_secretId..." + workspace_id = "c6beb68a-0f65-47b7-903a-1480f8de30f0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_yotpo/resource.tf b/examples/resources/airbyte_source_yotpo/resource.tf index 6d3785e0f..f0cddc03e 100755 --- a/examples/resources/airbyte_source_yotpo/resource.tf +++ b/examples/resources/airbyte_source_yotpo/resource.tf @@ -2,10 +2,11 @@ resource "airbyte_source_yotpo" "my_source_yotpo" { configuration = { access_token = "...my_access_token..." app_key = "...my_app_key..." - email = "Morton.Walter50@yahoo.com" + email = "Lacy.Steuber@yahoo.com" source_type = "yotpo" start_date = "2022-03-01T00:00:00.000Z" } - name = "Duane Hamill" - workspace_id = "7d03a148-0f8d-4e30-b069-d810618d97e1" + name = "Kay Smith" + secret_id = "...my_secretId..." + workspace_id = "e1522975-10da-4803-9229-2cc61c2a702b" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_younium/resource.tf b/examples/resources/airbyte_source_younium/resource.tf index f7eb4d779..4e3a2ae70 100755 --- a/examples/resources/airbyte_source_younium/resource.tf +++ b/examples/resources/airbyte_source_younium/resource.tf @@ -2,10 +2,11 @@ resource "airbyte_source_younium" "my_source_younium" { configuration = { legal_entity = "...my_legal_entity..." password = "...my_password..." - playground = false + playground = true source_type = "younium" - username = "Carley.Cole" + username = "Kimberly_Kuhlman9" } - name = "Catherine Balistreri" - workspace_id = "80312292-cc61-4c2a-b02b-b97ee102da2d" + name = "Bonnie Steuber" + secret_id = "...my_secretId..." + workspace_id = "de35f8e0-1bf3-43ea-ab45-402ac1704bf1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_youtube_analytics/resource.tf b/examples/resources/airbyte_source_youtube_analytics/resource.tf index 263bac065..626b79373 100755 --- a/examples/resources/airbyte_source_youtube_analytics/resource.tf +++ b/examples/resources/airbyte_source_youtube_analytics/resource.tf @@ -7,6 +7,7 @@ resource "airbyte_source_youtube_analytics" "my_source_youtubeanalytics" { } source_type = "youtube-analytics" } - name = "Mike Hansen" - workspace_id = "e01bf33e-aab4-4540-aac1-704bf1cc9fc6" + name = "Clark McGlynn" + secret_id = "...my_secretId..." + workspace_id = "61aae5eb-5f0c-4492-b574-4d08a2267aae" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zendesk_chat/resource.tf b/examples/resources/airbyte_source_zendesk_chat/resource.tf index 269c75804..dafe5be5c 100755 --- a/examples/resources/airbyte_source_zendesk_chat/resource.tf +++ b/examples/resources/airbyte_source_zendesk_chat/resource.tf @@ -1,13 +1,16 @@ resource "airbyte_source_zendesk_chat" "my_source_zendeskchat" { configuration = { credentials = { - access_token = "...my_access_token..." - credentials = "access_token" + source_zendesk_chat_authorization_method_access_token = { + access_token = "...my_access_token..." + credentials = "access_token" + } } source_type = "zendesk-chat" start_date = "2021-02-01T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Percy Hane" - workspace_id = "5f0c492b-5744-4d08-a226-7aaee79e3c71" + name = "Phil Emmerich" + secret_id = "...my_secretId..." + workspace_id = "1ad31bec-b83d-4237-8ae3-bfc23d9450a9" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zendesk_sunshine/resource.tf b/examples/resources/airbyte_source_zendesk_sunshine/resource.tf index c3728fe62..8eeba7067 100755 --- a/examples/resources/airbyte_source_zendesk_sunshine/resource.tf +++ b/examples/resources/airbyte_source_zendesk_sunshine/resource.tf @@ -1,14 +1,17 @@ resource "airbyte_source_zendesk_sunshine" "my_source_zendesksunshine" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_method = "api_token" - email = "Raoul73@hotmail.com" + source_zendesk_sunshine_authorization_method_api_token = { + api_token = "...my_api_token..." + auth_method = "api_token" + email = "Hoyt61@yahoo.com" + } } source_type = "zendesk-sunshine" start_date = "2021-01-01T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Benny Raynor" - workspace_id = "d2378ae3-bfc2-43d9-850a-986a495bac70" + name = "Bridget Pagac" + secret_id = "...my_secretId..." + workspace_id = "07f06b28-ecc8-4649-a386-f62c969c4cc6" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zendesk_support/resource.tf b/examples/resources/airbyte_source_zendesk_support/resource.tf index e6522337d..d8a1f8ee6 100755 --- a/examples/resources/airbyte_source_zendesk_support/resource.tf +++ b/examples/resources/airbyte_source_zendesk_support/resource.tf @@ -1,15 +1,18 @@ resource "airbyte_source_zendesk_support" "my_source_zendesksupport" { configuration = { credentials = { - api_token = "...my_api_token..." - credentials = "api_token" - email = "Urban_Bechtelar@yahoo.com" + source_zendesk_support_authentication_api_token = { + api_token = "...my_api_token..." + credentials = "api_token" + email = "Ignacio_Langosh@hotmail.com" + } } - ignore_pagination = false + ignore_pagination = true source_type = "zendesk-support" start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Gregg Littel" - workspace_id = "92386f62-c969-4c4c-86b7-8890a3fd3c81" + name = "Dallas Douglas" + secret_id = "...my_secretId..." + workspace_id = "1da10f8c-23df-4931-9a3e-db51fad94acc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zendesk_talk/resource.tf b/examples/resources/airbyte_source_zendesk_talk/resource.tf index 76cc8e33e..4f0fb18e0 100755 --- a/examples/resources/airbyte_source_zendesk_talk/resource.tf +++ b/examples/resources/airbyte_source_zendesk_talk/resource.tf @@ -1,14 +1,17 @@ resource "airbyte_source_zendesk_talk" "my_source_zendesktalk" { configuration = { credentials = { - api_token = "...my_api_token..." - auth_type = "api_token" - email = "Lori99@hotmail.com" + source_zendesk_talk_authentication_api_token = { + api_token = "...my_api_token..." + auth_type = "api_token" + email = "Elliott.Feeney@yahoo.com" + } } source_type = "zendesk-talk" start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - name = "Ethel Stehr" - workspace_id = "31da3edb-51fa-4d94-acc9-435137726d15" + name = "Sara Jast II" + secret_id = "...my_secretId..." + workspace_id = "321b832a-56d6-4918-8ff6-0eb9a6658e69" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zenloop/resource.tf b/examples/resources/airbyte_source_zenloop/resource.tf index 2efd8a699..c3775b6bc 100755 --- a/examples/resources/airbyte_source_zenloop/resource.tf +++ b/examples/resources/airbyte_source_zenloop/resource.tf @@ -6,6 +6,7 @@ resource "airbyte_source_zenloop" "my_source_zenloop" { survey_group_id = "...my_survey_group_id..." survey_id = "...my_survey_id..." } - name = "Marilyn Carter" - workspace_id = "32a56d69-180f-4f60-ab9a-6658e69a4b84" + name = "Kyle Reichert" + secret_id = "...my_secretId..." + workspace_id = "3d382dbe-c75c-468c-a065-9468ce304d88" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zoho_crm/resource.tf b/examples/resources/airbyte_source_zoho_crm/resource.tf index 924859e40..cb8e53250 100755 --- a/examples/resources/airbyte_source_zoho_crm/resource.tf +++ b/examples/resources/airbyte_source_zoho_crm/resource.tf @@ -3,12 +3,13 @@ resource "airbyte_source_zoho_crm" "my_source_zohocrm" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." dc_region = "AU" - edition = "Ultimate" - environment = "Production" + edition = "Professional" + environment = "Sandbox" refresh_token = "...my_refresh_token..." source_type = "zoho-crm" - start_datetime = "2000-01-01 13:00:00" + start_datetime = "2000-01-01T13:00:00-07:00" } - name = "Bradford Sauer" - workspace_id = "c68c6065-9468-4ce3-84d8-849bf8214c33" + name = "Amber Rosenbaum" + secret_id = "...my_secretId..." + workspace_id = "7f96bb0c-69e3-472d-b134-4ba9f78a5c0e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zoom/resource.tf b/examples/resources/airbyte_source_zoom/resource.tf index bfa00b4df..1845240fe 100755 --- a/examples/resources/airbyte_source_zoom/resource.tf +++ b/examples/resources/airbyte_source_zoom/resource.tf @@ -3,6 +3,7 @@ resource "airbyte_source_zoom" "my_source_zoom" { jwt_token = "...my_jwt_token..." source_type = "zoom" } - name = "May McClure" - workspace_id = "b0c69e37-2db1-4344-ba9f-78a5c0ed7aab" + name = "Ron Padberg" + secret_id = "...my_secretId..." + workspace_id = "62e97261-fb0c-458d-a7b5-1996b5b4b50e" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zuora/resource.tf b/examples/resources/airbyte_source_zuora/resource.tf index f2b0c16b8..49bc47cd3 100755 --- a/examples/resources/airbyte_source_zuora/resource.tf +++ b/examples/resources/airbyte_source_zuora/resource.tf @@ -2,12 +2,13 @@ resource "airbyte_source_zuora" "my_source_zuora" { configuration = { client_id = "...my_client_id..." client_secret = "...my_client_secret..." - data_query = "Live" + data_query = "Unlimited" source_type = "zuora" start_date = "...my_start_date..." - tenant_endpoint = "US Cloud Production" - window_in_days = "364" + tenant_endpoint = "EU Central Sandbox" + window_in_days = "60" } - name = "Mathew Cole DVM" - workspace_id = "b0c58d27-b519-496b-9b4b-50eef712b7a7" + name = "Christina Rice" + secret_id = "...my_secretId..." + workspace_id = "7ab0344b-1710-4688-9eeb-ef897f3dd0cc" } \ No newline at end of file diff --git a/examples/resources/airbyte_workspace/resource.tf b/examples/resources/airbyte_workspace/resource.tf index d925603f4..a79762b33 100755 --- a/examples/resources/airbyte_workspace/resource.tf +++ b/examples/resources/airbyte_workspace/resource.tf @@ -1,3 +1,3 @@ resource "airbyte_workspace" "my_workspace" { - name = "Malcolm Bartoletti" + name = "Curtis Fahey Sr." } \ No newline at end of file diff --git a/files.gen b/files.gen index 814d8894c..34a7898e9 100755 --- a/files.gen +++ b/files.gen @@ -47,7 +47,7 @@ internal/provider/type_destination_databricks_data_source_recommended_managed_ta internal/provider/type_destination_databricks_data_source_amazon_s3.go internal/provider/type_destination_databricks_data_source_azure_blob_storage.go internal/provider/type_destination_databricks_update_data_source_amazon_s3.go -internal/provider/type_destination_databricks_data_source.go +internal/provider/type_destination_databricks_data_source1.go internal/provider/type_destination_databricks.go internal/provider/type_destination_dev_null_test_destination_silent.go internal/provider/type_destination_dev_null_test_destination.go @@ -568,6 +568,83 @@ internal/provider/type_source_zenloop.go internal/provider/type_source_zoho_crm.go internal/provider/type_source_zoom.go internal/provider/type_source_zuora.go +internal/provider/type_destination_aws_datalake1.go +internal/provider/type_destination_databricks_data_source_amazon_s31.go +internal/provider/type_destination_databricks_update_data_source_amazon_s31.go +internal/provider/type_destination_databricks_data_source2.go +internal/provider/type_destination_databricks1.go +internal/provider/type_destination_dynamodb1.go +internal/provider/type_destination_redshift_uploading_method_s3_staging1.go +internal/provider/type_destination_redshift_update_uploading_method_s3_staging1.go +internal/provider/type_destination_redshift_uploading_method1.go +internal/provider/type_destination_redshift1.go +internal/provider/type_destination_s31.go +internal/provider/type_destination_s3_glue1.go +internal/provider/type_destination_snowflake_data_staging_method_awss3_staging1.go +internal/provider/type_destination_snowflake_update_data_staging_method_awss3_staging1.go +internal/provider/type_destination_snowflake_data_staging_method1.go +internal/provider/type_destination_snowflake1.go +internal/provider/type_source_alloydb_replication_method_logical_replication_cdc1.go +internal/provider/type_source_alloydb_update_replication_method_logical_replication_cdc1.go +internal/provider/type_source_alloydb_replication_method1.go +internal/provider/type_source_alloydb_ssl_modes_allow1.go +internal/provider/type_source_alloydb_ssl_modes_disable1.go +internal/provider/type_source_alloydb_ssl_modes_prefer1.go +internal/provider/type_source_alloydb_ssl_modes_require1.go +internal/provider/type_source_alloydb_ssl_modes_verify_ca1.go +internal/provider/type_source_alloydb_ssl_modes_verify_full1.go +internal/provider/type_source_alloydb_update_ssl_modes_allow1.go +internal/provider/type_source_alloydb_update_ssl_modes_disable1.go +internal/provider/type_source_alloydb_update_ssl_modes_prefer1.go +internal/provider/type_source_alloydb_update_ssl_modes_require1.go +internal/provider/type_source_alloydb_update_ssl_modes_verify_ca1.go +internal/provider/type_source_alloydb_update_ssl_modes_verify_full1.go +internal/provider/type_source_alloydb_ssl_modes1.go +internal/provider/type_source_alloydb1.go +internal/provider/type_source_dynamodb1.go +internal/provider/type_source_harvest_authentication_mechanism_authenticate_via_harvest_o_auth1.go +internal/provider/type_source_harvest_authentication_mechanism_authenticate_with_personal_access_token1.go +internal/provider/type_source_harvest_update_authentication_mechanism_authenticate_via_harvest_o_auth1.go +internal/provider/type_source_harvest_update_authentication_mechanism_authenticate_with_personal_access_token1.go +internal/provider/type_source_harvest_authentication_mechanism1.go +internal/provider/type_source_harvest1.go +internal/provider/type_source_postgres_replication_method_logical_replication_cdc1.go +internal/provider/type_source_postgres_update_replication_method_logical_replication_cdc1.go +internal/provider/type_source_postgres_replication_method1.go +internal/provider/type_source_postgres_ssl_modes_allow1.go +internal/provider/type_source_postgres_ssl_modes_disable1.go +internal/provider/type_source_postgres_ssl_modes_prefer1.go +internal/provider/type_source_postgres_ssl_modes_require1.go +internal/provider/type_source_postgres_ssl_modes_verify_ca1.go +internal/provider/type_source_postgres_ssl_modes_verify_full1.go +internal/provider/type_source_postgres_update_ssl_modes_allow1.go +internal/provider/type_source_postgres_update_ssl_modes_disable1.go +internal/provider/type_source_postgres_update_ssl_modes_prefer1.go +internal/provider/type_source_postgres_update_ssl_modes_require1.go +internal/provider/type_source_postgres_update_ssl_modes_verify_ca1.go +internal/provider/type_source_postgres_update_ssl_modes_verify_full1.go +internal/provider/type_source_postgres_ssl_modes1.go +internal/provider/type_source_postgres1.go +internal/provider/type_source_retently_authentication_mechanism_authenticate_via_retently_o_auth1.go +internal/provider/type_source_retently_authentication_mechanism_authenticate_with_api_token1.go +internal/provider/type_source_retently_update_authentication_mechanism_authenticate_via_retently_o_auth1.go +internal/provider/type_source_retently_update_authentication_mechanism_authenticate_with_api_token1.go +internal/provider/type_source_retently_authentication_mechanism1.go +internal/provider/type_source_retently1.go +internal/provider/type_source_youtube_analytics_authenticate_via_o_auth201.go +internal/provider/type_source_youtube_analytics1.go +internal/provider/type_source_zendesk_support_authentication_api_token1.go +internal/provider/type_source_zendesk_support_authentication_o_auth201.go +internal/provider/type_source_zendesk_support_update_authentication_api_token1.go +internal/provider/type_source_zendesk_support_update_authentication_o_auth201.go +internal/provider/type_source_zendesk_support_authentication1.go +internal/provider/type_source_zendesk_support1.go +internal/provider/type_source_zendesk_talk_authentication_api_token1.go +internal/provider/type_source_zendesk_talk_authentication_o_auth201.go +internal/provider/type_source_zendesk_talk_update_authentication_api_token1.go +internal/provider/type_source_zendesk_talk_update_authentication_o_auth201.go +internal/provider/type_source_zendesk_talk_authentication1.go +internal/provider/type_source_zendesk_talk1.go examples/README.md go.mod go.sum @@ -3261,4 +3338,709 @@ internal/provider/source_zuora_resource_sdk.go examples/resources/airbyte_source_zuora/resource.tf internal/provider/workspace_resource.go internal/provider/workspace_resource_sdk.go -examples/resources/airbyte_workspace/resource.tf \ No newline at end of file +examples/resources/airbyte_workspace/resource.tf +internal/provider/connection_data_source.go +internal/provider/connection_data_source_sdk.go +examples/data-sources/airbyte_connection/data-source.tf +internal/provider/destination_amazonsqs_data_source.go +internal/provider/destination_amazonsqs_data_source_sdk.go +examples/data-sources/airbyte_destination_amazon_sqs/data-source.tf +internal/provider/destination_awsdatalake_data_source.go +internal/provider/destination_awsdatalake_data_source_sdk.go +examples/data-sources/airbyte_destination_aws_datalake/data-source.tf +internal/provider/destination_azureblobstorage_data_source.go +internal/provider/destination_azureblobstorage_data_source_sdk.go +examples/data-sources/airbyte_destination_azure_blob_storage/data-source.tf +internal/provider/destination_bigquery_data_source.go +internal/provider/destination_bigquery_data_source_sdk.go +examples/data-sources/airbyte_destination_bigquery/data-source.tf +internal/provider/destination_bigquerydenormalized_data_source.go +internal/provider/destination_bigquerydenormalized_data_source_sdk.go +examples/data-sources/airbyte_destination_bigquery_denormalized/data-source.tf +internal/provider/destination_cassandra_data_source.go +internal/provider/destination_cassandra_data_source_sdk.go +examples/data-sources/airbyte_destination_cassandra/data-source.tf +internal/provider/destination_clickhouse_data_source.go +internal/provider/destination_clickhouse_data_source_sdk.go +examples/data-sources/airbyte_destination_clickhouse/data-source.tf +internal/provider/destination_convex_data_source.go +internal/provider/destination_convex_data_source_sdk.go +examples/data-sources/airbyte_destination_convex/data-source.tf +internal/provider/destination_cumulio_data_source.go +internal/provider/destination_cumulio_data_source_sdk.go +examples/data-sources/airbyte_destination_cumulio/data-source.tf +internal/provider/destination_databend_data_source.go +internal/provider/destination_databend_data_source_sdk.go +examples/data-sources/airbyte_destination_databend/data-source.tf +internal/provider/destination_databricks_data_source.go +internal/provider/destination_databricks_data_source_sdk.go +examples/data-sources/airbyte_destination_databricks/data-source.tf +internal/provider/destination_devnull_data_source.go +internal/provider/destination_devnull_data_source_sdk.go +examples/data-sources/airbyte_destination_dev_null/data-source.tf +internal/provider/destination_dynamodb_data_source.go +internal/provider/destination_dynamodb_data_source_sdk.go +examples/data-sources/airbyte_destination_dynamodb/data-source.tf +internal/provider/destination_elasticsearch_data_source.go +internal/provider/destination_elasticsearch_data_source_sdk.go +examples/data-sources/airbyte_destination_elasticsearch/data-source.tf +internal/provider/destination_firebolt_data_source.go +internal/provider/destination_firebolt_data_source_sdk.go +examples/data-sources/airbyte_destination_firebolt/data-source.tf +internal/provider/destination_firestore_data_source.go +internal/provider/destination_firestore_data_source_sdk.go +examples/data-sources/airbyte_destination_firestore/data-source.tf +internal/provider/destination_gcs_data_source.go +internal/provider/destination_gcs_data_source_sdk.go +examples/data-sources/airbyte_destination_gcs/data-source.tf +internal/provider/destination_googlesheets_data_source.go +internal/provider/destination_googlesheets_data_source_sdk.go +examples/data-sources/airbyte_destination_google_sheets/data-source.tf +internal/provider/destination_keen_data_source.go +internal/provider/destination_keen_data_source_sdk.go +examples/data-sources/airbyte_destination_keen/data-source.tf +internal/provider/destination_kinesis_data_source.go +internal/provider/destination_kinesis_data_source_sdk.go +examples/data-sources/airbyte_destination_kinesis/data-source.tf +internal/provider/destination_mariadbcolumnstore_data_source.go +internal/provider/destination_mariadbcolumnstore_data_source_sdk.go +examples/data-sources/airbyte_destination_mariadb_columnstore/data-source.tf +internal/provider/destination_meilisearch_data_source.go +internal/provider/destination_meilisearch_data_source_sdk.go +examples/data-sources/airbyte_destination_meilisearch/data-source.tf +internal/provider/destination_mongodb_data_source.go +internal/provider/destination_mongodb_data_source_sdk.go +examples/data-sources/airbyte_destination_mongodb/data-source.tf +internal/provider/destination_mssql_data_source.go +internal/provider/destination_mssql_data_source_sdk.go +examples/data-sources/airbyte_destination_mssql/data-source.tf +internal/provider/destination_mysql_data_source.go +internal/provider/destination_mysql_data_source_sdk.go +examples/data-sources/airbyte_destination_mysql/data-source.tf +internal/provider/destination_oracle_data_source.go +internal/provider/destination_oracle_data_source_sdk.go +examples/data-sources/airbyte_destination_oracle/data-source.tf +internal/provider/destination_postgres_data_source.go +internal/provider/destination_postgres_data_source_sdk.go +examples/data-sources/airbyte_destination_postgres/data-source.tf +internal/provider/destination_pubsub_data_source.go +internal/provider/destination_pubsub_data_source_sdk.go +examples/data-sources/airbyte_destination_pubsub/data-source.tf +internal/provider/destination_pulsar_data_source.go +internal/provider/destination_pulsar_data_source_sdk.go +examples/data-sources/airbyte_destination_pulsar/data-source.tf +internal/provider/destination_rabbitmq_data_source.go +internal/provider/destination_rabbitmq_data_source_sdk.go +examples/data-sources/airbyte_destination_rabbitmq/data-source.tf +internal/provider/destination_redis_data_source.go +internal/provider/destination_redis_data_source_sdk.go +examples/data-sources/airbyte_destination_redis/data-source.tf +internal/provider/destination_redshift_data_source.go +internal/provider/destination_redshift_data_source_sdk.go +examples/data-sources/airbyte_destination_redshift/data-source.tf +internal/provider/destination_rockset_data_source.go +internal/provider/destination_rockset_data_source_sdk.go +examples/data-sources/airbyte_destination_rockset/data-source.tf +internal/provider/destination_s3_data_source.go +internal/provider/destination_s3_data_source_sdk.go +examples/data-sources/airbyte_destination_s3/data-source.tf +internal/provider/destination_s3glue_data_source.go +internal/provider/destination_s3glue_data_source_sdk.go +examples/data-sources/airbyte_destination_s3_glue/data-source.tf +internal/provider/destination_scylla_data_source.go +internal/provider/destination_scylla_data_source_sdk.go +examples/data-sources/airbyte_destination_scylla/data-source.tf +internal/provider/destination_sftpjson_data_source.go +internal/provider/destination_sftpjson_data_source_sdk.go +examples/data-sources/airbyte_destination_sftp_json/data-source.tf +internal/provider/destination_snowflake_data_source.go +internal/provider/destination_snowflake_data_source_sdk.go +examples/data-sources/airbyte_destination_snowflake/data-source.tf +internal/provider/destination_typesense_data_source.go +internal/provider/destination_typesense_data_source_sdk.go +examples/data-sources/airbyte_destination_typesense/data-source.tf +internal/provider/destination_vertica_data_source.go +internal/provider/destination_vertica_data_source_sdk.go +examples/data-sources/airbyte_destination_vertica/data-source.tf +internal/provider/source_aircall_data_source.go +internal/provider/source_aircall_data_source_sdk.go +examples/data-sources/airbyte_source_aircall/data-source.tf +internal/provider/source_airtable_data_source.go +internal/provider/source_airtable_data_source_sdk.go +examples/data-sources/airbyte_source_airtable/data-source.tf +internal/provider/source_alloydb_data_source.go +internal/provider/source_alloydb_data_source_sdk.go +examples/data-sources/airbyte_source_alloydb/data-source.tf +internal/provider/source_amazonads_data_source.go +internal/provider/source_amazonads_data_source_sdk.go +examples/data-sources/airbyte_source_amazon_ads/data-source.tf +internal/provider/source_amazonsqs_data_source.go +internal/provider/source_amazonsqs_data_source_sdk.go +examples/data-sources/airbyte_source_amazon_sqs/data-source.tf +internal/provider/source_amplitude_data_source.go +internal/provider/source_amplitude_data_source_sdk.go +examples/data-sources/airbyte_source_amplitude/data-source.tf +internal/provider/source_apifydataset_data_source.go +internal/provider/source_apifydataset_data_source_sdk.go +examples/data-sources/airbyte_source_apify_dataset/data-source.tf +internal/provider/source_asana_data_source.go +internal/provider/source_asana_data_source_sdk.go +examples/data-sources/airbyte_source_asana/data-source.tf +internal/provider/source_auth0_data_source.go +internal/provider/source_auth0_data_source_sdk.go +examples/data-sources/airbyte_source_auth0/data-source.tf +internal/provider/source_awscloudtrail_data_source.go +internal/provider/source_awscloudtrail_data_source_sdk.go +examples/data-sources/airbyte_source_aws_cloudtrail/data-source.tf +internal/provider/source_azureblobstorage_data_source.go +internal/provider/source_azureblobstorage_data_source_sdk.go +examples/data-sources/airbyte_source_azure_blob_storage/data-source.tf +internal/provider/source_azuretable_data_source.go +internal/provider/source_azuretable_data_source_sdk.go +examples/data-sources/airbyte_source_azure_table/data-source.tf +internal/provider/source_bamboohr_data_source.go +internal/provider/source_bamboohr_data_source_sdk.go +examples/data-sources/airbyte_source_bamboo_hr/data-source.tf +internal/provider/source_bigcommerce_data_source.go +internal/provider/source_bigcommerce_data_source_sdk.go +examples/data-sources/airbyte_source_bigcommerce/data-source.tf +internal/provider/source_bigquery_data_source.go +internal/provider/source_bigquery_data_source_sdk.go +examples/data-sources/airbyte_source_bigquery/data-source.tf +internal/provider/source_bingads_data_source.go +internal/provider/source_bingads_data_source_sdk.go +examples/data-sources/airbyte_source_bing_ads/data-source.tf +internal/provider/source_braintree_data_source.go +internal/provider/source_braintree_data_source_sdk.go +examples/data-sources/airbyte_source_braintree/data-source.tf +internal/provider/source_braze_data_source.go +internal/provider/source_braze_data_source_sdk.go +examples/data-sources/airbyte_source_braze/data-source.tf +internal/provider/source_chargebee_data_source.go +internal/provider/source_chargebee_data_source_sdk.go +examples/data-sources/airbyte_source_chargebee/data-source.tf +internal/provider/source_chartmogul_data_source.go +internal/provider/source_chartmogul_data_source_sdk.go +examples/data-sources/airbyte_source_chartmogul/data-source.tf +internal/provider/source_clickhouse_data_source.go +internal/provider/source_clickhouse_data_source_sdk.go +examples/data-sources/airbyte_source_clickhouse/data-source.tf +internal/provider/source_clickupapi_data_source.go +internal/provider/source_clickupapi_data_source_sdk.go +examples/data-sources/airbyte_source_clickup_api/data-source.tf +internal/provider/source_closecom_data_source.go +internal/provider/source_closecom_data_source_sdk.go +examples/data-sources/airbyte_source_close_com/data-source.tf +internal/provider/source_coda_data_source.go +internal/provider/source_coda_data_source_sdk.go +examples/data-sources/airbyte_source_coda/data-source.tf +internal/provider/source_coinapi_data_source.go +internal/provider/source_coinapi_data_source_sdk.go +examples/data-sources/airbyte_source_coin_api/data-source.tf +internal/provider/source_coinmarketcap_data_source.go +internal/provider/source_coinmarketcap_data_source_sdk.go +examples/data-sources/airbyte_source_coinmarketcap/data-source.tf +internal/provider/source_configcat_data_source.go +internal/provider/source_configcat_data_source_sdk.go +examples/data-sources/airbyte_source_configcat/data-source.tf +internal/provider/source_confluence_data_source.go +internal/provider/source_confluence_data_source_sdk.go +examples/data-sources/airbyte_source_confluence/data-source.tf +internal/provider/source_datascope_data_source.go +internal/provider/source_datascope_data_source_sdk.go +examples/data-sources/airbyte_source_datascope/data-source.tf +internal/provider/source_delighted_data_source.go +internal/provider/source_delighted_data_source_sdk.go +examples/data-sources/airbyte_source_delighted/data-source.tf +internal/provider/source_dixa_data_source.go +internal/provider/source_dixa_data_source_sdk.go +examples/data-sources/airbyte_source_dixa/data-source.tf +internal/provider/source_dockerhub_data_source.go +internal/provider/source_dockerhub_data_source_sdk.go +examples/data-sources/airbyte_source_dockerhub/data-source.tf +internal/provider/source_dremio_data_source.go +internal/provider/source_dremio_data_source_sdk.go +examples/data-sources/airbyte_source_dremio/data-source.tf +internal/provider/source_dynamodb_data_source.go +internal/provider/source_dynamodb_data_source_sdk.go +examples/data-sources/airbyte_source_dynamodb/data-source.tf +internal/provider/source_e2etestcloud_data_source.go +internal/provider/source_e2etestcloud_data_source_sdk.go +examples/data-sources/airbyte_source_e2e_test_cloud/data-source.tf +internal/provider/source_emailoctopus_data_source.go +internal/provider/source_emailoctopus_data_source_sdk.go +examples/data-sources/airbyte_source_emailoctopus/data-source.tf +internal/provider/source_exchangerates_data_source.go +internal/provider/source_exchangerates_data_source_sdk.go +examples/data-sources/airbyte_source_exchange_rates/data-source.tf +internal/provider/source_facebookmarketing_data_source.go +internal/provider/source_facebookmarketing_data_source_sdk.go +examples/data-sources/airbyte_source_facebook_marketing/data-source.tf +internal/provider/source_facebookpages_data_source.go +internal/provider/source_facebookpages_data_source_sdk.go +examples/data-sources/airbyte_source_facebook_pages/data-source.tf +internal/provider/source_faker_data_source.go +internal/provider/source_faker_data_source_sdk.go +examples/data-sources/airbyte_source_faker/data-source.tf +internal/provider/source_fauna_data_source.go +internal/provider/source_fauna_data_source_sdk.go +examples/data-sources/airbyte_source_fauna/data-source.tf +internal/provider/source_filesecure_data_source.go +internal/provider/source_filesecure_data_source_sdk.go +examples/data-sources/airbyte_source_file_secure/data-source.tf +internal/provider/source_firebolt_data_source.go +internal/provider/source_firebolt_data_source_sdk.go +examples/data-sources/airbyte_source_firebolt/data-source.tf +internal/provider/source_freshcaller_data_source.go +internal/provider/source_freshcaller_data_source_sdk.go +examples/data-sources/airbyte_source_freshcaller/data-source.tf +internal/provider/source_freshdesk_data_source.go +internal/provider/source_freshdesk_data_source_sdk.go +examples/data-sources/airbyte_source_freshdesk/data-source.tf +internal/provider/source_freshsales_data_source.go +internal/provider/source_freshsales_data_source_sdk.go +examples/data-sources/airbyte_source_freshsales/data-source.tf +internal/provider/source_freshservice_data_source.go +internal/provider/source_freshservice_data_source_sdk.go +examples/data-sources/airbyte_source_freshservice/data-source.tf +internal/provider/source_gcs_data_source.go +internal/provider/source_gcs_data_source_sdk.go +examples/data-sources/airbyte_source_gcs/data-source.tf +internal/provider/source_getlago_data_source.go +internal/provider/source_getlago_data_source_sdk.go +examples/data-sources/airbyte_source_getlago/data-source.tf +internal/provider/source_github_data_source.go +internal/provider/source_github_data_source_sdk.go +examples/data-sources/airbyte_source_github/data-source.tf +internal/provider/source_gitlab_data_source.go +internal/provider/source_gitlab_data_source_sdk.go +examples/data-sources/airbyte_source_gitlab/data-source.tf +internal/provider/source_glassfrog_data_source.go +internal/provider/source_glassfrog_data_source_sdk.go +examples/data-sources/airbyte_source_glassfrog/data-source.tf +internal/provider/source_gnews_data_source.go +internal/provider/source_gnews_data_source_sdk.go +examples/data-sources/airbyte_source_gnews/data-source.tf +internal/provider/source_googleads_data_source.go +internal/provider/source_googleads_data_source_sdk.go +examples/data-sources/airbyte_source_google_ads/data-source.tf +internal/provider/source_googleanalyticsdataapi_data_source.go +internal/provider/source_googleanalyticsdataapi_data_source_sdk.go +examples/data-sources/airbyte_source_google_analytics_data_api/data-source.tf +internal/provider/source_googleanalyticsv4_data_source.go +internal/provider/source_googleanalyticsv4_data_source_sdk.go +examples/data-sources/airbyte_source_google_analytics_v4/data-source.tf +internal/provider/source_googledirectory_data_source.go +internal/provider/source_googledirectory_data_source_sdk.go +examples/data-sources/airbyte_source_google_directory/data-source.tf +internal/provider/source_googlepagespeedinsights_data_source.go +internal/provider/source_googlepagespeedinsights_data_source_sdk.go +examples/data-sources/airbyte_source_google_pagespeed_insights/data-source.tf +internal/provider/source_googlesearchconsole_data_source.go +internal/provider/source_googlesearchconsole_data_source_sdk.go +examples/data-sources/airbyte_source_google_search_console/data-source.tf +internal/provider/source_googlesheets_data_source.go +internal/provider/source_googlesheets_data_source_sdk.go +examples/data-sources/airbyte_source_google_sheets/data-source.tf +internal/provider/source_googlewebfonts_data_source.go +internal/provider/source_googlewebfonts_data_source_sdk.go +examples/data-sources/airbyte_source_google_webfonts/data-source.tf +internal/provider/source_googleworkspaceadminreports_data_source.go +internal/provider/source_googleworkspaceadminreports_data_source_sdk.go +examples/data-sources/airbyte_source_google_workspace_admin_reports/data-source.tf +internal/provider/source_greenhouse_data_source.go +internal/provider/source_greenhouse_data_source_sdk.go +examples/data-sources/airbyte_source_greenhouse/data-source.tf +internal/provider/source_gridly_data_source.go +internal/provider/source_gridly_data_source_sdk.go +examples/data-sources/airbyte_source_gridly/data-source.tf +internal/provider/source_harvest_data_source.go +internal/provider/source_harvest_data_source_sdk.go +examples/data-sources/airbyte_source_harvest/data-source.tf +internal/provider/source_hubplanner_data_source.go +internal/provider/source_hubplanner_data_source_sdk.go +examples/data-sources/airbyte_source_hubplanner/data-source.tf +internal/provider/source_hubspot_data_source.go +internal/provider/source_hubspot_data_source_sdk.go +examples/data-sources/airbyte_source_hubspot/data-source.tf +internal/provider/source_insightly_data_source.go +internal/provider/source_insightly_data_source_sdk.go +examples/data-sources/airbyte_source_insightly/data-source.tf +internal/provider/source_instagram_data_source.go +internal/provider/source_instagram_data_source_sdk.go +examples/data-sources/airbyte_source_instagram/data-source.tf +internal/provider/source_instatus_data_source.go +internal/provider/source_instatus_data_source_sdk.go +examples/data-sources/airbyte_source_instatus/data-source.tf +internal/provider/source_intercom_data_source.go +internal/provider/source_intercom_data_source_sdk.go +examples/data-sources/airbyte_source_intercom/data-source.tf +internal/provider/source_ip2whois_data_source.go +internal/provider/source_ip2whois_data_source_sdk.go +examples/data-sources/airbyte_source_ip2whois/data-source.tf +internal/provider/source_iterable_data_source.go +internal/provider/source_iterable_data_source_sdk.go +examples/data-sources/airbyte_source_iterable/data-source.tf +internal/provider/source_jira_data_source.go +internal/provider/source_jira_data_source_sdk.go +examples/data-sources/airbyte_source_jira/data-source.tf +internal/provider/source_k6cloud_data_source.go +internal/provider/source_k6cloud_data_source_sdk.go +examples/data-sources/airbyte_source_k6_cloud/data-source.tf +internal/provider/source_klarna_data_source.go +internal/provider/source_klarna_data_source_sdk.go +examples/data-sources/airbyte_source_klarna/data-source.tf +internal/provider/source_klaviyo_data_source.go +internal/provider/source_klaviyo_data_source_sdk.go +examples/data-sources/airbyte_source_klaviyo/data-source.tf +internal/provider/source_kustomersinger_data_source.go +internal/provider/source_kustomersinger_data_source_sdk.go +examples/data-sources/airbyte_source_kustomer_singer/data-source.tf +internal/provider/source_launchdarkly_data_source.go +internal/provider/source_launchdarkly_data_source_sdk.go +examples/data-sources/airbyte_source_launchdarkly/data-source.tf +internal/provider/source_lemlist_data_source.go +internal/provider/source_lemlist_data_source_sdk.go +examples/data-sources/airbyte_source_lemlist/data-source.tf +internal/provider/source_linkedinads_data_source.go +internal/provider/source_linkedinads_data_source_sdk.go +examples/data-sources/airbyte_source_linkedin_ads/data-source.tf +internal/provider/source_linkedinpages_data_source.go +internal/provider/source_linkedinpages_data_source_sdk.go +examples/data-sources/airbyte_source_linkedin_pages/data-source.tf +internal/provider/source_linnworks_data_source.go +internal/provider/source_linnworks_data_source_sdk.go +examples/data-sources/airbyte_source_linnworks/data-source.tf +internal/provider/source_lokalise_data_source.go +internal/provider/source_lokalise_data_source_sdk.go +examples/data-sources/airbyte_source_lokalise/data-source.tf +internal/provider/source_mailchimp_data_source.go +internal/provider/source_mailchimp_data_source_sdk.go +examples/data-sources/airbyte_source_mailchimp/data-source.tf +internal/provider/source_mailgun_data_source.go +internal/provider/source_mailgun_data_source_sdk.go +examples/data-sources/airbyte_source_mailgun/data-source.tf +internal/provider/source_mailjetsms_data_source.go +internal/provider/source_mailjetsms_data_source_sdk.go +examples/data-sources/airbyte_source_mailjet_sms/data-source.tf +internal/provider/source_marketo_data_source.go +internal/provider/source_marketo_data_source_sdk.go +examples/data-sources/airbyte_source_marketo/data-source.tf +internal/provider/source_metabase_data_source.go +internal/provider/source_metabase_data_source_sdk.go +examples/data-sources/airbyte_source_metabase/data-source.tf +internal/provider/source_microsoftteams_data_source.go +internal/provider/source_microsoftteams_data_source_sdk.go +examples/data-sources/airbyte_source_microsoft_teams/data-source.tf +internal/provider/source_mixpanel_data_source.go +internal/provider/source_mixpanel_data_source_sdk.go +examples/data-sources/airbyte_source_mixpanel/data-source.tf +internal/provider/source_monday_data_source.go +internal/provider/source_monday_data_source_sdk.go +examples/data-sources/airbyte_source_monday/data-source.tf +internal/provider/source_mongodb_data_source.go +internal/provider/source_mongodb_data_source_sdk.go +examples/data-sources/airbyte_source_mongodb/data-source.tf +internal/provider/source_mssql_data_source.go +internal/provider/source_mssql_data_source_sdk.go +examples/data-sources/airbyte_source_mssql/data-source.tf +internal/provider/source_myhours_data_source.go +internal/provider/source_myhours_data_source_sdk.go +examples/data-sources/airbyte_source_my_hours/data-source.tf +internal/provider/source_mysql_data_source.go +internal/provider/source_mysql_data_source_sdk.go +examples/data-sources/airbyte_source_mysql/data-source.tf +internal/provider/source_netsuite_data_source.go +internal/provider/source_netsuite_data_source_sdk.go +examples/data-sources/airbyte_source_netsuite/data-source.tf +internal/provider/source_notion_data_source.go +internal/provider/source_notion_data_source_sdk.go +examples/data-sources/airbyte_source_notion/data-source.tf +internal/provider/source_nytimes_data_source.go +internal/provider/source_nytimes_data_source_sdk.go +examples/data-sources/airbyte_source_nytimes/data-source.tf +internal/provider/source_okta_data_source.go +internal/provider/source_okta_data_source_sdk.go +examples/data-sources/airbyte_source_okta/data-source.tf +internal/provider/source_omnisend_data_source.go +internal/provider/source_omnisend_data_source_sdk.go +examples/data-sources/airbyte_source_omnisend/data-source.tf +internal/provider/source_onesignal_data_source.go +internal/provider/source_onesignal_data_source_sdk.go +examples/data-sources/airbyte_source_onesignal/data-source.tf +internal/provider/source_openweather_data_source.go +internal/provider/source_openweather_data_source_sdk.go +examples/data-sources/airbyte_source_openweather/data-source.tf +internal/provider/source_oracle_data_source.go +internal/provider/source_oracle_data_source_sdk.go +examples/data-sources/airbyte_source_oracle/data-source.tf +internal/provider/source_orb_data_source.go +internal/provider/source_orb_data_source_sdk.go +examples/data-sources/airbyte_source_orb/data-source.tf +internal/provider/source_orbit_data_source.go +internal/provider/source_orbit_data_source_sdk.go +examples/data-sources/airbyte_source_orbit/data-source.tf +internal/provider/source_outreach_data_source.go +internal/provider/source_outreach_data_source_sdk.go +examples/data-sources/airbyte_source_outreach/data-source.tf +internal/provider/source_paypaltransaction_data_source.go +internal/provider/source_paypaltransaction_data_source_sdk.go +examples/data-sources/airbyte_source_paypal_transaction/data-source.tf +internal/provider/source_paystack_data_source.go +internal/provider/source_paystack_data_source_sdk.go +examples/data-sources/airbyte_source_paystack/data-source.tf +internal/provider/source_pendo_data_source.go +internal/provider/source_pendo_data_source_sdk.go +examples/data-sources/airbyte_source_pendo/data-source.tf +internal/provider/source_persistiq_data_source.go +internal/provider/source_persistiq_data_source_sdk.go +examples/data-sources/airbyte_source_persistiq/data-source.tf +internal/provider/source_pexelsapi_data_source.go +internal/provider/source_pexelsapi_data_source_sdk.go +examples/data-sources/airbyte_source_pexels_api/data-source.tf +internal/provider/source_pinterest_data_source.go +internal/provider/source_pinterest_data_source_sdk.go +examples/data-sources/airbyte_source_pinterest/data-source.tf +internal/provider/source_pipedrive_data_source.go +internal/provider/source_pipedrive_data_source_sdk.go +examples/data-sources/airbyte_source_pipedrive/data-source.tf +internal/provider/source_pocket_data_source.go +internal/provider/source_pocket_data_source_sdk.go +examples/data-sources/airbyte_source_pocket/data-source.tf +internal/provider/source_pokeapi_data_source.go +internal/provider/source_pokeapi_data_source_sdk.go +examples/data-sources/airbyte_source_pokeapi/data-source.tf +internal/provider/source_polygonstockapi_data_source.go +internal/provider/source_polygonstockapi_data_source_sdk.go +examples/data-sources/airbyte_source_polygon_stock_api/data-source.tf +internal/provider/source_postgres_data_source.go +internal/provider/source_postgres_data_source_sdk.go +examples/data-sources/airbyte_source_postgres/data-source.tf +internal/provider/source_posthog_data_source.go +internal/provider/source_posthog_data_source_sdk.go +examples/data-sources/airbyte_source_posthog/data-source.tf +internal/provider/source_postmarkapp_data_source.go +internal/provider/source_postmarkapp_data_source_sdk.go +examples/data-sources/airbyte_source_postmarkapp/data-source.tf +internal/provider/source_prestashop_data_source.go +internal/provider/source_prestashop_data_source_sdk.go +examples/data-sources/airbyte_source_prestashop/data-source.tf +internal/provider/source_publicapis_data_source.go +internal/provider/source_publicapis_data_source_sdk.go +examples/data-sources/airbyte_source_public_apis/data-source.tf +internal/provider/source_punkapi_data_source.go +internal/provider/source_punkapi_data_source_sdk.go +examples/data-sources/airbyte_source_punk_api/data-source.tf +internal/provider/source_pypi_data_source.go +internal/provider/source_pypi_data_source_sdk.go +examples/data-sources/airbyte_source_pypi/data-source.tf +internal/provider/source_qualaroo_data_source.go +internal/provider/source_qualaroo_data_source_sdk.go +examples/data-sources/airbyte_source_qualaroo/data-source.tf +internal/provider/source_quickbooks_data_source.go +internal/provider/source_quickbooks_data_source_sdk.go +examples/data-sources/airbyte_source_quickbooks/data-source.tf +internal/provider/source_railz_data_source.go +internal/provider/source_railz_data_source_sdk.go +examples/data-sources/airbyte_source_railz/data-source.tf +internal/provider/source_recharge_data_source.go +internal/provider/source_recharge_data_source_sdk.go +examples/data-sources/airbyte_source_recharge/data-source.tf +internal/provider/source_recreation_data_source.go +internal/provider/source_recreation_data_source_sdk.go +examples/data-sources/airbyte_source_recreation/data-source.tf +internal/provider/source_recruitee_data_source.go +internal/provider/source_recruitee_data_source_sdk.go +examples/data-sources/airbyte_source_recruitee/data-source.tf +internal/provider/source_recurly_data_source.go +internal/provider/source_recurly_data_source_sdk.go +examples/data-sources/airbyte_source_recurly/data-source.tf +internal/provider/source_redshift_data_source.go +internal/provider/source_redshift_data_source_sdk.go +examples/data-sources/airbyte_source_redshift/data-source.tf +internal/provider/source_retently_data_source.go +internal/provider/source_retently_data_source_sdk.go +examples/data-sources/airbyte_source_retently/data-source.tf +internal/provider/source_rkicovid_data_source.go +internal/provider/source_rkicovid_data_source_sdk.go +examples/data-sources/airbyte_source_rki_covid/data-source.tf +internal/provider/source_rss_data_source.go +internal/provider/source_rss_data_source_sdk.go +examples/data-sources/airbyte_source_rss/data-source.tf +internal/provider/source_s3_data_source.go +internal/provider/source_s3_data_source_sdk.go +examples/data-sources/airbyte_source_s3/data-source.tf +internal/provider/source_salesforce_data_source.go +internal/provider/source_salesforce_data_source_sdk.go +examples/data-sources/airbyte_source_salesforce/data-source.tf +internal/provider/source_salesforcesinger_data_source.go +internal/provider/source_salesforcesinger_data_source_sdk.go +examples/data-sources/airbyte_source_salesforce_singer/data-source.tf +internal/provider/source_salesloft_data_source.go +internal/provider/source_salesloft_data_source_sdk.go +examples/data-sources/airbyte_source_salesloft/data-source.tf +internal/provider/source_sapfieldglass_data_source.go +internal/provider/source_sapfieldglass_data_source_sdk.go +examples/data-sources/airbyte_source_sap_fieldglass/data-source.tf +internal/provider/source_secoda_data_source.go +internal/provider/source_secoda_data_source_sdk.go +examples/data-sources/airbyte_source_secoda/data-source.tf +internal/provider/source_sendgrid_data_source.go +internal/provider/source_sendgrid_data_source_sdk.go +examples/data-sources/airbyte_source_sendgrid/data-source.tf +internal/provider/source_sendinblue_data_source.go +internal/provider/source_sendinblue_data_source_sdk.go +examples/data-sources/airbyte_source_sendinblue/data-source.tf +internal/provider/source_senseforce_data_source.go +internal/provider/source_senseforce_data_source_sdk.go +examples/data-sources/airbyte_source_senseforce/data-source.tf +internal/provider/source_sentry_data_source.go +internal/provider/source_sentry_data_source_sdk.go +examples/data-sources/airbyte_source_sentry/data-source.tf +internal/provider/source_sftp_data_source.go +internal/provider/source_sftp_data_source_sdk.go +examples/data-sources/airbyte_source_sftp/data-source.tf +internal/provider/source_sftpbulk_data_source.go +internal/provider/source_sftpbulk_data_source_sdk.go +examples/data-sources/airbyte_source_sftp_bulk/data-source.tf +internal/provider/source_shopify_data_source.go +internal/provider/source_shopify_data_source_sdk.go +examples/data-sources/airbyte_source_shopify/data-source.tf +internal/provider/source_shortio_data_source.go +internal/provider/source_shortio_data_source_sdk.go +examples/data-sources/airbyte_source_shortio/data-source.tf +internal/provider/source_slack_data_source.go +internal/provider/source_slack_data_source_sdk.go +examples/data-sources/airbyte_source_slack/data-source.tf +internal/provider/source_smaily_data_source.go +internal/provider/source_smaily_data_source_sdk.go +examples/data-sources/airbyte_source_smaily/data-source.tf +internal/provider/source_smartengage_data_source.go +internal/provider/source_smartengage_data_source_sdk.go +examples/data-sources/airbyte_source_smartengage/data-source.tf +internal/provider/source_smartsheets_data_source.go +internal/provider/source_smartsheets_data_source_sdk.go +examples/data-sources/airbyte_source_smartsheets/data-source.tf +internal/provider/source_snapchatmarketing_data_source.go +internal/provider/source_snapchatmarketing_data_source_sdk.go +examples/data-sources/airbyte_source_snapchat_marketing/data-source.tf +internal/provider/source_snowflake_data_source.go +internal/provider/source_snowflake_data_source_sdk.go +examples/data-sources/airbyte_source_snowflake/data-source.tf +internal/provider/source_sonarcloud_data_source.go +internal/provider/source_sonarcloud_data_source_sdk.go +examples/data-sources/airbyte_source_sonar_cloud/data-source.tf +internal/provider/source_spacexapi_data_source.go +internal/provider/source_spacexapi_data_source_sdk.go +examples/data-sources/airbyte_source_spacex_api/data-source.tf +internal/provider/source_square_data_source.go +internal/provider/source_square_data_source_sdk.go +examples/data-sources/airbyte_source_square/data-source.tf +internal/provider/source_strava_data_source.go +internal/provider/source_strava_data_source_sdk.go +examples/data-sources/airbyte_source_strava/data-source.tf +internal/provider/source_stripe_data_source.go +internal/provider/source_stripe_data_source_sdk.go +examples/data-sources/airbyte_source_stripe/data-source.tf +internal/provider/source_surveymonkey_data_source.go +internal/provider/source_surveymonkey_data_source_sdk.go +examples/data-sources/airbyte_source_surveymonkey/data-source.tf +internal/provider/source_surveysparrow_data_source.go +internal/provider/source_surveysparrow_data_source_sdk.go +examples/data-sources/airbyte_source_survey_sparrow/data-source.tf +internal/provider/source_tempo_data_source.go +internal/provider/source_tempo_data_source_sdk.go +examples/data-sources/airbyte_source_tempo/data-source.tf +internal/provider/source_theguardianapi_data_source.go +internal/provider/source_theguardianapi_data_source_sdk.go +examples/data-sources/airbyte_source_the_guardian_api/data-source.tf +internal/provider/source_tiktokmarketing_data_source.go +internal/provider/source_tiktokmarketing_data_source_sdk.go +examples/data-sources/airbyte_source_tiktok_marketing/data-source.tf +internal/provider/source_todoist_data_source.go +internal/provider/source_todoist_data_source_sdk.go +examples/data-sources/airbyte_source_todoist/data-source.tf +internal/provider/source_trello_data_source.go +internal/provider/source_trello_data_source_sdk.go +examples/data-sources/airbyte_source_trello/data-source.tf +internal/provider/source_trustpilot_data_source.go +internal/provider/source_trustpilot_data_source_sdk.go +examples/data-sources/airbyte_source_trustpilot/data-source.tf +internal/provider/source_tvmazeschedule_data_source.go +internal/provider/source_tvmazeschedule_data_source_sdk.go +examples/data-sources/airbyte_source_tvmaze_schedule/data-source.tf +internal/provider/source_twilio_data_source.go +internal/provider/source_twilio_data_source_sdk.go +examples/data-sources/airbyte_source_twilio/data-source.tf +internal/provider/source_twiliotaskrouter_data_source.go +internal/provider/source_twiliotaskrouter_data_source_sdk.go +examples/data-sources/airbyte_source_twilio_taskrouter/data-source.tf +internal/provider/source_twitter_data_source.go +internal/provider/source_twitter_data_source_sdk.go +examples/data-sources/airbyte_source_twitter/data-source.tf +internal/provider/source_typeform_data_source.go +internal/provider/source_typeform_data_source_sdk.go +examples/data-sources/airbyte_source_typeform/data-source.tf +internal/provider/source_uscensus_data_source.go +internal/provider/source_uscensus_data_source_sdk.go +examples/data-sources/airbyte_source_us_census/data-source.tf +internal/provider/source_vantage_data_source.go +internal/provider/source_vantage_data_source_sdk.go +examples/data-sources/airbyte_source_vantage/data-source.tf +internal/provider/source_webflow_data_source.go +internal/provider/source_webflow_data_source_sdk.go +examples/data-sources/airbyte_source_webflow/data-source.tf +internal/provider/source_whiskyhunter_data_source.go +internal/provider/source_whiskyhunter_data_source_sdk.go +examples/data-sources/airbyte_source_whisky_hunter/data-source.tf +internal/provider/source_wikipediapageviews_data_source.go +internal/provider/source_wikipediapageviews_data_source_sdk.go +examples/data-sources/airbyte_source_wikipedia_pageviews/data-source.tf +internal/provider/source_woocommerce_data_source.go +internal/provider/source_woocommerce_data_source_sdk.go +examples/data-sources/airbyte_source_woocommerce/data-source.tf +internal/provider/source_xero_data_source.go +internal/provider/source_xero_data_source_sdk.go +examples/data-sources/airbyte_source_xero/data-source.tf +internal/provider/source_xkcd_data_source.go +internal/provider/source_xkcd_data_source_sdk.go +examples/data-sources/airbyte_source_xkcd/data-source.tf +internal/provider/source_yandexmetrica_data_source.go +internal/provider/source_yandexmetrica_data_source_sdk.go +examples/data-sources/airbyte_source_yandex_metrica/data-source.tf +internal/provider/source_yotpo_data_source.go +internal/provider/source_yotpo_data_source_sdk.go +examples/data-sources/airbyte_source_yotpo/data-source.tf +internal/provider/source_younium_data_source.go +internal/provider/source_younium_data_source_sdk.go +examples/data-sources/airbyte_source_younium/data-source.tf +internal/provider/source_youtubeanalytics_data_source.go +internal/provider/source_youtubeanalytics_data_source_sdk.go +examples/data-sources/airbyte_source_youtube_analytics/data-source.tf +internal/provider/source_zendeskchat_data_source.go +internal/provider/source_zendeskchat_data_source_sdk.go +examples/data-sources/airbyte_source_zendesk_chat/data-source.tf +internal/provider/source_zendesksunshine_data_source.go +internal/provider/source_zendesksunshine_data_source_sdk.go +examples/data-sources/airbyte_source_zendesk_sunshine/data-source.tf +internal/provider/source_zendesksupport_data_source.go +internal/provider/source_zendesksupport_data_source_sdk.go +examples/data-sources/airbyte_source_zendesk_support/data-source.tf +internal/provider/source_zendesktalk_data_source.go +internal/provider/source_zendesktalk_data_source_sdk.go +examples/data-sources/airbyte_source_zendesk_talk/data-source.tf +internal/provider/source_zenloop_data_source.go +internal/provider/source_zenloop_data_source_sdk.go +examples/data-sources/airbyte_source_zenloop/data-source.tf +internal/provider/source_zohocrm_data_source.go +internal/provider/source_zohocrm_data_source_sdk.go +examples/data-sources/airbyte_source_zoho_crm/data-source.tf +internal/provider/source_zoom_data_source.go +internal/provider/source_zoom_data_source_sdk.go +examples/data-sources/airbyte_source_zoom/data-source.tf +internal/provider/source_zuora_data_source.go +internal/provider/source_zuora_data_source_sdk.go +examples/data-sources/airbyte_source_zuora/data-source.tf +internal/provider/workspace_data_source.go +internal/provider/workspace_data_source_sdk.go +examples/data-sources/airbyte_workspace/data-source.tf \ No newline at end of file diff --git a/internal/provider/connection_resource_sdk.go b/internal/provider/connection_resource_sdk.go index 86025766c..1760666f7 100755 --- a/internal/provider/connection_resource_sdk.go +++ b/internal/provider/connection_resource_sdk.go @@ -10,16 +10,16 @@ import ( func (r *ConnectionResourceModel) ToCreateSDKType() *shared.ConnectionCreateRequest { var configurations *shared.StreamConfigurations if r.Configurations != nil { - streams := make([]shared.StreamConfiguration, 0) + var streams []shared.StreamConfiguration = nil for _, streamsItem := range r.Configurations.Streams { - cursorField := make([]string, 0) + var cursorField []string = nil for _, cursorFieldItem := range streamsItem.CursorField { cursorField = append(cursorField, cursorFieldItem.ValueString()) } name := streamsItem.Name.ValueString() - primaryKey := make([][]string, 0) + var primaryKey [][]string = nil for _, primaryKeyItem := range streamsItem.PrimaryKey { - primaryKeyTmp := make([]string, 0) + var primaryKeyTmp []string = nil for _, item := range primaryKeyItem { primaryKeyTmp = append(primaryKeyTmp, item.ValueString()) } @@ -124,16 +124,16 @@ func (r *ConnectionResourceModel) ToGetSDKType() *shared.ConnectionCreateRequest func (r *ConnectionResourceModel) ToUpdateSDKType() *shared.ConnectionPatchRequest { var configurations *shared.StreamConfigurations if r.Configurations != nil { - streams := make([]shared.StreamConfiguration, 0) + var streams []shared.StreamConfiguration = nil for _, streamsItem := range r.Configurations.Streams { - cursorField := make([]string, 0) + var cursorField []string = nil for _, cursorFieldItem := range streamsItem.CursorField { cursorField = append(cursorField, cursorFieldItem.ValueString()) } name := streamsItem.Name.ValueString() - primaryKey := make([][]string, 0) + var primaryKey [][]string = nil for _, primaryKeyItem := range streamsItem.PrimaryKey { - primaryKeyTmp := make([]string, 0) + var primaryKeyTmp []string = nil for _, item := range primaryKeyItem { primaryKeyTmp = append(primaryKeyTmp, item.ValueString()) } diff --git a/internal/provider/destination_awsdatalake_resource_sdk.go b/internal/provider/destination_awsdatalake_resource_sdk.go index 4cb71fd20..079e1f995 100755 --- a/internal/provider/destination_awsdatalake_resource_sdk.go +++ b/internal/provider/destination_awsdatalake_resource_sdk.go @@ -54,42 +54,44 @@ func (r *DestinationAwsDatalakeResourceModel) ToCreateSDKType() *shared.Destinat } destinationType := shared.DestinationAwsDatalakeAwsDatalake(r.Configuration.DestinationType.ValueString()) var format *shared.DestinationAwsDatalakeOutputFormatWildcard - var destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON *shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON - if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { - compressionCodec := new(shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional) - if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsNull() { - *compressionCodec = shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.ValueString()) - } else { - compressionCodec = nil + if r.Configuration.Format != nil { + var destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON *shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON + if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { + compressionCodec := new(shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional) + if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsNull() { + *compressionCodec = shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.ValueString()) + } else { + compressionCodec = nil + } + formatType := shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) + destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON = &shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON{ + CompressionCodec: compressionCodec, + FormatType: formatType, + } } - formatType := shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSONFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) - destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON = &shared.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON{ - CompressionCodec: compressionCodec, - FormatType: formatType, + if destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { + format = &shared.DestinationAwsDatalakeOutputFormatWildcard{ + DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON: destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON, + } } - } - if destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { - format = &shared.DestinationAwsDatalakeOutputFormatWildcard{ - DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON: destinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON, - } - } - var destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage *shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage - if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { - compressionCodec1 := new(shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional) - if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsNull() { - *compressionCodec1 = shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.ValueString()) - } else { - compressionCodec1 = nil + var destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage *shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage + if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { + compressionCodec1 := new(shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional) + if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsNull() { + *compressionCodec1 = shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.ValueString()) + } else { + compressionCodec1 = nil + } + formatType1 := shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.FormatType.ValueString()) + destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage = &shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage{ + CompressionCodec: compressionCodec1, + FormatType: formatType1, + } } - formatType1 := shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorageFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.FormatType.ValueString()) - destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage = &shared.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage{ - CompressionCodec: compressionCodec1, - FormatType: formatType1, - } - } - if destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { - format = &shared.DestinationAwsDatalakeOutputFormatWildcard{ - DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage: destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage, + if destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { + format = &shared.DestinationAwsDatalakeOutputFormatWildcard{ + DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage: destinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage, + } } } glueCatalogFloatAsDecimal := new(bool) @@ -200,42 +202,44 @@ func (r *DestinationAwsDatalakeResourceModel) ToUpdateSDKType() *shared.Destinat } } var format *shared.DestinationAwsDatalakeUpdateOutputFormatWildcard - var destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON *shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON - if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { - compressionCodec := new(shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional) - if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsNull() { - *compressionCodec = shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.ValueString()) - } else { - compressionCodec = nil + if r.Configuration.Format != nil { + var destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON *shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON + if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { + compressionCodec := new(shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional) + if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.IsNull() { + *compressionCodec = shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.CompressionCodec.ValueString()) + } else { + compressionCodec = nil + } + formatType := shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) + destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON{ + CompressionCodec: compressionCodec, + FormatType: formatType, + } } - formatType := shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSONFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) - destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON{ - CompressionCodec: compressionCodec, - FormatType: formatType, + if destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { + format = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcard{ + DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON: destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON, + } } - } - if destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON != nil { - format = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcard{ - DestinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON: destinationAwsDatalakeUpdateOutputFormatWildcardJSONLinesNewlineDelimitedJSON, - } - } - var destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage *shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage - if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { - compressionCodec1 := new(shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional) - if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsNull() { - *compressionCodec1 = shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.ValueString()) - } else { - compressionCodec1 = nil + var destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage *shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage + if r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage != nil { + compressionCodec1 := new(shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional) + if !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.IsNull() { + *compressionCodec1 = shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageCompressionCodecOptional(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.CompressionCodec.ValueString()) + } else { + compressionCodec1 = nil + } + formatType1 := shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.FormatType.ValueString()) + destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage{ + CompressionCodec: compressionCodec1, + FormatType: formatType1, + } } - formatType1 := shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorageFormatTypeWildcard(r.Configuration.Format.DestinationAwsDatalakeOutputFormatWildcardParquetColumnarStorage.FormatType.ValueString()) - destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage{ - CompressionCodec: compressionCodec1, - FormatType: formatType1, - } - } - if destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage != nil { - format = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcard{ - DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage: destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage, + if destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage != nil { + format = &shared.DestinationAwsDatalakeUpdateOutputFormatWildcard{ + DestinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage: destinationAwsDatalakeUpdateOutputFormatWildcardParquetColumnarStorage, + } } } glueCatalogFloatAsDecimal := new(bool) diff --git a/internal/provider/destination_bigquery_resource_sdk.go b/internal/provider/destination_bigquery_resource_sdk.go index bb22574ac..5aac1f8a6 100755 --- a/internal/provider/destination_bigquery_resource_sdk.go +++ b/internal/provider/destination_bigquery_resource_sdk.go @@ -24,28 +24,30 @@ func (r *DestinationBigqueryResourceModel) ToCreateSDKType() *shared.Destination datasetLocation := shared.DestinationBigqueryDatasetLocation(r.Configuration.DatasetLocation.ValueString()) destinationType := shared.DestinationBigqueryBigquery(r.Configuration.DestinationType.ValueString()) var loadingMethod *shared.DestinationBigqueryLoadingMethod - var destinationBigqueryLoadingMethodStandardInserts *shared.DestinationBigqueryLoadingMethodStandardInserts - if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging != nil { - method := shared.DestinationBigqueryLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging.Method.ValueString()) - destinationBigqueryLoadingMethodStandardInserts = &shared.DestinationBigqueryLoadingMethodStandardInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationBigqueryLoadingMethodStandardInserts *shared.DestinationBigqueryLoadingMethodStandardInserts + if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging != nil { + method := shared.DestinationBigqueryLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging.Method.ValueString()) + destinationBigqueryLoadingMethodStandardInserts = &shared.DestinationBigqueryLoadingMethodStandardInserts{ + Method: method, + } } - } - if destinationBigqueryLoadingMethodStandardInserts != nil { - loadingMethod = &shared.DestinationBigqueryLoadingMethod{ - DestinationBigqueryLoadingMethodStandardInserts: destinationBigqueryLoadingMethodStandardInserts, + if destinationBigqueryLoadingMethodStandardInserts != nil { + loadingMethod = &shared.DestinationBigqueryLoadingMethod{ + DestinationBigqueryLoadingMethodStandardInserts: destinationBigqueryLoadingMethodStandardInserts, + } } - } - var destinationBigqueryLoadingMethodGCSStaging *shared.DestinationBigqueryLoadingMethodGCSStaging - if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts != nil { - method1 := shared.DestinationBigqueryLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts.Method.ValueString()) - destinationBigqueryLoadingMethodGCSStaging = &shared.DestinationBigqueryLoadingMethodGCSStaging{ - Method: method1, + var destinationBigqueryLoadingMethodGCSStaging *shared.DestinationBigqueryLoadingMethodGCSStaging + if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts != nil { + method1 := shared.DestinationBigqueryLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts.Method.ValueString()) + destinationBigqueryLoadingMethodGCSStaging = &shared.DestinationBigqueryLoadingMethodGCSStaging{ + Method: method1, + } } - } - if destinationBigqueryLoadingMethodGCSStaging != nil { - loadingMethod = &shared.DestinationBigqueryLoadingMethod{ - DestinationBigqueryLoadingMethodGCSStaging: destinationBigqueryLoadingMethodGCSStaging, + if destinationBigqueryLoadingMethodGCSStaging != nil { + loadingMethod = &shared.DestinationBigqueryLoadingMethod{ + DestinationBigqueryLoadingMethodGCSStaging: destinationBigqueryLoadingMethodGCSStaging, + } } } projectID := r.Configuration.ProjectID.ValueString() @@ -96,28 +98,30 @@ func (r *DestinationBigqueryResourceModel) ToUpdateSDKType() *shared.Destination datasetID := r.Configuration.DatasetID.ValueString() datasetLocation := shared.DestinationBigqueryUpdateDatasetLocation(r.Configuration.DatasetLocation.ValueString()) var loadingMethod *shared.DestinationBigqueryUpdateLoadingMethod - var destinationBigqueryUpdateLoadingMethodStandardInserts *shared.DestinationBigqueryUpdateLoadingMethodStandardInserts - if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging != nil { - method := shared.DestinationBigqueryUpdateLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging.Method.ValueString()) - destinationBigqueryUpdateLoadingMethodStandardInserts = &shared.DestinationBigqueryUpdateLoadingMethodStandardInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationBigqueryUpdateLoadingMethodStandardInserts *shared.DestinationBigqueryUpdateLoadingMethodStandardInserts + if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging != nil { + method := shared.DestinationBigqueryUpdateLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodGCSStaging.Method.ValueString()) + destinationBigqueryUpdateLoadingMethodStandardInserts = &shared.DestinationBigqueryUpdateLoadingMethodStandardInserts{ + Method: method, + } } - } - if destinationBigqueryUpdateLoadingMethodStandardInserts != nil { - loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{ - DestinationBigqueryUpdateLoadingMethodStandardInserts: destinationBigqueryUpdateLoadingMethodStandardInserts, + if destinationBigqueryUpdateLoadingMethodStandardInserts != nil { + loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{ + DestinationBigqueryUpdateLoadingMethodStandardInserts: destinationBigqueryUpdateLoadingMethodStandardInserts, + } } - } - var destinationBigqueryUpdateLoadingMethodGCSStaging *shared.DestinationBigqueryUpdateLoadingMethodGCSStaging - if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts != nil { - method1 := shared.DestinationBigqueryUpdateLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts.Method.ValueString()) - destinationBigqueryUpdateLoadingMethodGCSStaging = &shared.DestinationBigqueryUpdateLoadingMethodGCSStaging{ - Method: method1, + var destinationBigqueryUpdateLoadingMethodGCSStaging *shared.DestinationBigqueryUpdateLoadingMethodGCSStaging + if r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts != nil { + method1 := shared.DestinationBigqueryUpdateLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryLoadingMethodStandardInserts.Method.ValueString()) + destinationBigqueryUpdateLoadingMethodGCSStaging = &shared.DestinationBigqueryUpdateLoadingMethodGCSStaging{ + Method: method1, + } } - } - if destinationBigqueryUpdateLoadingMethodGCSStaging != nil { - loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{ - DestinationBigqueryUpdateLoadingMethodGCSStaging: destinationBigqueryUpdateLoadingMethodGCSStaging, + if destinationBigqueryUpdateLoadingMethodGCSStaging != nil { + loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{ + DestinationBigqueryUpdateLoadingMethodGCSStaging: destinationBigqueryUpdateLoadingMethodGCSStaging, + } } } projectID := r.Configuration.ProjectID.ValueString() diff --git a/internal/provider/destination_bigquerydenormalized_resource_sdk.go b/internal/provider/destination_bigquerydenormalized_resource_sdk.go index ea460d3bd..7681a2181 100755 --- a/internal/provider/destination_bigquerydenormalized_resource_sdk.go +++ b/internal/provider/destination_bigquerydenormalized_resource_sdk.go @@ -29,28 +29,30 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToCreateSDKType() *shared } destinationType := shared.DestinationBigqueryDenormalizedBigqueryDenormalized(r.Configuration.DestinationType.ValueString()) var loadingMethod *shared.DestinationBigqueryDenormalizedLoadingMethod - var destinationBigqueryDenormalizedLoadingMethodStandardInserts *shared.DestinationBigqueryDenormalizedLoadingMethodStandardInserts - if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { - method := shared.DestinationBigqueryDenormalizedLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging.Method.ValueString()) - destinationBigqueryDenormalizedLoadingMethodStandardInserts = &shared.DestinationBigqueryDenormalizedLoadingMethodStandardInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationBigqueryDenormalizedLoadingMethodStandardInserts *shared.DestinationBigqueryDenormalizedLoadingMethodStandardInserts + if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { + method := shared.DestinationBigqueryDenormalizedLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging.Method.ValueString()) + destinationBigqueryDenormalizedLoadingMethodStandardInserts = &shared.DestinationBigqueryDenormalizedLoadingMethodStandardInserts{ + Method: method, + } } - } - if destinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { - loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{ - DestinationBigqueryDenormalizedLoadingMethodStandardInserts: destinationBigqueryDenormalizedLoadingMethodStandardInserts, + if destinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { + loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{ + DestinationBigqueryDenormalizedLoadingMethodStandardInserts: destinationBigqueryDenormalizedLoadingMethodStandardInserts, + } } - } - var destinationBigqueryDenormalizedLoadingMethodGCSStaging *shared.DestinationBigqueryDenormalizedLoadingMethodGCSStaging - if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { - method1 := shared.DestinationBigqueryDenormalizedLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts.Method.ValueString()) - destinationBigqueryDenormalizedLoadingMethodGCSStaging = &shared.DestinationBigqueryDenormalizedLoadingMethodGCSStaging{ - Method: method1, + var destinationBigqueryDenormalizedLoadingMethodGCSStaging *shared.DestinationBigqueryDenormalizedLoadingMethodGCSStaging + if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { + method1 := shared.DestinationBigqueryDenormalizedLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts.Method.ValueString()) + destinationBigqueryDenormalizedLoadingMethodGCSStaging = &shared.DestinationBigqueryDenormalizedLoadingMethodGCSStaging{ + Method: method1, + } } - } - if destinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { - loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{ - DestinationBigqueryDenormalizedLoadingMethodGCSStaging: destinationBigqueryDenormalizedLoadingMethodGCSStaging, + if destinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { + loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{ + DestinationBigqueryDenormalizedLoadingMethodGCSStaging: destinationBigqueryDenormalizedLoadingMethodGCSStaging, + } } } projectID := r.Configuration.ProjectID.ValueString() @@ -99,28 +101,30 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToUpdateSDKType() *shared datasetLocation = nil } var loadingMethod *shared.DestinationBigqueryDenormalizedUpdateLoadingMethod - var destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts *shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts - if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { - method := shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging.Method.ValueString()) - destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts *shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts + if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging != nil { + method := shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInsertsMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodGCSStaging.Method.ValueString()) + destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts{ + Method: method, + } } - } - if destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts != nil { - loadingMethod = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethod{ - DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts: destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts, + if destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts != nil { + loadingMethod = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethod{ + DestinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts: destinationBigqueryDenormalizedUpdateLoadingMethodStandardInserts, + } } - } - var destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging *shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging - if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { - method1 := shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts.Method.ValueString()) - destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging{ - Method: method1, + var destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging *shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging + if r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts != nil { + method1 := shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStagingMethod(r.Configuration.LoadingMethod.DestinationBigqueryDenormalizedLoadingMethodStandardInserts.Method.ValueString()) + destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging{ + Method: method1, + } } - } - if destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging != nil { - loadingMethod = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethod{ - DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging: destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging, + if destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging != nil { + loadingMethod = &shared.DestinationBigqueryDenormalizedUpdateLoadingMethod{ + DestinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging: destinationBigqueryDenormalizedUpdateLoadingMethodGCSStaging, + } } } projectID := r.Configuration.ProjectID.ValueString() diff --git a/internal/provider/destination_clickhouse_resource_sdk.go b/internal/provider/destination_clickhouse_resource_sdk.go index d0470b7ba..eb5583d04 100755 --- a/internal/provider/destination_clickhouse_resource_sdk.go +++ b/internal/provider/destination_clickhouse_resource_sdk.go @@ -25,52 +25,54 @@ func (r *DestinationClickhouseResourceModel) ToCreateSDKType() *shared.Destinati } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationClickhouseSSHTunnelMethod - var destinationClickhouseSSHTunnelMethodNoTunnel *shared.DestinationClickhouseSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationClickhouseSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationClickhouseSSHTunnelMethodNoTunnel = &shared.DestinationClickhouseSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationClickhouseSSHTunnelMethodNoTunnel *shared.DestinationClickhouseSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationClickhouseSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationClickhouseSSHTunnelMethodNoTunnel = &shared.DestinationClickhouseSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ - DestinationClickhouseSSHTunnelMethodNoTunnel: destinationClickhouseSSHTunnelMethodNoTunnel, + if destinationClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ + DestinationClickhouseSSHTunnelMethodNoTunnel: destinationClickhouseSSHTunnelMethodNoTunnel, + } } - } - var destinationClickhouseSSHTunnelMethodSSHKeyAuthentication *shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationClickhouseSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationClickhouseSSHTunnelMethodSSHKeyAuthentication *shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationClickhouseSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ - DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication: destinationClickhouseSSHTunnelMethodSSHKeyAuthentication, + if destinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ + DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication: destinationClickhouseSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationClickhouseSSHTunnelMethodPasswordAuthentication *shared.DestinationClickhouseSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationClickhouseSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationClickhouseSSHTunnelMethodPasswordAuthentication = &shared.DestinationClickhouseSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationClickhouseSSHTunnelMethodPasswordAuthentication *shared.DestinationClickhouseSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationClickhouseSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationClickhouseSSHTunnelMethodPasswordAuthentication = &shared.DestinationClickhouseSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ - DestinationClickhouseSSHTunnelMethodPasswordAuthentication: destinationClickhouseSSHTunnelMethodPasswordAuthentication, + if destinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{ + DestinationClickhouseSSHTunnelMethodPasswordAuthentication: destinationClickhouseSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -116,52 +118,54 @@ func (r *DestinationClickhouseResourceModel) ToUpdateSDKType() *shared.Destinati } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationClickhouseUpdateSSHTunnelMethod - var destinationClickhouseUpdateSSHTunnelMethodNoTunnel *shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationClickhouseUpdateSSHTunnelMethodNoTunnel = &shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationClickhouseUpdateSSHTunnelMethodNoTunnel *shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationClickhouseUpdateSSHTunnelMethodNoTunnel = &shared.DestinationClickhouseUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationClickhouseUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ - DestinationClickhouseUpdateSSHTunnelMethodNoTunnel: destinationClickhouseUpdateSSHTunnelMethodNoTunnel, + if destinationClickhouseUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ + DestinationClickhouseUpdateSSHTunnelMethodNoTunnel: destinationClickhouseUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ - DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication: destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ + DestinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication: destinationClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ - DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication: destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication, + if destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationClickhouseUpdateSSHTunnelMethod{ + DestinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication: destinationClickhouseUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_elasticsearch_resource_sdk.go b/internal/provider/destination_elasticsearch_resource_sdk.go index e610cc78d..25b1181bd 100755 --- a/internal/provider/destination_elasticsearch_resource_sdk.go +++ b/internal/provider/destination_elasticsearch_resource_sdk.go @@ -9,36 +9,38 @@ import ( func (r *DestinationElasticsearchResourceModel) ToCreateSDKType() *shared.DestinationElasticsearchCreateRequest { var authenticationMethod *shared.DestinationElasticsearchAuthenticationMethod - var destinationElasticsearchAuthenticationMethodAPIKeySecret *shared.DestinationElasticsearchAuthenticationMethodAPIKeySecret - if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret != nil { - apiKeyID := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeyID.ValueString() - apiKeySecret := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeySecret.ValueString() - method := shared.DestinationElasticsearchAuthenticationMethodAPIKeySecretMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.Method.ValueString()) - destinationElasticsearchAuthenticationMethodAPIKeySecret = &shared.DestinationElasticsearchAuthenticationMethodAPIKeySecret{ - APIKeyID: apiKeyID, - APIKeySecret: apiKeySecret, - Method: method, + if r.Configuration.AuthenticationMethod != nil { + var destinationElasticsearchAuthenticationMethodAPIKeySecret *shared.DestinationElasticsearchAuthenticationMethodAPIKeySecret + if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret != nil { + apiKeyID := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeyID.ValueString() + apiKeySecret := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeySecret.ValueString() + method := shared.DestinationElasticsearchAuthenticationMethodAPIKeySecretMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.Method.ValueString()) + destinationElasticsearchAuthenticationMethodAPIKeySecret = &shared.DestinationElasticsearchAuthenticationMethodAPIKeySecret{ + APIKeyID: apiKeyID, + APIKeySecret: apiKeySecret, + Method: method, + } } - } - if destinationElasticsearchAuthenticationMethodAPIKeySecret != nil { - authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{ - DestinationElasticsearchAuthenticationMethodAPIKeySecret: destinationElasticsearchAuthenticationMethodAPIKeySecret, + if destinationElasticsearchAuthenticationMethodAPIKeySecret != nil { + authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{ + DestinationElasticsearchAuthenticationMethodAPIKeySecret: destinationElasticsearchAuthenticationMethodAPIKeySecret, + } } - } - var destinationElasticsearchAuthenticationMethodUsernamePassword *shared.DestinationElasticsearchAuthenticationMethodUsernamePassword - if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword != nil { - method1 := shared.DestinationElasticsearchAuthenticationMethodUsernamePasswordMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Method.ValueString()) - password := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Password.ValueString() - username := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Username.ValueString() - destinationElasticsearchAuthenticationMethodUsernamePassword = &shared.DestinationElasticsearchAuthenticationMethodUsernamePassword{ - Method: method1, - Password: password, - Username: username, + var destinationElasticsearchAuthenticationMethodUsernamePassword *shared.DestinationElasticsearchAuthenticationMethodUsernamePassword + if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword != nil { + method1 := shared.DestinationElasticsearchAuthenticationMethodUsernamePasswordMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Method.ValueString()) + password := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Password.ValueString() + username := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Username.ValueString() + destinationElasticsearchAuthenticationMethodUsernamePassword = &shared.DestinationElasticsearchAuthenticationMethodUsernamePassword{ + Method: method1, + Password: password, + Username: username, + } } - } - if destinationElasticsearchAuthenticationMethodUsernamePassword != nil { - authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{ - DestinationElasticsearchAuthenticationMethodUsernamePassword: destinationElasticsearchAuthenticationMethodUsernamePassword, + if destinationElasticsearchAuthenticationMethodUsernamePassword != nil { + authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{ + DestinationElasticsearchAuthenticationMethodUsernamePassword: destinationElasticsearchAuthenticationMethodUsernamePassword, + } } } caCertificate := new(string) @@ -79,36 +81,38 @@ func (r *DestinationElasticsearchResourceModel) ToGetSDKType() *shared.Destinati func (r *DestinationElasticsearchResourceModel) ToUpdateSDKType() *shared.DestinationElasticsearchPutRequest { var authenticationMethod *shared.DestinationElasticsearchUpdateAuthenticationMethod - var destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret *shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret - if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret != nil { - apiKeyID := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeyID.ValueString() - apiKeySecret := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeySecret.ValueString() - method := shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecretMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.Method.ValueString()) - destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret = &shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret{ - APIKeyID: apiKeyID, - APIKeySecret: apiKeySecret, - Method: method, + if r.Configuration.AuthenticationMethod != nil { + var destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret *shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret + if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret != nil { + apiKeyID := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeyID.ValueString() + apiKeySecret := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.APIKeySecret.ValueString() + method := shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecretMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodAPIKeySecret.Method.ValueString()) + destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret = &shared.DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret{ + APIKeyID: apiKeyID, + APIKeySecret: apiKeySecret, + Method: method, + } } - } - if destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret != nil { - authenticationMethod = &shared.DestinationElasticsearchUpdateAuthenticationMethod{ - DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret: destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret, + if destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret != nil { + authenticationMethod = &shared.DestinationElasticsearchUpdateAuthenticationMethod{ + DestinationElasticsearchUpdateAuthenticationMethodAPIKeySecret: destinationElasticsearchUpdateAuthenticationMethodAPIKeySecret, + } } - } - var destinationElasticsearchUpdateAuthenticationMethodUsernamePassword *shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword - if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword != nil { - method1 := shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePasswordMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Method.ValueString()) - password := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Password.ValueString() - username := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Username.ValueString() - destinationElasticsearchUpdateAuthenticationMethodUsernamePassword = &shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword{ - Method: method1, - Password: password, - Username: username, + var destinationElasticsearchUpdateAuthenticationMethodUsernamePassword *shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword + if r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword != nil { + method1 := shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePasswordMethod(r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Method.ValueString()) + password := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Password.ValueString() + username := r.Configuration.AuthenticationMethod.DestinationElasticsearchAuthenticationMethodUsernamePassword.Username.ValueString() + destinationElasticsearchUpdateAuthenticationMethodUsernamePassword = &shared.DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword{ + Method: method1, + Password: password, + Username: username, + } } - } - if destinationElasticsearchUpdateAuthenticationMethodUsernamePassword != nil { - authenticationMethod = &shared.DestinationElasticsearchUpdateAuthenticationMethod{ - DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword: destinationElasticsearchUpdateAuthenticationMethodUsernamePassword, + if destinationElasticsearchUpdateAuthenticationMethodUsernamePassword != nil { + authenticationMethod = &shared.DestinationElasticsearchUpdateAuthenticationMethod{ + DestinationElasticsearchUpdateAuthenticationMethodUsernamePassword: destinationElasticsearchUpdateAuthenticationMethodUsernamePassword, + } } } caCertificate := new(string) diff --git a/internal/provider/destination_firebolt_resource_sdk.go b/internal/provider/destination_firebolt_resource_sdk.go index 84489e4a5..c1a189da7 100755 --- a/internal/provider/destination_firebolt_resource_sdk.go +++ b/internal/provider/destination_firebolt_resource_sdk.go @@ -29,28 +29,30 @@ func (r *DestinationFireboltResourceModel) ToCreateSDKType() *shared.Destination host = nil } var loadingMethod *shared.DestinationFireboltLoadingMethod - var destinationFireboltLoadingMethodSQLInserts *shared.DestinationFireboltLoadingMethodSQLInserts - if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3 != nil { - method := shared.DestinationFireboltLoadingMethodSQLInsertsMethod(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3.Method.ValueString()) - destinationFireboltLoadingMethodSQLInserts = &shared.DestinationFireboltLoadingMethodSQLInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationFireboltLoadingMethodSQLInserts *shared.DestinationFireboltLoadingMethodSQLInserts + if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3 != nil { + method := shared.DestinationFireboltLoadingMethodSQLInsertsMethod(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3.Method.ValueString()) + destinationFireboltLoadingMethodSQLInserts = &shared.DestinationFireboltLoadingMethodSQLInserts{ + Method: method, + } } - } - if destinationFireboltLoadingMethodSQLInserts != nil { - loadingMethod = &shared.DestinationFireboltLoadingMethod{ - DestinationFireboltLoadingMethodSQLInserts: destinationFireboltLoadingMethodSQLInserts, + if destinationFireboltLoadingMethodSQLInserts != nil { + loadingMethod = &shared.DestinationFireboltLoadingMethod{ + DestinationFireboltLoadingMethodSQLInserts: destinationFireboltLoadingMethodSQLInserts, + } } - } - var destinationFireboltLoadingMethodExternalTableViaS3 *shared.DestinationFireboltLoadingMethodExternalTableViaS3 - if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts != nil { - method1 := shared.DestinationFireboltLoadingMethodExternalTableViaS3Method(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts.Method.ValueString()) - destinationFireboltLoadingMethodExternalTableViaS3 = &shared.DestinationFireboltLoadingMethodExternalTableViaS3{ - Method: method1, + var destinationFireboltLoadingMethodExternalTableViaS3 *shared.DestinationFireboltLoadingMethodExternalTableViaS3 + if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts != nil { + method1 := shared.DestinationFireboltLoadingMethodExternalTableViaS3Method(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts.Method.ValueString()) + destinationFireboltLoadingMethodExternalTableViaS3 = &shared.DestinationFireboltLoadingMethodExternalTableViaS3{ + Method: method1, + } } - } - if destinationFireboltLoadingMethodExternalTableViaS3 != nil { - loadingMethod = &shared.DestinationFireboltLoadingMethod{ - DestinationFireboltLoadingMethodExternalTableViaS3: destinationFireboltLoadingMethodExternalTableViaS3, + if destinationFireboltLoadingMethodExternalTableViaS3 != nil { + loadingMethod = &shared.DestinationFireboltLoadingMethod{ + DestinationFireboltLoadingMethodExternalTableViaS3: destinationFireboltLoadingMethodExternalTableViaS3, + } } } password := r.Configuration.Password.ValueString() @@ -101,28 +103,30 @@ func (r *DestinationFireboltResourceModel) ToUpdateSDKType() *shared.Destination host = nil } var loadingMethod *shared.DestinationFireboltUpdateLoadingMethod - var destinationFireboltUpdateLoadingMethodSQLInserts *shared.DestinationFireboltUpdateLoadingMethodSQLInserts - if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3 != nil { - method := shared.DestinationFireboltUpdateLoadingMethodSQLInsertsMethod(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3.Method.ValueString()) - destinationFireboltUpdateLoadingMethodSQLInserts = &shared.DestinationFireboltUpdateLoadingMethodSQLInserts{ - Method: method, + if r.Configuration.LoadingMethod != nil { + var destinationFireboltUpdateLoadingMethodSQLInserts *shared.DestinationFireboltUpdateLoadingMethodSQLInserts + if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3 != nil { + method := shared.DestinationFireboltUpdateLoadingMethodSQLInsertsMethod(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodExternalTableViaS3.Method.ValueString()) + destinationFireboltUpdateLoadingMethodSQLInserts = &shared.DestinationFireboltUpdateLoadingMethodSQLInserts{ + Method: method, + } } - } - if destinationFireboltUpdateLoadingMethodSQLInserts != nil { - loadingMethod = &shared.DestinationFireboltUpdateLoadingMethod{ - DestinationFireboltUpdateLoadingMethodSQLInserts: destinationFireboltUpdateLoadingMethodSQLInserts, + if destinationFireboltUpdateLoadingMethodSQLInserts != nil { + loadingMethod = &shared.DestinationFireboltUpdateLoadingMethod{ + DestinationFireboltUpdateLoadingMethodSQLInserts: destinationFireboltUpdateLoadingMethodSQLInserts, + } } - } - var destinationFireboltUpdateLoadingMethodExternalTableViaS3 *shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3 - if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts != nil { - method1 := shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3Method(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts.Method.ValueString()) - destinationFireboltUpdateLoadingMethodExternalTableViaS3 = &shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3{ - Method: method1, + var destinationFireboltUpdateLoadingMethodExternalTableViaS3 *shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3 + if r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts != nil { + method1 := shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3Method(r.Configuration.LoadingMethod.DestinationFireboltLoadingMethodSQLInserts.Method.ValueString()) + destinationFireboltUpdateLoadingMethodExternalTableViaS3 = &shared.DestinationFireboltUpdateLoadingMethodExternalTableViaS3{ + Method: method1, + } } - } - if destinationFireboltUpdateLoadingMethodExternalTableViaS3 != nil { - loadingMethod = &shared.DestinationFireboltUpdateLoadingMethod{ - DestinationFireboltUpdateLoadingMethodExternalTableViaS3: destinationFireboltUpdateLoadingMethodExternalTableViaS3, + if destinationFireboltUpdateLoadingMethodExternalTableViaS3 != nil { + loadingMethod = &shared.DestinationFireboltUpdateLoadingMethod{ + DestinationFireboltUpdateLoadingMethodExternalTableViaS3: destinationFireboltUpdateLoadingMethodExternalTableViaS3, + } } } password := r.Configuration.Password.ValueString() diff --git a/internal/provider/destination_gcs_resource_sdk.go b/internal/provider/destination_gcs_resource_sdk.go index 49ce79476..0e1281791 100755 --- a/internal/provider/destination_gcs_resource_sdk.go +++ b/internal/provider/destination_gcs_resource_sdk.go @@ -130,38 +130,40 @@ func (r *DestinationGcsResourceModel) ToCreateSDKType() *shared.DestinationGcsCr var destinationGcsOutputFormatCSVCommaSeparatedValues *shared.DestinationGcsOutputFormatCSVCommaSeparatedValues if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues != nil { var compression *shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompression - var destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression - if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compressionType := new(shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil - } - destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ - CompressionType: compressionType, - } - } - if destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, - } - } - var destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP - if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil - } - destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression != nil { + var destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compressionType := new(shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ + CompressionType: compressionType, + } + } + if destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, + } + } + var destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ + CompressionType: compressionType1, + } + } + if destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compression = &shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + } } } flattening := new(shared.DestinationGcsOutputFormatCSVCommaSeparatedValuesNormalization) @@ -185,38 +187,40 @@ func (r *DestinationGcsResourceModel) ToCreateSDKType() *shared.DestinationGcsCr var destinationGcsOutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression1 *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType2 := new(shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType2 = shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType2 = nil - } - destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType2, - } - } - if destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression1 = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType3 := new(shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType3 = shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType3 = nil - } - destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType3, - } - } - if destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression1 = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType2 := new(shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType2 = shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType2 = nil + } + destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType2, + } + } + if destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression1 = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } + } + var destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType3 := new(shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType3 = shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType3 = nil + } + destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType3, + } + } + if destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression1 = &shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } formatType2 := shared.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONFormatType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) @@ -437,38 +441,40 @@ func (r *DestinationGcsResourceModel) ToUpdateSDKType() *shared.DestinationGcsPu var destinationGcsUpdateOutputFormatCSVCommaSeparatedValues *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValues if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues != nil { var compression *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompression - var destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression - if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compressionType := new(shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil - } - destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ - CompressionType: compressionType, - } - } - if destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, - } - } - var destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP - if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil - } - destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression != nil { + var destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compressionType := new(shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ + CompressionType: compressionType, + } + } + if destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, + } + } + var destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP + if r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatCSVCommaSeparatedValues.Compression.DestinationGcsOutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ + CompressionType: compressionType1, + } + } + if destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compression = &shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationGcsUpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + } } } flattening := new(shared.DestinationGcsUpdateOutputFormatCSVCommaSeparatedValuesNormalization) @@ -492,38 +498,40 @@ func (r *DestinationGcsResourceModel) ToUpdateSDKType() *shared.DestinationGcsPu var destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression1 *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType2 := new(shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType2 = shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType2 = nil - } - destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType2, - } - } - if destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression1 = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType3 := new(shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType3 = shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType3 = nil - } - destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType3, - } - } - if destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression1 = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType2 := new(shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType2 = shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType2 = nil + } + destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType2, + } + } + if destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression1 = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } + } + var destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType3 := new(shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType3 = shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType3 = nil + } + destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType3, + } + } + if destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression1 = &shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } formatType2 := shared.DestinationGcsUpdateOutputFormatJSONLinesNewlineDelimitedJSONFormatType(r.Configuration.Format.DestinationGcsOutputFormatJSONLinesNewlineDelimitedJSON.FormatType.ValueString()) diff --git a/internal/provider/destination_mariadbcolumnstore_resource_sdk.go b/internal/provider/destination_mariadbcolumnstore_resource_sdk.go index 573370387..5c603bb34 100755 --- a/internal/provider/destination_mariadbcolumnstore_resource_sdk.go +++ b/internal/provider/destination_mariadbcolumnstore_resource_sdk.go @@ -25,52 +25,54 @@ func (r *DestinationMariadbColumnstoreResourceModel) ToCreateSDKType() *shared.D } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationMariadbColumnstoreSSHTunnelMethod - var destinationMariadbColumnstoreSSHTunnelMethodNoTunnel *shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMariadbColumnstoreSSHTunnelMethodNoTunnel = &shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMariadbColumnstoreSSHTunnelMethodNoTunnel *shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMariadbColumnstoreSSHTunnelMethodNoTunnel = &shared.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ - DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel: destinationMariadbColumnstoreSSHTunnelMethodNoTunnel, + if destinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ + DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel: destinationMariadbColumnstoreSSHTunnelMethodNoTunnel, + } } - } - var destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ - DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication: destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication, + if destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ + DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication: destinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication *shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication = &shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication *shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication = &shared.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ - DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication: destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication, + if destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreSSHTunnelMethod{ + DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication: destinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -116,52 +118,54 @@ func (r *DestinationMariadbColumnstoreResourceModel) ToUpdateSDKType() *shared.D } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod - var destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ - DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel: destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel, + if destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ + DestinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel: destinationMariadbColumnstoreUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ - DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ + DestinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMariadbColumnstoreUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMariadbColumnstoreSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ - DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication: destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication, + if destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMariadbColumnstoreUpdateSSHTunnelMethod{ + DestinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication: destinationMariadbColumnstoreUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_mongodb_resource_sdk.go b/internal/provider/destination_mongodb_resource_sdk.go index 879946b24..7306d2bee 100755 --- a/internal/provider/destination_mongodb_resource_sdk.go +++ b/internal/provider/destination_mongodb_resource_sdk.go @@ -36,98 +36,102 @@ func (r *DestinationMongodbResourceModel) ToCreateSDKType() *shared.DestinationM database := r.Configuration.Database.ValueString() destinationType := shared.DestinationMongodbMongodb(r.Configuration.DestinationType.ValueString()) var instanceType *shared.DestinationMongodbMongoDbInstanceType - var destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance *shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance - if r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instance := shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) - destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance{ - Instance: instance, - } - } - if destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instanceType = &shared.DestinationMongodbMongoDbInstanceType{ - DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance: destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance, - } - } - var destinationMongodbMongoDbInstanceTypeReplicaSet *shared.DestinationMongodbMongoDbInstanceTypeReplicaSet - if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet != nil { - instance1 := shared.DestinationMongodbMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) - replicaSet := new(string) - if !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { - *replicaSet = r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() - } else { - replicaSet = nil - } - serverAddresses := r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() - destinationMongodbMongoDbInstanceTypeReplicaSet = &shared.DestinationMongodbMongoDbInstanceTypeReplicaSet{ - Instance: instance1, - ReplicaSet: replicaSet, - ServerAddresses: serverAddresses, - } - } - if destinationMongodbMongoDbInstanceTypeReplicaSet != nil { - instanceType = &shared.DestinationMongodbMongoDbInstanceType{ - DestinationMongodbMongoDbInstanceTypeReplicaSet: destinationMongodbMongoDbInstanceTypeReplicaSet, - } - } - var destinationMongodbMongoDBInstanceTypeMongoDBAtlas *shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas - if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instance2 := shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) - destinationMongodbMongoDBInstanceTypeMongoDBAtlas = &shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas{ - Instance: instance2, - } - } - if destinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instanceType = &shared.DestinationMongodbMongoDbInstanceType{ - DestinationMongodbMongoDBInstanceTypeMongoDBAtlas: destinationMongodbMongoDBInstanceTypeMongoDBAtlas, + if r.Configuration.InstanceType != nil { + var destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance *shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance + if r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instance := shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) + destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance{ + Instance: instance, + } + } + if destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instanceType = &shared.DestinationMongodbMongoDbInstanceType{ + DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance: destinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance, + } + } + var destinationMongodbMongoDbInstanceTypeReplicaSet *shared.DestinationMongodbMongoDbInstanceTypeReplicaSet + if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet != nil { + instance1 := shared.DestinationMongodbMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) + replicaSet := new(string) + if !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { + *replicaSet = r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() + } else { + replicaSet = nil + } + serverAddresses := r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() + destinationMongodbMongoDbInstanceTypeReplicaSet = &shared.DestinationMongodbMongoDbInstanceTypeReplicaSet{ + Instance: instance1, + ReplicaSet: replicaSet, + ServerAddresses: serverAddresses, + } + } + if destinationMongodbMongoDbInstanceTypeReplicaSet != nil { + instanceType = &shared.DestinationMongodbMongoDbInstanceType{ + DestinationMongodbMongoDbInstanceTypeReplicaSet: destinationMongodbMongoDbInstanceTypeReplicaSet, + } + } + var destinationMongodbMongoDBInstanceTypeMongoDBAtlas *shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas + if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instance2 := shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) + destinationMongodbMongoDBInstanceTypeMongoDBAtlas = &shared.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas{ + Instance: instance2, + } + } + if destinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instanceType = &shared.DestinationMongodbMongoDbInstanceType{ + DestinationMongodbMongoDBInstanceTypeMongoDBAtlas: destinationMongodbMongoDBInstanceTypeMongoDBAtlas, + } } } var tunnelMethod *shared.DestinationMongodbSSHTunnelMethod - var destinationMongodbSSHTunnelMethodNoTunnel *shared.DestinationMongodbSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMongodbSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMongodbSSHTunnelMethodNoTunnel = &shared.DestinationMongodbSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationMongodbSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ - DestinationMongodbSSHTunnelMethodNoTunnel: destinationMongodbSSHTunnelMethodNoTunnel, - } - } - var destinationMongodbSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMongodbSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ - DestinationMongodbSSHTunnelMethodSSHKeyAuthentication: destinationMongodbSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationMongodbSSHTunnelMethodPasswordAuthentication *shared.DestinationMongodbSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMongodbSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMongodbSSHTunnelMethodPasswordAuthentication = &shared.DestinationMongodbSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationMongodbSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ - DestinationMongodbSSHTunnelMethodPasswordAuthentication: destinationMongodbSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationMongodbSSHTunnelMethodNoTunnel *shared.DestinationMongodbSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMongodbSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMongodbSSHTunnelMethodNoTunnel = &shared.DestinationMongodbSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationMongodbSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ + DestinationMongodbSSHTunnelMethodNoTunnel: destinationMongodbSSHTunnelMethodNoTunnel, + } + } + var destinationMongodbSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMongodbSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ + DestinationMongodbSSHTunnelMethodSSHKeyAuthentication: destinationMongodbSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationMongodbSSHTunnelMethodPasswordAuthentication *shared.DestinationMongodbSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMongodbSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMongodbSSHTunnelMethodPasswordAuthentication = &shared.DestinationMongodbSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationMongodbSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMongodbSSHTunnelMethod{ + DestinationMongodbSSHTunnelMethodPasswordAuthentication: destinationMongodbSSHTunnelMethodPasswordAuthentication, + } } } configuration := shared.DestinationMongodb{ @@ -180,98 +184,102 @@ func (r *DestinationMongodbResourceModel) ToUpdateSDKType() *shared.DestinationM } database := r.Configuration.Database.ValueString() var instanceType *shared.DestinationMongodbUpdateMongoDbInstanceType - var destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance *shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance - if r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instance := shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) - destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance{ - Instance: instance, - } - } - if destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ - DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance: destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance, - } - } - var destinationMongodbUpdateMongoDbInstanceTypeReplicaSet *shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet - if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet != nil { - instance1 := shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) - replicaSet := new(string) - if !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { - *replicaSet = r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() - } else { - replicaSet = nil - } - serverAddresses := r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() - destinationMongodbUpdateMongoDbInstanceTypeReplicaSet = &shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet{ - Instance: instance1, - ReplicaSet: replicaSet, - ServerAddresses: serverAddresses, - } - } - if destinationMongodbUpdateMongoDbInstanceTypeReplicaSet != nil { - instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ - DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet: destinationMongodbUpdateMongoDbInstanceTypeReplicaSet, - } - } - var destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas *shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas - if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instance2 := shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) - destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas = &shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas{ - Instance: instance2, - } - } - if destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas != nil { - instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ - DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas: destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas, + if r.Configuration.InstanceType != nil { + var destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance *shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance + if r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instance := shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.DestinationMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) + destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance{ + Instance: instance, + } + } + if destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ + DestinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance: destinationMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance, + } + } + var destinationMongodbUpdateMongoDbInstanceTypeReplicaSet *shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet + if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet != nil { + instance1 := shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) + replicaSet := new(string) + if !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { + *replicaSet = r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() + } else { + replicaSet = nil + } + serverAddresses := r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() + destinationMongodbUpdateMongoDbInstanceTypeReplicaSet = &shared.DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet{ + Instance: instance1, + ReplicaSet: replicaSet, + ServerAddresses: serverAddresses, + } + } + if destinationMongodbUpdateMongoDbInstanceTypeReplicaSet != nil { + instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ + DestinationMongodbUpdateMongoDbInstanceTypeReplicaSet: destinationMongodbUpdateMongoDbInstanceTypeReplicaSet, + } + } + var destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas *shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas + if r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instance2 := shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.DestinationMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) + destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas = &shared.DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas{ + Instance: instance2, + } + } + if destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas != nil { + instanceType = &shared.DestinationMongodbUpdateMongoDbInstanceType{ + DestinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas: destinationMongodbUpdateMongoDBInstanceTypeMongoDBAtlas, + } } } var tunnelMethod *shared.DestinationMongodbUpdateSSHTunnelMethod - var destinationMongodbUpdateSSHTunnelMethodNoTunnel *shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMongodbUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationMongodbUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ - DestinationMongodbUpdateSSHTunnelMethodNoTunnel: destinationMongodbUpdateSSHTunnelMethodNoTunnel, - } - } - var destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ - DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ - DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication: destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationMongodbUpdateSSHTunnelMethodNoTunnel *shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMongodbUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMongodbUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationMongodbUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ + DestinationMongodbUpdateSSHTunnelMethodNoTunnel: destinationMongodbUpdateSSHTunnelMethodNoTunnel, + } + } + var destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ + DestinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMongodbUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMongodbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMongodbUpdateSSHTunnelMethod{ + DestinationMongodbUpdateSSHTunnelMethodPasswordAuthentication: destinationMongodbUpdateSSHTunnelMethodPasswordAuthentication, + } } } configuration := shared.DestinationMongodbUpdate{ diff --git a/internal/provider/destination_mssql_resource_sdk.go b/internal/provider/destination_mssql_resource_sdk.go index cacef3eaf..6f2ca9d62 100755 --- a/internal/provider/destination_mssql_resource_sdk.go +++ b/internal/provider/destination_mssql_resource_sdk.go @@ -26,84 +26,88 @@ func (r *DestinationMssqlResourceModel) ToCreateSDKType() *shared.DestinationMss port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var sslMethod *shared.DestinationMssqlSSLMethod - var destinationMssqlSSLMethodEncryptedTrustServerCertificate *shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificate - if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod1 := shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) - destinationMssqlSSLMethodEncryptedTrustServerCertificate = &shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificate{ - SslMethod: sslMethod1, + if r.Configuration.SslMethod != nil { + var destinationMssqlSSLMethodEncryptedTrustServerCertificate *shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificate + if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod1 := shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) + destinationMssqlSSLMethodEncryptedTrustServerCertificate = &shared.DestinationMssqlSSLMethodEncryptedTrustServerCertificate{ + SslMethod: sslMethod1, + } } - } - if destinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod = &shared.DestinationMssqlSSLMethod{ - DestinationMssqlSSLMethodEncryptedTrustServerCertificate: destinationMssqlSSLMethodEncryptedTrustServerCertificate, + if destinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod = &shared.DestinationMssqlSSLMethod{ + DestinationMssqlSSLMethodEncryptedTrustServerCertificate: destinationMssqlSSLMethodEncryptedTrustServerCertificate, + } } - } - var destinationMssqlSSLMethodEncryptedVerifyCertificate *shared.DestinationMssqlSSLMethodEncryptedVerifyCertificate - if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate != nil { - hostNameInCertificate := new(string) - if !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { - *hostNameInCertificate = r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() - } else { - hostNameInCertificate = nil + var destinationMssqlSSLMethodEncryptedVerifyCertificate *shared.DestinationMssqlSSLMethodEncryptedVerifyCertificate + if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate != nil { + hostNameInCertificate := new(string) + if !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { + *hostNameInCertificate = r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() + } else { + hostNameInCertificate = nil + } + sslMethod2 := shared.DestinationMssqlSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) + destinationMssqlSSLMethodEncryptedVerifyCertificate = &shared.DestinationMssqlSSLMethodEncryptedVerifyCertificate{ + HostNameInCertificate: hostNameInCertificate, + SslMethod: sslMethod2, + } } - sslMethod2 := shared.DestinationMssqlSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) - destinationMssqlSSLMethodEncryptedVerifyCertificate = &shared.DestinationMssqlSSLMethodEncryptedVerifyCertificate{ - HostNameInCertificate: hostNameInCertificate, - SslMethod: sslMethod2, - } - } - if destinationMssqlSSLMethodEncryptedVerifyCertificate != nil { - sslMethod = &shared.DestinationMssqlSSLMethod{ - DestinationMssqlSSLMethodEncryptedVerifyCertificate: destinationMssqlSSLMethodEncryptedVerifyCertificate, + if destinationMssqlSSLMethodEncryptedVerifyCertificate != nil { + sslMethod = &shared.DestinationMssqlSSLMethod{ + DestinationMssqlSSLMethodEncryptedVerifyCertificate: destinationMssqlSSLMethodEncryptedVerifyCertificate, + } } } var tunnelMethod *shared.DestinationMssqlSSHTunnelMethod - var destinationMssqlSSHTunnelMethodNoTunnel *shared.DestinationMssqlSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMssqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMssqlSSHTunnelMethodNoTunnel = &shared.DestinationMssqlSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMssqlSSHTunnelMethodNoTunnel *shared.DestinationMssqlSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMssqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMssqlSSHTunnelMethodNoTunnel = &shared.DestinationMssqlSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ - DestinationMssqlSSHTunnelMethodNoTunnel: destinationMssqlSSHTunnelMethodNoTunnel, + if destinationMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ + DestinationMssqlSSHTunnelMethodNoTunnel: destinationMssqlSSHTunnelMethodNoTunnel, + } } - } - var destinationMssqlSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMssqlSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMssqlSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMssqlSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ - DestinationMssqlSSHTunnelMethodSSHKeyAuthentication: destinationMssqlSSHTunnelMethodSSHKeyAuthentication, + if destinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ + DestinationMssqlSSHTunnelMethodSSHKeyAuthentication: destinationMssqlSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMssqlSSHTunnelMethodPasswordAuthentication *shared.DestinationMssqlSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMssqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMssqlSSHTunnelMethodPasswordAuthentication = &shared.DestinationMssqlSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMssqlSSHTunnelMethodPasswordAuthentication *shared.DestinationMssqlSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMssqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMssqlSSHTunnelMethodPasswordAuthentication = &shared.DestinationMssqlSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ - DestinationMssqlSSHTunnelMethodPasswordAuthentication: destinationMssqlSSHTunnelMethodPasswordAuthentication, + if destinationMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMssqlSSHTunnelMethod{ + DestinationMssqlSSHTunnelMethodPasswordAuthentication: destinationMssqlSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -152,84 +156,88 @@ func (r *DestinationMssqlResourceModel) ToUpdateSDKType() *shared.DestinationMss port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var sslMethod *shared.DestinationMssqlUpdateSSLMethod - var destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate *shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate - if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod1 := shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) - destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate = &shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate{ - SslMethod: sslMethod1, + if r.Configuration.SslMethod != nil { + var destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate *shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate + if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod1 := shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) + destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate = &shared.DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate{ + SslMethod: sslMethod1, + } } - } - if destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod = &shared.DestinationMssqlUpdateSSLMethod{ - DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate: destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate, + if destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod = &shared.DestinationMssqlUpdateSSLMethod{ + DestinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate: destinationMssqlUpdateSSLMethodEncryptedTrustServerCertificate, + } } - } - var destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate *shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate - if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate != nil { - hostNameInCertificate := new(string) - if !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { - *hostNameInCertificate = r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() - } else { - hostNameInCertificate = nil + var destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate *shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate + if r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate != nil { + hostNameInCertificate := new(string) + if !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { + *hostNameInCertificate = r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() + } else { + hostNameInCertificate = nil + } + sslMethod2 := shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) + destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate = &shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate{ + HostNameInCertificate: hostNameInCertificate, + SslMethod: sslMethod2, + } } - sslMethod2 := shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.DestinationMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) - destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate = &shared.DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate{ - HostNameInCertificate: hostNameInCertificate, - SslMethod: sslMethod2, - } - } - if destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate != nil { - sslMethod = &shared.DestinationMssqlUpdateSSLMethod{ - DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate: destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate, + if destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate != nil { + sslMethod = &shared.DestinationMssqlUpdateSSLMethod{ + DestinationMssqlUpdateSSLMethodEncryptedVerifyCertificate: destinationMssqlUpdateSSLMethodEncryptedVerifyCertificate, + } } } var tunnelMethod *shared.DestinationMssqlUpdateSSHTunnelMethod - var destinationMssqlUpdateSSHTunnelMethodNoTunnel *shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMssqlUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMssqlUpdateSSHTunnelMethodNoTunnel *shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMssqlUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMssqlUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMssqlUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ - DestinationMssqlUpdateSSHTunnelMethodNoTunnel: destinationMssqlUpdateSSHTunnelMethodNoTunnel, + if destinationMssqlUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ + DestinationMssqlUpdateSSHTunnelMethodNoTunnel: destinationMssqlUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ - DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ + DestinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMssqlUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ - DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication: destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication, + if destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMssqlUpdateSSHTunnelMethod{ + DestinationMssqlUpdateSSHTunnelMethodPasswordAuthentication: destinationMssqlUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_mysql_resource_sdk.go b/internal/provider/destination_mysql_resource_sdk.go index e9d3ac8db..05d0747e2 100755 --- a/internal/provider/destination_mysql_resource_sdk.go +++ b/internal/provider/destination_mysql_resource_sdk.go @@ -25,52 +25,54 @@ func (r *DestinationMysqlResourceModel) ToCreateSDKType() *shared.DestinationMys } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationMysqlSSHTunnelMethod - var destinationMysqlSSHTunnelMethodNoTunnel *shared.DestinationMysqlSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMysqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMysqlSSHTunnelMethodNoTunnel = &shared.DestinationMysqlSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMysqlSSHTunnelMethodNoTunnel *shared.DestinationMysqlSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMysqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMysqlSSHTunnelMethodNoTunnel = &shared.DestinationMysqlSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ - DestinationMysqlSSHTunnelMethodNoTunnel: destinationMysqlSSHTunnelMethodNoTunnel, + if destinationMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ + DestinationMysqlSSHTunnelMethodNoTunnel: destinationMysqlSSHTunnelMethodNoTunnel, + } } - } - var destinationMysqlSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMysqlSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMysqlSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMysqlSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ - DestinationMysqlSSHTunnelMethodSSHKeyAuthentication: destinationMysqlSSHTunnelMethodSSHKeyAuthentication, + if destinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ + DestinationMysqlSSHTunnelMethodSSHKeyAuthentication: destinationMysqlSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMysqlSSHTunnelMethodPasswordAuthentication *shared.DestinationMysqlSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMysqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMysqlSSHTunnelMethodPasswordAuthentication = &shared.DestinationMysqlSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMysqlSSHTunnelMethodPasswordAuthentication *shared.DestinationMysqlSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMysqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMysqlSSHTunnelMethodPasswordAuthentication = &shared.DestinationMysqlSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ - DestinationMysqlSSHTunnelMethodPasswordAuthentication: destinationMysqlSSHTunnelMethodPasswordAuthentication, + if destinationMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMysqlSSHTunnelMethod{ + DestinationMysqlSSHTunnelMethodPasswordAuthentication: destinationMysqlSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -116,52 +118,54 @@ func (r *DestinationMysqlResourceModel) ToUpdateSDKType() *shared.DestinationMys } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.DestinationMysqlUpdateSSHTunnelMethod - var destinationMysqlUpdateSSHTunnelMethodNoTunnel *shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationMysqlUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationMysqlUpdateSSHTunnelMethodNoTunnel *shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationMysqlUpdateSSHTunnelMethodNoTunnel = &shared.DestinationMysqlUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationMysqlUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ - DestinationMysqlUpdateSSHTunnelMethodNoTunnel: destinationMysqlUpdateSSHTunnelMethodNoTunnel, + if destinationMysqlUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ + DestinationMysqlUpdateSSHTunnelMethodNoTunnel: destinationMysqlUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ - DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ + DestinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication: destinationMysqlUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ - DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication: destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication, + if destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationMysqlUpdateSSHTunnelMethod{ + DestinationMysqlUpdateSSHTunnelMethodPasswordAuthentication: destinationMysqlUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_oracle_resource_sdk.go b/internal/provider/destination_oracle_resource_sdk.go index ded0710ce..c17739ee7 100755 --- a/internal/provider/destination_oracle_resource_sdk.go +++ b/internal/provider/destination_oracle_resource_sdk.go @@ -31,52 +31,54 @@ func (r *DestinationOracleResourceModel) ToCreateSDKType() *shared.DestinationOr } sid := r.Configuration.Sid.ValueString() var tunnelMethod *shared.DestinationOracleSSHTunnelMethod - var destinationOracleSSHTunnelMethodNoTunnel *shared.DestinationOracleSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationOracleSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationOracleSSHTunnelMethodNoTunnel = &shared.DestinationOracleSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationOracleSSHTunnelMethodNoTunnel *shared.DestinationOracleSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationOracleSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationOracleSSHTunnelMethodNoTunnel = &shared.DestinationOracleSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ - DestinationOracleSSHTunnelMethodNoTunnel: destinationOracleSSHTunnelMethodNoTunnel, + if destinationOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ + DestinationOracleSSHTunnelMethodNoTunnel: destinationOracleSSHTunnelMethodNoTunnel, + } } - } - var destinationOracleSSHTunnelMethodSSHKeyAuthentication *shared.DestinationOracleSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationOracleSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationOracleSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationOracleSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationOracleSSHTunnelMethodSSHKeyAuthentication *shared.DestinationOracleSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationOracleSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationOracleSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationOracleSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ - DestinationOracleSSHTunnelMethodSSHKeyAuthentication: destinationOracleSSHTunnelMethodSSHKeyAuthentication, + if destinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ + DestinationOracleSSHTunnelMethodSSHKeyAuthentication: destinationOracleSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationOracleSSHTunnelMethodPasswordAuthentication *shared.DestinationOracleSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationOracleSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationOracleSSHTunnelMethodPasswordAuthentication = &shared.DestinationOracleSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationOracleSSHTunnelMethodPasswordAuthentication *shared.DestinationOracleSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationOracleSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationOracleSSHTunnelMethodPasswordAuthentication = &shared.DestinationOracleSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ - DestinationOracleSSHTunnelMethodPasswordAuthentication: destinationOracleSSHTunnelMethodPasswordAuthentication, + if destinationOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationOracleSSHTunnelMethod{ + DestinationOracleSSHTunnelMethodPasswordAuthentication: destinationOracleSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -129,52 +131,54 @@ func (r *DestinationOracleResourceModel) ToUpdateSDKType() *shared.DestinationOr } sid := r.Configuration.Sid.ValueString() var tunnelMethod *shared.DestinationOracleUpdateSSHTunnelMethod - var destinationOracleUpdateSSHTunnelMethodNoTunnel *shared.DestinationOracleUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationOracleUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationOracleUpdateSSHTunnelMethodNoTunnel = &shared.DestinationOracleUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationOracleUpdateSSHTunnelMethodNoTunnel *shared.DestinationOracleUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationOracleUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationOracleUpdateSSHTunnelMethodNoTunnel = &shared.DestinationOracleUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationOracleUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ - DestinationOracleUpdateSSHTunnelMethodNoTunnel: destinationOracleUpdateSSHTunnelMethodNoTunnel, + if destinationOracleUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ + DestinationOracleUpdateSSHTunnelMethodNoTunnel: destinationOracleUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ - DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication: destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ + DestinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication: destinationOracleUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationOracleUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationOracleUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationOracleUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationOracleUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationOracleUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ - DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication: destinationOracleUpdateSSHTunnelMethodPasswordAuthentication, + if destinationOracleUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationOracleUpdateSSHTunnelMethod{ + DestinationOracleUpdateSSHTunnelMethodPasswordAuthentication: destinationOracleUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_postgres_resource_sdk.go b/internal/provider/destination_postgres_resource_sdk.go index 45db3ad97..4fce7db29 100755 --- a/internal/provider/destination_postgres_resource_sdk.go +++ b/internal/provider/destination_postgres_resource_sdk.go @@ -26,147 +26,151 @@ func (r *DestinationPostgresResourceModel) ToCreateSDKType() *shared.Destination port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var sslMode *shared.DestinationPostgresSSLModes - var destinationPostgresSSLModesDisable *shared.DestinationPostgresSSLModesDisable - if r.Configuration.SslMode.DestinationPostgresSSLModesAllow != nil { - mode := shared.DestinationPostgresSSLModesDisableMode(r.Configuration.SslMode.DestinationPostgresSSLModesAllow.Mode.ValueString()) - destinationPostgresSSLModesDisable = &shared.DestinationPostgresSSLModesDisable{ - Mode: mode, - } - } - if destinationPostgresSSLModesDisable != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesDisable: destinationPostgresSSLModesDisable, - } - } - var destinationPostgresSSLModesAllow *shared.DestinationPostgresSSLModesAllow - if r.Configuration.SslMode.DestinationPostgresSSLModesDisable != nil { - mode1 := shared.DestinationPostgresSSLModesAllowMode(r.Configuration.SslMode.DestinationPostgresSSLModesDisable.Mode.ValueString()) - destinationPostgresSSLModesAllow = &shared.DestinationPostgresSSLModesAllow{ - Mode: mode1, - } - } - if destinationPostgresSSLModesAllow != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesAllow: destinationPostgresSSLModesAllow, - } - } - var destinationPostgresSSLModesPrefer *shared.DestinationPostgresSSLModesPrefer - if r.Configuration.SslMode.DestinationPostgresSSLModesPrefer != nil { - mode2 := shared.DestinationPostgresSSLModesPreferMode(r.Configuration.SslMode.DestinationPostgresSSLModesPrefer.Mode.ValueString()) - destinationPostgresSSLModesPrefer = &shared.DestinationPostgresSSLModesPrefer{ - Mode: mode2, - } - } - if destinationPostgresSSLModesPrefer != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesPrefer: destinationPostgresSSLModesPrefer, - } - } - var destinationPostgresSSLModesRequire *shared.DestinationPostgresSSLModesRequire - if r.Configuration.SslMode.DestinationPostgresSSLModesRequire != nil { - mode3 := shared.DestinationPostgresSSLModesRequireMode(r.Configuration.SslMode.DestinationPostgresSSLModesRequire.Mode.ValueString()) - destinationPostgresSSLModesRequire = &shared.DestinationPostgresSSLModesRequire{ - Mode: mode3, - } - } - if destinationPostgresSSLModesRequire != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesRequire: destinationPostgresSSLModesRequire, - } - } - var destinationPostgresSSLModesVerifyCa *shared.DestinationPostgresSSLModesVerifyCa - if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.CaCertificate.ValueString() - clientKeyPassword := new(string) - if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.DestinationPostgresSSLModesVerifyCaMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.Mode.ValueString()) - destinationPostgresSSLModesVerifyCa = &shared.DestinationPostgresSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - } - } - if destinationPostgresSSLModesVerifyCa != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesVerifyCa: destinationPostgresSSLModesVerifyCa, - } - } - var destinationPostgresSSLModesVerifyFull *shared.DestinationPostgresSSLModesVerifyFull - if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientCertificate.ValueString() - clientKey := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKey.ValueString() - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.DestinationPostgresSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.Mode.ValueString()) - destinationPostgresSSLModesVerifyFull = &shared.DestinationPostgresSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - } - } - if destinationPostgresSSLModesVerifyFull != nil { - sslMode = &shared.DestinationPostgresSSLModes{ - DestinationPostgresSSLModesVerifyFull: destinationPostgresSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var destinationPostgresSSLModesDisable *shared.DestinationPostgresSSLModesDisable + if r.Configuration.SslMode.DestinationPostgresSSLModesAllow != nil { + mode := shared.DestinationPostgresSSLModesDisableMode(r.Configuration.SslMode.DestinationPostgresSSLModesAllow.Mode.ValueString()) + destinationPostgresSSLModesDisable = &shared.DestinationPostgresSSLModesDisable{ + Mode: mode, + } + } + if destinationPostgresSSLModesDisable != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesDisable: destinationPostgresSSLModesDisable, + } + } + var destinationPostgresSSLModesAllow *shared.DestinationPostgresSSLModesAllow + if r.Configuration.SslMode.DestinationPostgresSSLModesDisable != nil { + mode1 := shared.DestinationPostgresSSLModesAllowMode(r.Configuration.SslMode.DestinationPostgresSSLModesDisable.Mode.ValueString()) + destinationPostgresSSLModesAllow = &shared.DestinationPostgresSSLModesAllow{ + Mode: mode1, + } + } + if destinationPostgresSSLModesAllow != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesAllow: destinationPostgresSSLModesAllow, + } + } + var destinationPostgresSSLModesPrefer *shared.DestinationPostgresSSLModesPrefer + if r.Configuration.SslMode.DestinationPostgresSSLModesPrefer != nil { + mode2 := shared.DestinationPostgresSSLModesPreferMode(r.Configuration.SslMode.DestinationPostgresSSLModesPrefer.Mode.ValueString()) + destinationPostgresSSLModesPrefer = &shared.DestinationPostgresSSLModesPrefer{ + Mode: mode2, + } + } + if destinationPostgresSSLModesPrefer != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesPrefer: destinationPostgresSSLModesPrefer, + } + } + var destinationPostgresSSLModesRequire *shared.DestinationPostgresSSLModesRequire + if r.Configuration.SslMode.DestinationPostgresSSLModesRequire != nil { + mode3 := shared.DestinationPostgresSSLModesRequireMode(r.Configuration.SslMode.DestinationPostgresSSLModesRequire.Mode.ValueString()) + destinationPostgresSSLModesRequire = &shared.DestinationPostgresSSLModesRequire{ + Mode: mode3, + } + } + if destinationPostgresSSLModesRequire != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesRequire: destinationPostgresSSLModesRequire, + } + } + var destinationPostgresSSLModesVerifyCa *shared.DestinationPostgresSSLModesVerifyCa + if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.CaCertificate.ValueString() + clientKeyPassword := new(string) + if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.DestinationPostgresSSLModesVerifyCaMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.Mode.ValueString()) + destinationPostgresSSLModesVerifyCa = &shared.DestinationPostgresSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + } + } + if destinationPostgresSSLModesVerifyCa != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesVerifyCa: destinationPostgresSSLModesVerifyCa, + } + } + var destinationPostgresSSLModesVerifyFull *shared.DestinationPostgresSSLModesVerifyFull + if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientCertificate.ValueString() + clientKey := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKey.ValueString() + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.DestinationPostgresSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.Mode.ValueString()) + destinationPostgresSSLModesVerifyFull = &shared.DestinationPostgresSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + } + } + if destinationPostgresSSLModesVerifyFull != nil { + sslMode = &shared.DestinationPostgresSSLModes{ + DestinationPostgresSSLModesVerifyFull: destinationPostgresSSLModesVerifyFull, + } } } var tunnelMethod *shared.DestinationPostgresSSHTunnelMethod - var destinationPostgresSSHTunnelMethodNoTunnel *shared.DestinationPostgresSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationPostgresSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationPostgresSSHTunnelMethodNoTunnel = &shared.DestinationPostgresSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationPostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ - DestinationPostgresSSHTunnelMethodNoTunnel: destinationPostgresSSHTunnelMethodNoTunnel, - } - } - var destinationPostgresSSHTunnelMethodSSHKeyAuthentication *shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationPostgresSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ - DestinationPostgresSSHTunnelMethodSSHKeyAuthentication: destinationPostgresSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationPostgresSSHTunnelMethodPasswordAuthentication *shared.DestinationPostgresSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationPostgresSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationPostgresSSHTunnelMethodPasswordAuthentication = &shared.DestinationPostgresSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationPostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ - DestinationPostgresSSHTunnelMethodPasswordAuthentication: destinationPostgresSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationPostgresSSHTunnelMethodNoTunnel *shared.DestinationPostgresSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationPostgresSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationPostgresSSHTunnelMethodNoTunnel = &shared.DestinationPostgresSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationPostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ + DestinationPostgresSSHTunnelMethodNoTunnel: destinationPostgresSSHTunnelMethodNoTunnel, + } + } + var destinationPostgresSSHTunnelMethodSSHKeyAuthentication *shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationPostgresSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ + DestinationPostgresSSHTunnelMethodSSHKeyAuthentication: destinationPostgresSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationPostgresSSHTunnelMethodPasswordAuthentication *shared.DestinationPostgresSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationPostgresSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationPostgresSSHTunnelMethodPasswordAuthentication = &shared.DestinationPostgresSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationPostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationPostgresSSHTunnelMethod{ + DestinationPostgresSSHTunnelMethodPasswordAuthentication: destinationPostgresSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -215,147 +219,151 @@ func (r *DestinationPostgresResourceModel) ToUpdateSDKType() *shared.Destination port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var sslMode *shared.DestinationPostgresUpdateSSLModes - var destinationPostgresUpdateSSLModesDisable *shared.DestinationPostgresUpdateSSLModesDisable - if r.Configuration.SslMode.DestinationPostgresSSLModesAllow != nil { - mode := shared.DestinationPostgresUpdateSSLModesDisableMode(r.Configuration.SslMode.DestinationPostgresSSLModesAllow.Mode.ValueString()) - destinationPostgresUpdateSSLModesDisable = &shared.DestinationPostgresUpdateSSLModesDisable{ - Mode: mode, - } - } - if destinationPostgresUpdateSSLModesDisable != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesDisable: destinationPostgresUpdateSSLModesDisable, - } - } - var destinationPostgresUpdateSSLModesAllow *shared.DestinationPostgresUpdateSSLModesAllow - if r.Configuration.SslMode.DestinationPostgresSSLModesDisable != nil { - mode1 := shared.DestinationPostgresUpdateSSLModesAllowMode(r.Configuration.SslMode.DestinationPostgresSSLModesDisable.Mode.ValueString()) - destinationPostgresUpdateSSLModesAllow = &shared.DestinationPostgresUpdateSSLModesAllow{ - Mode: mode1, - } - } - if destinationPostgresUpdateSSLModesAllow != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesAllow: destinationPostgresUpdateSSLModesAllow, - } - } - var destinationPostgresUpdateSSLModesPrefer *shared.DestinationPostgresUpdateSSLModesPrefer - if r.Configuration.SslMode.DestinationPostgresSSLModesPrefer != nil { - mode2 := shared.DestinationPostgresUpdateSSLModesPreferMode(r.Configuration.SslMode.DestinationPostgresSSLModesPrefer.Mode.ValueString()) - destinationPostgresUpdateSSLModesPrefer = &shared.DestinationPostgresUpdateSSLModesPrefer{ - Mode: mode2, - } - } - if destinationPostgresUpdateSSLModesPrefer != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesPrefer: destinationPostgresUpdateSSLModesPrefer, - } - } - var destinationPostgresUpdateSSLModesRequire *shared.DestinationPostgresUpdateSSLModesRequire - if r.Configuration.SslMode.DestinationPostgresSSLModesRequire != nil { - mode3 := shared.DestinationPostgresUpdateSSLModesRequireMode(r.Configuration.SslMode.DestinationPostgresSSLModesRequire.Mode.ValueString()) - destinationPostgresUpdateSSLModesRequire = &shared.DestinationPostgresUpdateSSLModesRequire{ - Mode: mode3, - } - } - if destinationPostgresUpdateSSLModesRequire != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesRequire: destinationPostgresUpdateSSLModesRequire, - } - } - var destinationPostgresUpdateSSLModesVerifyCa *shared.DestinationPostgresUpdateSSLModesVerifyCa - if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.CaCertificate.ValueString() - clientKeyPassword := new(string) - if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.DestinationPostgresUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.Mode.ValueString()) - destinationPostgresUpdateSSLModesVerifyCa = &shared.DestinationPostgresUpdateSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - } - } - if destinationPostgresUpdateSSLModesVerifyCa != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesVerifyCa: destinationPostgresUpdateSSLModesVerifyCa, - } - } - var destinationPostgresUpdateSSLModesVerifyFull *shared.DestinationPostgresUpdateSSLModesVerifyFull - if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientCertificate.ValueString() - clientKey := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKey.ValueString() - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.DestinationPostgresUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.Mode.ValueString()) - destinationPostgresUpdateSSLModesVerifyFull = &shared.DestinationPostgresUpdateSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - } - } - if destinationPostgresUpdateSSLModesVerifyFull != nil { - sslMode = &shared.DestinationPostgresUpdateSSLModes{ - DestinationPostgresUpdateSSLModesVerifyFull: destinationPostgresUpdateSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var destinationPostgresUpdateSSLModesDisable *shared.DestinationPostgresUpdateSSLModesDisable + if r.Configuration.SslMode.DestinationPostgresSSLModesAllow != nil { + mode := shared.DestinationPostgresUpdateSSLModesDisableMode(r.Configuration.SslMode.DestinationPostgresSSLModesAllow.Mode.ValueString()) + destinationPostgresUpdateSSLModesDisable = &shared.DestinationPostgresUpdateSSLModesDisable{ + Mode: mode, + } + } + if destinationPostgresUpdateSSLModesDisable != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesDisable: destinationPostgresUpdateSSLModesDisable, + } + } + var destinationPostgresUpdateSSLModesAllow *shared.DestinationPostgresUpdateSSLModesAllow + if r.Configuration.SslMode.DestinationPostgresSSLModesDisable != nil { + mode1 := shared.DestinationPostgresUpdateSSLModesAllowMode(r.Configuration.SslMode.DestinationPostgresSSLModesDisable.Mode.ValueString()) + destinationPostgresUpdateSSLModesAllow = &shared.DestinationPostgresUpdateSSLModesAllow{ + Mode: mode1, + } + } + if destinationPostgresUpdateSSLModesAllow != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesAllow: destinationPostgresUpdateSSLModesAllow, + } + } + var destinationPostgresUpdateSSLModesPrefer *shared.DestinationPostgresUpdateSSLModesPrefer + if r.Configuration.SslMode.DestinationPostgresSSLModesPrefer != nil { + mode2 := shared.DestinationPostgresUpdateSSLModesPreferMode(r.Configuration.SslMode.DestinationPostgresSSLModesPrefer.Mode.ValueString()) + destinationPostgresUpdateSSLModesPrefer = &shared.DestinationPostgresUpdateSSLModesPrefer{ + Mode: mode2, + } + } + if destinationPostgresUpdateSSLModesPrefer != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesPrefer: destinationPostgresUpdateSSLModesPrefer, + } + } + var destinationPostgresUpdateSSLModesRequire *shared.DestinationPostgresUpdateSSLModesRequire + if r.Configuration.SslMode.DestinationPostgresSSLModesRequire != nil { + mode3 := shared.DestinationPostgresUpdateSSLModesRequireMode(r.Configuration.SslMode.DestinationPostgresSSLModesRequire.Mode.ValueString()) + destinationPostgresUpdateSSLModesRequire = &shared.DestinationPostgresUpdateSSLModesRequire{ + Mode: mode3, + } + } + if destinationPostgresUpdateSSLModesRequire != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesRequire: destinationPostgresUpdateSSLModesRequire, + } + } + var destinationPostgresUpdateSSLModesVerifyCa *shared.DestinationPostgresUpdateSSLModesVerifyCa + if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.CaCertificate.ValueString() + clientKeyPassword := new(string) + if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.DestinationPostgresUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyCa.Mode.ValueString()) + destinationPostgresUpdateSSLModesVerifyCa = &shared.DestinationPostgresUpdateSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + } + } + if destinationPostgresUpdateSSLModesVerifyCa != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesVerifyCa: destinationPostgresUpdateSSLModesVerifyCa, + } + } + var destinationPostgresUpdateSSLModesVerifyFull *shared.DestinationPostgresUpdateSSLModesVerifyFull + if r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientCertificate.ValueString() + clientKey := r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKey.ValueString() + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.DestinationPostgresUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationPostgresSSLModesVerifyFull.Mode.ValueString()) + destinationPostgresUpdateSSLModesVerifyFull = &shared.DestinationPostgresUpdateSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + } + } + if destinationPostgresUpdateSSLModesVerifyFull != nil { + sslMode = &shared.DestinationPostgresUpdateSSLModes{ + DestinationPostgresUpdateSSLModesVerifyFull: destinationPostgresUpdateSSLModesVerifyFull, + } } } var tunnelMethod *shared.DestinationPostgresUpdateSSHTunnelMethod - var destinationPostgresUpdateSSHTunnelMethodNoTunnel *shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationPostgresUpdateSSHTunnelMethodNoTunnel = &shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationPostgresUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ - DestinationPostgresUpdateSSHTunnelMethodNoTunnel: destinationPostgresUpdateSSHTunnelMethodNoTunnel, - } - } - var destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ - DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication: destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ - DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication: destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationPostgresUpdateSSHTunnelMethodNoTunnel *shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationPostgresUpdateSSHTunnelMethodNoTunnel = &shared.DestinationPostgresUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationPostgresUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ + DestinationPostgresUpdateSSHTunnelMethodNoTunnel: destinationPostgresUpdateSSHTunnelMethodNoTunnel, + } + } + var destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ + DestinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication: destinationPostgresUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationPostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationPostgresUpdateSSHTunnelMethod{ + DestinationPostgresUpdateSSHTunnelMethodPasswordAuthentication: destinationPostgresUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_redis_resource_sdk.go b/internal/provider/destination_redis_resource_sdk.go index b338be3fd..e3556843f 100755 --- a/internal/provider/destination_redis_resource_sdk.go +++ b/internal/provider/destination_redis_resource_sdk.go @@ -25,90 +25,94 @@ func (r *DestinationRedisResourceModel) ToCreateSDKType() *shared.DestinationRed ssl = nil } var sslMode *shared.DestinationRedisSSLModes - var destinationRedisSSLModesDisable *shared.DestinationRedisSSLModesDisable - if r.Configuration.SslMode.DestinationRedisSSLModesDisable != nil { - mode := shared.DestinationRedisSSLModesDisableMode(r.Configuration.SslMode.DestinationRedisSSLModesDisable.Mode.ValueString()) - destinationRedisSSLModesDisable = &shared.DestinationRedisSSLModesDisable{ - Mode: mode, + if r.Configuration.SslMode != nil { + var destinationRedisSSLModesDisable *shared.DestinationRedisSSLModesDisable + if r.Configuration.SslMode.DestinationRedisSSLModesDisable != nil { + mode := shared.DestinationRedisSSLModesDisableMode(r.Configuration.SslMode.DestinationRedisSSLModesDisable.Mode.ValueString()) + destinationRedisSSLModesDisable = &shared.DestinationRedisSSLModesDisable{ + Mode: mode, + } } - } - if destinationRedisSSLModesDisable != nil { - sslMode = &shared.DestinationRedisSSLModes{ - DestinationRedisSSLModesDisable: destinationRedisSSLModesDisable, + if destinationRedisSSLModesDisable != nil { + sslMode = &shared.DestinationRedisSSLModes{ + DestinationRedisSSLModesDisable: destinationRedisSSLModesDisable, + } } - } - var destinationRedisSSLModesVerifyFull *shared.DestinationRedisSSLModesVerifyFull - if r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull != nil { - caCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientCertificate.ValueString() - clientKey := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKey.ValueString() - clientKeyPassword := new(string) - if !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil + var destinationRedisSSLModesVerifyFull *shared.DestinationRedisSSLModesVerifyFull + if r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull != nil { + caCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientCertificate.ValueString() + clientKey := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKey.ValueString() + clientKeyPassword := new(string) + if !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode1 := shared.DestinationRedisSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.Mode.ValueString()) + destinationRedisSSLModesVerifyFull = &shared.DestinationRedisSSLModesVerifyFull{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode1, + } } - mode1 := shared.DestinationRedisSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.Mode.ValueString()) - destinationRedisSSLModesVerifyFull = &shared.DestinationRedisSSLModesVerifyFull{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode1, - } - } - if destinationRedisSSLModesVerifyFull != nil { - sslMode = &shared.DestinationRedisSSLModes{ - DestinationRedisSSLModesVerifyFull: destinationRedisSSLModesVerifyFull, + if destinationRedisSSLModesVerifyFull != nil { + sslMode = &shared.DestinationRedisSSLModes{ + DestinationRedisSSLModesVerifyFull: destinationRedisSSLModesVerifyFull, + } } } var tunnelMethod *shared.DestinationRedisSSHTunnelMethod - var destinationRedisSSHTunnelMethodNoTunnel *shared.DestinationRedisSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationRedisSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationRedisSSHTunnelMethodNoTunnel = &shared.DestinationRedisSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationRedisSSHTunnelMethodNoTunnel *shared.DestinationRedisSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationRedisSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationRedisSSHTunnelMethodNoTunnel = &shared.DestinationRedisSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationRedisSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ - DestinationRedisSSHTunnelMethodNoTunnel: destinationRedisSSHTunnelMethodNoTunnel, + if destinationRedisSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ + DestinationRedisSSHTunnelMethodNoTunnel: destinationRedisSSHTunnelMethodNoTunnel, + } } - } - var destinationRedisSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedisSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationRedisSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationRedisSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedisSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationRedisSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedisSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationRedisSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationRedisSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedisSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ - DestinationRedisSSHTunnelMethodSSHKeyAuthentication: destinationRedisSSHTunnelMethodSSHKeyAuthentication, + if destinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ + DestinationRedisSSHTunnelMethodSSHKeyAuthentication: destinationRedisSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationRedisSSHTunnelMethodPasswordAuthentication *shared.DestinationRedisSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationRedisSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationRedisSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedisSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationRedisSSHTunnelMethodPasswordAuthentication *shared.DestinationRedisSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationRedisSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationRedisSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedisSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationRedisSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ - DestinationRedisSSHTunnelMethodPasswordAuthentication: destinationRedisSSHTunnelMethodPasswordAuthentication, + if destinationRedisSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationRedisSSHTunnelMethod{ + DestinationRedisSSHTunnelMethodPasswordAuthentication: destinationRedisSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -155,90 +159,94 @@ func (r *DestinationRedisResourceModel) ToUpdateSDKType() *shared.DestinationRed ssl = nil } var sslMode *shared.DestinationRedisUpdateSSLModes - var destinationRedisUpdateSSLModesDisable *shared.DestinationRedisUpdateSSLModesDisable - if r.Configuration.SslMode.DestinationRedisSSLModesDisable != nil { - mode := shared.DestinationRedisUpdateSSLModesDisableMode(r.Configuration.SslMode.DestinationRedisSSLModesDisable.Mode.ValueString()) - destinationRedisUpdateSSLModesDisable = &shared.DestinationRedisUpdateSSLModesDisable{ - Mode: mode, + if r.Configuration.SslMode != nil { + var destinationRedisUpdateSSLModesDisable *shared.DestinationRedisUpdateSSLModesDisable + if r.Configuration.SslMode.DestinationRedisSSLModesDisable != nil { + mode := shared.DestinationRedisUpdateSSLModesDisableMode(r.Configuration.SslMode.DestinationRedisSSLModesDisable.Mode.ValueString()) + destinationRedisUpdateSSLModesDisable = &shared.DestinationRedisUpdateSSLModesDisable{ + Mode: mode, + } } - } - if destinationRedisUpdateSSLModesDisable != nil { - sslMode = &shared.DestinationRedisUpdateSSLModes{ - DestinationRedisUpdateSSLModesDisable: destinationRedisUpdateSSLModesDisable, + if destinationRedisUpdateSSLModesDisable != nil { + sslMode = &shared.DestinationRedisUpdateSSLModes{ + DestinationRedisUpdateSSLModesDisable: destinationRedisUpdateSSLModesDisable, + } } - } - var destinationRedisUpdateSSLModesVerifyFull *shared.DestinationRedisUpdateSSLModesVerifyFull - if r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull != nil { - caCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientCertificate.ValueString() - clientKey := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKey.ValueString() - clientKeyPassword := new(string) - if !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil + var destinationRedisUpdateSSLModesVerifyFull *shared.DestinationRedisUpdateSSLModesVerifyFull + if r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull != nil { + caCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientCertificate.ValueString() + clientKey := r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKey.ValueString() + clientKeyPassword := new(string) + if !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode1 := shared.DestinationRedisUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.Mode.ValueString()) + destinationRedisUpdateSSLModesVerifyFull = &shared.DestinationRedisUpdateSSLModesVerifyFull{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode1, + } } - mode1 := shared.DestinationRedisUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.DestinationRedisSSLModesVerifyFull.Mode.ValueString()) - destinationRedisUpdateSSLModesVerifyFull = &shared.DestinationRedisUpdateSSLModesVerifyFull{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode1, - } - } - if destinationRedisUpdateSSLModesVerifyFull != nil { - sslMode = &shared.DestinationRedisUpdateSSLModes{ - DestinationRedisUpdateSSLModesVerifyFull: destinationRedisUpdateSSLModesVerifyFull, + if destinationRedisUpdateSSLModesVerifyFull != nil { + sslMode = &shared.DestinationRedisUpdateSSLModes{ + DestinationRedisUpdateSSLModesVerifyFull: destinationRedisUpdateSSLModesVerifyFull, + } } } var tunnelMethod *shared.DestinationRedisUpdateSSHTunnelMethod - var destinationRedisUpdateSSHTunnelMethodNoTunnel *shared.DestinationRedisUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationRedisUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationRedisUpdateSSHTunnelMethodNoTunnel = &shared.DestinationRedisUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationRedisUpdateSSHTunnelMethodNoTunnel *shared.DestinationRedisUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationRedisUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationRedisUpdateSSHTunnelMethodNoTunnel = &shared.DestinationRedisUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationRedisUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ - DestinationRedisUpdateSSHTunnelMethodNoTunnel: destinationRedisUpdateSSHTunnelMethodNoTunnel, + if destinationRedisUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ + DestinationRedisUpdateSSHTunnelMethodNoTunnel: destinationRedisUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ - DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication: destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ + DestinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication: destinationRedisUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationRedisUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationRedisUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationRedisUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedisSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationRedisUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationRedisUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ - DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication: destinationRedisUpdateSSHTunnelMethodPasswordAuthentication, + if destinationRedisUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationRedisUpdateSSHTunnelMethod{ + DestinationRedisUpdateSSHTunnelMethodPasswordAuthentication: destinationRedisUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_redshift_resource_sdk.go b/internal/provider/destination_redshift_resource_sdk.go index 2c457d5c3..2f43d9ca7 100755 --- a/internal/provider/destination_redshift_resource_sdk.go +++ b/internal/provider/destination_redshift_resource_sdk.go @@ -21,77 +21,81 @@ func (r *DestinationRedshiftResourceModel) ToCreateSDKType() *shared.Destination port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var tunnelMethod *shared.DestinationRedshiftSSHTunnelMethod - var destinationRedshiftSSHTunnelMethodNoTunnel *shared.DestinationRedshiftSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationRedshiftSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationRedshiftSSHTunnelMethodNoTunnel = &shared.DestinationRedshiftSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationRedshiftSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ - DestinationRedshiftSSHTunnelMethodNoTunnel: destinationRedshiftSSHTunnelMethodNoTunnel, - } - } - var destinationRedshiftSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationRedshiftSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ - DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication: destinationRedshiftSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationRedshiftSSHTunnelMethodPasswordAuthentication *shared.DestinationRedshiftSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationRedshiftSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationRedshiftSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedshiftSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ - DestinationRedshiftSSHTunnelMethodPasswordAuthentication: destinationRedshiftSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationRedshiftSSHTunnelMethodNoTunnel *shared.DestinationRedshiftSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationRedshiftSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationRedshiftSSHTunnelMethodNoTunnel = &shared.DestinationRedshiftSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationRedshiftSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ + DestinationRedshiftSSHTunnelMethodNoTunnel: destinationRedshiftSSHTunnelMethodNoTunnel, + } + } + var destinationRedshiftSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationRedshiftSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ + DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication: destinationRedshiftSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationRedshiftSSHTunnelMethodPasswordAuthentication *shared.DestinationRedshiftSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationRedshiftSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationRedshiftSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedshiftSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationRedshiftSSHTunnelMethod{ + DestinationRedshiftSSHTunnelMethodPasswordAuthentication: destinationRedshiftSSHTunnelMethodPasswordAuthentication, + } } } var uploadingMethod *shared.DestinationRedshiftUploadingMethod - var destinationRedshiftUploadingMethodStandard *shared.DestinationRedshiftUploadingMethodStandard - if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging != nil { - method := shared.DestinationRedshiftUploadingMethodStandardMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging.Method.ValueString()) - destinationRedshiftUploadingMethodStandard = &shared.DestinationRedshiftUploadingMethodStandard{ - Method: method, - } - } - if destinationRedshiftUploadingMethodStandard != nil { - uploadingMethod = &shared.DestinationRedshiftUploadingMethod{ - DestinationRedshiftUploadingMethodStandard: destinationRedshiftUploadingMethodStandard, - } - } - var destinationRedshiftUploadingMethodS3Staging *shared.DestinationRedshiftUploadingMethodS3Staging - if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard != nil { - method1 := shared.DestinationRedshiftUploadingMethodS3StagingMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard.Method.ValueString()) - destinationRedshiftUploadingMethodS3Staging = &shared.DestinationRedshiftUploadingMethodS3Staging{ - Method: method1, - } - } - if destinationRedshiftUploadingMethodS3Staging != nil { - uploadingMethod = &shared.DestinationRedshiftUploadingMethod{ - DestinationRedshiftUploadingMethodS3Staging: destinationRedshiftUploadingMethodS3Staging, + if r.Configuration.UploadingMethod != nil { + var destinationRedshiftUploadingMethodStandard *shared.DestinationRedshiftUploadingMethodStandard + if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging != nil { + method := shared.DestinationRedshiftUploadingMethodStandardMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging.Method.ValueString()) + destinationRedshiftUploadingMethodStandard = &shared.DestinationRedshiftUploadingMethodStandard{ + Method: method, + } + } + if destinationRedshiftUploadingMethodStandard != nil { + uploadingMethod = &shared.DestinationRedshiftUploadingMethod{ + DestinationRedshiftUploadingMethodStandard: destinationRedshiftUploadingMethodStandard, + } + } + var destinationRedshiftUploadingMethodS3Staging *shared.DestinationRedshiftUploadingMethodS3Staging + if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard != nil { + method1 := shared.DestinationRedshiftUploadingMethodS3StagingMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard.Method.ValueString()) + destinationRedshiftUploadingMethodS3Staging = &shared.DestinationRedshiftUploadingMethodS3Staging{ + Method: method1, + } + } + if destinationRedshiftUploadingMethodS3Staging != nil { + uploadingMethod = &shared.DestinationRedshiftUploadingMethod{ + DestinationRedshiftUploadingMethodS3Staging: destinationRedshiftUploadingMethodS3Staging, + } } } username := r.Configuration.Username.ValueString() @@ -135,77 +139,81 @@ func (r *DestinationRedshiftResourceModel) ToUpdateSDKType() *shared.Destination port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var tunnelMethod *shared.DestinationRedshiftUpdateSSHTunnelMethod - var destinationRedshiftUpdateSSHTunnelMethodNoTunnel *shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationRedshiftUpdateSSHTunnelMethodNoTunnel = &shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if destinationRedshiftUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ - DestinationRedshiftUpdateSSHTunnelMethodNoTunnel: destinationRedshiftUpdateSSHTunnelMethodNoTunnel, - } - } - var destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ - DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication: destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ - DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication: destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var destinationRedshiftUpdateSSHTunnelMethodNoTunnel *shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationRedshiftUpdateSSHTunnelMethodNoTunnel = &shared.DestinationRedshiftUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if destinationRedshiftUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ + DestinationRedshiftUpdateSSHTunnelMethodNoTunnel: destinationRedshiftUpdateSSHTunnelMethodNoTunnel, + } + } + var destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ + DestinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication: destinationRedshiftUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationRedshiftSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationRedshiftUpdateSSHTunnelMethod{ + DestinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication: destinationRedshiftUpdateSSHTunnelMethodPasswordAuthentication, + } } } var uploadingMethod *shared.DestinationRedshiftUpdateUploadingMethod - var destinationRedshiftUpdateUploadingMethodStandard *shared.DestinationRedshiftUpdateUploadingMethodStandard - if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging != nil { - method := shared.DestinationRedshiftUpdateUploadingMethodStandardMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging.Method.ValueString()) - destinationRedshiftUpdateUploadingMethodStandard = &shared.DestinationRedshiftUpdateUploadingMethodStandard{ - Method: method, - } - } - if destinationRedshiftUpdateUploadingMethodStandard != nil { - uploadingMethod = &shared.DestinationRedshiftUpdateUploadingMethod{ - DestinationRedshiftUpdateUploadingMethodStandard: destinationRedshiftUpdateUploadingMethodStandard, - } - } - var destinationRedshiftUpdateUploadingMethodS3Staging *shared.DestinationRedshiftUpdateUploadingMethodS3Staging - if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard != nil { - method1 := shared.DestinationRedshiftUpdateUploadingMethodS3StagingMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard.Method.ValueString()) - destinationRedshiftUpdateUploadingMethodS3Staging = &shared.DestinationRedshiftUpdateUploadingMethodS3Staging{ - Method: method1, - } - } - if destinationRedshiftUpdateUploadingMethodS3Staging != nil { - uploadingMethod = &shared.DestinationRedshiftUpdateUploadingMethod{ - DestinationRedshiftUpdateUploadingMethodS3Staging: destinationRedshiftUpdateUploadingMethodS3Staging, + if r.Configuration.UploadingMethod != nil { + var destinationRedshiftUpdateUploadingMethodStandard *shared.DestinationRedshiftUpdateUploadingMethodStandard + if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging != nil { + method := shared.DestinationRedshiftUpdateUploadingMethodStandardMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodS3Staging.Method.ValueString()) + destinationRedshiftUpdateUploadingMethodStandard = &shared.DestinationRedshiftUpdateUploadingMethodStandard{ + Method: method, + } + } + if destinationRedshiftUpdateUploadingMethodStandard != nil { + uploadingMethod = &shared.DestinationRedshiftUpdateUploadingMethod{ + DestinationRedshiftUpdateUploadingMethodStandard: destinationRedshiftUpdateUploadingMethodStandard, + } + } + var destinationRedshiftUpdateUploadingMethodS3Staging *shared.DestinationRedshiftUpdateUploadingMethodS3Staging + if r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard != nil { + method1 := shared.DestinationRedshiftUpdateUploadingMethodS3StagingMethod(r.Configuration.UploadingMethod.DestinationRedshiftUploadingMethodStandard.Method.ValueString()) + destinationRedshiftUpdateUploadingMethodS3Staging = &shared.DestinationRedshiftUpdateUploadingMethodS3Staging{ + Method: method1, + } + } + if destinationRedshiftUpdateUploadingMethodS3Staging != nil { + uploadingMethod = &shared.DestinationRedshiftUpdateUploadingMethod{ + DestinationRedshiftUpdateUploadingMethodS3Staging: destinationRedshiftUpdateUploadingMethodS3Staging, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/destination_s3_resource_sdk.go b/internal/provider/destination_s3_resource_sdk.go index aa2ebb40c..f4f1eab67 100755 --- a/internal/provider/destination_s3_resource_sdk.go +++ b/internal/provider/destination_s3_resource_sdk.go @@ -115,38 +115,40 @@ func (r *DestinationS3ResourceModel) ToCreateSDKType() *shared.DestinationS3Crea var destinationS3OutputFormatCSVCommaSeparatedValues *shared.DestinationS3OutputFormatCSVCommaSeparatedValues if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues != nil { var compression *shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompression - var destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression - if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compressionType := new(shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil - } - destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ - CompressionType: compressionType, - } - } - if destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompression{ - DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression, - } - } - var destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP - if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil - } - destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompression{ - DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP, + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression != nil { + var destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compressionType := new(shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ + CompressionType: compressionType, + } + } + if destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompression{ + DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression, + } + } + var destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP{ + CompressionType: compressionType1, + } + } + if destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compression = &shared.DestinationS3OutputFormatCSVCommaSeparatedValuesCompression{ + DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP, + } } } flattening := shared.DestinationS3OutputFormatCSVCommaSeparatedValuesFlattening(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Flattening.ValueString()) @@ -165,38 +167,40 @@ func (r *DestinationS3ResourceModel) ToCreateSDKType() *shared.DestinationS3Crea var destinationS3OutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression1 *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType2 := new(shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType2 = shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType2 = nil - } - destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType2, - } - } - if destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression1 = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType3 := new(shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType3 = shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType3 = nil - } - destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType3, - } - } - if destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression1 = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType2 := new(shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType2 = shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType2 = nil + } + destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType2, + } + } + if destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression1 = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } + } + var destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType3 := new(shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType3 = shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType3 = nil + } + destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType3, + } + } + if destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression1 = &shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } flattening1 := new(shared.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONFlattening) @@ -426,38 +430,40 @@ func (r *DestinationS3ResourceModel) ToUpdateSDKType() *shared.DestinationS3PutR var destinationS3UpdateOutputFormatCSVCommaSeparatedValues *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValues if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues != nil { var compression *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompression - var destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression - if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compressionType := new(shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil - } - destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ - CompressionType: compressionType, - } - } - if destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, - } - } - var destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP - if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil - } - destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { - compression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompression{ - DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression != nil { + var destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compressionType := new(shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression{ + CompressionType: compressionType, + } + } + if destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression: destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionNoCompression, + } + } + var destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP *shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP + if r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Compression.DestinationS3OutputFormatCSVCommaSeparatedValuesCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP{ + CompressionType: compressionType1, + } + } + if destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP != nil { + compression = &shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompression{ + DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP: destinationS3UpdateOutputFormatCSVCommaSeparatedValuesCompressionGZIP, + } } } flattening := shared.DestinationS3UpdateOutputFormatCSVCommaSeparatedValuesFlattening(r.Configuration.Format.DestinationS3OutputFormatCSVCommaSeparatedValues.Flattening.ValueString()) @@ -476,38 +482,40 @@ func (r *DestinationS3ResourceModel) ToUpdateSDKType() *shared.DestinationS3PutR var destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression1 *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType2 := new(shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType2 = shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType2 = nil - } - destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType2, - } - } - if destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression1 = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType3 := new(shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType3 = shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType3 = nil - } - destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType3, - } - } - if destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression1 = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType2 := new(shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType2 = shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType2 = nil + } + destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType2, + } + } + if destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression1 = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } + } + var destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType3 := new(shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType3 = shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3OutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType3 = nil + } + destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType3, + } + } + if destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression1 = &shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } flattening1 := new(shared.DestinationS3UpdateOutputFormatJSONLinesNewlineDelimitedJSONFlattening) diff --git a/internal/provider/destination_s3glue_resource_sdk.go b/internal/provider/destination_s3glue_resource_sdk.go index ed9667b59..8a2763c34 100755 --- a/internal/provider/destination_s3glue_resource_sdk.go +++ b/internal/provider/destination_s3glue_resource_sdk.go @@ -25,38 +25,40 @@ func (r *DestinationS3GlueResourceModel) ToCreateSDKType() *shared.DestinationS3 var destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType := new(shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType := new(shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType, + } } - destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType, + if destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } } - } - if destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil + var destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType1, + } } - destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression = &shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } flattening := new(shared.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONFlattening) @@ -146,38 +148,40 @@ func (r *DestinationS3GlueResourceModel) ToUpdateSDKType() *shared.DestinationS3 var destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSON *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSON if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON != nil { var compression *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression - var destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression - if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compressionType := new(shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) - if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { - *compressionType = shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) - } else { - compressionType = nil + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression != nil { + var destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compressionType := new(shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType) + if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.IsNull() { + *compressionType = shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompressionCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP.CompressionType.ValueString()) + } else { + compressionType = nil + } + destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ + CompressionType: compressionType, + } } - destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression{ - CompressionType: compressionType, + if destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, + } } - } - if destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression: destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression, - } - } - var destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP - if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { - compressionType1 := new(shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) - if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { - *compressionType1 = shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) - } else { - compressionType1 = nil + var destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP *shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP + if r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression != nil { + compressionType1 := new(shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType) + if !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.IsNull() { + *compressionType1 = shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIPCompressionType(r.Configuration.Format.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSON.Compression.DestinationS3GlueOutputFormatJSONLinesNewlineDelimitedJSONCompressionNoCompression.CompressionType.ValueString()) + } else { + compressionType1 = nil + } + destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ + CompressionType: compressionType1, + } } - destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP{ - CompressionType: compressionType1, - } - } - if destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { - compression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ - DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + if destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP != nil { + compression = &shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompression{ + DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP: destinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONCompressionGZIP, + } } } flattening := new(shared.DestinationS3GlueUpdateOutputFormatJSONLinesNewlineDelimitedJSONFlattening) diff --git a/internal/provider/destination_snowflake_resource_sdk.go b/internal/provider/destination_snowflake_resource_sdk.go index f6cac2e1b..46fafa40a 100755 --- a/internal/provider/destination_snowflake_resource_sdk.go +++ b/internal/provider/destination_snowflake_resource_sdk.go @@ -9,57 +9,59 @@ import ( func (r *DestinationSnowflakeResourceModel) ToCreateSDKType() *shared.DestinationSnowflakeCreateRequest { var credentials *shared.DestinationSnowflakeAuthorizationMethod - var destinationSnowflakeAuthorizationMethodOAuth20 *shared.DestinationSnowflakeAuthorizationMethodOAuth20 - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { - authType := new(shared.DestinationSnowflakeAuthorizationMethodOAuth20AuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsNull() { - *authType = shared.DestinationSnowflakeAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.ValueString()) - } else { - authType = nil - } - destinationSnowflakeAuthorizationMethodOAuth20 = &shared.DestinationSnowflakeAuthorizationMethodOAuth20{ - AuthType: authType, - } - } - if destinationSnowflakeAuthorizationMethodOAuth20 != nil { - credentials = &shared.DestinationSnowflakeAuthorizationMethod{ - DestinationSnowflakeAuthorizationMethodOAuth20: destinationSnowflakeAuthorizationMethodOAuth20, - } - } - var destinationSnowflakeAuthorizationMethodKeyPairAuthentication *shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20 != nil { - authType1 := new(shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthenticationAuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsNull() { - *authType1 = shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthenticationAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) - } else { - authType1 = nil - } - destinationSnowflakeAuthorizationMethodKeyPairAuthentication = &shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication{ - AuthType: authType1, - } - } - if destinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { - credentials = &shared.DestinationSnowflakeAuthorizationMethod{ - DestinationSnowflakeAuthorizationMethodKeyPairAuthentication: destinationSnowflakeAuthorizationMethodKeyPairAuthentication, - } - } - var destinationSnowflakeAuthorizationMethodUsernameAndPassword *shared.DestinationSnowflakeAuthorizationMethodUsernameAndPassword - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { - authType2 := new(shared.DestinationSnowflakeAuthorizationMethodUsernameAndPasswordAuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsNull() { - *authType2 = shared.DestinationSnowflakeAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) - } else { - authType2 = nil - } - password := r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() - destinationSnowflakeAuthorizationMethodUsernameAndPassword = &shared.DestinationSnowflakeAuthorizationMethodUsernameAndPassword{ - AuthType: authType2, - Password: password, - } - } - if destinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { - credentials = &shared.DestinationSnowflakeAuthorizationMethod{ - DestinationSnowflakeAuthorizationMethodUsernameAndPassword: destinationSnowflakeAuthorizationMethodUsernameAndPassword, + if r.Configuration.Credentials != nil { + var destinationSnowflakeAuthorizationMethodOAuth20 *shared.DestinationSnowflakeAuthorizationMethodOAuth20 + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { + authType := new(shared.DestinationSnowflakeAuthorizationMethodOAuth20AuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsNull() { + *authType = shared.DestinationSnowflakeAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.ValueString()) + } else { + authType = nil + } + destinationSnowflakeAuthorizationMethodOAuth20 = &shared.DestinationSnowflakeAuthorizationMethodOAuth20{ + AuthType: authType, + } + } + if destinationSnowflakeAuthorizationMethodOAuth20 != nil { + credentials = &shared.DestinationSnowflakeAuthorizationMethod{ + DestinationSnowflakeAuthorizationMethodOAuth20: destinationSnowflakeAuthorizationMethodOAuth20, + } + } + var destinationSnowflakeAuthorizationMethodKeyPairAuthentication *shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20 != nil { + authType1 := new(shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthenticationAuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsNull() { + *authType1 = shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthenticationAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + destinationSnowflakeAuthorizationMethodKeyPairAuthentication = &shared.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication{ + AuthType: authType1, + } + } + if destinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { + credentials = &shared.DestinationSnowflakeAuthorizationMethod{ + DestinationSnowflakeAuthorizationMethodKeyPairAuthentication: destinationSnowflakeAuthorizationMethodKeyPairAuthentication, + } + } + var destinationSnowflakeAuthorizationMethodUsernameAndPassword *shared.DestinationSnowflakeAuthorizationMethodUsernameAndPassword + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { + authType2 := new(shared.DestinationSnowflakeAuthorizationMethodUsernameAndPasswordAuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsNull() { + *authType2 = shared.DestinationSnowflakeAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) + } else { + authType2 = nil + } + password := r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() + destinationSnowflakeAuthorizationMethodUsernameAndPassword = &shared.DestinationSnowflakeAuthorizationMethodUsernameAndPassword{ + AuthType: authType2, + Password: password, + } + } + if destinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { + credentials = &shared.DestinationSnowflakeAuthorizationMethod{ + DestinationSnowflakeAuthorizationMethodUsernameAndPassword: destinationSnowflakeAuthorizationMethodUsernameAndPassword, + } } } database := r.Configuration.Database.ValueString() @@ -78,52 +80,54 @@ func (r *DestinationSnowflakeResourceModel) ToCreateSDKType() *shared.Destinatio jdbcURLParams = nil } var loadingMethod *shared.DestinationSnowflakeDataStagingMethod - var destinationSnowflakeDataStagingMethodSelectAnotherOption *shared.DestinationSnowflakeDataStagingMethodSelectAnotherOption - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { - method := shared.DestinationSnowflakeDataStagingMethodSelectAnotherOptionMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging.Method.ValueString()) - destinationSnowflakeDataStagingMethodSelectAnotherOption = &shared.DestinationSnowflakeDataStagingMethodSelectAnotherOption{ - Method: method, - } - } - if destinationSnowflakeDataStagingMethodSelectAnotherOption != nil { - loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ - DestinationSnowflakeDataStagingMethodSelectAnotherOption: destinationSnowflakeDataStagingMethodSelectAnotherOption, - } - } - var destinationSnowflakeDataStagingMethodRecommendedInternalStaging *shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging != nil { - method1 := shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging.Method.ValueString()) - destinationSnowflakeDataStagingMethodRecommendedInternalStaging = &shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging{ - Method: method1, - } - } - if destinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { - loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ - DestinationSnowflakeDataStagingMethodRecommendedInternalStaging: destinationSnowflakeDataStagingMethodRecommendedInternalStaging, - } - } - var destinationSnowflakeDataStagingMethodAWSS3Staging *shared.DestinationSnowflakeDataStagingMethodAWSS3Staging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { - method2 := shared.DestinationSnowflakeDataStagingMethodAWSS3StagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging.Method.ValueString()) - destinationSnowflakeDataStagingMethodAWSS3Staging = &shared.DestinationSnowflakeDataStagingMethodAWSS3Staging{ - Method: method2, - } - } - if destinationSnowflakeDataStagingMethodAWSS3Staging != nil { - loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ - DestinationSnowflakeDataStagingMethodAWSS3Staging: destinationSnowflakeDataStagingMethodAWSS3Staging, - } - } - var destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging *shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption != nil { - method3 := shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption.Method.ValueString()) - destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging = &shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging{ - Method: method3, - } - } - if destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { - loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ - DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging: destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging, + if r.Configuration.LoadingMethod != nil { + var destinationSnowflakeDataStagingMethodSelectAnotherOption *shared.DestinationSnowflakeDataStagingMethodSelectAnotherOption + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { + method := shared.DestinationSnowflakeDataStagingMethodSelectAnotherOptionMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging.Method.ValueString()) + destinationSnowflakeDataStagingMethodSelectAnotherOption = &shared.DestinationSnowflakeDataStagingMethodSelectAnotherOption{ + Method: method, + } + } + if destinationSnowflakeDataStagingMethodSelectAnotherOption != nil { + loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ + DestinationSnowflakeDataStagingMethodSelectAnotherOption: destinationSnowflakeDataStagingMethodSelectAnotherOption, + } + } + var destinationSnowflakeDataStagingMethodRecommendedInternalStaging *shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging != nil { + method1 := shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging.Method.ValueString()) + destinationSnowflakeDataStagingMethodRecommendedInternalStaging = &shared.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging{ + Method: method1, + } + } + if destinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { + loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ + DestinationSnowflakeDataStagingMethodRecommendedInternalStaging: destinationSnowflakeDataStagingMethodRecommendedInternalStaging, + } + } + var destinationSnowflakeDataStagingMethodAWSS3Staging *shared.DestinationSnowflakeDataStagingMethodAWSS3Staging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { + method2 := shared.DestinationSnowflakeDataStagingMethodAWSS3StagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging.Method.ValueString()) + destinationSnowflakeDataStagingMethodAWSS3Staging = &shared.DestinationSnowflakeDataStagingMethodAWSS3Staging{ + Method: method2, + } + } + if destinationSnowflakeDataStagingMethodAWSS3Staging != nil { + loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ + DestinationSnowflakeDataStagingMethodAWSS3Staging: destinationSnowflakeDataStagingMethodAWSS3Staging, + } + } + var destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging *shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption != nil { + method3 := shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption.Method.ValueString()) + destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging = &shared.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging{ + Method: method3, + } + } + if destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { + loadingMethod = &shared.DestinationSnowflakeDataStagingMethod{ + DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging: destinationSnowflakeDataStagingMethodGoogleCloudStorageStaging, + } } } role := r.Configuration.Role.ValueString() @@ -160,57 +164,59 @@ func (r *DestinationSnowflakeResourceModel) ToGetSDKType() *shared.DestinationSn func (r *DestinationSnowflakeResourceModel) ToUpdateSDKType() *shared.DestinationSnowflakePutRequest { var credentials *shared.DestinationSnowflakeUpdateAuthorizationMethod - var destinationSnowflakeUpdateAuthorizationMethodOAuth20 *shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { - authType := new(shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20AuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsNull() { - *authType = shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.ValueString()) - } else { - authType = nil - } - destinationSnowflakeUpdateAuthorizationMethodOAuth20 = &shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20{ - AuthType: authType, - } - } - if destinationSnowflakeUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ - DestinationSnowflakeUpdateAuthorizationMethodOAuth20: destinationSnowflakeUpdateAuthorizationMethodOAuth20, - } - } - var destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication *shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20 != nil { - authType1 := new(shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthenticationAuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsNull() { - *authType1 = shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthenticationAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) - } else { - authType1 = nil - } - destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication = &shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication{ - AuthType: authType1, - } - } - if destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication != nil { - credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ - DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication: destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication, - } - } - var destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword *shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword - if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { - authType2 := new(shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType) - if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsNull() { - *authType2 = shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) - } else { - authType2 = nil - } - password := r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() - destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword = &shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword{ - AuthType: authType2, - Password: password, - } - } - if destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword != nil { - credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ - DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword: destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword, + if r.Configuration.Credentials != nil { + var destinationSnowflakeUpdateAuthorizationMethodOAuth20 *shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication != nil { + authType := new(shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20AuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.IsNull() { + *authType = shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodKeyPairAuthentication.AuthType.ValueString()) + } else { + authType = nil + } + destinationSnowflakeUpdateAuthorizationMethodOAuth20 = &shared.DestinationSnowflakeUpdateAuthorizationMethodOAuth20{ + AuthType: authType, + } + } + if destinationSnowflakeUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ + DestinationSnowflakeUpdateAuthorizationMethodOAuth20: destinationSnowflakeUpdateAuthorizationMethodOAuth20, + } + } + var destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication *shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20 != nil { + authType1 := new(shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthenticationAuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.IsNull() { + *authType1 = shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthenticationAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication = &shared.DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication{ + AuthType: authType1, + } + } + if destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication != nil { + credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ + DestinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication: destinationSnowflakeUpdateAuthorizationMethodKeyPairAuthentication, + } + } + var destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword *shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword + if r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword != nil { + authType2 := new(shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType) + if !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsUnknown() && !r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.IsNull() { + *authType2 = shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) + } else { + authType2 = nil + } + password := r.Configuration.Credentials.DestinationSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() + destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword = &shared.DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword{ + AuthType: authType2, + Password: password, + } + } + if destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword != nil { + credentials = &shared.DestinationSnowflakeUpdateAuthorizationMethod{ + DestinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword: destinationSnowflakeUpdateAuthorizationMethodUsernameAndPassword, + } } } database := r.Configuration.Database.ValueString() @@ -228,52 +234,54 @@ func (r *DestinationSnowflakeResourceModel) ToUpdateSDKType() *shared.Destinatio jdbcURLParams = nil } var loadingMethod *shared.DestinationSnowflakeUpdateDataStagingMethod - var destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption *shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { - method := shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOptionMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging.Method.ValueString()) - destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption = &shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption{ - Method: method, - } - } - if destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption != nil { - loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ - DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption: destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption, - } - } - var destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging *shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging != nil { - method1 := shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging.Method.ValueString()) - destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging = &shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging{ - Method: method1, - } - } - if destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging != nil { - loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ - DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging: destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging, - } - } - var destinationSnowflakeUpdateDataStagingMethodAWSS3Staging *shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { - method2 := shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3StagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging.Method.ValueString()) - destinationSnowflakeUpdateDataStagingMethodAWSS3Staging = &shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging{ - Method: method2, - } - } - if destinationSnowflakeUpdateDataStagingMethodAWSS3Staging != nil { - loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ - DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging: destinationSnowflakeUpdateDataStagingMethodAWSS3Staging, - } - } - var destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging *shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging - if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption != nil { - method3 := shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption.Method.ValueString()) - destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging = &shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging{ - Method: method3, - } - } - if destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging != nil { - loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ - DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging: destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging, + if r.Configuration.LoadingMethod != nil { + var destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption *shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging != nil { + method := shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOptionMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodRecommendedInternalStaging.Method.ValueString()) + destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption = &shared.DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption{ + Method: method, + } + } + if destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption != nil { + loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ + DestinationSnowflakeUpdateDataStagingMethodSelectAnotherOption: destinationSnowflakeUpdateDataStagingMethodSelectAnotherOption, + } + } + var destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging *shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging != nil { + method1 := shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodAWSS3Staging.Method.ValueString()) + destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging = &shared.DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging{ + Method: method1, + } + } + if destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging != nil { + loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ + DestinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging: destinationSnowflakeUpdateDataStagingMethodRecommendedInternalStaging, + } + } + var destinationSnowflakeUpdateDataStagingMethodAWSS3Staging *shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging != nil { + method2 := shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3StagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodGoogleCloudStorageStaging.Method.ValueString()) + destinationSnowflakeUpdateDataStagingMethodAWSS3Staging = &shared.DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging{ + Method: method2, + } + } + if destinationSnowflakeUpdateDataStagingMethodAWSS3Staging != nil { + loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ + DestinationSnowflakeUpdateDataStagingMethodAWSS3Staging: destinationSnowflakeUpdateDataStagingMethodAWSS3Staging, + } + } + var destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging *shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging + if r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption != nil { + method3 := shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStagingMethod(r.Configuration.LoadingMethod.DestinationSnowflakeDataStagingMethodSelectAnotherOption.Method.ValueString()) + destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging = &shared.DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging{ + Method: method3, + } + } + if destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging != nil { + loadingMethod = &shared.DestinationSnowflakeUpdateDataStagingMethod{ + DestinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging: destinationSnowflakeUpdateDataStagingMethodGoogleCloudStorageStaging, + } } } role := r.Configuration.Role.ValueString() diff --git a/internal/provider/destination_vertica_resource_sdk.go b/internal/provider/destination_vertica_resource_sdk.go index 94b3d3a71..7e87d9a5c 100755 --- a/internal/provider/destination_vertica_resource_sdk.go +++ b/internal/provider/destination_vertica_resource_sdk.go @@ -26,52 +26,54 @@ func (r *DestinationVerticaResourceModel) ToCreateSDKType() *shared.DestinationV port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var tunnelMethod *shared.DestinationVerticaSSHTunnelMethod - var destinationVerticaSSHTunnelMethodNoTunnel *shared.DestinationVerticaSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationVerticaSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationVerticaSSHTunnelMethodNoTunnel = &shared.DestinationVerticaSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationVerticaSSHTunnelMethodNoTunnel *shared.DestinationVerticaSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationVerticaSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationVerticaSSHTunnelMethodNoTunnel = &shared.DestinationVerticaSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationVerticaSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ - DestinationVerticaSSHTunnelMethodNoTunnel: destinationVerticaSSHTunnelMethodNoTunnel, + if destinationVerticaSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ + DestinationVerticaSSHTunnelMethodNoTunnel: destinationVerticaSSHTunnelMethodNoTunnel, + } } - } - var destinationVerticaSSHTunnelMethodSSHKeyAuthentication *shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationVerticaSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationVerticaSSHTunnelMethodSSHKeyAuthentication *shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationVerticaSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ - DestinationVerticaSSHTunnelMethodSSHKeyAuthentication: destinationVerticaSSHTunnelMethodSSHKeyAuthentication, + if destinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ + DestinationVerticaSSHTunnelMethodSSHKeyAuthentication: destinationVerticaSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationVerticaSSHTunnelMethodPasswordAuthentication *shared.DestinationVerticaSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationVerticaSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationVerticaSSHTunnelMethodPasswordAuthentication = &shared.DestinationVerticaSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationVerticaSSHTunnelMethodPasswordAuthentication *shared.DestinationVerticaSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationVerticaSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationVerticaSSHTunnelMethodPasswordAuthentication = &shared.DestinationVerticaSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationVerticaSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ - DestinationVerticaSSHTunnelMethodPasswordAuthentication: destinationVerticaSSHTunnelMethodPasswordAuthentication, + if destinationVerticaSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationVerticaSSHTunnelMethod{ + DestinationVerticaSSHTunnelMethodPasswordAuthentication: destinationVerticaSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -119,52 +121,54 @@ func (r *DestinationVerticaResourceModel) ToUpdateSDKType() *shared.DestinationV port := r.Configuration.Port.ValueInt64() schema := r.Configuration.Schema.ValueString() var tunnelMethod *shared.DestinationVerticaUpdateSSHTunnelMethod - var destinationVerticaUpdateSSHTunnelMethodNoTunnel *shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - destinationVerticaUpdateSSHTunnelMethodNoTunnel = &shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var destinationVerticaUpdateSSHTunnelMethodNoTunnel *shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + destinationVerticaUpdateSSHTunnelMethodNoTunnel = &shared.DestinationVerticaUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if destinationVerticaUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ - DestinationVerticaUpdateSSHTunnelMethodNoTunnel: destinationVerticaUpdateSSHTunnelMethodNoTunnel, + if destinationVerticaUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ + DestinationVerticaUpdateSSHTunnelMethodNoTunnel: destinationVerticaUpdateSSHTunnelMethodNoTunnel, + } } - } - var destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication *shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ - DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication: destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication, + if destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ + DestinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication: destinationVerticaUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication *shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.DestinationVerticaSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication = &shared.DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ - DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication: destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication, + if destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.DestinationVerticaUpdateSSHTunnelMethod{ + DestinationVerticaUpdateSSHTunnelMethodPasswordAuthentication: destinationVerticaUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/provider.go b/internal/provider/provider.go index 1596857a3..42b329ac1 100755 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -25,6 +25,7 @@ type AirbyteProvider struct { // AirbyteProviderModel describes the provider data model. type AirbyteProviderModel struct { + ServerURL types.String `tfsdk:"server_url"` BearerAuth types.String `tfsdk:"bearer_auth"` } @@ -37,6 +38,11 @@ func (p *AirbyteProvider) Schema(ctx context.Context, req provider.SchemaRequest resp.Schema = schema.Schema{ Description: `airbyte-api: Programatically control Airbyte Cloud.`, Attributes: map[string]schema.Attribute{ + "server_url": schema.StringAttribute{ + MarkdownDescription: "Server URL (defaults to https://api.airbyte.com/v1)", + Optional: true, + Required: false, + }, "bearer_auth": schema.StringAttribute{ Optional: true, Sensitive: true, @@ -54,13 +60,19 @@ func (p *AirbyteProvider) Configure(ctx context.Context, req provider.ConfigureR return } + ServerURL := data.ServerURL.ValueString() + + if ServerURL == "" { + ServerURL = "https://api.airbyte.com/v1" + } + bearerAuth := data.BearerAuth.ValueString() security := shared.Security{ BearerAuth: bearerAuth, } opts := []sdk.SDKOption{ - sdk.WithServerURL("https://api.airbyte.com/v1/"), + sdk.WithServerURL(ServerURL), sdk.WithSecurity(security), } client := sdk.New(opts...) @@ -310,7 +322,243 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou } func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.DataSource { - return []func() datasource.DataSource{} + return []func() datasource.DataSource{ + NewConnectionDataSource, + NewDestinationAmazonSqsDataSource, + NewDestinationAwsDatalakeDataSource, + NewDestinationAzureBlobStorageDataSource, + NewDestinationBigqueryDataSource, + NewDestinationBigqueryDenormalizedDataSource, + NewDestinationCassandraDataSource, + NewDestinationClickhouseDataSource, + NewDestinationConvexDataSource, + NewDestinationCumulioDataSource, + NewDestinationDatabendDataSource, + NewDestinationDatabricksDataSource, + NewDestinationDevNullDataSource, + NewDestinationDynamodbDataSource, + NewDestinationElasticsearchDataSource, + NewDestinationFireboltDataSource, + NewDestinationFirestoreDataSource, + NewDestinationGcsDataSource, + NewDestinationGoogleSheetsDataSource, + NewDestinationKeenDataSource, + NewDestinationKinesisDataSource, + NewDestinationMariadbColumnstoreDataSource, + NewDestinationMeilisearchDataSource, + NewDestinationMongodbDataSource, + NewDestinationMssqlDataSource, + NewDestinationMysqlDataSource, + NewDestinationOracleDataSource, + NewDestinationPostgresDataSource, + NewDestinationPubsubDataSource, + NewDestinationPulsarDataSource, + NewDestinationRabbitmqDataSource, + NewDestinationRedisDataSource, + NewDestinationRedshiftDataSource, + NewDestinationRocksetDataSource, + NewDestinationS3DataSource, + NewDestinationS3GlueDataSource, + NewDestinationScyllaDataSource, + NewDestinationSftpJSONDataSource, + NewDestinationSnowflakeDataSource, + NewDestinationTypesenseDataSource, + NewDestinationVerticaDataSource, + NewSourceAircallDataSource, + NewSourceAirtableDataSource, + NewSourceAlloydbDataSource, + NewSourceAmazonAdsDataSource, + NewSourceAmazonSqsDataSource, + NewSourceAmplitudeDataSource, + NewSourceApifyDatasetDataSource, + NewSourceAsanaDataSource, + NewSourceAuth0DataSource, + NewSourceAwsCloudtrailDataSource, + NewSourceAzureBlobStorageDataSource, + NewSourceAzureTableDataSource, + NewSourceBambooHrDataSource, + NewSourceBigcommerceDataSource, + NewSourceBigqueryDataSource, + NewSourceBingAdsDataSource, + NewSourceBraintreeDataSource, + NewSourceBrazeDataSource, + NewSourceChargebeeDataSource, + NewSourceChartmogulDataSource, + NewSourceClickhouseDataSource, + NewSourceClickupAPIDataSource, + NewSourceCloseComDataSource, + NewSourceCodaDataSource, + NewSourceCoinAPIDataSource, + NewSourceCoinmarketcapDataSource, + NewSourceConfigcatDataSource, + NewSourceConfluenceDataSource, + NewSourceDatascopeDataSource, + NewSourceDelightedDataSource, + NewSourceDixaDataSource, + NewSourceDockerhubDataSource, + NewSourceDremioDataSource, + NewSourceDynamodbDataSource, + NewSourceE2eTestCloudDataSource, + NewSourceEmailoctopusDataSource, + NewSourceExchangeRatesDataSource, + NewSourceFacebookMarketingDataSource, + NewSourceFacebookPagesDataSource, + NewSourceFakerDataSource, + NewSourceFaunaDataSource, + NewSourceFileSecureDataSource, + NewSourceFireboltDataSource, + NewSourceFreshcallerDataSource, + NewSourceFreshdeskDataSource, + NewSourceFreshsalesDataSource, + NewSourceFreshserviceDataSource, + NewSourceGcsDataSource, + NewSourceGetlagoDataSource, + NewSourceGithubDataSource, + NewSourceGitlabDataSource, + NewSourceGlassfrogDataSource, + NewSourceGnewsDataSource, + NewSourceGoogleAdsDataSource, + NewSourceGoogleAnalyticsDataAPIDataSource, + NewSourceGoogleAnalyticsV4DataSource, + NewSourceGoogleDirectoryDataSource, + NewSourceGooglePagespeedInsightsDataSource, + NewSourceGoogleSearchConsoleDataSource, + NewSourceGoogleSheetsDataSource, + NewSourceGoogleWebfontsDataSource, + NewSourceGoogleWorkspaceAdminReportsDataSource, + NewSourceGreenhouseDataSource, + NewSourceGridlyDataSource, + NewSourceHarvestDataSource, + NewSourceHubplannerDataSource, + NewSourceHubspotDataSource, + NewSourceInsightlyDataSource, + NewSourceInstagramDataSource, + NewSourceInstatusDataSource, + NewSourceIntercomDataSource, + NewSourceIp2whoisDataSource, + NewSourceIterableDataSource, + NewSourceJiraDataSource, + NewSourceK6CloudDataSource, + NewSourceKlarnaDataSource, + NewSourceKlaviyoDataSource, + NewSourceKustomerSingerDataSource, + NewSourceLaunchdarklyDataSource, + NewSourceLemlistDataSource, + NewSourceLinkedinAdsDataSource, + NewSourceLinkedinPagesDataSource, + NewSourceLinnworksDataSource, + NewSourceLokaliseDataSource, + NewSourceMailchimpDataSource, + NewSourceMailgunDataSource, + NewSourceMailjetSmsDataSource, + NewSourceMarketoDataSource, + NewSourceMetabaseDataSource, + NewSourceMicrosoftTeamsDataSource, + NewSourceMixpanelDataSource, + NewSourceMondayDataSource, + NewSourceMongodbDataSource, + NewSourceMssqlDataSource, + NewSourceMyHoursDataSource, + NewSourceMysqlDataSource, + NewSourceNetsuiteDataSource, + NewSourceNotionDataSource, + NewSourceNytimesDataSource, + NewSourceOktaDataSource, + NewSourceOmnisendDataSource, + NewSourceOnesignalDataSource, + NewSourceOpenweatherDataSource, + NewSourceOracleDataSource, + NewSourceOrbDataSource, + NewSourceOrbitDataSource, + NewSourceOutreachDataSource, + NewSourcePaypalTransactionDataSource, + NewSourcePaystackDataSource, + NewSourcePendoDataSource, + NewSourcePersistiqDataSource, + NewSourcePexelsAPIDataSource, + NewSourcePinterestDataSource, + NewSourcePipedriveDataSource, + NewSourcePocketDataSource, + NewSourcePokeapiDataSource, + NewSourcePolygonStockAPIDataSource, + NewSourcePostgresDataSource, + NewSourcePosthogDataSource, + NewSourcePostmarkappDataSource, + NewSourcePrestashopDataSource, + NewSourcePublicApisDataSource, + NewSourcePunkAPIDataSource, + NewSourcePypiDataSource, + NewSourceQualarooDataSource, + NewSourceQuickbooksDataSource, + NewSourceRailzDataSource, + NewSourceRechargeDataSource, + NewSourceRecreationDataSource, + NewSourceRecruiteeDataSource, + NewSourceRecurlyDataSource, + NewSourceRedshiftDataSource, + NewSourceRetentlyDataSource, + NewSourceRkiCovidDataSource, + NewSourceRssDataSource, + NewSourceS3DataSource, + NewSourceSalesforceDataSource, + NewSourceSalesforceSingerDataSource, + NewSourceSalesloftDataSource, + NewSourceSapFieldglassDataSource, + NewSourceSecodaDataSource, + NewSourceSendgridDataSource, + NewSourceSendinblueDataSource, + NewSourceSenseforceDataSource, + NewSourceSentryDataSource, + NewSourceSftpDataSource, + NewSourceSftpBulkDataSource, + NewSourceShopifyDataSource, + NewSourceShortioDataSource, + NewSourceSlackDataSource, + NewSourceSmailyDataSource, + NewSourceSmartengageDataSource, + NewSourceSmartsheetsDataSource, + NewSourceSnapchatMarketingDataSource, + NewSourceSnowflakeDataSource, + NewSourceSonarCloudDataSource, + NewSourceSpacexAPIDataSource, + NewSourceSquareDataSource, + NewSourceStravaDataSource, + NewSourceStripeDataSource, + NewSourceSurveymonkeyDataSource, + NewSourceSurveySparrowDataSource, + NewSourceTempoDataSource, + NewSourceTheGuardianAPIDataSource, + NewSourceTiktokMarketingDataSource, + NewSourceTodoistDataSource, + NewSourceTrelloDataSource, + NewSourceTrustpilotDataSource, + NewSourceTvmazeScheduleDataSource, + NewSourceTwilioDataSource, + NewSourceTwilioTaskrouterDataSource, + NewSourceTwitterDataSource, + NewSourceTypeformDataSource, + NewSourceUsCensusDataSource, + NewSourceVantageDataSource, + NewSourceWebflowDataSource, + NewSourceWhiskyHunterDataSource, + NewSourceWikipediaPageviewsDataSource, + NewSourceWoocommerceDataSource, + NewSourceXeroDataSource, + NewSourceXkcdDataSource, + NewSourceYandexMetricaDataSource, + NewSourceYotpoDataSource, + NewSourceYouniumDataSource, + NewSourceYoutubeAnalyticsDataSource, + NewSourceZendeskChatDataSource, + NewSourceZendeskSunshineDataSource, + NewSourceZendeskSupportDataSource, + NewSourceZendeskTalkDataSource, + NewSourceZenloopDataSource, + NewSourceZohoCrmDataSource, + NewSourceZoomDataSource, + NewSourceZuoraDataSource, + NewWorkspaceDataSource, + } } func New(version string) func() provider.Provider { diff --git a/internal/provider/source_airtable_resource_sdk.go b/internal/provider/source_airtable_resource_sdk.go index 2019cce4f..b22fc254f 100755 --- a/internal/provider/source_airtable_resource_sdk.go +++ b/internal/provider/source_airtable_resource_sdk.go @@ -10,60 +10,62 @@ import ( func (r *SourceAirtableResourceModel) ToCreateSDKType() *shared.SourceAirtableCreateRequest { var credentials *shared.SourceAirtableAuthentication - var sourceAirtableAuthenticationOAuth20 *shared.SourceAirtableAuthenticationOAuth20 - if r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.ValueString() - } else { - accessToken = nil - } - authMethod := new(shared.SourceAirtableAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod = shared.SourceAirtableAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod = nil - } - clientID := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.RefreshToken.ValueString() - tokenExpiryDate := new(time.Time) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsNull() { - *tokenExpiryDate, _ = time.Parse(time.RFC3339Nano, r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.ValueString()) - } else { - tokenExpiryDate = nil - } - sourceAirtableAuthenticationOAuth20 = &shared.SourceAirtableAuthenticationOAuth20{ - AccessToken: accessToken, - AuthMethod: authMethod, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - TokenExpiryDate: tokenExpiryDate, - } - } - if sourceAirtableAuthenticationOAuth20 != nil { - credentials = &shared.SourceAirtableAuthentication{ - SourceAirtableAuthenticationOAuth20: sourceAirtableAuthenticationOAuth20, - } - } - var sourceAirtableAuthenticationPersonalAccessToken *shared.SourceAirtableAuthenticationPersonalAccessToken - if r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken != nil { - apiKey := r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.APIKey.ValueString() - authMethod1 := new(shared.SourceAirtableAuthenticationPersonalAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsNull() { - *authMethod1 = shared.SourceAirtableAuthenticationPersonalAccessTokenAuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.ValueString()) - } else { - authMethod1 = nil - } - sourceAirtableAuthenticationPersonalAccessToken = &shared.SourceAirtableAuthenticationPersonalAccessToken{ - APIKey: apiKey, - AuthMethod: authMethod1, - } - } - if sourceAirtableAuthenticationPersonalAccessToken != nil { - credentials = &shared.SourceAirtableAuthentication{ - SourceAirtableAuthenticationPersonalAccessToken: sourceAirtableAuthenticationPersonalAccessToken, + if r.Configuration.Credentials != nil { + var sourceAirtableAuthenticationOAuth20 *shared.SourceAirtableAuthenticationOAuth20 + if r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authMethod := new(shared.SourceAirtableAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod = shared.SourceAirtableAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod = nil + } + clientID := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.RefreshToken.ValueString() + tokenExpiryDate := new(time.Time) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsNull() { + *tokenExpiryDate, _ = time.Parse(time.RFC3339Nano, r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.ValueString()) + } else { + tokenExpiryDate = nil + } + sourceAirtableAuthenticationOAuth20 = &shared.SourceAirtableAuthenticationOAuth20{ + AccessToken: accessToken, + AuthMethod: authMethod, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + TokenExpiryDate: tokenExpiryDate, + } + } + if sourceAirtableAuthenticationOAuth20 != nil { + credentials = &shared.SourceAirtableAuthentication{ + SourceAirtableAuthenticationOAuth20: sourceAirtableAuthenticationOAuth20, + } + } + var sourceAirtableAuthenticationPersonalAccessToken *shared.SourceAirtableAuthenticationPersonalAccessToken + if r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken != nil { + apiKey := r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.APIKey.ValueString() + authMethod1 := new(shared.SourceAirtableAuthenticationPersonalAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsNull() { + *authMethod1 = shared.SourceAirtableAuthenticationPersonalAccessTokenAuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceAirtableAuthenticationPersonalAccessToken = &shared.SourceAirtableAuthenticationPersonalAccessToken{ + APIKey: apiKey, + AuthMethod: authMethod1, + } + } + if sourceAirtableAuthenticationPersonalAccessToken != nil { + credentials = &shared.SourceAirtableAuthentication{ + SourceAirtableAuthenticationPersonalAccessToken: sourceAirtableAuthenticationPersonalAccessToken, + } } } sourceType := new(shared.SourceAirtableAirtable) @@ -100,60 +102,62 @@ func (r *SourceAirtableResourceModel) ToGetSDKType() *shared.SourceAirtableCreat func (r *SourceAirtableResourceModel) ToUpdateSDKType() *shared.SourceAirtablePutRequest { var credentials *shared.SourceAirtableUpdateAuthentication - var sourceAirtableUpdateAuthenticationOAuth20 *shared.SourceAirtableUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.ValueString() - } else { - accessToken = nil - } - authMethod := new(shared.SourceAirtableUpdateAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod = shared.SourceAirtableUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod = nil - } - clientID := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.RefreshToken.ValueString() - tokenExpiryDate := new(time.Time) - if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsNull() { - *tokenExpiryDate, _ = time.Parse(time.RFC3339Nano, r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.ValueString()) - } else { - tokenExpiryDate = nil - } - sourceAirtableUpdateAuthenticationOAuth20 = &shared.SourceAirtableUpdateAuthenticationOAuth20{ - AccessToken: accessToken, - AuthMethod: authMethod, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - TokenExpiryDate: tokenExpiryDate, - } - } - if sourceAirtableUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceAirtableUpdateAuthentication{ - SourceAirtableUpdateAuthenticationOAuth20: sourceAirtableUpdateAuthenticationOAuth20, - } - } - var sourceAirtableUpdateAuthenticationPersonalAccessToken *shared.SourceAirtableUpdateAuthenticationPersonalAccessToken - if r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken != nil { - apiKey := r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.APIKey.ValueString() - authMethod1 := new(shared.SourceAirtableUpdateAuthenticationPersonalAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsNull() { - *authMethod1 = shared.SourceAirtableUpdateAuthenticationPersonalAccessTokenAuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.ValueString()) - } else { - authMethod1 = nil - } - sourceAirtableUpdateAuthenticationPersonalAccessToken = &shared.SourceAirtableUpdateAuthenticationPersonalAccessToken{ - APIKey: apiKey, - AuthMethod: authMethod1, - } - } - if sourceAirtableUpdateAuthenticationPersonalAccessToken != nil { - credentials = &shared.SourceAirtableUpdateAuthentication{ - SourceAirtableUpdateAuthenticationPersonalAccessToken: sourceAirtableUpdateAuthenticationPersonalAccessToken, + if r.Configuration.Credentials != nil { + var sourceAirtableUpdateAuthenticationOAuth20 *shared.SourceAirtableUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authMethod := new(shared.SourceAirtableUpdateAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod = shared.SourceAirtableUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod = nil + } + clientID := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.RefreshToken.ValueString() + tokenExpiryDate := new(time.Time) + if !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.IsNull() { + *tokenExpiryDate, _ = time.Parse(time.RFC3339Nano, r.Configuration.Credentials.SourceAirtableAuthenticationOAuth20.TokenExpiryDate.ValueString()) + } else { + tokenExpiryDate = nil + } + sourceAirtableUpdateAuthenticationOAuth20 = &shared.SourceAirtableUpdateAuthenticationOAuth20{ + AccessToken: accessToken, + AuthMethod: authMethod, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + TokenExpiryDate: tokenExpiryDate, + } + } + if sourceAirtableUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceAirtableUpdateAuthentication{ + SourceAirtableUpdateAuthenticationOAuth20: sourceAirtableUpdateAuthenticationOAuth20, + } + } + var sourceAirtableUpdateAuthenticationPersonalAccessToken *shared.SourceAirtableUpdateAuthenticationPersonalAccessToken + if r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken != nil { + apiKey := r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.APIKey.ValueString() + authMethod1 := new(shared.SourceAirtableUpdateAuthenticationPersonalAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.IsNull() { + *authMethod1 = shared.SourceAirtableUpdateAuthenticationPersonalAccessTokenAuthMethod(r.Configuration.Credentials.SourceAirtableAuthenticationPersonalAccessToken.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceAirtableUpdateAuthenticationPersonalAccessToken = &shared.SourceAirtableUpdateAuthenticationPersonalAccessToken{ + APIKey: apiKey, + AuthMethod: authMethod1, + } + } + if sourceAirtableUpdateAuthenticationPersonalAccessToken != nil { + credentials = &shared.SourceAirtableUpdateAuthentication{ + SourceAirtableUpdateAuthenticationPersonalAccessToken: sourceAirtableUpdateAuthenticationPersonalAccessToken, + } } } configuration := shared.SourceAirtableUpdate{ diff --git a/internal/provider/source_alloydb_resource_sdk.go b/internal/provider/source_alloydb_resource_sdk.go index 7fbff3417..2781a7ecc 100755 --- a/internal/provider/source_alloydb_resource_sdk.go +++ b/internal/provider/source_alloydb_resource_sdk.go @@ -25,231 +25,237 @@ func (r *SourceAlloydbResourceModel) ToCreateSDKType() *shared.SourceAlloydbCrea } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourceAlloydbReplicationMethod - var sourceAlloydbReplicationMethodStandard *shared.SourceAlloydbReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourceAlloydbReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourceAlloydbReplicationMethodStandard = &shared.SourceAlloydbReplicationMethodStandard{ - Method: method, - } - } - if sourceAlloydbReplicationMethodStandard != nil { - replicationMethod = &shared.SourceAlloydbReplicationMethod{ - SourceAlloydbReplicationMethodStandard: sourceAlloydbReplicationMethodStandard, - } - } - var sourceAlloydbReplicationMethodLogicalReplicationCDC *shared.SourceAlloydbReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard != nil { - method1 := shared.SourceAlloydbReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard.Method.ValueString()) - sourceAlloydbReplicationMethodLogicalReplicationCDC = &shared.SourceAlloydbReplicationMethodLogicalReplicationCDC{ - Method: method1, - } - } - if sourceAlloydbReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourceAlloydbReplicationMethod{ - SourceAlloydbReplicationMethodLogicalReplicationCDC: sourceAlloydbReplicationMethodLogicalReplicationCDC, - } - } - schemas := make([]string, 0) + if r.Configuration.ReplicationMethod != nil { + var sourceAlloydbReplicationMethodStandard *shared.SourceAlloydbReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourceAlloydbReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourceAlloydbReplicationMethodStandard = &shared.SourceAlloydbReplicationMethodStandard{ + Method: method, + } + } + if sourceAlloydbReplicationMethodStandard != nil { + replicationMethod = &shared.SourceAlloydbReplicationMethod{ + SourceAlloydbReplicationMethodStandard: sourceAlloydbReplicationMethodStandard, + } + } + var sourceAlloydbReplicationMethodLogicalReplicationCDC *shared.SourceAlloydbReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard != nil { + method1 := shared.SourceAlloydbReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard.Method.ValueString()) + sourceAlloydbReplicationMethodLogicalReplicationCDC = &shared.SourceAlloydbReplicationMethodLogicalReplicationCDC{ + Method: method1, + } + } + if sourceAlloydbReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourceAlloydbReplicationMethod{ + SourceAlloydbReplicationMethodLogicalReplicationCDC: sourceAlloydbReplicationMethodLogicalReplicationCDC, + } + } + } + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } sourceType := shared.SourceAlloydbAlloydb(r.Configuration.SourceType.ValueString()) var sslMode *shared.SourceAlloydbSSLModes - var sourceAlloydbSSLModesDisable *shared.SourceAlloydbSSLModesDisable - if r.Configuration.SslMode.SourceAlloydbSSLModesAllow != nil { - mode := shared.SourceAlloydbSSLModesDisableMode(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.Mode.ValueString()) - var additionalProperties interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceAlloydbSSLModesDisable = &shared.SourceAlloydbSSLModesDisable{ - Mode: mode, - AdditionalProperties: additionalProperties, - } - } - if sourceAlloydbSSLModesDisable != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesDisable: sourceAlloydbSSLModesDisable, - } - } - var sourceAlloydbSSLModesAllow *shared.SourceAlloydbSSLModesAllow - if r.Configuration.SslMode.SourceAlloydbSSLModesDisable != nil { - mode1 := shared.SourceAlloydbSSLModesAllowMode(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.Mode.ValueString()) - var additionalProperties1 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceAlloydbSSLModesAllow = &shared.SourceAlloydbSSLModesAllow{ - Mode: mode1, - AdditionalProperties: additionalProperties1, - } - } - if sourceAlloydbSSLModesAllow != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesAllow: sourceAlloydbSSLModesAllow, - } - } - var sourceAlloydbSSLModesPrefer *shared.SourceAlloydbSSLModesPrefer - if r.Configuration.SslMode.SourceAlloydbSSLModesPrefer != nil { - mode2 := shared.SourceAlloydbSSLModesPreferMode(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.Mode.ValueString()) - var additionalProperties2 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) - } - sourceAlloydbSSLModesPrefer = &shared.SourceAlloydbSSLModesPrefer{ - Mode: mode2, - AdditionalProperties: additionalProperties2, - } - } - if sourceAlloydbSSLModesPrefer != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesPrefer: sourceAlloydbSSLModesPrefer, - } - } - var sourceAlloydbSSLModesRequire *shared.SourceAlloydbSSLModesRequire - if r.Configuration.SslMode.SourceAlloydbSSLModesRequire != nil { - mode3 := shared.SourceAlloydbSSLModesRequireMode(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.Mode.ValueString()) - var additionalProperties3 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) - } - sourceAlloydbSSLModesRequire = &shared.SourceAlloydbSSLModesRequire{ - Mode: mode3, - AdditionalProperties: additionalProperties3, - } - } - if sourceAlloydbSSLModesRequire != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesRequire: sourceAlloydbSSLModesRequire, - } - } - var sourceAlloydbSSLModesVerifyCa *shared.SourceAlloydbSSLModesVerifyCa - if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.SourceAlloydbSSLModesVerifyCaMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.Mode.ValueString()) - var additionalProperties4 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) - } - sourceAlloydbSSLModesVerifyCa = &shared.SourceAlloydbSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - AdditionalProperties: additionalProperties4, - } - } - if sourceAlloydbSSLModesVerifyCa != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesVerifyCa: sourceAlloydbSSLModesVerifyCa, - } - } - var sourceAlloydbSSLModesVerifyFull *shared.SourceAlloydbSSLModesVerifyFull - if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.SourceAlloydbSSLModesVerifyFullMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.Mode.ValueString()) - var additionalProperties5 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) - } - sourceAlloydbSSLModesVerifyFull = &shared.SourceAlloydbSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - AdditionalProperties: additionalProperties5, - } - } - if sourceAlloydbSSLModesVerifyFull != nil { - sslMode = &shared.SourceAlloydbSSLModes{ - SourceAlloydbSSLModesVerifyFull: sourceAlloydbSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var sourceAlloydbSSLModesDisable *shared.SourceAlloydbSSLModesDisable + if r.Configuration.SslMode.SourceAlloydbSSLModesAllow != nil { + mode := shared.SourceAlloydbSSLModesDisableMode(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.Mode.ValueString()) + var additionalProperties interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceAlloydbSSLModesDisable = &shared.SourceAlloydbSSLModesDisable{ + Mode: mode, + AdditionalProperties: additionalProperties, + } + } + if sourceAlloydbSSLModesDisable != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesDisable: sourceAlloydbSSLModesDisable, + } + } + var sourceAlloydbSSLModesAllow *shared.SourceAlloydbSSLModesAllow + if r.Configuration.SslMode.SourceAlloydbSSLModesDisable != nil { + mode1 := shared.SourceAlloydbSSLModesAllowMode(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.Mode.ValueString()) + var additionalProperties1 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceAlloydbSSLModesAllow = &shared.SourceAlloydbSSLModesAllow{ + Mode: mode1, + AdditionalProperties: additionalProperties1, + } + } + if sourceAlloydbSSLModesAllow != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesAllow: sourceAlloydbSSLModesAllow, + } + } + var sourceAlloydbSSLModesPrefer *shared.SourceAlloydbSSLModesPrefer + if r.Configuration.SslMode.SourceAlloydbSSLModesPrefer != nil { + mode2 := shared.SourceAlloydbSSLModesPreferMode(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.Mode.ValueString()) + var additionalProperties2 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) + } + sourceAlloydbSSLModesPrefer = &shared.SourceAlloydbSSLModesPrefer{ + Mode: mode2, + AdditionalProperties: additionalProperties2, + } + } + if sourceAlloydbSSLModesPrefer != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesPrefer: sourceAlloydbSSLModesPrefer, + } + } + var sourceAlloydbSSLModesRequire *shared.SourceAlloydbSSLModesRequire + if r.Configuration.SslMode.SourceAlloydbSSLModesRequire != nil { + mode3 := shared.SourceAlloydbSSLModesRequireMode(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.Mode.ValueString()) + var additionalProperties3 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) + } + sourceAlloydbSSLModesRequire = &shared.SourceAlloydbSSLModesRequire{ + Mode: mode3, + AdditionalProperties: additionalProperties3, + } + } + if sourceAlloydbSSLModesRequire != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesRequire: sourceAlloydbSSLModesRequire, + } + } + var sourceAlloydbSSLModesVerifyCa *shared.SourceAlloydbSSLModesVerifyCa + if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.SourceAlloydbSSLModesVerifyCaMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.Mode.ValueString()) + var additionalProperties4 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) + } + sourceAlloydbSSLModesVerifyCa = &shared.SourceAlloydbSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + AdditionalProperties: additionalProperties4, + } + } + if sourceAlloydbSSLModesVerifyCa != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesVerifyCa: sourceAlloydbSSLModesVerifyCa, + } + } + var sourceAlloydbSSLModesVerifyFull *shared.SourceAlloydbSSLModesVerifyFull + if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.SourceAlloydbSSLModesVerifyFullMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.Mode.ValueString()) + var additionalProperties5 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) + } + sourceAlloydbSSLModesVerifyFull = &shared.SourceAlloydbSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + AdditionalProperties: additionalProperties5, + } + } + if sourceAlloydbSSLModesVerifyFull != nil { + sslMode = &shared.SourceAlloydbSSLModes{ + SourceAlloydbSSLModesVerifyFull: sourceAlloydbSSLModesVerifyFull, + } } } var tunnelMethod *shared.SourceAlloydbSSHTunnelMethod - var sourceAlloydbSSHTunnelMethodNoTunnel *shared.SourceAlloydbSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceAlloydbSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceAlloydbSSHTunnelMethodNoTunnel = &shared.SourceAlloydbSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceAlloydbSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ - SourceAlloydbSSHTunnelMethodNoTunnel: sourceAlloydbSSHTunnelMethodNoTunnel, - } - } - var sourceAlloydbSSHTunnelMethodSSHKeyAuthentication *shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceAlloydbSSHTunnelMethodSSHKeyAuthentication = &shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ - SourceAlloydbSSHTunnelMethodSSHKeyAuthentication: sourceAlloydbSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceAlloydbSSHTunnelMethodPasswordAuthentication *shared.SourceAlloydbSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceAlloydbSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceAlloydbSSHTunnelMethodPasswordAuthentication = &shared.SourceAlloydbSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ - SourceAlloydbSSHTunnelMethodPasswordAuthentication: sourceAlloydbSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceAlloydbSSHTunnelMethodNoTunnel *shared.SourceAlloydbSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceAlloydbSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceAlloydbSSHTunnelMethodNoTunnel = &shared.SourceAlloydbSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceAlloydbSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ + SourceAlloydbSSHTunnelMethodNoTunnel: sourceAlloydbSSHTunnelMethodNoTunnel, + } + } + var sourceAlloydbSSHTunnelMethodSSHKeyAuthentication *shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceAlloydbSSHTunnelMethodSSHKeyAuthentication = &shared.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ + SourceAlloydbSSHTunnelMethodSSHKeyAuthentication: sourceAlloydbSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceAlloydbSSHTunnelMethodPasswordAuthentication *shared.SourceAlloydbSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceAlloydbSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceAlloydbSSHTunnelMethodPasswordAuthentication = &shared.SourceAlloydbSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceAlloydbSSHTunnelMethod{ + SourceAlloydbSSHTunnelMethodPasswordAuthentication: sourceAlloydbSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -305,230 +311,236 @@ func (r *SourceAlloydbResourceModel) ToUpdateSDKType() *shared.SourceAlloydbPutR } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourceAlloydbUpdateReplicationMethod - var sourceAlloydbUpdateReplicationMethodStandard *shared.SourceAlloydbUpdateReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourceAlloydbUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourceAlloydbUpdateReplicationMethodStandard = &shared.SourceAlloydbUpdateReplicationMethodStandard{ - Method: method, - } - } - if sourceAlloydbUpdateReplicationMethodStandard != nil { - replicationMethod = &shared.SourceAlloydbUpdateReplicationMethod{ - SourceAlloydbUpdateReplicationMethodStandard: sourceAlloydbUpdateReplicationMethodStandard, - } - } - var sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC *shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard != nil { - method1 := shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard.Method.ValueString()) - sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC = &shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC{ - Method: method1, - } - } - if sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourceAlloydbUpdateReplicationMethod{ - SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC: sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC, - } - } - schemas := make([]string, 0) + if r.Configuration.ReplicationMethod != nil { + var sourceAlloydbUpdateReplicationMethodStandard *shared.SourceAlloydbUpdateReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourceAlloydbUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourceAlloydbUpdateReplicationMethodStandard = &shared.SourceAlloydbUpdateReplicationMethodStandard{ + Method: method, + } + } + if sourceAlloydbUpdateReplicationMethodStandard != nil { + replicationMethod = &shared.SourceAlloydbUpdateReplicationMethod{ + SourceAlloydbUpdateReplicationMethodStandard: sourceAlloydbUpdateReplicationMethodStandard, + } + } + var sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC *shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard != nil { + method1 := shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceAlloydbReplicationMethodStandard.Method.ValueString()) + sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC = &shared.SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC{ + Method: method1, + } + } + if sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourceAlloydbUpdateReplicationMethod{ + SourceAlloydbUpdateReplicationMethodLogicalReplicationCDC: sourceAlloydbUpdateReplicationMethodLogicalReplicationCDC, + } + } + } + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } var sslMode *shared.SourceAlloydbUpdateSSLModes - var sourceAlloydbUpdateSSLModesDisable *shared.SourceAlloydbUpdateSSLModesDisable - if r.Configuration.SslMode.SourceAlloydbSSLModesAllow != nil { - mode := shared.SourceAlloydbUpdateSSLModesDisableMode(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.Mode.ValueString()) - var additionalProperties interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceAlloydbUpdateSSLModesDisable = &shared.SourceAlloydbUpdateSSLModesDisable{ - Mode: mode, - AdditionalProperties: additionalProperties, - } - } - if sourceAlloydbUpdateSSLModesDisable != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesDisable: sourceAlloydbUpdateSSLModesDisable, - } - } - var sourceAlloydbUpdateSSLModesAllow *shared.SourceAlloydbUpdateSSLModesAllow - if r.Configuration.SslMode.SourceAlloydbSSLModesDisable != nil { - mode1 := shared.SourceAlloydbUpdateSSLModesAllowMode(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.Mode.ValueString()) - var additionalProperties1 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceAlloydbUpdateSSLModesAllow = &shared.SourceAlloydbUpdateSSLModesAllow{ - Mode: mode1, - AdditionalProperties: additionalProperties1, - } - } - if sourceAlloydbUpdateSSLModesAllow != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesAllow: sourceAlloydbUpdateSSLModesAllow, - } - } - var sourceAlloydbUpdateSSLModesPrefer *shared.SourceAlloydbUpdateSSLModesPrefer - if r.Configuration.SslMode.SourceAlloydbSSLModesPrefer != nil { - mode2 := shared.SourceAlloydbUpdateSSLModesPreferMode(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.Mode.ValueString()) - var additionalProperties2 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) - } - sourceAlloydbUpdateSSLModesPrefer = &shared.SourceAlloydbUpdateSSLModesPrefer{ - Mode: mode2, - AdditionalProperties: additionalProperties2, - } - } - if sourceAlloydbUpdateSSLModesPrefer != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesPrefer: sourceAlloydbUpdateSSLModesPrefer, - } - } - var sourceAlloydbUpdateSSLModesRequire *shared.SourceAlloydbUpdateSSLModesRequire - if r.Configuration.SslMode.SourceAlloydbSSLModesRequire != nil { - mode3 := shared.SourceAlloydbUpdateSSLModesRequireMode(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.Mode.ValueString()) - var additionalProperties3 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) - } - sourceAlloydbUpdateSSLModesRequire = &shared.SourceAlloydbUpdateSSLModesRequire{ - Mode: mode3, - AdditionalProperties: additionalProperties3, - } - } - if sourceAlloydbUpdateSSLModesRequire != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesRequire: sourceAlloydbUpdateSSLModesRequire, - } - } - var sourceAlloydbUpdateSSLModesVerifyCa *shared.SourceAlloydbUpdateSSLModesVerifyCa - if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.SourceAlloydbUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.Mode.ValueString()) - var additionalProperties4 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) - } - sourceAlloydbUpdateSSLModesVerifyCa = &shared.SourceAlloydbUpdateSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - AdditionalProperties: additionalProperties4, - } - } - if sourceAlloydbUpdateSSLModesVerifyCa != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesVerifyCa: sourceAlloydbUpdateSSLModesVerifyCa, - } - } - var sourceAlloydbUpdateSSLModesVerifyFull *shared.SourceAlloydbUpdateSSLModesVerifyFull - if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.SourceAlloydbUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.Mode.ValueString()) - var additionalProperties5 interface{} - if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) - } - sourceAlloydbUpdateSSLModesVerifyFull = &shared.SourceAlloydbUpdateSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - AdditionalProperties: additionalProperties5, - } - } - if sourceAlloydbUpdateSSLModesVerifyFull != nil { - sslMode = &shared.SourceAlloydbUpdateSSLModes{ - SourceAlloydbUpdateSSLModesVerifyFull: sourceAlloydbUpdateSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var sourceAlloydbUpdateSSLModesDisable *shared.SourceAlloydbUpdateSSLModesDisable + if r.Configuration.SslMode.SourceAlloydbSSLModesAllow != nil { + mode := shared.SourceAlloydbUpdateSSLModesDisableMode(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.Mode.ValueString()) + var additionalProperties interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceAlloydbUpdateSSLModesDisable = &shared.SourceAlloydbUpdateSSLModesDisable{ + Mode: mode, + AdditionalProperties: additionalProperties, + } + } + if sourceAlloydbUpdateSSLModesDisable != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesDisable: sourceAlloydbUpdateSSLModesDisable, + } + } + var sourceAlloydbUpdateSSLModesAllow *shared.SourceAlloydbUpdateSSLModesAllow + if r.Configuration.SslMode.SourceAlloydbSSLModesDisable != nil { + mode1 := shared.SourceAlloydbUpdateSSLModesAllowMode(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.Mode.ValueString()) + var additionalProperties1 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceAlloydbUpdateSSLModesAllow = &shared.SourceAlloydbUpdateSSLModesAllow{ + Mode: mode1, + AdditionalProperties: additionalProperties1, + } + } + if sourceAlloydbUpdateSSLModesAllow != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesAllow: sourceAlloydbUpdateSSLModesAllow, + } + } + var sourceAlloydbUpdateSSLModesPrefer *shared.SourceAlloydbUpdateSSLModesPrefer + if r.Configuration.SslMode.SourceAlloydbSSLModesPrefer != nil { + mode2 := shared.SourceAlloydbUpdateSSLModesPreferMode(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.Mode.ValueString()) + var additionalProperties2 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) + } + sourceAlloydbUpdateSSLModesPrefer = &shared.SourceAlloydbUpdateSSLModesPrefer{ + Mode: mode2, + AdditionalProperties: additionalProperties2, + } + } + if sourceAlloydbUpdateSSLModesPrefer != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesPrefer: sourceAlloydbUpdateSSLModesPrefer, + } + } + var sourceAlloydbUpdateSSLModesRequire *shared.SourceAlloydbUpdateSSLModesRequire + if r.Configuration.SslMode.SourceAlloydbSSLModesRequire != nil { + mode3 := shared.SourceAlloydbUpdateSSLModesRequireMode(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.Mode.ValueString()) + var additionalProperties3 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) + } + sourceAlloydbUpdateSSLModesRequire = &shared.SourceAlloydbUpdateSSLModesRequire{ + Mode: mode3, + AdditionalProperties: additionalProperties3, + } + } + if sourceAlloydbUpdateSSLModesRequire != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesRequire: sourceAlloydbUpdateSSLModesRequire, + } + } + var sourceAlloydbUpdateSSLModesVerifyCa *shared.SourceAlloydbUpdateSSLModesVerifyCa + if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.SourceAlloydbUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.Mode.ValueString()) + var additionalProperties4 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) + } + sourceAlloydbUpdateSSLModesVerifyCa = &shared.SourceAlloydbUpdateSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + AdditionalProperties: additionalProperties4, + } + } + if sourceAlloydbUpdateSSLModesVerifyCa != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesVerifyCa: sourceAlloydbUpdateSSLModesVerifyCa, + } + } + var sourceAlloydbUpdateSSLModesVerifyFull *shared.SourceAlloydbUpdateSSLModesVerifyFull + if r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.SourceAlloydbUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.Mode.ValueString()) + var additionalProperties5 interface{} + if !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourceAlloydbSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) + } + sourceAlloydbUpdateSSLModesVerifyFull = &shared.SourceAlloydbUpdateSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + AdditionalProperties: additionalProperties5, + } + } + if sourceAlloydbUpdateSSLModesVerifyFull != nil { + sslMode = &shared.SourceAlloydbUpdateSSLModes{ + SourceAlloydbUpdateSSLModesVerifyFull: sourceAlloydbUpdateSSLModesVerifyFull, + } } } var tunnelMethod *shared.SourceAlloydbUpdateSSHTunnelMethod - var sourceAlloydbUpdateSSHTunnelMethodNoTunnel *shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceAlloydbUpdateSSHTunnelMethodNoTunnel = &shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceAlloydbUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ - SourceAlloydbUpdateSSHTunnelMethodNoTunnel: sourceAlloydbUpdateSSHTunnelMethodNoTunnel, - } - } - var sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ - SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication: sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ - SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication: sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceAlloydbUpdateSSHTunnelMethodNoTunnel *shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceAlloydbUpdateSSHTunnelMethodNoTunnel = &shared.SourceAlloydbUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceAlloydbUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ + SourceAlloydbUpdateSSHTunnelMethodNoTunnel: sourceAlloydbUpdateSSHTunnelMethodNoTunnel, + } + } + var sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ + SourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication: sourceAlloydbUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceAlloydbSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceAlloydbUpdateSSHTunnelMethod{ + SourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication: sourceAlloydbUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_amazonads_resource_sdk.go b/internal/provider/source_amazonads_resource_sdk.go index d7106ae25..dc76c1f6c 100755 --- a/internal/provider/source_amazonads_resource_sdk.go +++ b/internal/provider/source_amazonads_resource_sdk.go @@ -22,7 +22,7 @@ func (r *SourceAmazonAdsResourceModel) ToCreateSDKType() *shared.SourceAmazonAds } else { lookBackWindow = nil } - profiles := make([]int64, 0) + var profiles []int64 = nil for _, profilesItem := range r.Configuration.Profiles { profiles = append(profiles, profilesItem.ValueInt64()) } @@ -33,7 +33,7 @@ func (r *SourceAmazonAdsResourceModel) ToCreateSDKType() *shared.SourceAmazonAds } else { region = nil } - reportRecordTypes := make([]shared.SourceAmazonAdsReportRecordTypes, 0) + var reportRecordTypes []shared.SourceAmazonAdsReportRecordTypes = nil for _, reportRecordTypesItem := range r.Configuration.ReportRecordTypes { reportRecordTypes = append(reportRecordTypes, shared.SourceAmazonAdsReportRecordTypes(reportRecordTypesItem.ValueString())) } @@ -44,7 +44,7 @@ func (r *SourceAmazonAdsResourceModel) ToCreateSDKType() *shared.SourceAmazonAds } else { startDate = nil } - stateFilter := make([]shared.SourceAmazonAdsStateFilter, 0) + var stateFilter []shared.SourceAmazonAdsStateFilter = nil for _, stateFilterItem := range r.Configuration.StateFilter { stateFilter = append(stateFilter, shared.SourceAmazonAdsStateFilter(stateFilterItem.ValueString())) } @@ -98,7 +98,7 @@ func (r *SourceAmazonAdsResourceModel) ToUpdateSDKType() *shared.SourceAmazonAds } else { lookBackWindow = nil } - profiles := make([]int64, 0) + var profiles []int64 = nil for _, profilesItem := range r.Configuration.Profiles { profiles = append(profiles, profilesItem.ValueInt64()) } @@ -109,7 +109,7 @@ func (r *SourceAmazonAdsResourceModel) ToUpdateSDKType() *shared.SourceAmazonAds } else { region = nil } - reportRecordTypes := make([]shared.SourceAmazonAdsUpdateReportRecordTypes, 0) + var reportRecordTypes []shared.SourceAmazonAdsUpdateReportRecordTypes = nil for _, reportRecordTypesItem := range r.Configuration.ReportRecordTypes { reportRecordTypes = append(reportRecordTypes, shared.SourceAmazonAdsUpdateReportRecordTypes(reportRecordTypesItem.ValueString())) } @@ -119,7 +119,7 @@ func (r *SourceAmazonAdsResourceModel) ToUpdateSDKType() *shared.SourceAmazonAds } else { startDate = nil } - stateFilter := make([]shared.SourceAmazonAdsUpdateStateFilter, 0) + var stateFilter []shared.SourceAmazonAdsUpdateStateFilter = nil for _, stateFilterItem := range r.Configuration.StateFilter { stateFilter = append(stateFilter, shared.SourceAmazonAdsUpdateStateFilter(stateFilterItem.ValueString())) } diff --git a/internal/provider/source_asana_resource_sdk.go b/internal/provider/source_asana_resource_sdk.go index bd0723c7d..de1c80952 100755 --- a/internal/provider/source_asana_resource_sdk.go +++ b/internal/provider/source_asana_resource_sdk.go @@ -9,46 +9,48 @@ import ( func (r *SourceAsanaResourceModel) ToCreateSDKType() *shared.SourceAsanaCreateRequest { var credentials *shared.SourceAsanaAuthenticationMechanism - var sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth *shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth - if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { - clientID := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientSecret.ValueString() - optionTitle := new(shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle) - if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsNull() { - *optionTitle = shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth *shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth + if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { + clientID := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientSecret.ValueString() + optionTitle := new(shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle) + if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsNull() { + *optionTitle = shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + refreshToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.RefreshToken.ValueString() + sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth = &shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth{ + ClientID: clientID, + ClientSecret: clientSecret, + OptionTitle: optionTitle, + RefreshToken: refreshToken, + } } - refreshToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.RefreshToken.ValueString() - sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth = &shared.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth{ - ClientID: clientID, - ClientSecret: clientSecret, - OptionTitle: optionTitle, - RefreshToken: refreshToken, + if sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { + credentials = &shared.SourceAsanaAuthenticationMechanism{ + SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth: sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth, + } } - } - if sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { - credentials = &shared.SourceAsanaAuthenticationMechanism{ - SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth: sourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth, - } - } - var sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken - if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - optionTitle1 := new(shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle) - if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken + if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + optionTitle1 := new(shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle) + if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + personalAccessToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.PersonalAccessToken.ValueString() + sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken{ + OptionTitle: optionTitle1, + PersonalAccessToken: personalAccessToken, + } } - personalAccessToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.PersonalAccessToken.ValueString() - sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken{ - OptionTitle: optionTitle1, - PersonalAccessToken: personalAccessToken, - } - } - if sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - credentials = &shared.SourceAsanaAuthenticationMechanism{ - SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken, + if sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + credentials = &shared.SourceAsanaAuthenticationMechanism{ + SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken, + } } } sourceType := new(shared.SourceAsanaAsana) @@ -85,46 +87,48 @@ func (r *SourceAsanaResourceModel) ToGetSDKType() *shared.SourceAsanaCreateReque func (r *SourceAsanaResourceModel) ToUpdateSDKType() *shared.SourceAsanaPutRequest { var credentials *shared.SourceAsanaUpdateAuthenticationMechanism - var sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth *shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth - if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { - clientID := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientSecret.ValueString() - optionTitle := new(shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle) - if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsNull() { - *optionTitle = shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth *shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth + if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth != nil { + clientID := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.ClientSecret.ValueString() + optionTitle := new(shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle) + if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.IsNull() { + *optionTitle = shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauthCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + refreshToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.RefreshToken.ValueString() + sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth = &shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth{ + ClientID: clientID, + ClientSecret: clientSecret, + OptionTitle: optionTitle, + RefreshToken: refreshToken, + } } - refreshToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateViaAsanaOauth.RefreshToken.ValueString() - sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth = &shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth{ - ClientID: clientID, - ClientSecret: clientSecret, - OptionTitle: optionTitle, - RefreshToken: refreshToken, + if sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth != nil { + credentials = &shared.SourceAsanaUpdateAuthenticationMechanism{ + SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth: sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth, + } } - } - if sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth != nil { - credentials = &shared.SourceAsanaUpdateAuthenticationMechanism{ - SourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth: sourceAsanaUpdateAuthenticationMechanismAuthenticateViaAsanaOauth, - } - } - var sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken - if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - optionTitle1 := new(shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle) - if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken + if r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + optionTitle1 := new(shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle) + if !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenCredentialsTitle(r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + personalAccessToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.PersonalAccessToken.ValueString() + sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken{ + OptionTitle: optionTitle1, + PersonalAccessToken: personalAccessToken, + } } - personalAccessToken := r.Configuration.Credentials.SourceAsanaAuthenticationMechanismAuthenticateWithPersonalAccessToken.PersonalAccessToken.ValueString() - sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken{ - OptionTitle: optionTitle1, - PersonalAccessToken: personalAccessToken, - } - } - if sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - credentials = &shared.SourceAsanaUpdateAuthenticationMechanism{ - SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken, + if sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + credentials = &shared.SourceAsanaUpdateAuthenticationMechanism{ + SourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceAsanaUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken, + } } } configuration := shared.SourceAsanaUpdate{ diff --git a/internal/provider/source_clickhouse_resource_sdk.go b/internal/provider/source_clickhouse_resource_sdk.go index 69f9dbc1d..dd914be0b 100755 --- a/internal/provider/source_clickhouse_resource_sdk.go +++ b/internal/provider/source_clickhouse_resource_sdk.go @@ -19,52 +19,54 @@ func (r *SourceClickhouseResourceModel) ToCreateSDKType() *shared.SourceClickhou port := r.Configuration.Port.ValueInt64() sourceType := shared.SourceClickhouseClickhouse(r.Configuration.SourceType.ValueString()) var tunnelMethod *shared.SourceClickhouseSSHTunnelMethod - var sourceClickhouseSSHTunnelMethodNoTunnel *shared.SourceClickhouseSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceClickhouseSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceClickhouseSSHTunnelMethodNoTunnel = &shared.SourceClickhouseSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var sourceClickhouseSSHTunnelMethodNoTunnel *shared.SourceClickhouseSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceClickhouseSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceClickhouseSSHTunnelMethodNoTunnel = &shared.SourceClickhouseSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if sourceClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ - SourceClickhouseSSHTunnelMethodNoTunnel: sourceClickhouseSSHTunnelMethodNoTunnel, + if sourceClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ + SourceClickhouseSSHTunnelMethodNoTunnel: sourceClickhouseSSHTunnelMethodNoTunnel, + } } - } - var sourceClickhouseSSHTunnelMethodSSHKeyAuthentication *shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceClickhouseSSHTunnelMethodSSHKeyAuthentication = &shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var sourceClickhouseSSHTunnelMethodSSHKeyAuthentication *shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceClickhouseSSHTunnelMethodSSHKeyAuthentication = &shared.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if sourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ - SourceClickhouseSSHTunnelMethodSSHKeyAuthentication: sourceClickhouseSSHTunnelMethodSSHKeyAuthentication, + if sourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ + SourceClickhouseSSHTunnelMethodSSHKeyAuthentication: sourceClickhouseSSHTunnelMethodSSHKeyAuthentication, + } } - } - var sourceClickhouseSSHTunnelMethodPasswordAuthentication *shared.SourceClickhouseSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceClickhouseSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceClickhouseSSHTunnelMethodPasswordAuthentication = &shared.SourceClickhouseSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var sourceClickhouseSSHTunnelMethodPasswordAuthentication *shared.SourceClickhouseSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceClickhouseSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceClickhouseSSHTunnelMethodPasswordAuthentication = &shared.SourceClickhouseSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if sourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ - SourceClickhouseSSHTunnelMethodPasswordAuthentication: sourceClickhouseSSHTunnelMethodPasswordAuthentication, + if sourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceClickhouseSSHTunnelMethod{ + SourceClickhouseSSHTunnelMethodPasswordAuthentication: sourceClickhouseSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -110,52 +112,54 @@ func (r *SourceClickhouseResourceModel) ToUpdateSDKType() *shared.SourceClickhou } port := r.Configuration.Port.ValueInt64() var tunnelMethod *shared.SourceClickhouseUpdateSSHTunnelMethod - var sourceClickhouseUpdateSSHTunnelMethodNoTunnel *shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceClickhouseUpdateSSHTunnelMethodNoTunnel = &shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var sourceClickhouseUpdateSSHTunnelMethodNoTunnel *shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceClickhouseUpdateSSHTunnelMethodNoTunnel = &shared.SourceClickhouseUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if sourceClickhouseUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ - SourceClickhouseUpdateSSHTunnelMethodNoTunnel: sourceClickhouseUpdateSSHTunnelMethodNoTunnel, + if sourceClickhouseUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ + SourceClickhouseUpdateSSHTunnelMethodNoTunnel: sourceClickhouseUpdateSSHTunnelMethodNoTunnel, + } } - } - var sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ - SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication: sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication, + if sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ + SourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication: sourceClickhouseUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceClickhouseSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ - SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication: sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication, + if sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceClickhouseUpdateSSHTunnelMethod{ + SourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication: sourceClickhouseUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_coinmarketcap_resource_sdk.go b/internal/provider/source_coinmarketcap_resource_sdk.go index 9a7b3ecb4..07a1cbd90 100755 --- a/internal/provider/source_coinmarketcap_resource_sdk.go +++ b/internal/provider/source_coinmarketcap_resource_sdk.go @@ -11,7 +11,7 @@ func (r *SourceCoinmarketcapResourceModel) ToCreateSDKType() *shared.SourceCoinm apiKey := r.Configuration.APIKey.ValueString() dataType := shared.SourceCoinmarketcapDataType(r.Configuration.DataType.ValueString()) sourceType := shared.SourceCoinmarketcapCoinmarketcap(r.Configuration.SourceType.ValueString()) - symbols := make([]string, 0) + var symbols []string = nil for _, symbolsItem := range r.Configuration.Symbols { symbols = append(symbols, symbolsItem.ValueString()) } @@ -46,7 +46,7 @@ func (r *SourceCoinmarketcapResourceModel) ToGetSDKType() *shared.SourceCoinmark func (r *SourceCoinmarketcapResourceModel) ToUpdateSDKType() *shared.SourceCoinmarketcapPutRequest { apiKey := r.Configuration.APIKey.ValueString() dataType := shared.SourceCoinmarketcapUpdateDataType(r.Configuration.DataType.ValueString()) - symbols := make([]string, 0) + var symbols []string = nil for _, symbolsItem := range r.Configuration.Symbols { symbols = append(symbols, symbolsItem.ValueString()) } diff --git a/internal/provider/source_facebookmarketing_resource_sdk.go b/internal/provider/source_facebookmarketing_resource_sdk.go index 89bc6aac9..1d3c1836e 100755 --- a/internal/provider/source_facebookmarketing_resource_sdk.go +++ b/internal/provider/source_facebookmarketing_resource_sdk.go @@ -17,13 +17,13 @@ func (r *SourceFacebookMarketingResourceModel) ToCreateSDKType() *shared.SourceF } else { actionBreakdownsAllowEmpty = nil } - customInsights := make([]shared.SourceFacebookMarketingInsightConfig, 0) + var customInsights []shared.SourceFacebookMarketingInsightConfig = nil for _, customInsightsItem := range r.Configuration.CustomInsights { - actionBreakdowns := make([]shared.SourceFacebookMarketingInsightConfigValidActionBreakdowns, 0) + var actionBreakdowns []shared.SourceFacebookMarketingInsightConfigValidActionBreakdowns = nil for _, actionBreakdownsItem := range customInsightsItem.ActionBreakdowns { actionBreakdowns = append(actionBreakdowns, shared.SourceFacebookMarketingInsightConfigValidActionBreakdowns(actionBreakdownsItem.ValueString())) } - breakdowns := make([]shared.SourceFacebookMarketingInsightConfigValidBreakdowns, 0) + var breakdowns []shared.SourceFacebookMarketingInsightConfigValidBreakdowns = nil for _, breakdownsItem := range customInsightsItem.Breakdowns { breakdowns = append(breakdowns, shared.SourceFacebookMarketingInsightConfigValidBreakdowns(breakdownsItem.ValueString())) } @@ -33,7 +33,7 @@ func (r *SourceFacebookMarketingResourceModel) ToCreateSDKType() *shared.SourceF } else { endDate = nil } - fields := make([]shared.SourceFacebookMarketingInsightConfigValidEnums, 0) + var fields []shared.SourceFacebookMarketingInsightConfigValidEnums = nil for _, fieldsItem := range customInsightsItem.Fields { fields = append(fields, shared.SourceFacebookMarketingInsightConfigValidEnums(fieldsItem.ValueString())) } @@ -157,13 +157,13 @@ func (r *SourceFacebookMarketingResourceModel) ToUpdateSDKType() *shared.SourceF } else { actionBreakdownsAllowEmpty = nil } - customInsights := make([]shared.SourceFacebookMarketingUpdateInsightConfig, 0) + var customInsights []shared.SourceFacebookMarketingUpdateInsightConfig = nil for _, customInsightsItem := range r.Configuration.CustomInsights { - actionBreakdowns := make([]shared.SourceFacebookMarketingUpdateInsightConfigValidActionBreakdowns, 0) + var actionBreakdowns []shared.SourceFacebookMarketingUpdateInsightConfigValidActionBreakdowns = nil for _, actionBreakdownsItem := range customInsightsItem.ActionBreakdowns { actionBreakdowns = append(actionBreakdowns, shared.SourceFacebookMarketingUpdateInsightConfigValidActionBreakdowns(actionBreakdownsItem.ValueString())) } - breakdowns := make([]shared.SourceFacebookMarketingUpdateInsightConfigValidBreakdowns, 0) + var breakdowns []shared.SourceFacebookMarketingUpdateInsightConfigValidBreakdowns = nil for _, breakdownsItem := range customInsightsItem.Breakdowns { breakdowns = append(breakdowns, shared.SourceFacebookMarketingUpdateInsightConfigValidBreakdowns(breakdownsItem.ValueString())) } @@ -173,7 +173,7 @@ func (r *SourceFacebookMarketingResourceModel) ToUpdateSDKType() *shared.SourceF } else { endDate = nil } - fields := make([]shared.SourceFacebookMarketingUpdateInsightConfigValidEnums, 0) + var fields []shared.SourceFacebookMarketingUpdateInsightConfigValidEnums = nil for _, fieldsItem := range customInsightsItem.Fields { fields = append(fields, shared.SourceFacebookMarketingUpdateInsightConfigValidEnums(fieldsItem.ValueString())) } diff --git a/internal/provider/source_github_resource_sdk.go b/internal/provider/source_github_resource_sdk.go index cb5dce9f4..e57aa8aea 100755 --- a/internal/provider/source_github_resource_sdk.go +++ b/internal/provider/source_github_resource_sdk.go @@ -16,42 +16,44 @@ func (r *SourceGithubResourceModel) ToCreateSDKType() *shared.SourceGithubCreate branch = nil } var credentials *shared.SourceGithubAuthentication - var sourceGithubAuthenticationOAuth *shared.SourceGithubAuthenticationOAuth - if r.Configuration.Credentials.SourceGithubAuthenticationOAuth != nil { - accessToken := r.Configuration.Credentials.SourceGithubAuthenticationOAuth.AccessToken.ValueString() - optionTitle := new(shared.SourceGithubAuthenticationOAuthOptionTitle) - if !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsNull() { - *optionTitle = shared.SourceGithubAuthenticationOAuthOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceGithubAuthenticationOAuth *shared.SourceGithubAuthenticationOAuth + if r.Configuration.Credentials.SourceGithubAuthenticationOAuth != nil { + accessToken := r.Configuration.Credentials.SourceGithubAuthenticationOAuth.AccessToken.ValueString() + optionTitle := new(shared.SourceGithubAuthenticationOAuthOptionTitle) + if !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsNull() { + *optionTitle = shared.SourceGithubAuthenticationOAuthOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + sourceGithubAuthenticationOAuth = &shared.SourceGithubAuthenticationOAuth{ + AccessToken: accessToken, + OptionTitle: optionTitle, + } } - sourceGithubAuthenticationOAuth = &shared.SourceGithubAuthenticationOAuth{ - AccessToken: accessToken, - OptionTitle: optionTitle, + if sourceGithubAuthenticationOAuth != nil { + credentials = &shared.SourceGithubAuthentication{ + SourceGithubAuthenticationOAuth: sourceGithubAuthenticationOAuth, + } } - } - if sourceGithubAuthenticationOAuth != nil { - credentials = &shared.SourceGithubAuthentication{ - SourceGithubAuthenticationOAuth: sourceGithubAuthenticationOAuth, - } - } - var sourceGithubAuthenticationPersonalAccessToken *shared.SourceGithubAuthenticationPersonalAccessToken - if r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken != nil { - optionTitle1 := new(shared.SourceGithubAuthenticationPersonalAccessTokenOptionTitle) - if !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceGithubAuthenticationPersonalAccessTokenOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceGithubAuthenticationPersonalAccessToken *shared.SourceGithubAuthenticationPersonalAccessToken + if r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken != nil { + optionTitle1 := new(shared.SourceGithubAuthenticationPersonalAccessTokenOptionTitle) + if !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceGithubAuthenticationPersonalAccessTokenOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + personalAccessToken := r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.PersonalAccessToken.ValueString() + sourceGithubAuthenticationPersonalAccessToken = &shared.SourceGithubAuthenticationPersonalAccessToken{ + OptionTitle: optionTitle1, + PersonalAccessToken: personalAccessToken, + } } - personalAccessToken := r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.PersonalAccessToken.ValueString() - sourceGithubAuthenticationPersonalAccessToken = &shared.SourceGithubAuthenticationPersonalAccessToken{ - OptionTitle: optionTitle1, - PersonalAccessToken: personalAccessToken, - } - } - if sourceGithubAuthenticationPersonalAccessToken != nil { - credentials = &shared.SourceGithubAuthentication{ - SourceGithubAuthenticationPersonalAccessToken: sourceGithubAuthenticationPersonalAccessToken, + if sourceGithubAuthenticationPersonalAccessToken != nil { + credentials = &shared.SourceGithubAuthentication{ + SourceGithubAuthenticationPersonalAccessToken: sourceGithubAuthenticationPersonalAccessToken, + } } } repository := r.Configuration.Repository.ValueString() @@ -101,42 +103,44 @@ func (r *SourceGithubResourceModel) ToUpdateSDKType() *shared.SourceGithubPutReq branch = nil } var credentials *shared.SourceGithubUpdateAuthentication - var sourceGithubUpdateAuthenticationOAuth *shared.SourceGithubUpdateAuthenticationOAuth - if r.Configuration.Credentials.SourceGithubAuthenticationOAuth != nil { - accessToken := r.Configuration.Credentials.SourceGithubAuthenticationOAuth.AccessToken.ValueString() - optionTitle := new(shared.SourceGithubUpdateAuthenticationOAuthOptionTitle) - if !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsNull() { - *optionTitle = shared.SourceGithubUpdateAuthenticationOAuthOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceGithubUpdateAuthenticationOAuth *shared.SourceGithubUpdateAuthenticationOAuth + if r.Configuration.Credentials.SourceGithubAuthenticationOAuth != nil { + accessToken := r.Configuration.Credentials.SourceGithubAuthenticationOAuth.AccessToken.ValueString() + optionTitle := new(shared.SourceGithubUpdateAuthenticationOAuthOptionTitle) + if !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.IsNull() { + *optionTitle = shared.SourceGithubUpdateAuthenticationOAuthOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationOAuth.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + sourceGithubUpdateAuthenticationOAuth = &shared.SourceGithubUpdateAuthenticationOAuth{ + AccessToken: accessToken, + OptionTitle: optionTitle, + } } - sourceGithubUpdateAuthenticationOAuth = &shared.SourceGithubUpdateAuthenticationOAuth{ - AccessToken: accessToken, - OptionTitle: optionTitle, + if sourceGithubUpdateAuthenticationOAuth != nil { + credentials = &shared.SourceGithubUpdateAuthentication{ + SourceGithubUpdateAuthenticationOAuth: sourceGithubUpdateAuthenticationOAuth, + } } - } - if sourceGithubUpdateAuthenticationOAuth != nil { - credentials = &shared.SourceGithubUpdateAuthentication{ - SourceGithubUpdateAuthenticationOAuth: sourceGithubUpdateAuthenticationOAuth, - } - } - var sourceGithubUpdateAuthenticationPersonalAccessToken *shared.SourceGithubUpdateAuthenticationPersonalAccessToken - if r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken != nil { - optionTitle1 := new(shared.SourceGithubUpdateAuthenticationPersonalAccessTokenOptionTitle) - if !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceGithubUpdateAuthenticationPersonalAccessTokenOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceGithubUpdateAuthenticationPersonalAccessToken *shared.SourceGithubUpdateAuthenticationPersonalAccessToken + if r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken != nil { + optionTitle1 := new(shared.SourceGithubUpdateAuthenticationPersonalAccessTokenOptionTitle) + if !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceGithubUpdateAuthenticationPersonalAccessTokenOptionTitle(r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + personalAccessToken := r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.PersonalAccessToken.ValueString() + sourceGithubUpdateAuthenticationPersonalAccessToken = &shared.SourceGithubUpdateAuthenticationPersonalAccessToken{ + OptionTitle: optionTitle1, + PersonalAccessToken: personalAccessToken, + } } - personalAccessToken := r.Configuration.Credentials.SourceGithubAuthenticationPersonalAccessToken.PersonalAccessToken.ValueString() - sourceGithubUpdateAuthenticationPersonalAccessToken = &shared.SourceGithubUpdateAuthenticationPersonalAccessToken{ - OptionTitle: optionTitle1, - PersonalAccessToken: personalAccessToken, - } - } - if sourceGithubUpdateAuthenticationPersonalAccessToken != nil { - credentials = &shared.SourceGithubUpdateAuthentication{ - SourceGithubUpdateAuthenticationPersonalAccessToken: sourceGithubUpdateAuthenticationPersonalAccessToken, + if sourceGithubUpdateAuthenticationPersonalAccessToken != nil { + credentials = &shared.SourceGithubUpdateAuthentication{ + SourceGithubUpdateAuthenticationPersonalAccessToken: sourceGithubUpdateAuthenticationPersonalAccessToken, + } } } repository := r.Configuration.Repository.ValueString() diff --git a/internal/provider/source_gnews_resource_sdk.go b/internal/provider/source_gnews_resource_sdk.go index d1b5aaeb1..9d2254134 100755 --- a/internal/provider/source_gnews_resource_sdk.go +++ b/internal/provider/source_gnews_resource_sdk.go @@ -21,7 +21,7 @@ func (r *SourceGnewsResourceModel) ToCreateSDKType() *shared.SourceGnewsCreateRe } else { endDate = nil } - in := make([]shared.SourceGnewsIn, 0) + var in []shared.SourceGnewsIn = nil for _, inItem := range r.Configuration.In { in = append(in, shared.SourceGnewsIn(inItem.ValueString())) } @@ -31,7 +31,7 @@ func (r *SourceGnewsResourceModel) ToCreateSDKType() *shared.SourceGnewsCreateRe } else { language = nil } - nullable := make([]shared.SourceGnewsNullable, 0) + var nullable []shared.SourceGnewsNullable = nil for _, nullableItem := range r.Configuration.Nullable { nullable = append(nullable, shared.SourceGnewsNullable(nullableItem.ValueString())) } @@ -111,7 +111,7 @@ func (r *SourceGnewsResourceModel) ToUpdateSDKType() *shared.SourceGnewsPutReque } else { endDate = nil } - in := make([]shared.SourceGnewsUpdateIn, 0) + var in []shared.SourceGnewsUpdateIn = nil for _, inItem := range r.Configuration.In { in = append(in, shared.SourceGnewsUpdateIn(inItem.ValueString())) } @@ -121,7 +121,7 @@ func (r *SourceGnewsResourceModel) ToUpdateSDKType() *shared.SourceGnewsPutReque } else { language = nil } - nullable := make([]shared.SourceGnewsUpdateNullable, 0) + var nullable []shared.SourceGnewsUpdateNullable = nil for _, nullableItem := range r.Configuration.Nullable { nullable = append(nullable, shared.SourceGnewsUpdateNullable(nullableItem.ValueString())) } diff --git a/internal/provider/source_googleads_resource_sdk.go b/internal/provider/source_googleads_resource_sdk.go index ad535ed7f..d59e28d96 100755 --- a/internal/provider/source_googleads_resource_sdk.go +++ b/internal/provider/source_googleads_resource_sdk.go @@ -32,7 +32,7 @@ func (r *SourceGoogleAdsResourceModel) ToCreateSDKType() *shared.SourceGoogleAds DeveloperToken: developerToken, RefreshToken: refreshToken, } - customQueries := make([]shared.SourceGoogleAdsCustomQueries, 0) + var customQueries []shared.SourceGoogleAdsCustomQueries = nil for _, customQueriesItem := range r.Configuration.CustomQueries { query := customQueriesItem.Query.ValueString() tableName := customQueriesItem.TableName.ValueString() @@ -112,7 +112,7 @@ func (r *SourceGoogleAdsResourceModel) ToUpdateSDKType() *shared.SourceGoogleAds DeveloperToken: developerToken, RefreshToken: refreshToken, } - customQueries := make([]shared.SourceGoogleAdsUpdateCustomQueries, 0) + var customQueries []shared.SourceGoogleAdsUpdateCustomQueries = nil for _, customQueriesItem := range r.Configuration.CustomQueries { query := customQueriesItem.Query.ValueString() tableName := customQueriesItem.TableName.ValueString() diff --git a/internal/provider/source_googleanalyticsdataapi_resource_sdk.go b/internal/provider/source_googleanalyticsdataapi_resource_sdk.go index 74a6e13fd..561f64885 100755 --- a/internal/provider/source_googleanalyticsdataapi_resource_sdk.go +++ b/internal/provider/source_googleanalyticsdataapi_resource_sdk.go @@ -10,53 +10,55 @@ import ( func (r *SourceGoogleAnalyticsDataAPIResourceModel) ToCreateSDKType() *shared.SourceGoogleAnalyticsDataAPICreateRequest { var credentials *shared.SourceGoogleAnalyticsDataAPICredentials - var sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth - if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth + if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := new(shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauthAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { + *authType = shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() + sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := new(shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauthAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { - *authType = shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) - } else { - authType = nil + if sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { + credentials = &shared.SourceGoogleAnalyticsDataAPICredentials{ + SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth, + } } - clientID := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() - sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication + if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { + authType1 := new(shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthenticationAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { + *authType1 = shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) + } else { + authType1 = nil + } + credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() + sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication{ + AuthType: authType1, + CredentialsJSON: credentialsJSON, + } } - } - if sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { - credentials = &shared.SourceGoogleAnalyticsDataAPICredentials{ - SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth, - } - } - var sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication - if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { - authType1 := new(shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthenticationAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { - *authType1 = shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) - } else { - authType1 = nil - } - credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication{ - AuthType: authType1, - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsDataAPICredentials{ - SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication, + if sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { + credentials = &shared.SourceGoogleAnalyticsDataAPICredentials{ + SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication, + } } } customReports := new(string) @@ -106,53 +108,55 @@ func (r *SourceGoogleAnalyticsDataAPIResourceModel) ToGetSDKType() *shared.Sourc func (r *SourceGoogleAnalyticsDataAPIResourceModel) ToUpdateSDKType() *shared.SourceGoogleAnalyticsDataAPIPutRequest { var credentials *shared.SourceGoogleAnalyticsDataAPIUpdateCredentials - var sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth - if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth + if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := new(shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauthAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { + *authType = shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() + sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := new(shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauthAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { - *authType = shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) - } else { - authType = nil + if sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth != nil { + credentials = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentials{ + SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth, + } } - clientID := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() - sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication + if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { + authType1 := new(shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthenticationAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { + *authType1 = shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) + } else { + authType1 = nil + } + credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() + sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication{ + AuthType: authType1, + CredentialsJSON: credentialsJSON, + } } - } - if sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth != nil { - credentials = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentials{ - SourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOauth, - } - } - var sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication - if r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication != nil { - authType1 := new(shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthenticationAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { - *authType1 = shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) - } else { - authType1 = nil - } - credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsDataAPICredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication{ - AuthType: authType1, - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentials{ - SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication, + if sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication != nil { + credentials = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentials{ + SourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication, + } } } customReports := new(string) diff --git a/internal/provider/source_googleanalyticsv4_resource_sdk.go b/internal/provider/source_googleanalyticsv4_resource_sdk.go index e70bea529..dcdadcd56 100755 --- a/internal/provider/source_googleanalyticsv4_resource_sdk.go +++ b/internal/provider/source_googleanalyticsv4_resource_sdk.go @@ -9,53 +9,55 @@ import ( func (r *SourceGoogleAnalyticsV4ResourceModel) ToCreateSDKType() *shared.SourceGoogleAnalyticsV4CreateRequest { var credentials *shared.SourceGoogleAnalyticsV4Credentials - var sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth - if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth + if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := new(shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauthAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { + *authType = shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() + sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := new(shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauthAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { - *authType = shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) - } else { - authType = nil + if sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { + credentials = &shared.SourceGoogleAnalyticsV4Credentials{ + SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth, + } } - clientID := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() - sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication + if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { + authType1 := new(shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthenticationAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { + *authType1 = shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) + } else { + authType1 = nil + } + credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() + sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication{ + AuthType: authType1, + CredentialsJSON: credentialsJSON, + } } - } - if sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { - credentials = &shared.SourceGoogleAnalyticsV4Credentials{ - SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth, - } - } - var sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication - if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { - authType1 := new(shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthenticationAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { - *authType1 = shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) - } else { - authType1 = nil - } - credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication{ - AuthType: authType1, - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsV4Credentials{ - SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication, + if sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { + credentials = &shared.SourceGoogleAnalyticsV4Credentials{ + SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication, + } } } customReports := new(string) @@ -105,53 +107,55 @@ func (r *SourceGoogleAnalyticsV4ResourceModel) ToGetSDKType() *shared.SourceGoog func (r *SourceGoogleAnalyticsV4ResourceModel) ToUpdateSDKType() *shared.SourceGoogleAnalyticsV4PutRequest { var credentials *shared.SourceGoogleAnalyticsV4UpdateCredentials - var sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth - if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth *shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth + if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := new(shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauthAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { + *authType = shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() + sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := new(shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauthAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.IsNull() { - *authType = shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauthAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.AuthType.ValueString()) - } else { - authType = nil + if sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth != nil { + credentials = &shared.SourceGoogleAnalyticsV4UpdateCredentials{ + SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth, + } } - clientID := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsAuthenticateViaGoogleOauth.RefreshToken.ValueString() - sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth = &shared.SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication + if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { + authType1 := new(shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthenticationAuthType) + if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { + *authType1 = shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) + } else { + authType1 = nil + } + credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() + sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication{ + AuthType: authType1, + CredentialsJSON: credentialsJSON, + } } - } - if sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth != nil { - credentials = &shared.SourceGoogleAnalyticsV4UpdateCredentials{ - SourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth: sourceGoogleAnalyticsV4UpdateCredentialsAuthenticateViaGoogleOauth, - } - } - var sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication - if r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication != nil { - authType1 := new(shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthenticationAuthType) - if !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.IsNull() { - *authType1 = shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthenticationAuthType(r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.AuthType.ValueString()) - } else { - authType1 = nil - } - credentialsJSON := r.Configuration.Credentials.SourceGoogleAnalyticsV4CredentialsServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication{ - AuthType: authType1, - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsV4UpdateCredentials{ - SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication, + if sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication != nil { + credentials = &shared.SourceGoogleAnalyticsV4UpdateCredentials{ + SourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4UpdateCredentialsServiceAccountKeyAuthentication, + } } } customReports := new(string) diff --git a/internal/provider/source_googlepagespeedinsights_resource_sdk.go b/internal/provider/source_googlepagespeedinsights_resource_sdk.go index 1322e184b..c1cc06ddb 100755 --- a/internal/provider/source_googlepagespeedinsights_resource_sdk.go +++ b/internal/provider/source_googlepagespeedinsights_resource_sdk.go @@ -14,16 +14,16 @@ func (r *SourceGooglePagespeedInsightsResourceModel) ToCreateSDKType() *shared.S } else { apiKey = nil } - categories := make([]shared.SourceGooglePagespeedInsightsCategories, 0) + var categories []shared.SourceGooglePagespeedInsightsCategories = nil for _, categoriesItem := range r.Configuration.Categories { categories = append(categories, shared.SourceGooglePagespeedInsightsCategories(categoriesItem.ValueString())) } sourceType := shared.SourceGooglePagespeedInsightsGooglePagespeedInsights(r.Configuration.SourceType.ValueString()) - strategies := make([]shared.SourceGooglePagespeedInsightsStrategies, 0) + var strategies []shared.SourceGooglePagespeedInsightsStrategies = nil for _, strategiesItem := range r.Configuration.Strategies { strategies = append(strategies, shared.SourceGooglePagespeedInsightsStrategies(strategiesItem.ValueString())) } - urls := make([]string, 0) + var urls []string = nil for _, urlsItem := range r.Configuration.Urls { urls = append(urls, urlsItem.ValueString()) } @@ -63,15 +63,15 @@ func (r *SourceGooglePagespeedInsightsResourceModel) ToUpdateSDKType() *shared.S } else { apiKey = nil } - categories := make([]shared.SourceGooglePagespeedInsightsUpdateCategories, 0) + var categories []shared.SourceGooglePagespeedInsightsUpdateCategories = nil for _, categoriesItem := range r.Configuration.Categories { categories = append(categories, shared.SourceGooglePagespeedInsightsUpdateCategories(categoriesItem.ValueString())) } - strategies := make([]shared.SourceGooglePagespeedInsightsUpdateStrategies, 0) + var strategies []shared.SourceGooglePagespeedInsightsUpdateStrategies = nil for _, strategiesItem := range r.Configuration.Strategies { strategies = append(strategies, shared.SourceGooglePagespeedInsightsUpdateStrategies(strategiesItem.ValueString())) } - urls := make([]string, 0) + var urls []string = nil for _, urlsItem := range r.Configuration.Urls { urls = append(urls, urlsItem.ValueString()) } diff --git a/internal/provider/source_googlesearchconsole_resource_sdk.go b/internal/provider/source_googlesearchconsole_resource_sdk.go index 67c7ec0de..197034696 100755 --- a/internal/provider/source_googlesearchconsole_resource_sdk.go +++ b/internal/provider/source_googlesearchconsole_resource_sdk.go @@ -69,7 +69,7 @@ func (r *SourceGoogleSearchConsoleResourceModel) ToCreateSDKType() *shared.Sourc } else { endDate = nil } - siteUrls := make([]string, 0) + var siteUrls []string = nil for _, siteUrlsItem := range r.Configuration.SiteUrls { siteUrls = append(siteUrls, siteUrlsItem.ValueString()) } @@ -167,7 +167,7 @@ func (r *SourceGoogleSearchConsoleResourceModel) ToUpdateSDKType() *shared.Sourc } else { endDate = nil } - siteUrls := make([]string, 0) + var siteUrls []string = nil for _, siteUrlsItem := range r.Configuration.SiteUrls { siteUrls = append(siteUrls, siteUrlsItem.ValueString()) } diff --git a/internal/provider/source_harvest_resource_sdk.go b/internal/provider/source_harvest_resource_sdk.go index 87f8c187c..c64118acf 100755 --- a/internal/provider/source_harvest_resource_sdk.go +++ b/internal/provider/source_harvest_resource_sdk.go @@ -12,56 +12,58 @@ import ( func (r *SourceHarvestResourceModel) ToCreateSDKType() *shared.SourceHarvestCreateRequest { accountID := r.Configuration.AccountID.ValueString() var credentials *shared.SourceHarvestAuthenticationMechanism - var sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth *shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth - if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { - authType := new(shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType) - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsNull() { - *authType = shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.ValueString()) - } else { - authType = nil - } - clientID := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.RefreshToken.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth = &shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - AdditionalProperties: additionalProperties, - } - } - if sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { - credentials = &shared.SourceHarvestAuthenticationMechanism{ - SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth: sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth, - } - } - var sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken - if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - apiToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.APIToken.ValueString() - authType1 := new(shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType) - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsNull() { - *authType1 = shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken{ - APIToken: apiToken, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - credentials = &shared.SourceHarvestAuthenticationMechanism{ - SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken, + if r.Configuration.Credentials != nil { + var sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth *shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth + if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { + authType := new(shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType) + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsNull() { + *authType = shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.RefreshToken.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth = &shared.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + AdditionalProperties: additionalProperties, + } + } + if sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { + credentials = &shared.SourceHarvestAuthenticationMechanism{ + SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth: sourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth, + } + } + var sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken + if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + apiToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.APIToken.ValueString() + authType1 := new(shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType) + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsNull() { + *authType1 = shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken{ + APIToken: apiToken, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + credentials = &shared.SourceHarvestAuthenticationMechanism{ + SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken, + } } } replicationEndDate := new(time.Time) @@ -104,56 +106,58 @@ func (r *SourceHarvestResourceModel) ToGetSDKType() *shared.SourceHarvestCreateR func (r *SourceHarvestResourceModel) ToUpdateSDKType() *shared.SourceHarvestPutRequest { accountID := r.Configuration.AccountID.ValueString() var credentials *shared.SourceHarvestUpdateAuthenticationMechanism - var sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth *shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth - if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { - authType := new(shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType) - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsNull() { - *authType = shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.ValueString()) - } else { - authType = nil - } - clientID := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.RefreshToken.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth = &shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - AdditionalProperties: additionalProperties, - } - } - if sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { - credentials = &shared.SourceHarvestUpdateAuthenticationMechanism{ - SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth: sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth, - } - } - var sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken - if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - apiToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.APIToken.ValueString() - authType1 := new(shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType) - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsNull() { - *authType1 = shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken{ - APIToken: apiToken, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { - credentials = &shared.SourceHarvestUpdateAuthenticationMechanism{ - SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken, + if r.Configuration.Credentials != nil { + var sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth *shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth + if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { + authType := new(shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType) + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.IsNull() { + *authType = shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuthAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.RefreshToken.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateViaHarvestOAuth.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth = &shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + AdditionalProperties: additionalProperties, + } + } + if sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth != nil { + credentials = &shared.SourceHarvestUpdateAuthenticationMechanism{ + SourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth: sourceHarvestUpdateAuthenticationMechanismAuthenticateViaHarvestOAuth, + } + } + var sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken *shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken + if r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + apiToken := r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.APIToken.ValueString() + authType1 := new(shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType) + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.IsNull() { + *authType1 = shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessTokenAuthType(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceHarvestAuthenticationMechanismAuthenticateWithPersonalAccessToken.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken = &shared.SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken{ + APIToken: apiToken, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken != nil { + credentials = &shared.SourceHarvestUpdateAuthenticationMechanism{ + SourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken: sourceHarvestUpdateAuthenticationMechanismAuthenticateWithPersonalAccessToken, + } } } replicationEndDate := new(time.Time) diff --git a/internal/provider/source_jira_resource_sdk.go b/internal/provider/source_jira_resource_sdk.go index 315a4415f..11c35104c 100755 --- a/internal/provider/source_jira_resource_sdk.go +++ b/internal/provider/source_jira_resource_sdk.go @@ -24,7 +24,7 @@ func (r *SourceJiraResourceModel) ToCreateSDKType() *shared.SourceJiraCreateRequ } else { expandIssueChangelog = nil } - projects := make([]string, 0) + var projects []string = nil for _, projectsItem := range r.Configuration.Projects { projects = append(projects, projectsItem.ValueString()) } @@ -90,7 +90,7 @@ func (r *SourceJiraResourceModel) ToUpdateSDKType() *shared.SourceJiraPutRequest } else { expandIssueChangelog = nil } - projects := make([]string, 0) + var projects []string = nil for _, projectsItem := range r.Configuration.Projects { projects = append(projects, projectsItem.ValueString()) } diff --git a/internal/provider/source_linkedinads_resource_sdk.go b/internal/provider/source_linkedinads_resource_sdk.go index 99f918682..b9cc9b6f1 100755 --- a/internal/provider/source_linkedinads_resource_sdk.go +++ b/internal/provider/source_linkedinads_resource_sdk.go @@ -9,43 +9,45 @@ import ( ) func (r *SourceLinkedinAdsResourceModel) ToCreateSDKType() *shared.SourceLinkedinAdsCreateRequest { - accountIds := make([]int64, 0) + var accountIds []int64 = nil for _, accountIdsItem := range r.Configuration.AccountIds { accountIds = append(accountIds, accountIdsItem.ValueInt64()) } var credentials *shared.SourceLinkedinAdsAuthentication - var sourceLinkedinAdsAuthenticationOAuth20 *shared.SourceLinkedinAdsAuthenticationOAuth20 - if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken != nil { - authMethod := new(shared.SourceLinkedinAdsAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsNull() { - *authMethod = shared.SourceLinkedinAdsAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.ValueString()) - } else { - authMethod = nil + if r.Configuration.Credentials != nil { + var sourceLinkedinAdsAuthenticationOAuth20 *shared.SourceLinkedinAdsAuthenticationOAuth20 + if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken != nil { + authMethod := new(shared.SourceLinkedinAdsAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsNull() { + *authMethod = shared.SourceLinkedinAdsAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.ValueString()) + } else { + authMethod = nil + } + sourceLinkedinAdsAuthenticationOAuth20 = &shared.SourceLinkedinAdsAuthenticationOAuth20{ + AuthMethod: authMethod, + } } - sourceLinkedinAdsAuthenticationOAuth20 = &shared.SourceLinkedinAdsAuthenticationOAuth20{ - AuthMethod: authMethod, + if sourceLinkedinAdsAuthenticationOAuth20 != nil { + credentials = &shared.SourceLinkedinAdsAuthentication{ + SourceLinkedinAdsAuthenticationOAuth20: sourceLinkedinAdsAuthenticationOAuth20, + } } - } - if sourceLinkedinAdsAuthenticationOAuth20 != nil { - credentials = &shared.SourceLinkedinAdsAuthentication{ - SourceLinkedinAdsAuthenticationOAuth20: sourceLinkedinAdsAuthenticationOAuth20, - } - } - var sourceLinkedinAdsAuthenticationAccessToken *shared.SourceLinkedinAdsAuthenticationAccessToken - if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20 != nil { - authMethod1 := new(shared.SourceLinkedinAdsAuthenticationAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod1 = shared.SourceLinkedinAdsAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod1 = nil + var sourceLinkedinAdsAuthenticationAccessToken *shared.SourceLinkedinAdsAuthenticationAccessToken + if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20 != nil { + authMethod1 := new(shared.SourceLinkedinAdsAuthenticationAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod1 = shared.SourceLinkedinAdsAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceLinkedinAdsAuthenticationAccessToken = &shared.SourceLinkedinAdsAuthenticationAccessToken{ + AuthMethod: authMethod1, + } } - sourceLinkedinAdsAuthenticationAccessToken = &shared.SourceLinkedinAdsAuthenticationAccessToken{ - AuthMethod: authMethod1, - } - } - if sourceLinkedinAdsAuthenticationAccessToken != nil { - credentials = &shared.SourceLinkedinAdsAuthentication{ - SourceLinkedinAdsAuthenticationAccessToken: sourceLinkedinAdsAuthenticationAccessToken, + if sourceLinkedinAdsAuthenticationAccessToken != nil { + credentials = &shared.SourceLinkedinAdsAuthentication{ + SourceLinkedinAdsAuthenticationAccessToken: sourceLinkedinAdsAuthenticationAccessToken, + } } } sourceType := shared.SourceLinkedinAdsLinkedinAds(r.Configuration.SourceType.ValueString()) @@ -79,43 +81,45 @@ func (r *SourceLinkedinAdsResourceModel) ToGetSDKType() *shared.SourceLinkedinAd } func (r *SourceLinkedinAdsResourceModel) ToUpdateSDKType() *shared.SourceLinkedinAdsPutRequest { - accountIds := make([]int64, 0) + var accountIds []int64 = nil for _, accountIdsItem := range r.Configuration.AccountIds { accountIds = append(accountIds, accountIdsItem.ValueInt64()) } var credentials *shared.SourceLinkedinAdsUpdateAuthentication - var sourceLinkedinAdsUpdateAuthenticationOAuth20 *shared.SourceLinkedinAdsUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken != nil { - authMethod := new(shared.SourceLinkedinAdsUpdateAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsNull() { - *authMethod = shared.SourceLinkedinAdsUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.ValueString()) - } else { - authMethod = nil + if r.Configuration.Credentials != nil { + var sourceLinkedinAdsUpdateAuthenticationOAuth20 *shared.SourceLinkedinAdsUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken != nil { + authMethod := new(shared.SourceLinkedinAdsUpdateAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.IsNull() { + *authMethod = shared.SourceLinkedinAdsUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationAccessToken.AuthMethod.ValueString()) + } else { + authMethod = nil + } + sourceLinkedinAdsUpdateAuthenticationOAuth20 = &shared.SourceLinkedinAdsUpdateAuthenticationOAuth20{ + AuthMethod: authMethod, + } } - sourceLinkedinAdsUpdateAuthenticationOAuth20 = &shared.SourceLinkedinAdsUpdateAuthenticationOAuth20{ - AuthMethod: authMethod, + if sourceLinkedinAdsUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceLinkedinAdsUpdateAuthentication{ + SourceLinkedinAdsUpdateAuthenticationOAuth20: sourceLinkedinAdsUpdateAuthenticationOAuth20, + } } - } - if sourceLinkedinAdsUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceLinkedinAdsUpdateAuthentication{ - SourceLinkedinAdsUpdateAuthenticationOAuth20: sourceLinkedinAdsUpdateAuthenticationOAuth20, - } - } - var sourceLinkedinAdsUpdateAuthenticationAccessToken *shared.SourceLinkedinAdsUpdateAuthenticationAccessToken - if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20 != nil { - authMethod1 := new(shared.SourceLinkedinAdsUpdateAuthenticationAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod1 = shared.SourceLinkedinAdsUpdateAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod1 = nil + var sourceLinkedinAdsUpdateAuthenticationAccessToken *shared.SourceLinkedinAdsUpdateAuthenticationAccessToken + if r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20 != nil { + authMethod1 := new(shared.SourceLinkedinAdsUpdateAuthenticationAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod1 = shared.SourceLinkedinAdsUpdateAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinAdsAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceLinkedinAdsUpdateAuthenticationAccessToken = &shared.SourceLinkedinAdsUpdateAuthenticationAccessToken{ + AuthMethod: authMethod1, + } } - sourceLinkedinAdsUpdateAuthenticationAccessToken = &shared.SourceLinkedinAdsUpdateAuthenticationAccessToken{ - AuthMethod: authMethod1, - } - } - if sourceLinkedinAdsUpdateAuthenticationAccessToken != nil { - credentials = &shared.SourceLinkedinAdsUpdateAuthentication{ - SourceLinkedinAdsUpdateAuthenticationAccessToken: sourceLinkedinAdsUpdateAuthenticationAccessToken, + if sourceLinkedinAdsUpdateAuthenticationAccessToken != nil { + credentials = &shared.SourceLinkedinAdsUpdateAuthentication{ + SourceLinkedinAdsUpdateAuthenticationAccessToken: sourceLinkedinAdsUpdateAuthenticationAccessToken, + } } } startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) diff --git a/internal/provider/source_linkedinpages_resource_sdk.go b/internal/provider/source_linkedinpages_resource_sdk.go index 72e540349..245e7faad 100755 --- a/internal/provider/source_linkedinpages_resource_sdk.go +++ b/internal/provider/source_linkedinpages_resource_sdk.go @@ -9,38 +9,40 @@ import ( func (r *SourceLinkedinPagesResourceModel) ToCreateSDKType() *shared.SourceLinkedinPagesCreateRequest { var credentials *shared.SourceLinkedinPagesAuthentication - var sourceLinkedinPagesAuthenticationOAuth20 *shared.SourceLinkedinPagesAuthenticationOAuth20 - if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken != nil { - authMethod := new(shared.SourceLinkedinPagesAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsNull() { - *authMethod = shared.SourceLinkedinPagesAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.ValueString()) - } else { - authMethod = nil + if r.Configuration.Credentials != nil { + var sourceLinkedinPagesAuthenticationOAuth20 *shared.SourceLinkedinPagesAuthenticationOAuth20 + if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken != nil { + authMethod := new(shared.SourceLinkedinPagesAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsNull() { + *authMethod = shared.SourceLinkedinPagesAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.ValueString()) + } else { + authMethod = nil + } + sourceLinkedinPagesAuthenticationOAuth20 = &shared.SourceLinkedinPagesAuthenticationOAuth20{ + AuthMethod: authMethod, + } } - sourceLinkedinPagesAuthenticationOAuth20 = &shared.SourceLinkedinPagesAuthenticationOAuth20{ - AuthMethod: authMethod, + if sourceLinkedinPagesAuthenticationOAuth20 != nil { + credentials = &shared.SourceLinkedinPagesAuthentication{ + SourceLinkedinPagesAuthenticationOAuth20: sourceLinkedinPagesAuthenticationOAuth20, + } } - } - if sourceLinkedinPagesAuthenticationOAuth20 != nil { - credentials = &shared.SourceLinkedinPagesAuthentication{ - SourceLinkedinPagesAuthenticationOAuth20: sourceLinkedinPagesAuthenticationOAuth20, - } - } - var sourceLinkedinPagesAuthenticationAccessToken *shared.SourceLinkedinPagesAuthenticationAccessToken - if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20 != nil { - authMethod1 := new(shared.SourceLinkedinPagesAuthenticationAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod1 = shared.SourceLinkedinPagesAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod1 = nil + var sourceLinkedinPagesAuthenticationAccessToken *shared.SourceLinkedinPagesAuthenticationAccessToken + if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20 != nil { + authMethod1 := new(shared.SourceLinkedinPagesAuthenticationAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod1 = shared.SourceLinkedinPagesAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceLinkedinPagesAuthenticationAccessToken = &shared.SourceLinkedinPagesAuthenticationAccessToken{ + AuthMethod: authMethod1, + } } - sourceLinkedinPagesAuthenticationAccessToken = &shared.SourceLinkedinPagesAuthenticationAccessToken{ - AuthMethod: authMethod1, - } - } - if sourceLinkedinPagesAuthenticationAccessToken != nil { - credentials = &shared.SourceLinkedinPagesAuthentication{ - SourceLinkedinPagesAuthenticationAccessToken: sourceLinkedinPagesAuthenticationAccessToken, + if sourceLinkedinPagesAuthenticationAccessToken != nil { + credentials = &shared.SourceLinkedinPagesAuthentication{ + SourceLinkedinPagesAuthenticationAccessToken: sourceLinkedinPagesAuthenticationAccessToken, + } } } orgID := r.Configuration.OrgID.ValueString() @@ -74,38 +76,40 @@ func (r *SourceLinkedinPagesResourceModel) ToGetSDKType() *shared.SourceLinkedin func (r *SourceLinkedinPagesResourceModel) ToUpdateSDKType() *shared.SourceLinkedinPagesPutRequest { var credentials *shared.SourceLinkedinPagesUpdateAuthentication - var sourceLinkedinPagesUpdateAuthenticationOAuth20 *shared.SourceLinkedinPagesUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken != nil { - authMethod := new(shared.SourceLinkedinPagesUpdateAuthenticationOAuth20AuthMethod) - if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsNull() { - *authMethod = shared.SourceLinkedinPagesUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.ValueString()) - } else { - authMethod = nil + if r.Configuration.Credentials != nil { + var sourceLinkedinPagesUpdateAuthenticationOAuth20 *shared.SourceLinkedinPagesUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken != nil { + authMethod := new(shared.SourceLinkedinPagesUpdateAuthenticationOAuth20AuthMethod) + if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.IsNull() { + *authMethod = shared.SourceLinkedinPagesUpdateAuthenticationOAuth20AuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationAccessToken.AuthMethod.ValueString()) + } else { + authMethod = nil + } + sourceLinkedinPagesUpdateAuthenticationOAuth20 = &shared.SourceLinkedinPagesUpdateAuthenticationOAuth20{ + AuthMethod: authMethod, + } } - sourceLinkedinPagesUpdateAuthenticationOAuth20 = &shared.SourceLinkedinPagesUpdateAuthenticationOAuth20{ - AuthMethod: authMethod, + if sourceLinkedinPagesUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceLinkedinPagesUpdateAuthentication{ + SourceLinkedinPagesUpdateAuthenticationOAuth20: sourceLinkedinPagesUpdateAuthenticationOAuth20, + } } - } - if sourceLinkedinPagesUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceLinkedinPagesUpdateAuthentication{ - SourceLinkedinPagesUpdateAuthenticationOAuth20: sourceLinkedinPagesUpdateAuthenticationOAuth20, - } - } - var sourceLinkedinPagesUpdateAuthenticationAccessToken *shared.SourceLinkedinPagesUpdateAuthenticationAccessToken - if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20 != nil { - authMethod1 := new(shared.SourceLinkedinPagesUpdateAuthenticationAccessTokenAuthMethod) - if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsNull() { - *authMethod1 = shared.SourceLinkedinPagesUpdateAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.ValueString()) - } else { - authMethod1 = nil + var sourceLinkedinPagesUpdateAuthenticationAccessToken *shared.SourceLinkedinPagesUpdateAuthenticationAccessToken + if r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20 != nil { + authMethod1 := new(shared.SourceLinkedinPagesUpdateAuthenticationAccessTokenAuthMethod) + if !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsUnknown() && !r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.IsNull() { + *authMethod1 = shared.SourceLinkedinPagesUpdateAuthenticationAccessTokenAuthMethod(r.Configuration.Credentials.SourceLinkedinPagesAuthenticationOAuth20.AuthMethod.ValueString()) + } else { + authMethod1 = nil + } + sourceLinkedinPagesUpdateAuthenticationAccessToken = &shared.SourceLinkedinPagesUpdateAuthenticationAccessToken{ + AuthMethod: authMethod1, + } } - sourceLinkedinPagesUpdateAuthenticationAccessToken = &shared.SourceLinkedinPagesUpdateAuthenticationAccessToken{ - AuthMethod: authMethod1, - } - } - if sourceLinkedinPagesUpdateAuthenticationAccessToken != nil { - credentials = &shared.SourceLinkedinPagesUpdateAuthentication{ - SourceLinkedinPagesUpdateAuthenticationAccessToken: sourceLinkedinPagesUpdateAuthenticationAccessToken, + if sourceLinkedinPagesUpdateAuthenticationAccessToken != nil { + credentials = &shared.SourceLinkedinPagesUpdateAuthentication{ + SourceLinkedinPagesUpdateAuthenticationAccessToken: sourceLinkedinPagesUpdateAuthenticationAccessToken, + } } } orgID := r.Configuration.OrgID.ValueString() diff --git a/internal/provider/source_mailchimp_resource_sdk.go b/internal/provider/source_mailchimp_resource_sdk.go index 524f80dcb..754284823 100755 --- a/internal/provider/source_mailchimp_resource_sdk.go +++ b/internal/provider/source_mailchimp_resource_sdk.go @@ -15,28 +15,30 @@ func (r *SourceMailchimpResourceModel) ToCreateSDKType() *shared.SourceMailchimp campaignID = nil } var credentials *shared.SourceMailchimpAuthentication - var sourceMailchimpAuthenticationOAuth20 *shared.SourceMailchimpAuthenticationOAuth20 - if r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey != nil { - authType := shared.SourceMailchimpAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey.AuthType.ValueString()) - sourceMailchimpAuthenticationOAuth20 = &shared.SourceMailchimpAuthenticationOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceMailchimpAuthenticationOAuth20 *shared.SourceMailchimpAuthenticationOAuth20 + if r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey != nil { + authType := shared.SourceMailchimpAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey.AuthType.ValueString()) + sourceMailchimpAuthenticationOAuth20 = &shared.SourceMailchimpAuthenticationOAuth20{ + AuthType: authType, + } } - } - if sourceMailchimpAuthenticationOAuth20 != nil { - credentials = &shared.SourceMailchimpAuthentication{ - SourceMailchimpAuthenticationOAuth20: sourceMailchimpAuthenticationOAuth20, + if sourceMailchimpAuthenticationOAuth20 != nil { + credentials = &shared.SourceMailchimpAuthentication{ + SourceMailchimpAuthenticationOAuth20: sourceMailchimpAuthenticationOAuth20, + } } - } - var sourceMailchimpAuthenticationAPIKey *shared.SourceMailchimpAuthenticationAPIKey - if r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20 != nil { - authType1 := shared.SourceMailchimpAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20.AuthType.ValueString()) - sourceMailchimpAuthenticationAPIKey = &shared.SourceMailchimpAuthenticationAPIKey{ - AuthType: authType1, + var sourceMailchimpAuthenticationAPIKey *shared.SourceMailchimpAuthenticationAPIKey + if r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20 != nil { + authType1 := shared.SourceMailchimpAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20.AuthType.ValueString()) + sourceMailchimpAuthenticationAPIKey = &shared.SourceMailchimpAuthenticationAPIKey{ + AuthType: authType1, + } } - } - if sourceMailchimpAuthenticationAPIKey != nil { - credentials = &shared.SourceMailchimpAuthentication{ - SourceMailchimpAuthenticationAPIKey: sourceMailchimpAuthenticationAPIKey, + if sourceMailchimpAuthenticationAPIKey != nil { + credentials = &shared.SourceMailchimpAuthentication{ + SourceMailchimpAuthenticationAPIKey: sourceMailchimpAuthenticationAPIKey, + } } } sourceType := shared.SourceMailchimpMailchimp(r.Configuration.SourceType.ValueString()) @@ -75,28 +77,30 @@ func (r *SourceMailchimpResourceModel) ToUpdateSDKType() *shared.SourceMailchimp campaignID = nil } var credentials *shared.SourceMailchimpUpdateAuthentication - var sourceMailchimpUpdateAuthenticationOAuth20 *shared.SourceMailchimpUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey != nil { - authType := shared.SourceMailchimpUpdateAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey.AuthType.ValueString()) - sourceMailchimpUpdateAuthenticationOAuth20 = &shared.SourceMailchimpUpdateAuthenticationOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceMailchimpUpdateAuthenticationOAuth20 *shared.SourceMailchimpUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey != nil { + authType := shared.SourceMailchimpUpdateAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationAPIKey.AuthType.ValueString()) + sourceMailchimpUpdateAuthenticationOAuth20 = &shared.SourceMailchimpUpdateAuthenticationOAuth20{ + AuthType: authType, + } } - } - if sourceMailchimpUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceMailchimpUpdateAuthentication{ - SourceMailchimpUpdateAuthenticationOAuth20: sourceMailchimpUpdateAuthenticationOAuth20, + if sourceMailchimpUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceMailchimpUpdateAuthentication{ + SourceMailchimpUpdateAuthenticationOAuth20: sourceMailchimpUpdateAuthenticationOAuth20, + } } - } - var sourceMailchimpUpdateAuthenticationAPIKey *shared.SourceMailchimpUpdateAuthenticationAPIKey - if r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20 != nil { - authType1 := shared.SourceMailchimpUpdateAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20.AuthType.ValueString()) - sourceMailchimpUpdateAuthenticationAPIKey = &shared.SourceMailchimpUpdateAuthenticationAPIKey{ - AuthType: authType1, + var sourceMailchimpUpdateAuthenticationAPIKey *shared.SourceMailchimpUpdateAuthenticationAPIKey + if r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20 != nil { + authType1 := shared.SourceMailchimpUpdateAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceMailchimpAuthenticationOAuth20.AuthType.ValueString()) + sourceMailchimpUpdateAuthenticationAPIKey = &shared.SourceMailchimpUpdateAuthenticationAPIKey{ + AuthType: authType1, + } } - } - if sourceMailchimpUpdateAuthenticationAPIKey != nil { - credentials = &shared.SourceMailchimpUpdateAuthentication{ - SourceMailchimpUpdateAuthenticationAPIKey: sourceMailchimpUpdateAuthenticationAPIKey, + if sourceMailchimpUpdateAuthenticationAPIKey != nil { + credentials = &shared.SourceMailchimpUpdateAuthentication{ + SourceMailchimpUpdateAuthenticationAPIKey: sourceMailchimpUpdateAuthenticationAPIKey, + } } } configuration := shared.SourceMailchimpUpdate{ diff --git a/internal/provider/source_microsoftteams_resource_sdk.go b/internal/provider/source_microsoftteams_resource_sdk.go index 80d7ebd93..6fa7aeaec 100755 --- a/internal/provider/source_microsoftteams_resource_sdk.go +++ b/internal/provider/source_microsoftteams_resource_sdk.go @@ -9,50 +9,52 @@ import ( func (r *SourceMicrosoftTeamsResourceModel) ToCreateSDKType() *shared.SourceMicrosoftTeamsCreateRequest { var credentials *shared.SourceMicrosoftTeamsAuthenticationMechanism - var sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 *shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 - if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { - authType := new(shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType) - if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsNull() { - *authType = shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.ValueString()) - } else { - authType = nil + if r.Configuration.Credentials != nil { + var sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 *shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 + if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { + authType := new(shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType) + if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsNull() { + *authType = shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientSecret.ValueString() + tenantID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.TenantID.ValueString() + sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 = &shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + TenantID: tenantID, + } } - clientID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientSecret.ValueString() - tenantID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.TenantID.ValueString() - sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 = &shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - TenantID: tenantID, + if sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { + credentials = &shared.SourceMicrosoftTeamsAuthenticationMechanism{ + SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20: sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20, + } } - } - if sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { - credentials = &shared.SourceMicrosoftTeamsAuthenticationMechanism{ - SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20: sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20, - } - } - var sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft *shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft - if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { - authType1 := new(shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftAuthType) - if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsNull() { - *authType1 = shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftAuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.ValueString()) - } else { - authType1 = nil + var sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft *shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft + if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { + authType1 := new(shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftAuthType) + if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsNull() { + *authType1 = shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftAuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + clientId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientID.ValueString() + clientSecret1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientSecret.ValueString() + tenantId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.TenantID.ValueString() + sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft = &shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft{ + AuthType: authType1, + ClientID: clientId1, + ClientSecret: clientSecret1, + TenantID: tenantId1, + } } - clientId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientID.ValueString() - clientSecret1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientSecret.ValueString() - tenantId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.TenantID.ValueString() - sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft = &shared.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft{ - AuthType: authType1, - ClientID: clientId1, - ClientSecret: clientSecret1, - TenantID: tenantId1, - } - } - if sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { - credentials = &shared.SourceMicrosoftTeamsAuthenticationMechanism{ - SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft: sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft, + if sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { + credentials = &shared.SourceMicrosoftTeamsAuthenticationMechanism{ + SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft: sourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft, + } } } period := r.Configuration.Period.ValueString() @@ -86,50 +88,52 @@ func (r *SourceMicrosoftTeamsResourceModel) ToGetSDKType() *shared.SourceMicroso func (r *SourceMicrosoftTeamsResourceModel) ToUpdateSDKType() *shared.SourceMicrosoftTeamsPutRequest { var credentials *shared.SourceMicrosoftTeamsUpdateAuthenticationMechanism - var sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 *shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 - if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { - authType := new(shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType) - if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsNull() { - *authType = shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.ValueString()) - } else { - authType = nil + if r.Configuration.Credentials != nil { + var sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 *shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 + if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft != nil { + authType := new(shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType) + if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.IsNull() { + *authType = shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20AuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientSecret.ValueString() + tenantID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.TenantID.ValueString() + sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + TenantID: tenantID, + } } - clientID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.ClientSecret.ValueString() - tenantID := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoft.TenantID.ValueString() - sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - TenantID: tenantID, + if sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { + credentials = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanism{ + SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20: sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20, + } } - } - if sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { - credentials = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanism{ - SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20: sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftOAuth20, - } - } - var sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft *shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft - if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { - authType1 := new(shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftAuthType) - if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsNull() { - *authType1 = shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftAuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.ValueString()) - } else { - authType1 = nil + var sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft *shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft + if r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20 != nil { + authType1 := new(shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftAuthType) + if !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.IsNull() { + *authType1 = shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoftAuthType(r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + clientId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientID.ValueString() + clientSecret1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientSecret.ValueString() + tenantId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.TenantID.ValueString() + sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft{ + AuthType: authType1, + ClientID: clientId1, + ClientSecret: clientSecret1, + TenantID: tenantId1, + } } - clientId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientID.ValueString() - clientSecret1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.ClientSecret.ValueString() - tenantId1 := r.Configuration.Credentials.SourceMicrosoftTeamsAuthenticationMechanismAuthenticateViaMicrosoftOAuth20.TenantID.ValueString() - sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft{ - AuthType: authType1, - ClientID: clientId1, - ClientSecret: clientSecret1, - TenantID: tenantId1, - } - } - if sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft != nil { - credentials = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanism{ - SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft: sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft, + if sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft != nil { + credentials = &shared.SourceMicrosoftTeamsUpdateAuthenticationMechanism{ + SourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft: sourceMicrosoftTeamsUpdateAuthenticationMechanismAuthenticateViaMicrosoft, + } } } period := r.Configuration.Period.ValueString() diff --git a/internal/provider/source_mixpanel_resource_sdk.go b/internal/provider/source_mixpanel_resource_sdk.go index 8e21e85db..223b03c7a 100755 --- a/internal/provider/source_mixpanel_resource_sdk.go +++ b/internal/provider/source_mixpanel_resource_sdk.go @@ -16,38 +16,40 @@ func (r *SourceMixpanelResourceModel) ToCreateSDKType() *shared.SourceMixpanelCr attributionWindow = nil } var credentials *shared.SourceMixpanelAuthenticationWildcard - var sourceMixpanelAuthenticationWildcardServiceAccount *shared.SourceMixpanelAuthenticationWildcardServiceAccount - if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret != nil { - optionTitle := new(shared.SourceMixpanelAuthenticationWildcardServiceAccountOptionTitle) - if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsNull() { - *optionTitle = shared.SourceMixpanelAuthenticationWildcardServiceAccountOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceMixpanelAuthenticationWildcardServiceAccount *shared.SourceMixpanelAuthenticationWildcardServiceAccount + if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret != nil { + optionTitle := new(shared.SourceMixpanelAuthenticationWildcardServiceAccountOptionTitle) + if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsNull() { + *optionTitle = shared.SourceMixpanelAuthenticationWildcardServiceAccountOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + sourceMixpanelAuthenticationWildcardServiceAccount = &shared.SourceMixpanelAuthenticationWildcardServiceAccount{ + OptionTitle: optionTitle, + } } - sourceMixpanelAuthenticationWildcardServiceAccount = &shared.SourceMixpanelAuthenticationWildcardServiceAccount{ - OptionTitle: optionTitle, + if sourceMixpanelAuthenticationWildcardServiceAccount != nil { + credentials = &shared.SourceMixpanelAuthenticationWildcard{ + SourceMixpanelAuthenticationWildcardServiceAccount: sourceMixpanelAuthenticationWildcardServiceAccount, + } } - } - if sourceMixpanelAuthenticationWildcardServiceAccount != nil { - credentials = &shared.SourceMixpanelAuthenticationWildcard{ - SourceMixpanelAuthenticationWildcardServiceAccount: sourceMixpanelAuthenticationWildcardServiceAccount, - } - } - var sourceMixpanelAuthenticationWildcardProjectSecret *shared.SourceMixpanelAuthenticationWildcardProjectSecret - if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount != nil { - optionTitle1 := new(shared.SourceMixpanelAuthenticationWildcardProjectSecretOptionTitle) - if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceMixpanelAuthenticationWildcardProjectSecretOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceMixpanelAuthenticationWildcardProjectSecret *shared.SourceMixpanelAuthenticationWildcardProjectSecret + if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount != nil { + optionTitle1 := new(shared.SourceMixpanelAuthenticationWildcardProjectSecretOptionTitle) + if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceMixpanelAuthenticationWildcardProjectSecretOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + sourceMixpanelAuthenticationWildcardProjectSecret = &shared.SourceMixpanelAuthenticationWildcardProjectSecret{ + OptionTitle: optionTitle1, + } } - sourceMixpanelAuthenticationWildcardProjectSecret = &shared.SourceMixpanelAuthenticationWildcardProjectSecret{ - OptionTitle: optionTitle1, - } - } - if sourceMixpanelAuthenticationWildcardProjectSecret != nil { - credentials = &shared.SourceMixpanelAuthenticationWildcard{ - SourceMixpanelAuthenticationWildcardProjectSecret: sourceMixpanelAuthenticationWildcardProjectSecret, + if sourceMixpanelAuthenticationWildcardProjectSecret != nil { + credentials = &shared.SourceMixpanelAuthenticationWildcard{ + SourceMixpanelAuthenticationWildcardProjectSecret: sourceMixpanelAuthenticationWildcardProjectSecret, + } } } dateWindowSize := new(int64) @@ -140,38 +142,40 @@ func (r *SourceMixpanelResourceModel) ToUpdateSDKType() *shared.SourceMixpanelPu attributionWindow = nil } var credentials *shared.SourceMixpanelUpdateAuthenticationWildcard - var sourceMixpanelUpdateAuthenticationWildcardServiceAccount *shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccount - if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret != nil { - optionTitle := new(shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccountOptionTitle) - if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsNull() { - *optionTitle = shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccountOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.ValueString()) - } else { - optionTitle = nil + if r.Configuration.Credentials != nil { + var sourceMixpanelUpdateAuthenticationWildcardServiceAccount *shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccount + if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret != nil { + optionTitle := new(shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccountOptionTitle) + if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.IsNull() { + *optionTitle = shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccountOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardProjectSecret.OptionTitle.ValueString()) + } else { + optionTitle = nil + } + sourceMixpanelUpdateAuthenticationWildcardServiceAccount = &shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccount{ + OptionTitle: optionTitle, + } } - sourceMixpanelUpdateAuthenticationWildcardServiceAccount = &shared.SourceMixpanelUpdateAuthenticationWildcardServiceAccount{ - OptionTitle: optionTitle, + if sourceMixpanelUpdateAuthenticationWildcardServiceAccount != nil { + credentials = &shared.SourceMixpanelUpdateAuthenticationWildcard{ + SourceMixpanelUpdateAuthenticationWildcardServiceAccount: sourceMixpanelUpdateAuthenticationWildcardServiceAccount, + } } - } - if sourceMixpanelUpdateAuthenticationWildcardServiceAccount != nil { - credentials = &shared.SourceMixpanelUpdateAuthenticationWildcard{ - SourceMixpanelUpdateAuthenticationWildcardServiceAccount: sourceMixpanelUpdateAuthenticationWildcardServiceAccount, - } - } - var sourceMixpanelUpdateAuthenticationWildcardProjectSecret *shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecret - if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount != nil { - optionTitle1 := new(shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecretOptionTitle) - if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsNull() { - *optionTitle1 = shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecretOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.ValueString()) - } else { - optionTitle1 = nil + var sourceMixpanelUpdateAuthenticationWildcardProjectSecret *shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecret + if r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount != nil { + optionTitle1 := new(shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecretOptionTitle) + if !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsUnknown() && !r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.IsNull() { + *optionTitle1 = shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecretOptionTitle(r.Configuration.Credentials.SourceMixpanelAuthenticationWildcardServiceAccount.OptionTitle.ValueString()) + } else { + optionTitle1 = nil + } + sourceMixpanelUpdateAuthenticationWildcardProjectSecret = &shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecret{ + OptionTitle: optionTitle1, + } } - sourceMixpanelUpdateAuthenticationWildcardProjectSecret = &shared.SourceMixpanelUpdateAuthenticationWildcardProjectSecret{ - OptionTitle: optionTitle1, - } - } - if sourceMixpanelUpdateAuthenticationWildcardProjectSecret != nil { - credentials = &shared.SourceMixpanelUpdateAuthenticationWildcard{ - SourceMixpanelUpdateAuthenticationWildcardProjectSecret: sourceMixpanelUpdateAuthenticationWildcardProjectSecret, + if sourceMixpanelUpdateAuthenticationWildcardProjectSecret != nil { + credentials = &shared.SourceMixpanelUpdateAuthenticationWildcard{ + SourceMixpanelUpdateAuthenticationWildcardProjectSecret: sourceMixpanelUpdateAuthenticationWildcardProjectSecret, + } } } dateWindowSize := new(int64) diff --git a/internal/provider/source_monday_resource_sdk.go b/internal/provider/source_monday_resource_sdk.go index 95dd73c5e..fe33df7a6 100755 --- a/internal/provider/source_monday_resource_sdk.go +++ b/internal/provider/source_monday_resource_sdk.go @@ -9,28 +9,30 @@ import ( func (r *SourceMondayResourceModel) ToCreateSDKType() *shared.SourceMondayCreateRequest { var credentials *shared.SourceMondayAuthorizationMethod - var sourceMondayAuthorizationMethodOAuth20 *shared.SourceMondayAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken != nil { - authType := shared.SourceMondayAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken.AuthType.ValueString()) - sourceMondayAuthorizationMethodOAuth20 = &shared.SourceMondayAuthorizationMethodOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceMondayAuthorizationMethodOAuth20 *shared.SourceMondayAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken != nil { + authType := shared.SourceMondayAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken.AuthType.ValueString()) + sourceMondayAuthorizationMethodOAuth20 = &shared.SourceMondayAuthorizationMethodOAuth20{ + AuthType: authType, + } } - } - if sourceMondayAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceMondayAuthorizationMethod{ - SourceMondayAuthorizationMethodOAuth20: sourceMondayAuthorizationMethodOAuth20, + if sourceMondayAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceMondayAuthorizationMethod{ + SourceMondayAuthorizationMethodOAuth20: sourceMondayAuthorizationMethodOAuth20, + } } - } - var sourceMondayAuthorizationMethodAPIToken *shared.SourceMondayAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20 != nil { - authType1 := shared.SourceMondayAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20.AuthType.ValueString()) - sourceMondayAuthorizationMethodAPIToken = &shared.SourceMondayAuthorizationMethodAPIToken{ - AuthType: authType1, + var sourceMondayAuthorizationMethodAPIToken *shared.SourceMondayAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20 != nil { + authType1 := shared.SourceMondayAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20.AuthType.ValueString()) + sourceMondayAuthorizationMethodAPIToken = &shared.SourceMondayAuthorizationMethodAPIToken{ + AuthType: authType1, + } } - } - if sourceMondayAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceMondayAuthorizationMethod{ - SourceMondayAuthorizationMethodAPIToken: sourceMondayAuthorizationMethodAPIToken, + if sourceMondayAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceMondayAuthorizationMethod{ + SourceMondayAuthorizationMethodAPIToken: sourceMondayAuthorizationMethodAPIToken, + } } } sourceType := shared.SourceMondayMonday(r.Configuration.SourceType.ValueString()) @@ -62,28 +64,30 @@ func (r *SourceMondayResourceModel) ToGetSDKType() *shared.SourceMondayCreateReq func (r *SourceMondayResourceModel) ToUpdateSDKType() *shared.SourceMondayPutRequest { var credentials *shared.SourceMondayUpdateAuthorizationMethod - var sourceMondayUpdateAuthorizationMethodOAuth20 *shared.SourceMondayUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken != nil { - authType := shared.SourceMondayUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken.AuthType.ValueString()) - sourceMondayUpdateAuthorizationMethodOAuth20 = &shared.SourceMondayUpdateAuthorizationMethodOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceMondayUpdateAuthorizationMethodOAuth20 *shared.SourceMondayUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken != nil { + authType := shared.SourceMondayUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodAPIToken.AuthType.ValueString()) + sourceMondayUpdateAuthorizationMethodOAuth20 = &shared.SourceMondayUpdateAuthorizationMethodOAuth20{ + AuthType: authType, + } } - } - if sourceMondayUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceMondayUpdateAuthorizationMethod{ - SourceMondayUpdateAuthorizationMethodOAuth20: sourceMondayUpdateAuthorizationMethodOAuth20, + if sourceMondayUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceMondayUpdateAuthorizationMethod{ + SourceMondayUpdateAuthorizationMethodOAuth20: sourceMondayUpdateAuthorizationMethodOAuth20, + } } - } - var sourceMondayUpdateAuthorizationMethodAPIToken *shared.SourceMondayUpdateAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20 != nil { - authType1 := shared.SourceMondayUpdateAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20.AuthType.ValueString()) - sourceMondayUpdateAuthorizationMethodAPIToken = &shared.SourceMondayUpdateAuthorizationMethodAPIToken{ - AuthType: authType1, + var sourceMondayUpdateAuthorizationMethodAPIToken *shared.SourceMondayUpdateAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20 != nil { + authType1 := shared.SourceMondayUpdateAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceMondayAuthorizationMethodOAuth20.AuthType.ValueString()) + sourceMondayUpdateAuthorizationMethodAPIToken = &shared.SourceMondayUpdateAuthorizationMethodAPIToken{ + AuthType: authType1, + } } - } - if sourceMondayUpdateAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceMondayUpdateAuthorizationMethod{ - SourceMondayUpdateAuthorizationMethodAPIToken: sourceMondayUpdateAuthorizationMethodAPIToken, + if sourceMondayUpdateAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceMondayUpdateAuthorizationMethod{ + SourceMondayUpdateAuthorizationMethodAPIToken: sourceMondayUpdateAuthorizationMethodAPIToken, + } } } configuration := shared.SourceMondayUpdate{ diff --git a/internal/provider/source_mongodb_resource_sdk.go b/internal/provider/source_mongodb_resource_sdk.go index 0e7360453..ed2ad41bc 100755 --- a/internal/provider/source_mongodb_resource_sdk.go +++ b/internal/provider/source_mongodb_resource_sdk.go @@ -16,49 +16,51 @@ func (r *SourceMongodbResourceModel) ToCreateSDKType() *shared.SourceMongodbCrea } database := r.Configuration.Database.ValueString() var instanceType *shared.SourceMongodbMongoDbInstanceType - var sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance *shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance - if r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instance := shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) - sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance{ - Instance: instance, + if r.Configuration.InstanceType != nil { + var sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance *shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance + if r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instance := shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) + sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance{ + Instance: instance, + } } - } - if sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instanceType = &shared.SourceMongodbMongoDbInstanceType{ - SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance: sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance, - } - } - var sourceMongodbMongoDbInstanceTypeReplicaSet *shared.SourceMongodbMongoDbInstanceTypeReplicaSet - if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet != nil { - instance1 := shared.SourceMongodbMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) - replicaSet := new(string) - if !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { - *replicaSet = r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() - } else { - replicaSet = nil + if sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instanceType = &shared.SourceMongodbMongoDbInstanceType{ + SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance: sourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance, + } } - serverAddresses := r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() - sourceMongodbMongoDbInstanceTypeReplicaSet = &shared.SourceMongodbMongoDbInstanceTypeReplicaSet{ - Instance: instance1, - ReplicaSet: replicaSet, - ServerAddresses: serverAddresses, + var sourceMongodbMongoDbInstanceTypeReplicaSet *shared.SourceMongodbMongoDbInstanceTypeReplicaSet + if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet != nil { + instance1 := shared.SourceMongodbMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) + replicaSet := new(string) + if !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { + *replicaSet = r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() + } else { + replicaSet = nil + } + serverAddresses := r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() + sourceMongodbMongoDbInstanceTypeReplicaSet = &shared.SourceMongodbMongoDbInstanceTypeReplicaSet{ + Instance: instance1, + ReplicaSet: replicaSet, + ServerAddresses: serverAddresses, + } } - } - if sourceMongodbMongoDbInstanceTypeReplicaSet != nil { - instanceType = &shared.SourceMongodbMongoDbInstanceType{ - SourceMongodbMongoDbInstanceTypeReplicaSet: sourceMongodbMongoDbInstanceTypeReplicaSet, + if sourceMongodbMongoDbInstanceTypeReplicaSet != nil { + instanceType = &shared.SourceMongodbMongoDbInstanceType{ + SourceMongodbMongoDbInstanceTypeReplicaSet: sourceMongodbMongoDbInstanceTypeReplicaSet, + } } - } - var sourceMongodbMongoDBInstanceTypeMongoDBAtlas *shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlas - if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instance2 := shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) - sourceMongodbMongoDBInstanceTypeMongoDBAtlas = &shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlas{ - Instance: instance2, + var sourceMongodbMongoDBInstanceTypeMongoDBAtlas *shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlas + if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instance2 := shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) + sourceMongodbMongoDBInstanceTypeMongoDBAtlas = &shared.SourceMongodbMongoDBInstanceTypeMongoDBAtlas{ + Instance: instance2, + } } - } - if sourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instanceType = &shared.SourceMongodbMongoDbInstanceType{ - SourceMongodbMongoDBInstanceTypeMongoDBAtlas: sourceMongodbMongoDBInstanceTypeMongoDBAtlas, + if sourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instanceType = &shared.SourceMongodbMongoDbInstanceType{ + SourceMongodbMongoDBInstanceTypeMongoDBAtlas: sourceMongodbMongoDBInstanceTypeMongoDBAtlas, + } } } password := new(string) @@ -113,49 +115,51 @@ func (r *SourceMongodbResourceModel) ToUpdateSDKType() *shared.SourceMongodbPutR } database := r.Configuration.Database.ValueString() var instanceType *shared.SourceMongodbUpdateMongoDbInstanceType - var sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance *shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance - if r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { - instance := shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) - sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance{ - Instance: instance, + if r.Configuration.InstanceType != nil { + var sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance *shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance + if r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas != nil { + instance := shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstanceInstance(r.Configuration.InstanceType.SourceMongodbMongoDBInstanceTypeMongoDBAtlas.Instance.ValueString()) + sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance = &shared.SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance{ + Instance: instance, + } } - } - if sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ - SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance: sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance, - } - } - var sourceMongodbUpdateMongoDbInstanceTypeReplicaSet *shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSet - if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet != nil { - instance1 := shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) - replicaSet := new(string) - if !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { - *replicaSet = r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() - } else { - replicaSet = nil + if sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ + SourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance: sourceMongodbUpdateMongoDbInstanceTypeStandaloneMongoDbInstance, + } } - serverAddresses := r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() - sourceMongodbUpdateMongoDbInstanceTypeReplicaSet = &shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSet{ - Instance: instance1, - ReplicaSet: replicaSet, - ServerAddresses: serverAddresses, + var sourceMongodbUpdateMongoDbInstanceTypeReplicaSet *shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSet + if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet != nil { + instance1 := shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSetInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.Instance.ValueString()) + replicaSet := new(string) + if !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsUnknown() && !r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.IsNull() { + *replicaSet = r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ReplicaSet.ValueString() + } else { + replicaSet = nil + } + serverAddresses := r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeReplicaSet.ServerAddresses.ValueString() + sourceMongodbUpdateMongoDbInstanceTypeReplicaSet = &shared.SourceMongodbUpdateMongoDbInstanceTypeReplicaSet{ + Instance: instance1, + ReplicaSet: replicaSet, + ServerAddresses: serverAddresses, + } } - } - if sourceMongodbUpdateMongoDbInstanceTypeReplicaSet != nil { - instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ - SourceMongodbUpdateMongoDbInstanceTypeReplicaSet: sourceMongodbUpdateMongoDbInstanceTypeReplicaSet, + if sourceMongodbUpdateMongoDbInstanceTypeReplicaSet != nil { + instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ + SourceMongodbUpdateMongoDbInstanceTypeReplicaSet: sourceMongodbUpdateMongoDbInstanceTypeReplicaSet, + } } - } - var sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas *shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas - if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { - instance2 := shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) - sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas = &shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas{ - Instance: instance2, + var sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas *shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas + if r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance != nil { + instance2 := shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlasInstance(r.Configuration.InstanceType.SourceMongodbMongoDbInstanceTypeStandaloneMongoDbInstance.Instance.ValueString()) + sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas = &shared.SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas{ + Instance: instance2, + } } - } - if sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas != nil { - instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ - SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas: sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas, + if sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas != nil { + instanceType = &shared.SourceMongodbUpdateMongoDbInstanceType{ + SourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas: sourceMongodbUpdateMongoDBInstanceTypeMongoDBAtlas, + } } } password := new(string) diff --git a/internal/provider/source_mssql_resource_sdk.go b/internal/provider/source_mssql_resource_sdk.go index 791ddb33b..00ff694be 100755 --- a/internal/provider/source_mssql_resource_sdk.go +++ b/internal/provider/source_mssql_resource_sdk.go @@ -24,114 +24,120 @@ func (r *SourceMssqlResourceModel) ToCreateSDKType() *shared.SourceMssqlCreateRe } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourceMssqlReplicationMethod - var sourceMssqlReplicationMethodStandard *shared.SourceMssqlReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourceMssqlReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourceMssqlReplicationMethodStandard = &shared.SourceMssqlReplicationMethodStandard{ - Method: method, + if r.Configuration.ReplicationMethod != nil { + var sourceMssqlReplicationMethodStandard *shared.SourceMssqlReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourceMssqlReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourceMssqlReplicationMethodStandard = &shared.SourceMssqlReplicationMethodStandard{ + Method: method, + } } - } - if sourceMssqlReplicationMethodStandard != nil { - replicationMethod = &shared.SourceMssqlReplicationMethod{ - SourceMssqlReplicationMethodStandard: sourceMssqlReplicationMethodStandard, + if sourceMssqlReplicationMethodStandard != nil { + replicationMethod = &shared.SourceMssqlReplicationMethod{ + SourceMssqlReplicationMethodStandard: sourceMssqlReplicationMethodStandard, + } } - } - var sourceMssqlReplicationMethodLogicalReplicationCDC *shared.SourceMssqlReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard != nil { - method1 := shared.SourceMssqlReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard.Method.ValueString()) - sourceMssqlReplicationMethodLogicalReplicationCDC = &shared.SourceMssqlReplicationMethodLogicalReplicationCDC{ - Method: method1, + var sourceMssqlReplicationMethodLogicalReplicationCDC *shared.SourceMssqlReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard != nil { + method1 := shared.SourceMssqlReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard.Method.ValueString()) + sourceMssqlReplicationMethodLogicalReplicationCDC = &shared.SourceMssqlReplicationMethodLogicalReplicationCDC{ + Method: method1, + } } - } - if sourceMssqlReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourceMssqlReplicationMethod{ - SourceMssqlReplicationMethodLogicalReplicationCDC: sourceMssqlReplicationMethodLogicalReplicationCDC, + if sourceMssqlReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourceMssqlReplicationMethod{ + SourceMssqlReplicationMethodLogicalReplicationCDC: sourceMssqlReplicationMethodLogicalReplicationCDC, + } } } - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } sourceType := shared.SourceMssqlMssql(r.Configuration.SourceType.ValueString()) var sslMethod *shared.SourceMssqlSSLMethod - var sourceMssqlSSLMethodEncryptedTrustServerCertificate *shared.SourceMssqlSSLMethodEncryptedTrustServerCertificate - if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod1 := shared.SourceMssqlSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) - sourceMssqlSSLMethodEncryptedTrustServerCertificate = &shared.SourceMssqlSSLMethodEncryptedTrustServerCertificate{ - SslMethod: sslMethod1, + if r.Configuration.SslMethod != nil { + var sourceMssqlSSLMethodEncryptedTrustServerCertificate *shared.SourceMssqlSSLMethodEncryptedTrustServerCertificate + if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod1 := shared.SourceMssqlSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) + sourceMssqlSSLMethodEncryptedTrustServerCertificate = &shared.SourceMssqlSSLMethodEncryptedTrustServerCertificate{ + SslMethod: sslMethod1, + } } - } - if sourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod = &shared.SourceMssqlSSLMethod{ - SourceMssqlSSLMethodEncryptedTrustServerCertificate: sourceMssqlSSLMethodEncryptedTrustServerCertificate, - } - } - var sourceMssqlSSLMethodEncryptedVerifyCertificate *shared.SourceMssqlSSLMethodEncryptedVerifyCertificate - if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate != nil { - hostNameInCertificate := new(string) - if !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { - *hostNameInCertificate = r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() - } else { - hostNameInCertificate = nil + if sourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod = &shared.SourceMssqlSSLMethod{ + SourceMssqlSSLMethodEncryptedTrustServerCertificate: sourceMssqlSSLMethodEncryptedTrustServerCertificate, + } } - sslMethod2 := shared.SourceMssqlSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) - sourceMssqlSSLMethodEncryptedVerifyCertificate = &shared.SourceMssqlSSLMethodEncryptedVerifyCertificate{ - HostNameInCertificate: hostNameInCertificate, - SslMethod: sslMethod2, + var sourceMssqlSSLMethodEncryptedVerifyCertificate *shared.SourceMssqlSSLMethodEncryptedVerifyCertificate + if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate != nil { + hostNameInCertificate := new(string) + if !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { + *hostNameInCertificate = r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() + } else { + hostNameInCertificate = nil + } + sslMethod2 := shared.SourceMssqlSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) + sourceMssqlSSLMethodEncryptedVerifyCertificate = &shared.SourceMssqlSSLMethodEncryptedVerifyCertificate{ + HostNameInCertificate: hostNameInCertificate, + SslMethod: sslMethod2, + } } - } - if sourceMssqlSSLMethodEncryptedVerifyCertificate != nil { - sslMethod = &shared.SourceMssqlSSLMethod{ - SourceMssqlSSLMethodEncryptedVerifyCertificate: sourceMssqlSSLMethodEncryptedVerifyCertificate, + if sourceMssqlSSLMethodEncryptedVerifyCertificate != nil { + sslMethod = &shared.SourceMssqlSSLMethod{ + SourceMssqlSSLMethodEncryptedVerifyCertificate: sourceMssqlSSLMethodEncryptedVerifyCertificate, + } } } var tunnelMethod *shared.SourceMssqlSSHTunnelMethod - var sourceMssqlSSHTunnelMethodNoTunnel *shared.SourceMssqlSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceMssqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceMssqlSSHTunnelMethodNoTunnel = &shared.SourceMssqlSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var sourceMssqlSSHTunnelMethodNoTunnel *shared.SourceMssqlSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceMssqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceMssqlSSHTunnelMethodNoTunnel = &shared.SourceMssqlSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if sourceMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ - SourceMssqlSSHTunnelMethodNoTunnel: sourceMssqlSSHTunnelMethodNoTunnel, + if sourceMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ + SourceMssqlSSHTunnelMethodNoTunnel: sourceMssqlSSHTunnelMethodNoTunnel, + } } - } - var sourceMssqlSSHTunnelMethodSSHKeyAuthentication *shared.SourceMssqlSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceMssqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceMssqlSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMssqlSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var sourceMssqlSSHTunnelMethodSSHKeyAuthentication *shared.SourceMssqlSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceMssqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceMssqlSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMssqlSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if sourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ - SourceMssqlSSHTunnelMethodSSHKeyAuthentication: sourceMssqlSSHTunnelMethodSSHKeyAuthentication, + if sourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ + SourceMssqlSSHTunnelMethodSSHKeyAuthentication: sourceMssqlSSHTunnelMethodSSHKeyAuthentication, + } } - } - var sourceMssqlSSHTunnelMethodPasswordAuthentication *shared.SourceMssqlSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceMssqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceMssqlSSHTunnelMethodPasswordAuthentication = &shared.SourceMssqlSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var sourceMssqlSSHTunnelMethodPasswordAuthentication *shared.SourceMssqlSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceMssqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceMssqlSSHTunnelMethodPasswordAuthentication = &shared.SourceMssqlSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if sourceMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ - SourceMssqlSSHTunnelMethodPasswordAuthentication: sourceMssqlSSHTunnelMethodPasswordAuthentication, + if sourceMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceMssqlSSHTunnelMethod{ + SourceMssqlSSHTunnelMethodPasswordAuthentication: sourceMssqlSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -187,113 +193,119 @@ func (r *SourceMssqlResourceModel) ToUpdateSDKType() *shared.SourceMssqlPutReque } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourceMssqlUpdateReplicationMethod - var sourceMssqlUpdateReplicationMethodStandard *shared.SourceMssqlUpdateReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourceMssqlUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourceMssqlUpdateReplicationMethodStandard = &shared.SourceMssqlUpdateReplicationMethodStandard{ - Method: method, + if r.Configuration.ReplicationMethod != nil { + var sourceMssqlUpdateReplicationMethodStandard *shared.SourceMssqlUpdateReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourceMssqlUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourceMssqlUpdateReplicationMethodStandard = &shared.SourceMssqlUpdateReplicationMethodStandard{ + Method: method, + } } - } - if sourceMssqlUpdateReplicationMethodStandard != nil { - replicationMethod = &shared.SourceMssqlUpdateReplicationMethod{ - SourceMssqlUpdateReplicationMethodStandard: sourceMssqlUpdateReplicationMethodStandard, + if sourceMssqlUpdateReplicationMethodStandard != nil { + replicationMethod = &shared.SourceMssqlUpdateReplicationMethod{ + SourceMssqlUpdateReplicationMethodStandard: sourceMssqlUpdateReplicationMethodStandard, + } } - } - var sourceMssqlUpdateReplicationMethodLogicalReplicationCDC *shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard != nil { - method1 := shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard.Method.ValueString()) - sourceMssqlUpdateReplicationMethodLogicalReplicationCDC = &shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDC{ - Method: method1, + var sourceMssqlUpdateReplicationMethodLogicalReplicationCDC *shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard != nil { + method1 := shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourceMssqlReplicationMethodStandard.Method.ValueString()) + sourceMssqlUpdateReplicationMethodLogicalReplicationCDC = &shared.SourceMssqlUpdateReplicationMethodLogicalReplicationCDC{ + Method: method1, + } } - } - if sourceMssqlUpdateReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourceMssqlUpdateReplicationMethod{ - SourceMssqlUpdateReplicationMethodLogicalReplicationCDC: sourceMssqlUpdateReplicationMethodLogicalReplicationCDC, + if sourceMssqlUpdateReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourceMssqlUpdateReplicationMethod{ + SourceMssqlUpdateReplicationMethodLogicalReplicationCDC: sourceMssqlUpdateReplicationMethodLogicalReplicationCDC, + } } } - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } var sslMethod *shared.SourceMssqlUpdateSSLMethod - var sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate *shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate - if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod1 := shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) - sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate = &shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate{ - SslMethod: sslMethod1, + if r.Configuration.SslMethod != nil { + var sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate *shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate + if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod1 := shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedTrustServerCertificate.SslMethod.ValueString()) + sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate = &shared.SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate{ + SslMethod: sslMethod1, + } } - } - if sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate != nil { - sslMethod = &shared.SourceMssqlUpdateSSLMethod{ - SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate: sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate, - } - } - var sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate *shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate - if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate != nil { - hostNameInCertificate := new(string) - if !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { - *hostNameInCertificate = r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() - } else { - hostNameInCertificate = nil + if sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate != nil { + sslMethod = &shared.SourceMssqlUpdateSSLMethod{ + SourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate: sourceMssqlUpdateSSLMethodEncryptedTrustServerCertificate, + } } - sslMethod2 := shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) - sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate = &shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate{ - HostNameInCertificate: hostNameInCertificate, - SslMethod: sslMethod2, + var sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate *shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate + if r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate != nil { + hostNameInCertificate := new(string) + if !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsUnknown() && !r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.IsNull() { + *hostNameInCertificate = r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.HostNameInCertificate.ValueString() + } else { + hostNameInCertificate = nil + } + sslMethod2 := shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificateSSLMethod(r.Configuration.SslMethod.SourceMssqlSSLMethodEncryptedVerifyCertificate.SslMethod.ValueString()) + sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate = &shared.SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate{ + HostNameInCertificate: hostNameInCertificate, + SslMethod: sslMethod2, + } } - } - if sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate != nil { - sslMethod = &shared.SourceMssqlUpdateSSLMethod{ - SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate: sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate, + if sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate != nil { + sslMethod = &shared.SourceMssqlUpdateSSLMethod{ + SourceMssqlUpdateSSLMethodEncryptedVerifyCertificate: sourceMssqlUpdateSSLMethodEncryptedVerifyCertificate, + } } } var tunnelMethod *shared.SourceMssqlUpdateSSHTunnelMethod - var sourceMssqlUpdateSSHTunnelMethodNoTunnel *shared.SourceMssqlUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceMssqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceMssqlUpdateSSHTunnelMethodNoTunnel = &shared.SourceMssqlUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, + if r.Configuration.TunnelMethod != nil { + var sourceMssqlUpdateSSHTunnelMethodNoTunnel *shared.SourceMssqlUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceMssqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceMssqlUpdateSSHTunnelMethodNoTunnel = &shared.SourceMssqlUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } } - } - if sourceMssqlUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ - SourceMssqlUpdateSSHTunnelMethodNoTunnel: sourceMssqlUpdateSSHTunnelMethodNoTunnel, + if sourceMssqlUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ + SourceMssqlUpdateSSHTunnelMethodNoTunnel: sourceMssqlUpdateSSHTunnelMethodNoTunnel, + } } - } - var sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, + var sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } } - } - if sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ - SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication: sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication, + if sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ + SourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication: sourceMssqlUpdateSSHTunnelMethodSSHKeyAuthentication, + } } - } - var sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, + var sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceMssqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } } - } - if sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ - SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication: sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication, + if sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceMssqlUpdateSSHTunnelMethod{ + SourceMssqlUpdateSSHTunnelMethodPasswordAuthentication: sourceMssqlUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_mysql_resource_sdk.go b/internal/provider/source_mysql_resource_sdk.go index 531eaff3d..7960a43ae 100755 --- a/internal/provider/source_mysql_resource_sdk.go +++ b/internal/provider/source_mysql_resource_sdk.go @@ -50,147 +50,151 @@ func (r *SourceMysqlResourceModel) ToCreateSDKType() *shared.SourceMysqlCreateRe } sourceType := shared.SourceMysqlMysql(r.Configuration.SourceType.ValueString()) var sslMode *shared.SourceMysqlSSLModes - var sourceMysqlSSLModesPreferred *shared.SourceMysqlSSLModesPreferred - if r.Configuration.SslMode.SourceMysqlSSLModesPreferred != nil { - mode := shared.SourceMysqlSSLModesPreferredMode(r.Configuration.SslMode.SourceMysqlSSLModesPreferred.Mode.ValueString()) - sourceMysqlSSLModesPreferred = &shared.SourceMysqlSSLModesPreferred{ - Mode: mode, - } - } - if sourceMysqlSSLModesPreferred != nil { - sslMode = &shared.SourceMysqlSSLModes{ - SourceMysqlSSLModesPreferred: sourceMysqlSSLModesPreferred, - } - } - var sourceMysqlSSLModesRequired *shared.SourceMysqlSSLModesRequired - if r.Configuration.SslMode.SourceMysqlSSLModesRequired != nil { - mode1 := shared.SourceMysqlSSLModesRequiredMode(r.Configuration.SslMode.SourceMysqlSSLModesRequired.Mode.ValueString()) - sourceMysqlSSLModesRequired = &shared.SourceMysqlSSLModesRequired{ - Mode: mode1, - } - } - if sourceMysqlSSLModesRequired != nil { - sslMode = &shared.SourceMysqlSSLModes{ - SourceMysqlSSLModesRequired: sourceMysqlSSLModesRequired, - } - } - var sourceMysqlSSLModesVerifyCA *shared.SourceMysqlSSLModesVerifyCA - if r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA != nil { - caCertificate := r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode2 := shared.SourceMysqlSSLModesVerifyCAMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.Mode.ValueString()) - sourceMysqlSSLModesVerifyCA = &shared.SourceMysqlSSLModesVerifyCA{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode2, - } - } - if sourceMysqlSSLModesVerifyCA != nil { - sslMode = &shared.SourceMysqlSSLModes{ - SourceMysqlSSLModesVerifyCA: sourceMysqlSSLModesVerifyCA, - } - } - var sourceMysqlSSLModesVerifyIdentity *shared.SourceMysqlSSLModesVerifyIdentity - if r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity != nil { - caCertificate1 := r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode3 := shared.SourceMysqlSSLModesVerifyIdentityMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.Mode.ValueString()) - sourceMysqlSSLModesVerifyIdentity = &shared.SourceMysqlSSLModesVerifyIdentity{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode3, - } - } - if sourceMysqlSSLModesVerifyIdentity != nil { - sslMode = &shared.SourceMysqlSSLModes{ - SourceMysqlSSLModesVerifyIdentity: sourceMysqlSSLModesVerifyIdentity, + if r.Configuration.SslMode != nil { + var sourceMysqlSSLModesPreferred *shared.SourceMysqlSSLModesPreferred + if r.Configuration.SslMode.SourceMysqlSSLModesPreferred != nil { + mode := shared.SourceMysqlSSLModesPreferredMode(r.Configuration.SslMode.SourceMysqlSSLModesPreferred.Mode.ValueString()) + sourceMysqlSSLModesPreferred = &shared.SourceMysqlSSLModesPreferred{ + Mode: mode, + } + } + if sourceMysqlSSLModesPreferred != nil { + sslMode = &shared.SourceMysqlSSLModes{ + SourceMysqlSSLModesPreferred: sourceMysqlSSLModesPreferred, + } + } + var sourceMysqlSSLModesRequired *shared.SourceMysqlSSLModesRequired + if r.Configuration.SslMode.SourceMysqlSSLModesRequired != nil { + mode1 := shared.SourceMysqlSSLModesRequiredMode(r.Configuration.SslMode.SourceMysqlSSLModesRequired.Mode.ValueString()) + sourceMysqlSSLModesRequired = &shared.SourceMysqlSSLModesRequired{ + Mode: mode1, + } + } + if sourceMysqlSSLModesRequired != nil { + sslMode = &shared.SourceMysqlSSLModes{ + SourceMysqlSSLModesRequired: sourceMysqlSSLModesRequired, + } + } + var sourceMysqlSSLModesVerifyCA *shared.SourceMysqlSSLModesVerifyCA + if r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA != nil { + caCertificate := r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode2 := shared.SourceMysqlSSLModesVerifyCAMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.Mode.ValueString()) + sourceMysqlSSLModesVerifyCA = &shared.SourceMysqlSSLModesVerifyCA{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode2, + } + } + if sourceMysqlSSLModesVerifyCA != nil { + sslMode = &shared.SourceMysqlSSLModes{ + SourceMysqlSSLModesVerifyCA: sourceMysqlSSLModesVerifyCA, + } + } + var sourceMysqlSSLModesVerifyIdentity *shared.SourceMysqlSSLModesVerifyIdentity + if r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity != nil { + caCertificate1 := r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode3 := shared.SourceMysqlSSLModesVerifyIdentityMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.Mode.ValueString()) + sourceMysqlSSLModesVerifyIdentity = &shared.SourceMysqlSSLModesVerifyIdentity{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode3, + } + } + if sourceMysqlSSLModesVerifyIdentity != nil { + sslMode = &shared.SourceMysqlSSLModes{ + SourceMysqlSSLModesVerifyIdentity: sourceMysqlSSLModesVerifyIdentity, + } } } var tunnelMethod *shared.SourceMysqlSSHTunnelMethod - var sourceMysqlSSHTunnelMethodNoTunnel *shared.SourceMysqlSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceMysqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceMysqlSSHTunnelMethodNoTunnel = &shared.SourceMysqlSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ - SourceMysqlSSHTunnelMethodNoTunnel: sourceMysqlSSHTunnelMethodNoTunnel, - } - } - var sourceMysqlSSHTunnelMethodSSHKeyAuthentication *shared.SourceMysqlSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceMysqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceMysqlSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMysqlSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ - SourceMysqlSSHTunnelMethodSSHKeyAuthentication: sourceMysqlSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceMysqlSSHTunnelMethodPasswordAuthentication *shared.SourceMysqlSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceMysqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceMysqlSSHTunnelMethodPasswordAuthentication = &shared.SourceMysqlSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ - SourceMysqlSSHTunnelMethodPasswordAuthentication: sourceMysqlSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceMysqlSSHTunnelMethodNoTunnel *shared.SourceMysqlSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceMysqlSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceMysqlSSHTunnelMethodNoTunnel = &shared.SourceMysqlSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ + SourceMysqlSSHTunnelMethodNoTunnel: sourceMysqlSSHTunnelMethodNoTunnel, + } + } + var sourceMysqlSSHTunnelMethodSSHKeyAuthentication *shared.SourceMysqlSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceMysqlSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceMysqlSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMysqlSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ + SourceMysqlSSHTunnelMethodSSHKeyAuthentication: sourceMysqlSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceMysqlSSHTunnelMethodPasswordAuthentication *shared.SourceMysqlSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceMysqlSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceMysqlSSHTunnelMethodPasswordAuthentication = &shared.SourceMysqlSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceMysqlSSHTunnelMethod{ + SourceMysqlSSHTunnelMethodPasswordAuthentication: sourceMysqlSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -270,147 +274,151 @@ func (r *SourceMysqlResourceModel) ToUpdateSDKType() *shared.SourceMysqlPutReque } } var sslMode *shared.SourceMysqlUpdateSSLModes - var sourceMysqlUpdateSSLModesPreferred *shared.SourceMysqlUpdateSSLModesPreferred - if r.Configuration.SslMode.SourceMysqlSSLModesPreferred != nil { - mode := shared.SourceMysqlUpdateSSLModesPreferredMode(r.Configuration.SslMode.SourceMysqlSSLModesPreferred.Mode.ValueString()) - sourceMysqlUpdateSSLModesPreferred = &shared.SourceMysqlUpdateSSLModesPreferred{ - Mode: mode, - } - } - if sourceMysqlUpdateSSLModesPreferred != nil { - sslMode = &shared.SourceMysqlUpdateSSLModes{ - SourceMysqlUpdateSSLModesPreferred: sourceMysqlUpdateSSLModesPreferred, - } - } - var sourceMysqlUpdateSSLModesRequired *shared.SourceMysqlUpdateSSLModesRequired - if r.Configuration.SslMode.SourceMysqlSSLModesRequired != nil { - mode1 := shared.SourceMysqlUpdateSSLModesRequiredMode(r.Configuration.SslMode.SourceMysqlSSLModesRequired.Mode.ValueString()) - sourceMysqlUpdateSSLModesRequired = &shared.SourceMysqlUpdateSSLModesRequired{ - Mode: mode1, - } - } - if sourceMysqlUpdateSSLModesRequired != nil { - sslMode = &shared.SourceMysqlUpdateSSLModes{ - SourceMysqlUpdateSSLModesRequired: sourceMysqlUpdateSSLModesRequired, - } - } - var sourceMysqlUpdateSSLModesVerifyCA *shared.SourceMysqlUpdateSSLModesVerifyCA - if r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA != nil { - caCertificate := r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode2 := shared.SourceMysqlUpdateSSLModesVerifyCAMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.Mode.ValueString()) - sourceMysqlUpdateSSLModesVerifyCA = &shared.SourceMysqlUpdateSSLModesVerifyCA{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode2, - } - } - if sourceMysqlUpdateSSLModesVerifyCA != nil { - sslMode = &shared.SourceMysqlUpdateSSLModes{ - SourceMysqlUpdateSSLModesVerifyCA: sourceMysqlUpdateSSLModesVerifyCA, - } - } - var sourceMysqlUpdateSSLModesVerifyIdentity *shared.SourceMysqlUpdateSSLModesVerifyIdentity - if r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity != nil { - caCertificate1 := r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode3 := shared.SourceMysqlUpdateSSLModesVerifyIdentityMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.Mode.ValueString()) - sourceMysqlUpdateSSLModesVerifyIdentity = &shared.SourceMysqlUpdateSSLModesVerifyIdentity{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode3, - } - } - if sourceMysqlUpdateSSLModesVerifyIdentity != nil { - sslMode = &shared.SourceMysqlUpdateSSLModes{ - SourceMysqlUpdateSSLModesVerifyIdentity: sourceMysqlUpdateSSLModesVerifyIdentity, + if r.Configuration.SslMode != nil { + var sourceMysqlUpdateSSLModesPreferred *shared.SourceMysqlUpdateSSLModesPreferred + if r.Configuration.SslMode.SourceMysqlSSLModesPreferred != nil { + mode := shared.SourceMysqlUpdateSSLModesPreferredMode(r.Configuration.SslMode.SourceMysqlSSLModesPreferred.Mode.ValueString()) + sourceMysqlUpdateSSLModesPreferred = &shared.SourceMysqlUpdateSSLModesPreferred{ + Mode: mode, + } + } + if sourceMysqlUpdateSSLModesPreferred != nil { + sslMode = &shared.SourceMysqlUpdateSSLModes{ + SourceMysqlUpdateSSLModesPreferred: sourceMysqlUpdateSSLModesPreferred, + } + } + var sourceMysqlUpdateSSLModesRequired *shared.SourceMysqlUpdateSSLModesRequired + if r.Configuration.SslMode.SourceMysqlSSLModesRequired != nil { + mode1 := shared.SourceMysqlUpdateSSLModesRequiredMode(r.Configuration.SslMode.SourceMysqlSSLModesRequired.Mode.ValueString()) + sourceMysqlUpdateSSLModesRequired = &shared.SourceMysqlUpdateSSLModesRequired{ + Mode: mode1, + } + } + if sourceMysqlUpdateSSLModesRequired != nil { + sslMode = &shared.SourceMysqlUpdateSSLModes{ + SourceMysqlUpdateSSLModesRequired: sourceMysqlUpdateSSLModesRequired, + } + } + var sourceMysqlUpdateSSLModesVerifyCA *shared.SourceMysqlUpdateSSLModesVerifyCA + if r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA != nil { + caCertificate := r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode2 := shared.SourceMysqlUpdateSSLModesVerifyCAMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyCA.Mode.ValueString()) + sourceMysqlUpdateSSLModesVerifyCA = &shared.SourceMysqlUpdateSSLModesVerifyCA{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode2, + } + } + if sourceMysqlUpdateSSLModesVerifyCA != nil { + sslMode = &shared.SourceMysqlUpdateSSLModes{ + SourceMysqlUpdateSSLModesVerifyCA: sourceMysqlUpdateSSLModesVerifyCA, + } + } + var sourceMysqlUpdateSSLModesVerifyIdentity *shared.SourceMysqlUpdateSSLModesVerifyIdentity + if r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity != nil { + caCertificate1 := r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode3 := shared.SourceMysqlUpdateSSLModesVerifyIdentityMode(r.Configuration.SslMode.SourceMysqlSSLModesVerifyIdentity.Mode.ValueString()) + sourceMysqlUpdateSSLModesVerifyIdentity = &shared.SourceMysqlUpdateSSLModesVerifyIdentity{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode3, + } + } + if sourceMysqlUpdateSSLModesVerifyIdentity != nil { + sslMode = &shared.SourceMysqlUpdateSSLModes{ + SourceMysqlUpdateSSLModesVerifyIdentity: sourceMysqlUpdateSSLModesVerifyIdentity, + } } } var tunnelMethod *shared.SourceMysqlUpdateSSHTunnelMethod - var sourceMysqlUpdateSSHTunnelMethodNoTunnel *shared.SourceMysqlUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceMysqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceMysqlUpdateSSHTunnelMethodNoTunnel = &shared.SourceMysqlUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceMysqlUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ - SourceMysqlUpdateSSHTunnelMethodNoTunnel: sourceMysqlUpdateSSHTunnelMethodNoTunnel, - } - } - var sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ - SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication: sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ - SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication: sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceMysqlUpdateSSHTunnelMethodNoTunnel *shared.SourceMysqlUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceMysqlUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceMysqlUpdateSSHTunnelMethodNoTunnel = &shared.SourceMysqlUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceMysqlUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ + SourceMysqlUpdateSSHTunnelMethodNoTunnel: sourceMysqlUpdateSSHTunnelMethodNoTunnel, + } + } + var sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ + SourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication: sourceMysqlUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceMysqlSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceMysqlUpdateSSHTunnelMethod{ + SourceMysqlUpdateSSHTunnelMethodPasswordAuthentication: sourceMysqlUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_netsuite_resource_sdk.go b/internal/provider/source_netsuite_resource_sdk.go index 23eb03bf1..becf37a80 100755 --- a/internal/provider/source_netsuite_resource_sdk.go +++ b/internal/provider/source_netsuite_resource_sdk.go @@ -10,7 +10,7 @@ import ( func (r *SourceNetsuiteResourceModel) ToCreateSDKType() *shared.SourceNetsuiteCreateRequest { consumerKey := r.Configuration.ConsumerKey.ValueString() consumerSecret := r.Configuration.ConsumerSecret.ValueString() - objectTypes := make([]string, 0) + var objectTypes []string = nil for _, objectTypesItem := range r.Configuration.ObjectTypes { objectTypes = append(objectTypes, objectTypesItem.ValueString()) } @@ -61,7 +61,7 @@ func (r *SourceNetsuiteResourceModel) ToGetSDKType() *shared.SourceNetsuiteCreat func (r *SourceNetsuiteResourceModel) ToUpdateSDKType() *shared.SourceNetsuitePutRequest { consumerKey := r.Configuration.ConsumerKey.ValueString() consumerSecret := r.Configuration.ConsumerSecret.ValueString() - objectTypes := make([]string, 0) + var objectTypes []string = nil for _, objectTypesItem := range r.Configuration.ObjectTypes { objectTypes = append(objectTypes, objectTypesItem.ValueString()) } diff --git a/internal/provider/source_notion_resource_sdk.go b/internal/provider/source_notion_resource_sdk.go index 2f3000ef1..72b75f569 100755 --- a/internal/provider/source_notion_resource_sdk.go +++ b/internal/provider/source_notion_resource_sdk.go @@ -10,28 +10,30 @@ import ( func (r *SourceNotionResourceModel) ToCreateSDKType() *shared.SourceNotionCreateRequest { var credentials *shared.SourceNotionAuthenticateUsing - var sourceNotionAuthenticateUsingOAuth20 *shared.SourceNotionAuthenticateUsingOAuth20 - if r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken != nil { - authType := shared.SourceNotionAuthenticateUsingOAuth20AuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken.AuthType.ValueString()) - sourceNotionAuthenticateUsingOAuth20 = &shared.SourceNotionAuthenticateUsingOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceNotionAuthenticateUsingOAuth20 *shared.SourceNotionAuthenticateUsingOAuth20 + if r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken != nil { + authType := shared.SourceNotionAuthenticateUsingOAuth20AuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken.AuthType.ValueString()) + sourceNotionAuthenticateUsingOAuth20 = &shared.SourceNotionAuthenticateUsingOAuth20{ + AuthType: authType, + } } - } - if sourceNotionAuthenticateUsingOAuth20 != nil { - credentials = &shared.SourceNotionAuthenticateUsing{ - SourceNotionAuthenticateUsingOAuth20: sourceNotionAuthenticateUsingOAuth20, + if sourceNotionAuthenticateUsingOAuth20 != nil { + credentials = &shared.SourceNotionAuthenticateUsing{ + SourceNotionAuthenticateUsingOAuth20: sourceNotionAuthenticateUsingOAuth20, + } } - } - var sourceNotionAuthenticateUsingAccessToken *shared.SourceNotionAuthenticateUsingAccessToken - if r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20 != nil { - authType1 := shared.SourceNotionAuthenticateUsingAccessTokenAuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20.AuthType.ValueString()) - sourceNotionAuthenticateUsingAccessToken = &shared.SourceNotionAuthenticateUsingAccessToken{ - AuthType: authType1, + var sourceNotionAuthenticateUsingAccessToken *shared.SourceNotionAuthenticateUsingAccessToken + if r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20 != nil { + authType1 := shared.SourceNotionAuthenticateUsingAccessTokenAuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20.AuthType.ValueString()) + sourceNotionAuthenticateUsingAccessToken = &shared.SourceNotionAuthenticateUsingAccessToken{ + AuthType: authType1, + } } - } - if sourceNotionAuthenticateUsingAccessToken != nil { - credentials = &shared.SourceNotionAuthenticateUsing{ - SourceNotionAuthenticateUsingAccessToken: sourceNotionAuthenticateUsingAccessToken, + if sourceNotionAuthenticateUsingAccessToken != nil { + credentials = &shared.SourceNotionAuthenticateUsing{ + SourceNotionAuthenticateUsingAccessToken: sourceNotionAuthenticateUsingAccessToken, + } } } sourceType := shared.SourceNotionNotion(r.Configuration.SourceType.ValueString()) @@ -65,28 +67,30 @@ func (r *SourceNotionResourceModel) ToGetSDKType() *shared.SourceNotionCreateReq func (r *SourceNotionResourceModel) ToUpdateSDKType() *shared.SourceNotionPutRequest { var credentials *shared.SourceNotionUpdateAuthenticateUsing - var sourceNotionUpdateAuthenticateUsingOAuth20 *shared.SourceNotionUpdateAuthenticateUsingOAuth20 - if r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken != nil { - authType := shared.SourceNotionUpdateAuthenticateUsingOAuth20AuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken.AuthType.ValueString()) - sourceNotionUpdateAuthenticateUsingOAuth20 = &shared.SourceNotionUpdateAuthenticateUsingOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceNotionUpdateAuthenticateUsingOAuth20 *shared.SourceNotionUpdateAuthenticateUsingOAuth20 + if r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken != nil { + authType := shared.SourceNotionUpdateAuthenticateUsingOAuth20AuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingAccessToken.AuthType.ValueString()) + sourceNotionUpdateAuthenticateUsingOAuth20 = &shared.SourceNotionUpdateAuthenticateUsingOAuth20{ + AuthType: authType, + } } - } - if sourceNotionUpdateAuthenticateUsingOAuth20 != nil { - credentials = &shared.SourceNotionUpdateAuthenticateUsing{ - SourceNotionUpdateAuthenticateUsingOAuth20: sourceNotionUpdateAuthenticateUsingOAuth20, + if sourceNotionUpdateAuthenticateUsingOAuth20 != nil { + credentials = &shared.SourceNotionUpdateAuthenticateUsing{ + SourceNotionUpdateAuthenticateUsingOAuth20: sourceNotionUpdateAuthenticateUsingOAuth20, + } } - } - var sourceNotionUpdateAuthenticateUsingAccessToken *shared.SourceNotionUpdateAuthenticateUsingAccessToken - if r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20 != nil { - authType1 := shared.SourceNotionUpdateAuthenticateUsingAccessTokenAuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20.AuthType.ValueString()) - sourceNotionUpdateAuthenticateUsingAccessToken = &shared.SourceNotionUpdateAuthenticateUsingAccessToken{ - AuthType: authType1, + var sourceNotionUpdateAuthenticateUsingAccessToken *shared.SourceNotionUpdateAuthenticateUsingAccessToken + if r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20 != nil { + authType1 := shared.SourceNotionUpdateAuthenticateUsingAccessTokenAuthType(r.Configuration.Credentials.SourceNotionAuthenticateUsingOAuth20.AuthType.ValueString()) + sourceNotionUpdateAuthenticateUsingAccessToken = &shared.SourceNotionUpdateAuthenticateUsingAccessToken{ + AuthType: authType1, + } } - } - if sourceNotionUpdateAuthenticateUsingAccessToken != nil { - credentials = &shared.SourceNotionUpdateAuthenticateUsing{ - SourceNotionUpdateAuthenticateUsingAccessToken: sourceNotionUpdateAuthenticateUsingAccessToken, + if sourceNotionUpdateAuthenticateUsingAccessToken != nil { + credentials = &shared.SourceNotionUpdateAuthenticateUsing{ + SourceNotionUpdateAuthenticateUsingAccessToken: sourceNotionUpdateAuthenticateUsingAccessToken, + } } } startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) diff --git a/internal/provider/source_okta_resource_sdk.go b/internal/provider/source_okta_resource_sdk.go index f7736ff11..c6373f5e4 100755 --- a/internal/provider/source_okta_resource_sdk.go +++ b/internal/provider/source_okta_resource_sdk.go @@ -9,28 +9,30 @@ import ( func (r *SourceOktaResourceModel) ToCreateSDKType() *shared.SourceOktaCreateRequest { var credentials *shared.SourceOktaAuthorizationMethod - var sourceOktaAuthorizationMethodOAuth20 *shared.SourceOktaAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken != nil { - authType := shared.SourceOktaAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken.AuthType.ValueString()) - sourceOktaAuthorizationMethodOAuth20 = &shared.SourceOktaAuthorizationMethodOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceOktaAuthorizationMethodOAuth20 *shared.SourceOktaAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken != nil { + authType := shared.SourceOktaAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken.AuthType.ValueString()) + sourceOktaAuthorizationMethodOAuth20 = &shared.SourceOktaAuthorizationMethodOAuth20{ + AuthType: authType, + } } - } - if sourceOktaAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceOktaAuthorizationMethod{ - SourceOktaAuthorizationMethodOAuth20: sourceOktaAuthorizationMethodOAuth20, + if sourceOktaAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceOktaAuthorizationMethod{ + SourceOktaAuthorizationMethodOAuth20: sourceOktaAuthorizationMethodOAuth20, + } } - } - var sourceOktaAuthorizationMethodAPIToken *shared.SourceOktaAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20 != nil { - authType1 := shared.SourceOktaAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20.AuthType.ValueString()) - sourceOktaAuthorizationMethodAPIToken = &shared.SourceOktaAuthorizationMethodAPIToken{ - AuthType: authType1, + var sourceOktaAuthorizationMethodAPIToken *shared.SourceOktaAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20 != nil { + authType1 := shared.SourceOktaAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20.AuthType.ValueString()) + sourceOktaAuthorizationMethodAPIToken = &shared.SourceOktaAuthorizationMethodAPIToken{ + AuthType: authType1, + } } - } - if sourceOktaAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceOktaAuthorizationMethod{ - SourceOktaAuthorizationMethodAPIToken: sourceOktaAuthorizationMethodAPIToken, + if sourceOktaAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceOktaAuthorizationMethod{ + SourceOktaAuthorizationMethodAPIToken: sourceOktaAuthorizationMethodAPIToken, + } } } domain := new(string) @@ -76,28 +78,30 @@ func (r *SourceOktaResourceModel) ToGetSDKType() *shared.SourceOktaCreateRequest func (r *SourceOktaResourceModel) ToUpdateSDKType() *shared.SourceOktaPutRequest { var credentials *shared.SourceOktaUpdateAuthorizationMethod - var sourceOktaUpdateAuthorizationMethodOAuth20 *shared.SourceOktaUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken != nil { - authType := shared.SourceOktaUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken.AuthType.ValueString()) - sourceOktaUpdateAuthorizationMethodOAuth20 = &shared.SourceOktaUpdateAuthorizationMethodOAuth20{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceOktaUpdateAuthorizationMethodOAuth20 *shared.SourceOktaUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken != nil { + authType := shared.SourceOktaUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodAPIToken.AuthType.ValueString()) + sourceOktaUpdateAuthorizationMethodOAuth20 = &shared.SourceOktaUpdateAuthorizationMethodOAuth20{ + AuthType: authType, + } } - } - if sourceOktaUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceOktaUpdateAuthorizationMethod{ - SourceOktaUpdateAuthorizationMethodOAuth20: sourceOktaUpdateAuthorizationMethodOAuth20, + if sourceOktaUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceOktaUpdateAuthorizationMethod{ + SourceOktaUpdateAuthorizationMethodOAuth20: sourceOktaUpdateAuthorizationMethodOAuth20, + } } - } - var sourceOktaUpdateAuthorizationMethodAPIToken *shared.SourceOktaUpdateAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20 != nil { - authType1 := shared.SourceOktaUpdateAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20.AuthType.ValueString()) - sourceOktaUpdateAuthorizationMethodAPIToken = &shared.SourceOktaUpdateAuthorizationMethodAPIToken{ - AuthType: authType1, + var sourceOktaUpdateAuthorizationMethodAPIToken *shared.SourceOktaUpdateAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20 != nil { + authType1 := shared.SourceOktaUpdateAuthorizationMethodAPITokenAuthType(r.Configuration.Credentials.SourceOktaAuthorizationMethodOAuth20.AuthType.ValueString()) + sourceOktaUpdateAuthorizationMethodAPIToken = &shared.SourceOktaUpdateAuthorizationMethodAPIToken{ + AuthType: authType1, + } } - } - if sourceOktaUpdateAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceOktaUpdateAuthorizationMethod{ - SourceOktaUpdateAuthorizationMethodAPIToken: sourceOktaUpdateAuthorizationMethodAPIToken, + if sourceOktaUpdateAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceOktaUpdateAuthorizationMethod{ + SourceOktaUpdateAuthorizationMethodAPIToken: sourceOktaUpdateAuthorizationMethodAPIToken, + } } } domain := new(string) diff --git a/internal/provider/source_onesignal_resource_sdk.go b/internal/provider/source_onesignal_resource_sdk.go index a81f4561f..a57e1e65d 100755 --- a/internal/provider/source_onesignal_resource_sdk.go +++ b/internal/provider/source_onesignal_resource_sdk.go @@ -9,7 +9,7 @@ import ( ) func (r *SourceOnesignalResourceModel) ToCreateSDKType() *shared.SourceOnesignalCreateRequest { - applications := make([]shared.SourceOnesignalApplications, 0) + var applications []shared.SourceOnesignalApplications = nil for _, applicationsItem := range r.Configuration.Applications { appAPIKey := applicationsItem.AppAPIKey.ValueString() appID := applicationsItem.AppID.ValueString() @@ -59,7 +59,7 @@ func (r *SourceOnesignalResourceModel) ToGetSDKType() *shared.SourceOnesignalCre } func (r *SourceOnesignalResourceModel) ToUpdateSDKType() *shared.SourceOnesignalPutRequest { - applications := make([]shared.SourceOnesignalUpdateApplications, 0) + var applications []shared.SourceOnesignalUpdateApplications = nil for _, applicationsItem := range r.Configuration.Applications { appAPIKey := applicationsItem.AppAPIKey.ValueString() appID := applicationsItem.AppID.ValueString() diff --git a/internal/provider/source_oracle_resource_sdk.go b/internal/provider/source_oracle_resource_sdk.go index f0556178f..310060fde 100755 --- a/internal/provider/source_oracle_resource_sdk.go +++ b/internal/provider/source_oracle_resource_sdk.go @@ -9,42 +9,44 @@ import ( func (r *SourceOracleResourceModel) ToCreateSDKType() *shared.SourceOracleCreateRequest { var connectionData *shared.SourceOracleConnectBy - var sourceOracleConnectByServiceName *shared.SourceOracleConnectByServiceName - if r.Configuration.ConnectionData.SourceOracleConnectByServiceName != nil { - connectionType := new(shared.SourceOracleConnectByServiceNameConnectionType) - if !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsNull() { - *connectionType = shared.SourceOracleConnectByServiceNameConnectionType(r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.ValueString()) - } else { - connectionType = nil - } - serviceName := r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ServiceName.ValueString() - sourceOracleConnectByServiceName = &shared.SourceOracleConnectByServiceName{ - ConnectionType: connectionType, - ServiceName: serviceName, - } - } - if sourceOracleConnectByServiceName != nil { - connectionData = &shared.SourceOracleConnectBy{ - SourceOracleConnectByServiceName: sourceOracleConnectByServiceName, - } - } - var sourceOracleConnectBySystemIDSID *shared.SourceOracleConnectBySystemIDSID - if r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID != nil { - connectionType1 := new(shared.SourceOracleConnectBySystemIDSIDConnectionType) - if !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsNull() { - *connectionType1 = shared.SourceOracleConnectBySystemIDSIDConnectionType(r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.ValueString()) - } else { - connectionType1 = nil - } - sid := r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.Sid.ValueString() - sourceOracleConnectBySystemIDSID = &shared.SourceOracleConnectBySystemIDSID{ - ConnectionType: connectionType1, - Sid: sid, - } - } - if sourceOracleConnectBySystemIDSID != nil { - connectionData = &shared.SourceOracleConnectBy{ - SourceOracleConnectBySystemIDSID: sourceOracleConnectBySystemIDSID, + if r.Configuration.ConnectionData != nil { + var sourceOracleConnectByServiceName *shared.SourceOracleConnectByServiceName + if r.Configuration.ConnectionData.SourceOracleConnectByServiceName != nil { + connectionType := new(shared.SourceOracleConnectByServiceNameConnectionType) + if !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsNull() { + *connectionType = shared.SourceOracleConnectByServiceNameConnectionType(r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.ValueString()) + } else { + connectionType = nil + } + serviceName := r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ServiceName.ValueString() + sourceOracleConnectByServiceName = &shared.SourceOracleConnectByServiceName{ + ConnectionType: connectionType, + ServiceName: serviceName, + } + } + if sourceOracleConnectByServiceName != nil { + connectionData = &shared.SourceOracleConnectBy{ + SourceOracleConnectByServiceName: sourceOracleConnectByServiceName, + } + } + var sourceOracleConnectBySystemIDSID *shared.SourceOracleConnectBySystemIDSID + if r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID != nil { + connectionType1 := new(shared.SourceOracleConnectBySystemIDSIDConnectionType) + if !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsNull() { + *connectionType1 = shared.SourceOracleConnectBySystemIDSIDConnectionType(r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.ValueString()) + } else { + connectionType1 = nil + } + sid := r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.Sid.ValueString() + sourceOracleConnectBySystemIDSID = &shared.SourceOracleConnectBySystemIDSID{ + ConnectionType: connectionType1, + Sid: sid, + } + } + if sourceOracleConnectBySystemIDSID != nil { + connectionData = &shared.SourceOracleConnectBy{ + SourceOracleConnectBySystemIDSID: sourceOracleConnectBySystemIDSID, + } } } var encryption shared.SourceOracleEncryption @@ -95,58 +97,60 @@ func (r *SourceOracleResourceModel) ToCreateSDKType() *shared.SourceOracleCreate password = nil } port := r.Configuration.Port.ValueInt64() - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } sourceType := shared.SourceOracleOracle(r.Configuration.SourceType.ValueString()) var tunnelMethod *shared.SourceOracleSSHTunnelMethod - var sourceOracleSSHTunnelMethodNoTunnel *shared.SourceOracleSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceOracleSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceOracleSSHTunnelMethodNoTunnel = &shared.SourceOracleSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ - SourceOracleSSHTunnelMethodNoTunnel: sourceOracleSSHTunnelMethodNoTunnel, - } - } - var sourceOracleSSHTunnelMethodSSHKeyAuthentication *shared.SourceOracleSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceOracleSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceOracleSSHTunnelMethodSSHKeyAuthentication = &shared.SourceOracleSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ - SourceOracleSSHTunnelMethodSSHKeyAuthentication: sourceOracleSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceOracleSSHTunnelMethodPasswordAuthentication *shared.SourceOracleSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceOracleSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceOracleSSHTunnelMethodPasswordAuthentication = &shared.SourceOracleSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ - SourceOracleSSHTunnelMethodPasswordAuthentication: sourceOracleSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceOracleSSHTunnelMethodNoTunnel *shared.SourceOracleSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceOracleSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceOracleSSHTunnelMethodNoTunnel = &shared.SourceOracleSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ + SourceOracleSSHTunnelMethodNoTunnel: sourceOracleSSHTunnelMethodNoTunnel, + } + } + var sourceOracleSSHTunnelMethodSSHKeyAuthentication *shared.SourceOracleSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceOracleSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceOracleSSHTunnelMethodSSHKeyAuthentication = &shared.SourceOracleSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ + SourceOracleSSHTunnelMethodSSHKeyAuthentication: sourceOracleSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceOracleSSHTunnelMethodPasswordAuthentication *shared.SourceOracleSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceOracleSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceOracleSSHTunnelMethodPasswordAuthentication = &shared.SourceOracleSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceOracleSSHTunnelMethod{ + SourceOracleSSHTunnelMethodPasswordAuthentication: sourceOracleSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -186,42 +190,44 @@ func (r *SourceOracleResourceModel) ToGetSDKType() *shared.SourceOracleCreateReq func (r *SourceOracleResourceModel) ToUpdateSDKType() *shared.SourceOraclePutRequest { var connectionData *shared.SourceOracleUpdateConnectBy - var sourceOracleUpdateConnectByServiceName *shared.SourceOracleUpdateConnectByServiceName - if r.Configuration.ConnectionData.SourceOracleConnectByServiceName != nil { - connectionType := new(shared.SourceOracleUpdateConnectByServiceNameConnectionType) - if !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsNull() { - *connectionType = shared.SourceOracleUpdateConnectByServiceNameConnectionType(r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.ValueString()) - } else { - connectionType = nil - } - serviceName := r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ServiceName.ValueString() - sourceOracleUpdateConnectByServiceName = &shared.SourceOracleUpdateConnectByServiceName{ - ConnectionType: connectionType, - ServiceName: serviceName, - } - } - if sourceOracleUpdateConnectByServiceName != nil { - connectionData = &shared.SourceOracleUpdateConnectBy{ - SourceOracleUpdateConnectByServiceName: sourceOracleUpdateConnectByServiceName, - } - } - var sourceOracleUpdateConnectBySystemIDSID *shared.SourceOracleUpdateConnectBySystemIDSID - if r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID != nil { - connectionType1 := new(shared.SourceOracleUpdateConnectBySystemIDSIDConnectionType) - if !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsNull() { - *connectionType1 = shared.SourceOracleUpdateConnectBySystemIDSIDConnectionType(r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.ValueString()) - } else { - connectionType1 = nil - } - sid := r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.Sid.ValueString() - sourceOracleUpdateConnectBySystemIDSID = &shared.SourceOracleUpdateConnectBySystemIDSID{ - ConnectionType: connectionType1, - Sid: sid, - } - } - if sourceOracleUpdateConnectBySystemIDSID != nil { - connectionData = &shared.SourceOracleUpdateConnectBy{ - SourceOracleUpdateConnectBySystemIDSID: sourceOracleUpdateConnectBySystemIDSID, + if r.Configuration.ConnectionData != nil { + var sourceOracleUpdateConnectByServiceName *shared.SourceOracleUpdateConnectByServiceName + if r.Configuration.ConnectionData.SourceOracleConnectByServiceName != nil { + connectionType := new(shared.SourceOracleUpdateConnectByServiceNameConnectionType) + if !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.IsNull() { + *connectionType = shared.SourceOracleUpdateConnectByServiceNameConnectionType(r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ConnectionType.ValueString()) + } else { + connectionType = nil + } + serviceName := r.Configuration.ConnectionData.SourceOracleConnectByServiceName.ServiceName.ValueString() + sourceOracleUpdateConnectByServiceName = &shared.SourceOracleUpdateConnectByServiceName{ + ConnectionType: connectionType, + ServiceName: serviceName, + } + } + if sourceOracleUpdateConnectByServiceName != nil { + connectionData = &shared.SourceOracleUpdateConnectBy{ + SourceOracleUpdateConnectByServiceName: sourceOracleUpdateConnectByServiceName, + } + } + var sourceOracleUpdateConnectBySystemIDSID *shared.SourceOracleUpdateConnectBySystemIDSID + if r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID != nil { + connectionType1 := new(shared.SourceOracleUpdateConnectBySystemIDSIDConnectionType) + if !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsUnknown() && !r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.IsNull() { + *connectionType1 = shared.SourceOracleUpdateConnectBySystemIDSIDConnectionType(r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.ConnectionType.ValueString()) + } else { + connectionType1 = nil + } + sid := r.Configuration.ConnectionData.SourceOracleConnectBySystemIDSID.Sid.ValueString() + sourceOracleUpdateConnectBySystemIDSID = &shared.SourceOracleUpdateConnectBySystemIDSID{ + ConnectionType: connectionType1, + Sid: sid, + } + } + if sourceOracleUpdateConnectBySystemIDSID != nil { + connectionData = &shared.SourceOracleUpdateConnectBy{ + SourceOracleUpdateConnectBySystemIDSID: sourceOracleUpdateConnectBySystemIDSID, + } } } var encryption shared.SourceOracleUpdateEncryption @@ -272,57 +278,59 @@ func (r *SourceOracleResourceModel) ToUpdateSDKType() *shared.SourceOraclePutReq password = nil } port := r.Configuration.Port.ValueInt64() - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } var tunnelMethod *shared.SourceOracleUpdateSSHTunnelMethod - var sourceOracleUpdateSSHTunnelMethodNoTunnel *shared.SourceOracleUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourceOracleUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourceOracleUpdateSSHTunnelMethodNoTunnel = &shared.SourceOracleUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourceOracleUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ - SourceOracleUpdateSSHTunnelMethodNoTunnel: sourceOracleUpdateSSHTunnelMethodNoTunnel, - } - } - var sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ - SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication: sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourceOracleUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourceOracleUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourceOracleUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ - SourceOracleUpdateSSHTunnelMethodPasswordAuthentication: sourceOracleUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourceOracleUpdateSSHTunnelMethodNoTunnel *shared.SourceOracleUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourceOracleUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourceOracleUpdateSSHTunnelMethodNoTunnel = &shared.SourceOracleUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourceOracleUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ + SourceOracleUpdateSSHTunnelMethodNoTunnel: sourceOracleUpdateSSHTunnelMethodNoTunnel, + } + } + var sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ + SourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication: sourceOracleUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourceOracleUpdateSSHTunnelMethodPasswordAuthentication *shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourceOracleSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourceOracleUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourceOracleUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourceOracleUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourceOracleUpdateSSHTunnelMethod{ + SourceOracleUpdateSSHTunnelMethodPasswordAuthentication: sourceOracleUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_orb_resource_sdk.go b/internal/provider/source_orb_resource_sdk.go index 027240e58..5c249155d 100755 --- a/internal/provider/source_orb_resource_sdk.go +++ b/internal/provider/source_orb_resource_sdk.go @@ -15,7 +15,7 @@ func (r *SourceOrbResourceModel) ToCreateSDKType() *shared.SourceOrbCreateReques } else { lookbackWindowDays = nil } - numericEventPropertiesKeys := make([]string, 0) + var numericEventPropertiesKeys []string = nil for _, numericEventPropertiesKeysItem := range r.Configuration.NumericEventPropertiesKeys { numericEventPropertiesKeys = append(numericEventPropertiesKeys, numericEventPropertiesKeysItem.ValueString()) } @@ -27,7 +27,7 @@ func (r *SourceOrbResourceModel) ToCreateSDKType() *shared.SourceOrbCreateReques } sourceType := shared.SourceOrbOrb(r.Configuration.SourceType.ValueString()) startDate := r.Configuration.StartDate.ValueString() - stringEventPropertiesKeys := make([]string, 0) + var stringEventPropertiesKeys []string = nil for _, stringEventPropertiesKeysItem := range r.Configuration.StringEventPropertiesKeys { stringEventPropertiesKeys = append(stringEventPropertiesKeys, stringEventPropertiesKeysItem.ValueString()) } @@ -77,7 +77,7 @@ func (r *SourceOrbResourceModel) ToUpdateSDKType() *shared.SourceOrbPutRequest { } else { lookbackWindowDays = nil } - numericEventPropertiesKeys := make([]string, 0) + var numericEventPropertiesKeys []string = nil for _, numericEventPropertiesKeysItem := range r.Configuration.NumericEventPropertiesKeys { numericEventPropertiesKeys = append(numericEventPropertiesKeys, numericEventPropertiesKeysItem.ValueString()) } @@ -88,7 +88,7 @@ func (r *SourceOrbResourceModel) ToUpdateSDKType() *shared.SourceOrbPutRequest { planID = nil } startDate := r.Configuration.StartDate.ValueString() - stringEventPropertiesKeys := make([]string, 0) + var stringEventPropertiesKeys []string = nil for _, stringEventPropertiesKeysItem := range r.Configuration.StringEventPropertiesKeys { stringEventPropertiesKeys = append(stringEventPropertiesKeys, stringEventPropertiesKeysItem.ValueString()) } diff --git a/internal/provider/source_pinterest_resource_sdk.go b/internal/provider/source_pinterest_resource_sdk.go index 84ad188ae..5938544b8 100755 --- a/internal/provider/source_pinterest_resource_sdk.go +++ b/internal/provider/source_pinterest_resource_sdk.go @@ -10,33 +10,35 @@ import ( func (r *SourcePinterestResourceModel) ToCreateSDKType() *shared.SourcePinterestCreateRequest { var credentials *shared.SourcePinterestAuthorizationMethod - var sourcePinterestAuthorizationMethodOAuth20 *shared.SourcePinterestAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken != nil { - authMethod := shared.SourcePinterestAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken.AuthMethod.ValueString()) - sourcePinterestAuthorizationMethodOAuth20 = &shared.SourcePinterestAuthorizationMethodOAuth20{ - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourcePinterestAuthorizationMethodOAuth20 *shared.SourcePinterestAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken != nil { + authMethod := shared.SourcePinterestAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken.AuthMethod.ValueString()) + sourcePinterestAuthorizationMethodOAuth20 = &shared.SourcePinterestAuthorizationMethodOAuth20{ + AuthMethod: authMethod, + } } - } - if sourcePinterestAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourcePinterestAuthorizationMethod{ - SourcePinterestAuthorizationMethodOAuth20: sourcePinterestAuthorizationMethodOAuth20, + if sourcePinterestAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourcePinterestAuthorizationMethod{ + SourcePinterestAuthorizationMethodOAuth20: sourcePinterestAuthorizationMethodOAuth20, + } } - } - var sourcePinterestAuthorizationMethodAccessToken *shared.SourcePinterestAuthorizationMethodAccessToken - if r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20 != nil { - authMethod1 := shared.SourcePinterestAuthorizationMethodAccessTokenAuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20.AuthMethod.ValueString()) - sourcePinterestAuthorizationMethodAccessToken = &shared.SourcePinterestAuthorizationMethodAccessToken{ - AuthMethod: authMethod1, + var sourcePinterestAuthorizationMethodAccessToken *shared.SourcePinterestAuthorizationMethodAccessToken + if r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20 != nil { + authMethod1 := shared.SourcePinterestAuthorizationMethodAccessTokenAuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20.AuthMethod.ValueString()) + sourcePinterestAuthorizationMethodAccessToken = &shared.SourcePinterestAuthorizationMethodAccessToken{ + AuthMethod: authMethod1, + } } - } - if sourcePinterestAuthorizationMethodAccessToken != nil { - credentials = &shared.SourcePinterestAuthorizationMethod{ - SourcePinterestAuthorizationMethodAccessToken: sourcePinterestAuthorizationMethodAccessToken, + if sourcePinterestAuthorizationMethodAccessToken != nil { + credentials = &shared.SourcePinterestAuthorizationMethod{ + SourcePinterestAuthorizationMethodAccessToken: sourcePinterestAuthorizationMethodAccessToken, + } } } sourceType := shared.SourcePinterestPinterest(r.Configuration.SourceType.ValueString()) startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) - status := make([]shared.SourcePinterestStatus, 0) + var status []shared.SourcePinterestStatus = nil for _, statusItem := range r.Configuration.Status { status = append(status, shared.SourcePinterestStatus(statusItem.ValueString())) } @@ -70,32 +72,34 @@ func (r *SourcePinterestResourceModel) ToGetSDKType() *shared.SourcePinterestCre func (r *SourcePinterestResourceModel) ToUpdateSDKType() *shared.SourcePinterestPutRequest { var credentials *shared.SourcePinterestUpdateAuthorizationMethod - var sourcePinterestUpdateAuthorizationMethodOAuth20 *shared.SourcePinterestUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken != nil { - authMethod := shared.SourcePinterestUpdateAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken.AuthMethod.ValueString()) - sourcePinterestUpdateAuthorizationMethodOAuth20 = &shared.SourcePinterestUpdateAuthorizationMethodOAuth20{ - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourcePinterestUpdateAuthorizationMethodOAuth20 *shared.SourcePinterestUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken != nil { + authMethod := shared.SourcePinterestUpdateAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodAccessToken.AuthMethod.ValueString()) + sourcePinterestUpdateAuthorizationMethodOAuth20 = &shared.SourcePinterestUpdateAuthorizationMethodOAuth20{ + AuthMethod: authMethod, + } } - } - if sourcePinterestUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourcePinterestUpdateAuthorizationMethod{ - SourcePinterestUpdateAuthorizationMethodOAuth20: sourcePinterestUpdateAuthorizationMethodOAuth20, + if sourcePinterestUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourcePinterestUpdateAuthorizationMethod{ + SourcePinterestUpdateAuthorizationMethodOAuth20: sourcePinterestUpdateAuthorizationMethodOAuth20, + } } - } - var sourcePinterestUpdateAuthorizationMethodAccessToken *shared.SourcePinterestUpdateAuthorizationMethodAccessToken - if r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20 != nil { - authMethod1 := shared.SourcePinterestUpdateAuthorizationMethodAccessTokenAuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20.AuthMethod.ValueString()) - sourcePinterestUpdateAuthorizationMethodAccessToken = &shared.SourcePinterestUpdateAuthorizationMethodAccessToken{ - AuthMethod: authMethod1, + var sourcePinterestUpdateAuthorizationMethodAccessToken *shared.SourcePinterestUpdateAuthorizationMethodAccessToken + if r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20 != nil { + authMethod1 := shared.SourcePinterestUpdateAuthorizationMethodAccessTokenAuthMethod(r.Configuration.Credentials.SourcePinterestAuthorizationMethodOAuth20.AuthMethod.ValueString()) + sourcePinterestUpdateAuthorizationMethodAccessToken = &shared.SourcePinterestUpdateAuthorizationMethodAccessToken{ + AuthMethod: authMethod1, + } } - } - if sourcePinterestUpdateAuthorizationMethodAccessToken != nil { - credentials = &shared.SourcePinterestUpdateAuthorizationMethod{ - SourcePinterestUpdateAuthorizationMethodAccessToken: sourcePinterestUpdateAuthorizationMethodAccessToken, + if sourcePinterestUpdateAuthorizationMethodAccessToken != nil { + credentials = &shared.SourcePinterestUpdateAuthorizationMethod{ + SourcePinterestUpdateAuthorizationMethodAccessToken: sourcePinterestUpdateAuthorizationMethodAccessToken, + } } } startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) - status := make([]shared.SourcePinterestUpdateStatus, 0) + var status []shared.SourcePinterestUpdateStatus = nil for _, statusItem := range r.Configuration.Status { status = append(status, shared.SourcePinterestUpdateStatus(statusItem.ValueString())) } diff --git a/internal/provider/source_postgres_resource_sdk.go b/internal/provider/source_postgres_resource_sdk.go index f177502e4..10789cb4b 100755 --- a/internal/provider/source_postgres_resource_sdk.go +++ b/internal/provider/source_postgres_resource_sdk.go @@ -25,231 +25,237 @@ func (r *SourcePostgresResourceModel) ToCreateSDKType() *shared.SourcePostgresCr } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourcePostgresReplicationMethod - var sourcePostgresReplicationMethodStandard *shared.SourcePostgresReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourcePostgresReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourcePostgresReplicationMethodStandard = &shared.SourcePostgresReplicationMethodStandard{ - Method: method, - } - } - if sourcePostgresReplicationMethodStandard != nil { - replicationMethod = &shared.SourcePostgresReplicationMethod{ - SourcePostgresReplicationMethodStandard: sourcePostgresReplicationMethodStandard, - } - } - var sourcePostgresReplicationMethodLogicalReplicationCDC *shared.SourcePostgresReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard != nil { - method1 := shared.SourcePostgresReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard.Method.ValueString()) - sourcePostgresReplicationMethodLogicalReplicationCDC = &shared.SourcePostgresReplicationMethodLogicalReplicationCDC{ - Method: method1, - } - } - if sourcePostgresReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourcePostgresReplicationMethod{ - SourcePostgresReplicationMethodLogicalReplicationCDC: sourcePostgresReplicationMethodLogicalReplicationCDC, - } - } - schemas := make([]string, 0) + if r.Configuration.ReplicationMethod != nil { + var sourcePostgresReplicationMethodStandard *shared.SourcePostgresReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourcePostgresReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourcePostgresReplicationMethodStandard = &shared.SourcePostgresReplicationMethodStandard{ + Method: method, + } + } + if sourcePostgresReplicationMethodStandard != nil { + replicationMethod = &shared.SourcePostgresReplicationMethod{ + SourcePostgresReplicationMethodStandard: sourcePostgresReplicationMethodStandard, + } + } + var sourcePostgresReplicationMethodLogicalReplicationCDC *shared.SourcePostgresReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard != nil { + method1 := shared.SourcePostgresReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard.Method.ValueString()) + sourcePostgresReplicationMethodLogicalReplicationCDC = &shared.SourcePostgresReplicationMethodLogicalReplicationCDC{ + Method: method1, + } + } + if sourcePostgresReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourcePostgresReplicationMethod{ + SourcePostgresReplicationMethodLogicalReplicationCDC: sourcePostgresReplicationMethodLogicalReplicationCDC, + } + } + } + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } sourceType := shared.SourcePostgresPostgres(r.Configuration.SourceType.ValueString()) var sslMode *shared.SourcePostgresSSLModes - var sourcePostgresSSLModesDisable *shared.SourcePostgresSSLModesDisable - if r.Configuration.SslMode.SourcePostgresSSLModesAllow != nil { - mode := shared.SourcePostgresSSLModesDisableMode(r.Configuration.SslMode.SourcePostgresSSLModesAllow.Mode.ValueString()) - var additionalProperties interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) - } - sourcePostgresSSLModesDisable = &shared.SourcePostgresSSLModesDisable{ - Mode: mode, - AdditionalProperties: additionalProperties, - } - } - if sourcePostgresSSLModesDisable != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesDisable: sourcePostgresSSLModesDisable, - } - } - var sourcePostgresSSLModesAllow *shared.SourcePostgresSSLModesAllow - if r.Configuration.SslMode.SourcePostgresSSLModesDisable != nil { - mode1 := shared.SourcePostgresSSLModesAllowMode(r.Configuration.SslMode.SourcePostgresSSLModesDisable.Mode.ValueString()) - var additionalProperties1 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourcePostgresSSLModesAllow = &shared.SourcePostgresSSLModesAllow{ - Mode: mode1, - AdditionalProperties: additionalProperties1, - } - } - if sourcePostgresSSLModesAllow != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesAllow: sourcePostgresSSLModesAllow, - } - } - var sourcePostgresSSLModesPrefer *shared.SourcePostgresSSLModesPrefer - if r.Configuration.SslMode.SourcePostgresSSLModesPrefer != nil { - mode2 := shared.SourcePostgresSSLModesPreferMode(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.Mode.ValueString()) - var additionalProperties2 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) - } - sourcePostgresSSLModesPrefer = &shared.SourcePostgresSSLModesPrefer{ - Mode: mode2, - AdditionalProperties: additionalProperties2, - } - } - if sourcePostgresSSLModesPrefer != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesPrefer: sourcePostgresSSLModesPrefer, - } - } - var sourcePostgresSSLModesRequire *shared.SourcePostgresSSLModesRequire - if r.Configuration.SslMode.SourcePostgresSSLModesRequire != nil { - mode3 := shared.SourcePostgresSSLModesRequireMode(r.Configuration.SslMode.SourcePostgresSSLModesRequire.Mode.ValueString()) - var additionalProperties3 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) - } - sourcePostgresSSLModesRequire = &shared.SourcePostgresSSLModesRequire{ - Mode: mode3, - AdditionalProperties: additionalProperties3, - } - } - if sourcePostgresSSLModesRequire != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesRequire: sourcePostgresSSLModesRequire, - } - } - var sourcePostgresSSLModesVerifyCa *shared.SourcePostgresSSLModesVerifyCa - if r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.SourcePostgresSSLModesVerifyCaMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.Mode.ValueString()) - var additionalProperties4 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) - } - sourcePostgresSSLModesVerifyCa = &shared.SourcePostgresSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - AdditionalProperties: additionalProperties4, - } - } - if sourcePostgresSSLModesVerifyCa != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesVerifyCa: sourcePostgresSSLModesVerifyCa, - } - } - var sourcePostgresSSLModesVerifyFull *shared.SourcePostgresSSLModesVerifyFull - if r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.SourcePostgresSSLModesVerifyFullMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.Mode.ValueString()) - var additionalProperties5 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) - } - sourcePostgresSSLModesVerifyFull = &shared.SourcePostgresSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - AdditionalProperties: additionalProperties5, - } - } - if sourcePostgresSSLModesVerifyFull != nil { - sslMode = &shared.SourcePostgresSSLModes{ - SourcePostgresSSLModesVerifyFull: sourcePostgresSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var sourcePostgresSSLModesDisable *shared.SourcePostgresSSLModesDisable + if r.Configuration.SslMode.SourcePostgresSSLModesAllow != nil { + mode := shared.SourcePostgresSSLModesDisableMode(r.Configuration.SslMode.SourcePostgresSSLModesAllow.Mode.ValueString()) + var additionalProperties interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) + } + sourcePostgresSSLModesDisable = &shared.SourcePostgresSSLModesDisable{ + Mode: mode, + AdditionalProperties: additionalProperties, + } + } + if sourcePostgresSSLModesDisable != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesDisable: sourcePostgresSSLModesDisable, + } + } + var sourcePostgresSSLModesAllow *shared.SourcePostgresSSLModesAllow + if r.Configuration.SslMode.SourcePostgresSSLModesDisable != nil { + mode1 := shared.SourcePostgresSSLModesAllowMode(r.Configuration.SslMode.SourcePostgresSSLModesDisable.Mode.ValueString()) + var additionalProperties1 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourcePostgresSSLModesAllow = &shared.SourcePostgresSSLModesAllow{ + Mode: mode1, + AdditionalProperties: additionalProperties1, + } + } + if sourcePostgresSSLModesAllow != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesAllow: sourcePostgresSSLModesAllow, + } + } + var sourcePostgresSSLModesPrefer *shared.SourcePostgresSSLModesPrefer + if r.Configuration.SslMode.SourcePostgresSSLModesPrefer != nil { + mode2 := shared.SourcePostgresSSLModesPreferMode(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.Mode.ValueString()) + var additionalProperties2 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) + } + sourcePostgresSSLModesPrefer = &shared.SourcePostgresSSLModesPrefer{ + Mode: mode2, + AdditionalProperties: additionalProperties2, + } + } + if sourcePostgresSSLModesPrefer != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesPrefer: sourcePostgresSSLModesPrefer, + } + } + var sourcePostgresSSLModesRequire *shared.SourcePostgresSSLModesRequire + if r.Configuration.SslMode.SourcePostgresSSLModesRequire != nil { + mode3 := shared.SourcePostgresSSLModesRequireMode(r.Configuration.SslMode.SourcePostgresSSLModesRequire.Mode.ValueString()) + var additionalProperties3 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) + } + sourcePostgresSSLModesRequire = &shared.SourcePostgresSSLModesRequire{ + Mode: mode3, + AdditionalProperties: additionalProperties3, + } + } + if sourcePostgresSSLModesRequire != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesRequire: sourcePostgresSSLModesRequire, + } + } + var sourcePostgresSSLModesVerifyCa *shared.SourcePostgresSSLModesVerifyCa + if r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.SourcePostgresSSLModesVerifyCaMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.Mode.ValueString()) + var additionalProperties4 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) + } + sourcePostgresSSLModesVerifyCa = &shared.SourcePostgresSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + AdditionalProperties: additionalProperties4, + } + } + if sourcePostgresSSLModesVerifyCa != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesVerifyCa: sourcePostgresSSLModesVerifyCa, + } + } + var sourcePostgresSSLModesVerifyFull *shared.SourcePostgresSSLModesVerifyFull + if r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.SourcePostgresSSLModesVerifyFullMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.Mode.ValueString()) + var additionalProperties5 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) + } + sourcePostgresSSLModesVerifyFull = &shared.SourcePostgresSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + AdditionalProperties: additionalProperties5, + } + } + if sourcePostgresSSLModesVerifyFull != nil { + sslMode = &shared.SourcePostgresSSLModes{ + SourcePostgresSSLModesVerifyFull: sourcePostgresSSLModesVerifyFull, + } } } var tunnelMethod *shared.SourcePostgresSSHTunnelMethod - var sourcePostgresSSHTunnelMethodNoTunnel *shared.SourcePostgresSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourcePostgresSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourcePostgresSSHTunnelMethodNoTunnel = &shared.SourcePostgresSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourcePostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ - SourcePostgresSSHTunnelMethodNoTunnel: sourcePostgresSSHTunnelMethodNoTunnel, - } - } - var sourcePostgresSSHTunnelMethodSSHKeyAuthentication *shared.SourcePostgresSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourcePostgresSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourcePostgresSSHTunnelMethodSSHKeyAuthentication = &shared.SourcePostgresSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ - SourcePostgresSSHTunnelMethodSSHKeyAuthentication: sourcePostgresSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourcePostgresSSHTunnelMethodPasswordAuthentication *shared.SourcePostgresSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourcePostgresSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourcePostgresSSHTunnelMethodPasswordAuthentication = &shared.SourcePostgresSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourcePostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ - SourcePostgresSSHTunnelMethodPasswordAuthentication: sourcePostgresSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourcePostgresSSHTunnelMethodNoTunnel *shared.SourcePostgresSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourcePostgresSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourcePostgresSSHTunnelMethodNoTunnel = &shared.SourcePostgresSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourcePostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ + SourcePostgresSSHTunnelMethodNoTunnel: sourcePostgresSSHTunnelMethodNoTunnel, + } + } + var sourcePostgresSSHTunnelMethodSSHKeyAuthentication *shared.SourcePostgresSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourcePostgresSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourcePostgresSSHTunnelMethodSSHKeyAuthentication = &shared.SourcePostgresSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ + SourcePostgresSSHTunnelMethodSSHKeyAuthentication: sourcePostgresSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourcePostgresSSHTunnelMethodPasswordAuthentication *shared.SourcePostgresSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourcePostgresSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourcePostgresSSHTunnelMethodPasswordAuthentication = &shared.SourcePostgresSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourcePostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourcePostgresSSHTunnelMethod{ + SourcePostgresSSHTunnelMethodPasswordAuthentication: sourcePostgresSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() @@ -305,230 +311,236 @@ func (r *SourcePostgresResourceModel) ToUpdateSDKType() *shared.SourcePostgresPu } port := r.Configuration.Port.ValueInt64() var replicationMethod *shared.SourcePostgresUpdateReplicationMethod - var sourcePostgresUpdateReplicationMethodStandard *shared.SourcePostgresUpdateReplicationMethodStandard - if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC != nil { - method := shared.SourcePostgresUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC.Method.ValueString()) - sourcePostgresUpdateReplicationMethodStandard = &shared.SourcePostgresUpdateReplicationMethodStandard{ - Method: method, - } - } - if sourcePostgresUpdateReplicationMethodStandard != nil { - replicationMethod = &shared.SourcePostgresUpdateReplicationMethod{ - SourcePostgresUpdateReplicationMethodStandard: sourcePostgresUpdateReplicationMethodStandard, - } - } - var sourcePostgresUpdateReplicationMethodLogicalReplicationCDC *shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDC - if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard != nil { - method1 := shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard.Method.ValueString()) - sourcePostgresUpdateReplicationMethodLogicalReplicationCDC = &shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDC{ - Method: method1, - } - } - if sourcePostgresUpdateReplicationMethodLogicalReplicationCDC != nil { - replicationMethod = &shared.SourcePostgresUpdateReplicationMethod{ - SourcePostgresUpdateReplicationMethodLogicalReplicationCDC: sourcePostgresUpdateReplicationMethodLogicalReplicationCDC, - } - } - schemas := make([]string, 0) + if r.Configuration.ReplicationMethod != nil { + var sourcePostgresUpdateReplicationMethodStandard *shared.SourcePostgresUpdateReplicationMethodStandard + if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC != nil { + method := shared.SourcePostgresUpdateReplicationMethodStandardMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodLogicalReplicationCDC.Method.ValueString()) + sourcePostgresUpdateReplicationMethodStandard = &shared.SourcePostgresUpdateReplicationMethodStandard{ + Method: method, + } + } + if sourcePostgresUpdateReplicationMethodStandard != nil { + replicationMethod = &shared.SourcePostgresUpdateReplicationMethod{ + SourcePostgresUpdateReplicationMethodStandard: sourcePostgresUpdateReplicationMethodStandard, + } + } + var sourcePostgresUpdateReplicationMethodLogicalReplicationCDC *shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDC + if r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard != nil { + method1 := shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDCMethod(r.Configuration.ReplicationMethod.SourcePostgresReplicationMethodStandard.Method.ValueString()) + sourcePostgresUpdateReplicationMethodLogicalReplicationCDC = &shared.SourcePostgresUpdateReplicationMethodLogicalReplicationCDC{ + Method: method1, + } + } + if sourcePostgresUpdateReplicationMethodLogicalReplicationCDC != nil { + replicationMethod = &shared.SourcePostgresUpdateReplicationMethod{ + SourcePostgresUpdateReplicationMethodLogicalReplicationCDC: sourcePostgresUpdateReplicationMethodLogicalReplicationCDC, + } + } + } + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } var sslMode *shared.SourcePostgresUpdateSSLModes - var sourcePostgresUpdateSSLModesDisable *shared.SourcePostgresUpdateSSLModesDisable - if r.Configuration.SslMode.SourcePostgresSSLModesAllow != nil { - mode := shared.SourcePostgresUpdateSSLModesDisableMode(r.Configuration.SslMode.SourcePostgresSSLModesAllow.Mode.ValueString()) - var additionalProperties interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) - } - sourcePostgresUpdateSSLModesDisable = &shared.SourcePostgresUpdateSSLModesDisable{ - Mode: mode, - AdditionalProperties: additionalProperties, - } - } - if sourcePostgresUpdateSSLModesDisable != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesDisable: sourcePostgresUpdateSSLModesDisable, - } - } - var sourcePostgresUpdateSSLModesAllow *shared.SourcePostgresUpdateSSLModesAllow - if r.Configuration.SslMode.SourcePostgresSSLModesDisable != nil { - mode1 := shared.SourcePostgresUpdateSSLModesAllowMode(r.Configuration.SslMode.SourcePostgresSSLModesDisable.Mode.ValueString()) - var additionalProperties1 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourcePostgresUpdateSSLModesAllow = &shared.SourcePostgresUpdateSSLModesAllow{ - Mode: mode1, - AdditionalProperties: additionalProperties1, - } - } - if sourcePostgresUpdateSSLModesAllow != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesAllow: sourcePostgresUpdateSSLModesAllow, - } - } - var sourcePostgresUpdateSSLModesPrefer *shared.SourcePostgresUpdateSSLModesPrefer - if r.Configuration.SslMode.SourcePostgresSSLModesPrefer != nil { - mode2 := shared.SourcePostgresUpdateSSLModesPreferMode(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.Mode.ValueString()) - var additionalProperties2 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) - } - sourcePostgresUpdateSSLModesPrefer = &shared.SourcePostgresUpdateSSLModesPrefer{ - Mode: mode2, - AdditionalProperties: additionalProperties2, - } - } - if sourcePostgresUpdateSSLModesPrefer != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesPrefer: sourcePostgresUpdateSSLModesPrefer, - } - } - var sourcePostgresUpdateSSLModesRequire *shared.SourcePostgresUpdateSSLModesRequire - if r.Configuration.SslMode.SourcePostgresSSLModesRequire != nil { - mode3 := shared.SourcePostgresUpdateSSLModesRequireMode(r.Configuration.SslMode.SourcePostgresSSLModesRequire.Mode.ValueString()) - var additionalProperties3 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) - } - sourcePostgresUpdateSSLModesRequire = &shared.SourcePostgresUpdateSSLModesRequire{ - Mode: mode3, - AdditionalProperties: additionalProperties3, - } - } - if sourcePostgresUpdateSSLModesRequire != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesRequire: sourcePostgresUpdateSSLModesRequire, - } - } - var sourcePostgresUpdateSSLModesVerifyCa *shared.SourcePostgresUpdateSSLModesVerifyCa - if r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa != nil { - caCertificate := r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.CaCertificate.ValueString() - clientCertificate := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsNull() { - *clientCertificate = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.ValueString() - } else { - clientCertificate = nil - } - clientKey := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsNull() { - *clientKey = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.ValueString() - } else { - clientKey = nil - } - clientKeyPassword := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { - *clientKeyPassword = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() - } else { - clientKeyPassword = nil - } - mode4 := shared.SourcePostgresUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.Mode.ValueString()) - var additionalProperties4 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) - } - sourcePostgresUpdateSSLModesVerifyCa = &shared.SourcePostgresUpdateSSLModesVerifyCa{ - CaCertificate: caCertificate, - ClientCertificate: clientCertificate, - ClientKey: clientKey, - ClientKeyPassword: clientKeyPassword, - Mode: mode4, - AdditionalProperties: additionalProperties4, - } - } - if sourcePostgresUpdateSSLModesVerifyCa != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesVerifyCa: sourcePostgresUpdateSSLModesVerifyCa, - } - } - var sourcePostgresUpdateSSLModesVerifyFull *shared.SourcePostgresUpdateSSLModesVerifyFull - if r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull != nil { - caCertificate1 := r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.CaCertificate.ValueString() - clientCertificate1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsNull() { - *clientCertificate1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.ValueString() - } else { - clientCertificate1 = nil - } - clientKey1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsNull() { - *clientKey1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.ValueString() - } else { - clientKey1 = nil - } - clientKeyPassword1 := new(string) - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { - *clientKeyPassword1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() - } else { - clientKeyPassword1 = nil - } - mode5 := shared.SourcePostgresUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.Mode.ValueString()) - var additionalProperties5 interface{} - if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) - } - sourcePostgresUpdateSSLModesVerifyFull = &shared.SourcePostgresUpdateSSLModesVerifyFull{ - CaCertificate: caCertificate1, - ClientCertificate: clientCertificate1, - ClientKey: clientKey1, - ClientKeyPassword: clientKeyPassword1, - Mode: mode5, - AdditionalProperties: additionalProperties5, - } - } - if sourcePostgresUpdateSSLModesVerifyFull != nil { - sslMode = &shared.SourcePostgresUpdateSSLModes{ - SourcePostgresUpdateSSLModesVerifyFull: sourcePostgresUpdateSSLModesVerifyFull, + if r.Configuration.SslMode != nil { + var sourcePostgresUpdateSSLModesDisable *shared.SourcePostgresUpdateSSLModesDisable + if r.Configuration.SslMode.SourcePostgresSSLModesAllow != nil { + mode := shared.SourcePostgresUpdateSSLModesDisableMode(r.Configuration.SslMode.SourcePostgresSSLModesAllow.Mode.ValueString()) + var additionalProperties interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesAllow.AdditionalProperties.ValueString()), &additionalProperties) + } + sourcePostgresUpdateSSLModesDisable = &shared.SourcePostgresUpdateSSLModesDisable{ + Mode: mode, + AdditionalProperties: additionalProperties, + } + } + if sourcePostgresUpdateSSLModesDisable != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesDisable: sourcePostgresUpdateSSLModesDisable, + } + } + var sourcePostgresUpdateSSLModesAllow *shared.SourcePostgresUpdateSSLModesAllow + if r.Configuration.SslMode.SourcePostgresSSLModesDisable != nil { + mode1 := shared.SourcePostgresUpdateSSLModesAllowMode(r.Configuration.SslMode.SourcePostgresSSLModesDisable.Mode.ValueString()) + var additionalProperties1 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesDisable.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourcePostgresUpdateSSLModesAllow = &shared.SourcePostgresUpdateSSLModesAllow{ + Mode: mode1, + AdditionalProperties: additionalProperties1, + } + } + if sourcePostgresUpdateSSLModesAllow != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesAllow: sourcePostgresUpdateSSLModesAllow, + } + } + var sourcePostgresUpdateSSLModesPrefer *shared.SourcePostgresUpdateSSLModesPrefer + if r.Configuration.SslMode.SourcePostgresSSLModesPrefer != nil { + mode2 := shared.SourcePostgresUpdateSSLModesPreferMode(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.Mode.ValueString()) + var additionalProperties2 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesPrefer.AdditionalProperties.ValueString()), &additionalProperties2) + } + sourcePostgresUpdateSSLModesPrefer = &shared.SourcePostgresUpdateSSLModesPrefer{ + Mode: mode2, + AdditionalProperties: additionalProperties2, + } + } + if sourcePostgresUpdateSSLModesPrefer != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesPrefer: sourcePostgresUpdateSSLModesPrefer, + } + } + var sourcePostgresUpdateSSLModesRequire *shared.SourcePostgresUpdateSSLModesRequire + if r.Configuration.SslMode.SourcePostgresSSLModesRequire != nil { + mode3 := shared.SourcePostgresUpdateSSLModesRequireMode(r.Configuration.SslMode.SourcePostgresSSLModesRequire.Mode.ValueString()) + var additionalProperties3 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesRequire.AdditionalProperties.ValueString()), &additionalProperties3) + } + sourcePostgresUpdateSSLModesRequire = &shared.SourcePostgresUpdateSSLModesRequire{ + Mode: mode3, + AdditionalProperties: additionalProperties3, + } + } + if sourcePostgresUpdateSSLModesRequire != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesRequire: sourcePostgresUpdateSSLModesRequire, + } + } + var sourcePostgresUpdateSSLModesVerifyCa *shared.SourcePostgresUpdateSSLModesVerifyCa + if r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa != nil { + caCertificate := r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.CaCertificate.ValueString() + clientCertificate := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.IsNull() { + *clientCertificate = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientCertificate.ValueString() + } else { + clientCertificate = nil + } + clientKey := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.IsNull() { + *clientKey = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKey.ValueString() + } else { + clientKey = nil + } + clientKeyPassword := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.IsNull() { + *clientKeyPassword = r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.ClientKeyPassword.ValueString() + } else { + clientKeyPassword = nil + } + mode4 := shared.SourcePostgresUpdateSSLModesVerifyCaMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.Mode.ValueString()) + var additionalProperties4 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyCa.AdditionalProperties.ValueString()), &additionalProperties4) + } + sourcePostgresUpdateSSLModesVerifyCa = &shared.SourcePostgresUpdateSSLModesVerifyCa{ + CaCertificate: caCertificate, + ClientCertificate: clientCertificate, + ClientKey: clientKey, + ClientKeyPassword: clientKeyPassword, + Mode: mode4, + AdditionalProperties: additionalProperties4, + } + } + if sourcePostgresUpdateSSLModesVerifyCa != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesVerifyCa: sourcePostgresUpdateSSLModesVerifyCa, + } + } + var sourcePostgresUpdateSSLModesVerifyFull *shared.SourcePostgresUpdateSSLModesVerifyFull + if r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull != nil { + caCertificate1 := r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.CaCertificate.ValueString() + clientCertificate1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.IsNull() { + *clientCertificate1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientCertificate.ValueString() + } else { + clientCertificate1 = nil + } + clientKey1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.IsNull() { + *clientKey1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKey.ValueString() + } else { + clientKey1 = nil + } + clientKeyPassword1 := new(string) + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.IsNull() { + *clientKeyPassword1 = r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.ClientKeyPassword.ValueString() + } else { + clientKeyPassword1 = nil + } + mode5 := shared.SourcePostgresUpdateSSLModesVerifyFullMode(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.Mode.ValueString()) + var additionalProperties5 interface{} + if !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsUnknown() && !r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.SslMode.SourcePostgresSSLModesVerifyFull.AdditionalProperties.ValueString()), &additionalProperties5) + } + sourcePostgresUpdateSSLModesVerifyFull = &shared.SourcePostgresUpdateSSLModesVerifyFull{ + CaCertificate: caCertificate1, + ClientCertificate: clientCertificate1, + ClientKey: clientKey1, + ClientKeyPassword: clientKeyPassword1, + Mode: mode5, + AdditionalProperties: additionalProperties5, + } + } + if sourcePostgresUpdateSSLModesVerifyFull != nil { + sslMode = &shared.SourcePostgresUpdateSSLModes{ + SourcePostgresUpdateSSLModesVerifyFull: sourcePostgresUpdateSSLModesVerifyFull, + } } } var tunnelMethod *shared.SourcePostgresUpdateSSHTunnelMethod - var sourcePostgresUpdateSSHTunnelMethodNoTunnel *shared.SourcePostgresUpdateSSHTunnelMethodNoTunnel - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel != nil { - tunnelMethod1 := shared.SourcePostgresUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) - sourcePostgresUpdateSSHTunnelMethodNoTunnel = &shared.SourcePostgresUpdateSSHTunnelMethodNoTunnel{ - TunnelMethod: tunnelMethod1, - } - } - if sourcePostgresUpdateSSHTunnelMethodNoTunnel != nil { - tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ - SourcePostgresUpdateSSHTunnelMethodNoTunnel: sourcePostgresUpdateSSHTunnelMethodNoTunnel, - } - } - var sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication != nil { - tunnelHost := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() - tunnelMethod2 := shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) - tunnelPort := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() - tunnelUser := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() - sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication{ - TunnelHost: tunnelHost, - TunnelMethod: tunnelMethod2, - TunnelPort: tunnelPort, - TunnelUser: tunnelUser, - } - } - if sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ - SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication: sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication, - } - } - var sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication *shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication - if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { - tunnelHost1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() - tunnelMethod3 := shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) - tunnelPort1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() - tunnelUser1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() - sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication{ - TunnelHost: tunnelHost1, - TunnelMethod: tunnelMethod3, - TunnelPort: tunnelPort1, - TunnelUser: tunnelUser1, - } - } - if sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication != nil { - tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ - SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication: sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication, + if r.Configuration.TunnelMethod != nil { + var sourcePostgresUpdateSSHTunnelMethodNoTunnel *shared.SourcePostgresUpdateSSHTunnelMethodNoTunnel + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel != nil { + tunnelMethod1 := shared.SourcePostgresUpdateSSHTunnelMethodNoTunnelTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodNoTunnel.TunnelMethod.ValueString()) + sourcePostgresUpdateSSHTunnelMethodNoTunnel = &shared.SourcePostgresUpdateSSHTunnelMethodNoTunnel{ + TunnelMethod: tunnelMethod1, + } + } + if sourcePostgresUpdateSSHTunnelMethodNoTunnel != nil { + tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ + SourcePostgresUpdateSSHTunnelMethodNoTunnel: sourcePostgresUpdateSSHTunnelMethodNoTunnel, + } + } + var sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication *shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication != nil { + tunnelHost := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelHost.ValueString() + tunnelMethod2 := shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelMethod.ValueString()) + tunnelPort := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelPort.ValueInt64() + tunnelUser := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodPasswordAuthentication.TunnelUser.ValueString() + sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication = &shared.SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication{ + TunnelHost: tunnelHost, + TunnelMethod: tunnelMethod2, + TunnelPort: tunnelPort, + TunnelUser: tunnelUser, + } + } + if sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ + SourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication: sourcePostgresUpdateSSHTunnelMethodSSHKeyAuthentication, + } + } + var sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication *shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication + if r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication != nil { + tunnelHost1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelHost.ValueString() + tunnelMethod3 := shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthenticationTunnelMethod(r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelMethod.ValueString()) + tunnelPort1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelPort.ValueInt64() + tunnelUser1 := r.Configuration.TunnelMethod.SourcePostgresSSHTunnelMethodSSHKeyAuthentication.TunnelUser.ValueString() + sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication = &shared.SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication{ + TunnelHost: tunnelHost1, + TunnelMethod: tunnelMethod3, + TunnelPort: tunnelPort1, + TunnelUser: tunnelUser1, + } + } + if sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication != nil { + tunnelMethod = &shared.SourcePostgresUpdateSSHTunnelMethod{ + SourcePostgresUpdateSSHTunnelMethodPasswordAuthentication: sourcePostgresUpdateSSHTunnelMethodPasswordAuthentication, + } } } username := r.Configuration.Username.ValueString() diff --git a/internal/provider/source_qualaroo_resource_sdk.go b/internal/provider/source_qualaroo_resource_sdk.go index 1268390cc..b0c19cbd3 100755 --- a/internal/provider/source_qualaroo_resource_sdk.go +++ b/internal/provider/source_qualaroo_resource_sdk.go @@ -11,7 +11,7 @@ func (r *SourceQualarooResourceModel) ToCreateSDKType() *shared.SourceQualarooCr key := r.Configuration.Key.ValueString() sourceType := shared.SourceQualarooQualaroo(r.Configuration.SourceType.ValueString()) startDate := r.Configuration.StartDate.ValueString() - surveyIds := make([]string, 0) + var surveyIds []string = nil for _, surveyIdsItem := range r.Configuration.SurveyIds { surveyIds = append(surveyIds, surveyIdsItem.ValueString()) } @@ -48,7 +48,7 @@ func (r *SourceQualarooResourceModel) ToGetSDKType() *shared.SourceQualarooCreat func (r *SourceQualarooResourceModel) ToUpdateSDKType() *shared.SourceQualarooPutRequest { key := r.Configuration.Key.ValueString() startDate := r.Configuration.StartDate.ValueString() - surveyIds := make([]string, 0) + var surveyIds []string = nil for _, surveyIdsItem := range r.Configuration.SurveyIds { surveyIds = append(surveyIds, surveyIdsItem.ValueString()) } diff --git a/internal/provider/source_redshift_resource_sdk.go b/internal/provider/source_redshift_resource_sdk.go index c6e7d0113..c3a57e86a 100755 --- a/internal/provider/source_redshift_resource_sdk.go +++ b/internal/provider/source_redshift_resource_sdk.go @@ -18,7 +18,7 @@ func (r *SourceRedshiftResourceModel) ToCreateSDKType() *shared.SourceRedshiftCr } password := r.Configuration.Password.ValueString() port := r.Configuration.Port.ValueInt64() - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } @@ -67,7 +67,7 @@ func (r *SourceRedshiftResourceModel) ToUpdateSDKType() *shared.SourceRedshiftPu } password := r.Configuration.Password.ValueString() port := r.Configuration.Port.ValueInt64() - schemas := make([]string, 0) + var schemas []string = nil for _, schemasItem := range r.Configuration.Schemas { schemas = append(schemas, schemasItem.ValueString()) } diff --git a/internal/provider/source_retently_resource_sdk.go b/internal/provider/source_retently_resource_sdk.go index e0374857a..623f354fc 100755 --- a/internal/provider/source_retently_resource_sdk.go +++ b/internal/provider/source_retently_resource_sdk.go @@ -10,56 +10,58 @@ import ( func (r *SourceRetentlyResourceModel) ToCreateSDKType() *shared.SourceRetentlyCreateRequest { var credentials *shared.SourceRetentlyAuthenticationMechanism - var sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth *shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth - if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { - authType := new(shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType) - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsNull() { - *authType = shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.ValueString()) - } else { - authType = nil - } - clientID := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.RefreshToken.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth = &shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - AdditionalProperties: additionalProperties, - } - } - if sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { - credentials = &shared.SourceRetentlyAuthenticationMechanism{ - SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth: sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth, - } - } - var sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken *shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken - if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { - apiKey := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.APIKey.ValueString() - authType1 := new(shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPITokenAuthType) - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsNull() { - *authType1 = shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPITokenAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken = &shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken{ - APIKey: apiKey, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { - credentials = &shared.SourceRetentlyAuthenticationMechanism{ - SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken: sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken, + if r.Configuration.Credentials != nil { + var sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth *shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth + if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { + authType := new(shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType) + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsNull() { + *authType = shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.RefreshToken.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth = &shared.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + AdditionalProperties: additionalProperties, + } + } + if sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { + credentials = &shared.SourceRetentlyAuthenticationMechanism{ + SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth: sourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth, + } + } + var sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken *shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken + if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { + apiKey := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.APIKey.ValueString() + authType1 := new(shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPITokenAuthType) + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsNull() { + *authType1 = shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPITokenAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken = &shared.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken{ + APIKey: apiKey, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { + credentials = &shared.SourceRetentlyAuthenticationMechanism{ + SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken: sourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken, + } } } sourceType := new(shared.SourceRetentlyRetently) @@ -96,56 +98,58 @@ func (r *SourceRetentlyResourceModel) ToGetSDKType() *shared.SourceRetentlyCreat func (r *SourceRetentlyResourceModel) ToUpdateSDKType() *shared.SourceRetentlyPutRequest { var credentials *shared.SourceRetentlyUpdateAuthenticationMechanism - var sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth *shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth - if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { - authType := new(shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType) - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsNull() { - *authType = shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.ValueString()) - } else { - authType = nil - } - clientID := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientSecret.ValueString() - refreshToken := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.RefreshToken.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth = &shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth{ - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, - AdditionalProperties: additionalProperties, - } - } - if sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { - credentials = &shared.SourceRetentlyUpdateAuthenticationMechanism{ - SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth: sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth, - } - } - var sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken *shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken - if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { - apiKey := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.APIKey.ValueString() - authType1 := new(shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPITokenAuthType) - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsNull() { - *authType1 = shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPITokenAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken = &shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken{ - APIKey: apiKey, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken != nil { - credentials = &shared.SourceRetentlyUpdateAuthenticationMechanism{ - SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken: sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken, + if r.Configuration.Credentials != nil { + var sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth *shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth + if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { + authType := new(shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType) + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.IsNull() { + *authType = shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuthAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AuthType.ValueString()) + } else { + authType = nil + } + clientID := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.ClientSecret.ValueString() + refreshToken := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.RefreshToken.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateViaRetentlyOAuth.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth = &shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth{ + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + AdditionalProperties: additionalProperties, + } + } + if sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth != nil { + credentials = &shared.SourceRetentlyUpdateAuthenticationMechanism{ + SourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth: sourceRetentlyUpdateAuthenticationMechanismAuthenticateViaRetentlyOAuth, + } + } + var sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken *shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken + if r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken != nil { + apiKey := r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.APIKey.ValueString() + authType1 := new(shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPITokenAuthType) + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.IsNull() { + *authType1 = shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPITokenAuthType(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceRetentlyAuthenticationMechanismAuthenticateWithAPIToken.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken = &shared.SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken{ + APIKey: apiKey, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken != nil { + credentials = &shared.SourceRetentlyUpdateAuthenticationMechanism{ + SourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken: sourceRetentlyUpdateAuthenticationMechanismAuthenticateWithAPIToken, + } } } configuration := shared.SourceRetentlyUpdate{ diff --git a/internal/provider/source_s3_resource_sdk.go b/internal/provider/source_s3_resource_sdk.go index ca511f906..db2f1a7d7 100755 --- a/internal/provider/source_s3_resource_sdk.go +++ b/internal/provider/source_s3_resource_sdk.go @@ -11,72 +11,74 @@ import ( func (r *SourceS3ResourceModel) ToCreateSDKType() *shared.SourceS3CreateRequest { dataset := r.Configuration.Dataset.ValueString() var format *shared.SourceS3FileFormat - var sourceS3FileFormatCSV *shared.SourceS3FileFormatCSV - if r.Configuration.Format.SourceS3FileFormatAvro != nil { - filetype := new(shared.SourceS3FileFormatCSVFiletype) - if !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsNull() { - *filetype = shared.SourceS3FileFormatCSVFiletype(r.Configuration.Format.SourceS3FileFormatAvro.Filetype.ValueString()) - } else { - filetype = nil + if r.Configuration.Format != nil { + var sourceS3FileFormatCSV *shared.SourceS3FileFormatCSV + if r.Configuration.Format.SourceS3FileFormatAvro != nil { + filetype := new(shared.SourceS3FileFormatCSVFiletype) + if !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsNull() { + *filetype = shared.SourceS3FileFormatCSVFiletype(r.Configuration.Format.SourceS3FileFormatAvro.Filetype.ValueString()) + } else { + filetype = nil + } + sourceS3FileFormatCSV = &shared.SourceS3FileFormatCSV{ + Filetype: filetype, + } } - sourceS3FileFormatCSV = &shared.SourceS3FileFormatCSV{ - Filetype: filetype, + if sourceS3FileFormatCSV != nil { + format = &shared.SourceS3FileFormat{ + SourceS3FileFormatCSV: sourceS3FileFormatCSV, + } } - } - if sourceS3FileFormatCSV != nil { - format = &shared.SourceS3FileFormat{ - SourceS3FileFormatCSV: sourceS3FileFormatCSV, - } - } - var sourceS3FileFormatParquet *shared.SourceS3FileFormatParquet - if r.Configuration.Format.SourceS3FileFormatCSV != nil { - filetype1 := new(shared.SourceS3FileFormatParquetFiletype) - if !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsNull() { - *filetype1 = shared.SourceS3FileFormatParquetFiletype(r.Configuration.Format.SourceS3FileFormatCSV.Filetype.ValueString()) - } else { - filetype1 = nil + var sourceS3FileFormatParquet *shared.SourceS3FileFormatParquet + if r.Configuration.Format.SourceS3FileFormatCSV != nil { + filetype1 := new(shared.SourceS3FileFormatParquetFiletype) + if !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsNull() { + *filetype1 = shared.SourceS3FileFormatParquetFiletype(r.Configuration.Format.SourceS3FileFormatCSV.Filetype.ValueString()) + } else { + filetype1 = nil + } + sourceS3FileFormatParquet = &shared.SourceS3FileFormatParquet{ + Filetype: filetype1, + } } - sourceS3FileFormatParquet = &shared.SourceS3FileFormatParquet{ - Filetype: filetype1, + if sourceS3FileFormatParquet != nil { + format = &shared.SourceS3FileFormat{ + SourceS3FileFormatParquet: sourceS3FileFormatParquet, + } } - } - if sourceS3FileFormatParquet != nil { - format = &shared.SourceS3FileFormat{ - SourceS3FileFormatParquet: sourceS3FileFormatParquet, + var sourceS3FileFormatAvro *shared.SourceS3FileFormatAvro + if r.Configuration.Format.SourceS3FileFormatJsonl != nil { + filetype2 := new(shared.SourceS3FileFormatAvroFiletype) + if !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsNull() { + *filetype2 = shared.SourceS3FileFormatAvroFiletype(r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.ValueString()) + } else { + filetype2 = nil + } + sourceS3FileFormatAvro = &shared.SourceS3FileFormatAvro{ + Filetype: filetype2, + } } - } - var sourceS3FileFormatAvro *shared.SourceS3FileFormatAvro - if r.Configuration.Format.SourceS3FileFormatJsonl != nil { - filetype2 := new(shared.SourceS3FileFormatAvroFiletype) - if !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsNull() { - *filetype2 = shared.SourceS3FileFormatAvroFiletype(r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.ValueString()) - } else { - filetype2 = nil + if sourceS3FileFormatAvro != nil { + format = &shared.SourceS3FileFormat{ + SourceS3FileFormatAvro: sourceS3FileFormatAvro, + } } - sourceS3FileFormatAvro = &shared.SourceS3FileFormatAvro{ - Filetype: filetype2, + var sourceS3FileFormatJsonl *shared.SourceS3FileFormatJsonl + if r.Configuration.Format.SourceS3FileFormatParquet != nil { + filetype3 := new(shared.SourceS3FileFormatJsonlFiletype) + if !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsNull() { + *filetype3 = shared.SourceS3FileFormatJsonlFiletype(r.Configuration.Format.SourceS3FileFormatParquet.Filetype.ValueString()) + } else { + filetype3 = nil + } + sourceS3FileFormatJsonl = &shared.SourceS3FileFormatJsonl{ + Filetype: filetype3, + } } - } - if sourceS3FileFormatAvro != nil { - format = &shared.SourceS3FileFormat{ - SourceS3FileFormatAvro: sourceS3FileFormatAvro, - } - } - var sourceS3FileFormatJsonl *shared.SourceS3FileFormatJsonl - if r.Configuration.Format.SourceS3FileFormatParquet != nil { - filetype3 := new(shared.SourceS3FileFormatJsonlFiletype) - if !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsNull() { - *filetype3 = shared.SourceS3FileFormatJsonlFiletype(r.Configuration.Format.SourceS3FileFormatParquet.Filetype.ValueString()) - } else { - filetype3 = nil - } - sourceS3FileFormatJsonl = &shared.SourceS3FileFormatJsonl{ - Filetype: filetype3, - } - } - if sourceS3FileFormatJsonl != nil { - format = &shared.SourceS3FileFormat{ - SourceS3FileFormatJsonl: sourceS3FileFormatJsonl, + if sourceS3FileFormatJsonl != nil { + format = &shared.SourceS3FileFormat{ + SourceS3FileFormatJsonl: sourceS3FileFormatJsonl, + } } } pathPattern := r.Configuration.PathPattern.ValueString() @@ -159,72 +161,74 @@ func (r *SourceS3ResourceModel) ToGetSDKType() *shared.SourceS3CreateRequest { func (r *SourceS3ResourceModel) ToUpdateSDKType() *shared.SourceS3PutRequest { dataset := r.Configuration.Dataset.ValueString() var format *shared.SourceS3UpdateFileFormat - var sourceS3UpdateFileFormatCSV *shared.SourceS3UpdateFileFormatCSV - if r.Configuration.Format.SourceS3FileFormatAvro != nil { - filetype := new(shared.SourceS3UpdateFileFormatCSVFiletype) - if !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsNull() { - *filetype = shared.SourceS3UpdateFileFormatCSVFiletype(r.Configuration.Format.SourceS3FileFormatAvro.Filetype.ValueString()) - } else { - filetype = nil + if r.Configuration.Format != nil { + var sourceS3UpdateFileFormatCSV *shared.SourceS3UpdateFileFormatCSV + if r.Configuration.Format.SourceS3FileFormatAvro != nil { + filetype := new(shared.SourceS3UpdateFileFormatCSVFiletype) + if !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatAvro.Filetype.IsNull() { + *filetype = shared.SourceS3UpdateFileFormatCSVFiletype(r.Configuration.Format.SourceS3FileFormatAvro.Filetype.ValueString()) + } else { + filetype = nil + } + sourceS3UpdateFileFormatCSV = &shared.SourceS3UpdateFileFormatCSV{ + Filetype: filetype, + } } - sourceS3UpdateFileFormatCSV = &shared.SourceS3UpdateFileFormatCSV{ - Filetype: filetype, + if sourceS3UpdateFileFormatCSV != nil { + format = &shared.SourceS3UpdateFileFormat{ + SourceS3UpdateFileFormatCSV: sourceS3UpdateFileFormatCSV, + } } - } - if sourceS3UpdateFileFormatCSV != nil { - format = &shared.SourceS3UpdateFileFormat{ - SourceS3UpdateFileFormatCSV: sourceS3UpdateFileFormatCSV, - } - } - var sourceS3UpdateFileFormatParquet *shared.SourceS3UpdateFileFormatParquet - if r.Configuration.Format.SourceS3FileFormatCSV != nil { - filetype1 := new(shared.SourceS3UpdateFileFormatParquetFiletype) - if !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsNull() { - *filetype1 = shared.SourceS3UpdateFileFormatParquetFiletype(r.Configuration.Format.SourceS3FileFormatCSV.Filetype.ValueString()) - } else { - filetype1 = nil + var sourceS3UpdateFileFormatParquet *shared.SourceS3UpdateFileFormatParquet + if r.Configuration.Format.SourceS3FileFormatCSV != nil { + filetype1 := new(shared.SourceS3UpdateFileFormatParquetFiletype) + if !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatCSV.Filetype.IsNull() { + *filetype1 = shared.SourceS3UpdateFileFormatParquetFiletype(r.Configuration.Format.SourceS3FileFormatCSV.Filetype.ValueString()) + } else { + filetype1 = nil + } + sourceS3UpdateFileFormatParquet = &shared.SourceS3UpdateFileFormatParquet{ + Filetype: filetype1, + } } - sourceS3UpdateFileFormatParquet = &shared.SourceS3UpdateFileFormatParquet{ - Filetype: filetype1, + if sourceS3UpdateFileFormatParquet != nil { + format = &shared.SourceS3UpdateFileFormat{ + SourceS3UpdateFileFormatParquet: sourceS3UpdateFileFormatParquet, + } } - } - if sourceS3UpdateFileFormatParquet != nil { - format = &shared.SourceS3UpdateFileFormat{ - SourceS3UpdateFileFormatParquet: sourceS3UpdateFileFormatParquet, + var sourceS3UpdateFileFormatAvro *shared.SourceS3UpdateFileFormatAvro + if r.Configuration.Format.SourceS3FileFormatJsonl != nil { + filetype2 := new(shared.SourceS3UpdateFileFormatAvroFiletype) + if !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsNull() { + *filetype2 = shared.SourceS3UpdateFileFormatAvroFiletype(r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.ValueString()) + } else { + filetype2 = nil + } + sourceS3UpdateFileFormatAvro = &shared.SourceS3UpdateFileFormatAvro{ + Filetype: filetype2, + } } - } - var sourceS3UpdateFileFormatAvro *shared.SourceS3UpdateFileFormatAvro - if r.Configuration.Format.SourceS3FileFormatJsonl != nil { - filetype2 := new(shared.SourceS3UpdateFileFormatAvroFiletype) - if !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.IsNull() { - *filetype2 = shared.SourceS3UpdateFileFormatAvroFiletype(r.Configuration.Format.SourceS3FileFormatJsonl.Filetype.ValueString()) - } else { - filetype2 = nil + if sourceS3UpdateFileFormatAvro != nil { + format = &shared.SourceS3UpdateFileFormat{ + SourceS3UpdateFileFormatAvro: sourceS3UpdateFileFormatAvro, + } } - sourceS3UpdateFileFormatAvro = &shared.SourceS3UpdateFileFormatAvro{ - Filetype: filetype2, + var sourceS3UpdateFileFormatJsonl *shared.SourceS3UpdateFileFormatJsonl + if r.Configuration.Format.SourceS3FileFormatParquet != nil { + filetype3 := new(shared.SourceS3UpdateFileFormatJsonlFiletype) + if !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsNull() { + *filetype3 = shared.SourceS3UpdateFileFormatJsonlFiletype(r.Configuration.Format.SourceS3FileFormatParquet.Filetype.ValueString()) + } else { + filetype3 = nil + } + sourceS3UpdateFileFormatJsonl = &shared.SourceS3UpdateFileFormatJsonl{ + Filetype: filetype3, + } } - } - if sourceS3UpdateFileFormatAvro != nil { - format = &shared.SourceS3UpdateFileFormat{ - SourceS3UpdateFileFormatAvro: sourceS3UpdateFileFormatAvro, - } - } - var sourceS3UpdateFileFormatJsonl *shared.SourceS3UpdateFileFormatJsonl - if r.Configuration.Format.SourceS3FileFormatParquet != nil { - filetype3 := new(shared.SourceS3UpdateFileFormatJsonlFiletype) - if !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsUnknown() && !r.Configuration.Format.SourceS3FileFormatParquet.Filetype.IsNull() { - *filetype3 = shared.SourceS3UpdateFileFormatJsonlFiletype(r.Configuration.Format.SourceS3FileFormatParquet.Filetype.ValueString()) - } else { - filetype3 = nil - } - sourceS3UpdateFileFormatJsonl = &shared.SourceS3UpdateFileFormatJsonl{ - Filetype: filetype3, - } - } - if sourceS3UpdateFileFormatJsonl != nil { - format = &shared.SourceS3UpdateFileFormat{ - SourceS3UpdateFileFormatJsonl: sourceS3UpdateFileFormatJsonl, + if sourceS3UpdateFileFormatJsonl != nil { + format = &shared.SourceS3UpdateFileFormat{ + SourceS3UpdateFileFormatJsonl: sourceS3UpdateFileFormatJsonl, + } } } pathPattern := r.Configuration.PathPattern.ValueString() diff --git a/internal/provider/source_salesforce_resource_sdk.go b/internal/provider/source_salesforce_resource_sdk.go index dd6a6b842..4cd5f34d6 100755 --- a/internal/provider/source_salesforce_resource_sdk.go +++ b/internal/provider/source_salesforce_resource_sdk.go @@ -31,7 +31,7 @@ func (r *SourceSalesforceResourceModel) ToCreateSDKType() *shared.SourceSalesfor } else { startDate = nil } - streamsCriteria := make([]shared.SourceSalesforceStreamsCriteria, 0) + var streamsCriteria []shared.SourceSalesforceStreamsCriteria = nil for _, streamsCriteriaItem := range r.Configuration.StreamsCriteria { criteria := shared.SourceSalesforceStreamsCriteriaSearchCriteria(streamsCriteriaItem.Criteria.ValueString()) value := streamsCriteriaItem.Value.ValueString() @@ -94,7 +94,7 @@ func (r *SourceSalesforceResourceModel) ToUpdateSDKType() *shared.SourceSalesfor } else { startDate = nil } - streamsCriteria := make([]shared.SourceSalesforceUpdateStreamsCriteria, 0) + var streamsCriteria []shared.SourceSalesforceUpdateStreamsCriteria = nil for _, streamsCriteriaItem := range r.Configuration.StreamsCriteria { criteria := shared.SourceSalesforceUpdateStreamsCriteriaSearchCriteria(streamsCriteriaItem.Criteria.ValueString()) value := streamsCriteriaItem.Value.ValueString() diff --git a/internal/provider/source_sentry_resource_sdk.go b/internal/provider/source_sentry_resource_sdk.go index ddb51dbbc..18c3200bc 100755 --- a/internal/provider/source_sentry_resource_sdk.go +++ b/internal/provider/source_sentry_resource_sdk.go @@ -10,7 +10,7 @@ import ( func (r *SourceSentryResourceModel) ToCreateSDKType() *shared.SourceSentryCreateRequest { authToken := r.Configuration.AuthToken.ValueString() - discoverFields := make([]interface{}, 0) + var discoverFields []interface{} = nil for _, discoverFieldsItem := range r.Configuration.DiscoverFields { var discoverFieldsTmp interface{} _ = json.Unmarshal([]byte(discoverFieldsItem.ValueString()), &discoverFieldsTmp) @@ -57,7 +57,7 @@ func (r *SourceSentryResourceModel) ToGetSDKType() *shared.SourceSentryCreateReq func (r *SourceSentryResourceModel) ToUpdateSDKType() *shared.SourceSentryPutRequest { authToken := r.Configuration.AuthToken.ValueString() - discoverFields := make([]interface{}, 0) + var discoverFields []interface{} = nil for _, discoverFieldsItem := range r.Configuration.DiscoverFields { var discoverFieldsTmp interface{} _ = json.Unmarshal([]byte(discoverFieldsItem.ValueString()), &discoverFieldsTmp) diff --git a/internal/provider/source_sftp_resource_sdk.go b/internal/provider/source_sftp_resource_sdk.go index 513a44cc0..212af07b4 100755 --- a/internal/provider/source_sftp_resource_sdk.go +++ b/internal/provider/source_sftp_resource_sdk.go @@ -9,32 +9,34 @@ import ( func (r *SourceSftpResourceModel) ToCreateSDKType() *shared.SourceSftpCreateRequest { var credentials *shared.SourceSftpAuthenticationWildcard - var sourceSftpAuthenticationWildcardPasswordAuthentication *shared.SourceSftpAuthenticationWildcardPasswordAuthentication - if r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication != nil { - authMethod := shared.SourceSftpAuthenticationWildcardPasswordAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthMethod.ValueString()) - authUserPassword := r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthUserPassword.ValueString() - sourceSftpAuthenticationWildcardPasswordAuthentication = &shared.SourceSftpAuthenticationWildcardPasswordAuthentication{ - AuthMethod: authMethod, - AuthUserPassword: authUserPassword, + if r.Configuration.Credentials != nil { + var sourceSftpAuthenticationWildcardPasswordAuthentication *shared.SourceSftpAuthenticationWildcardPasswordAuthentication + if r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication != nil { + authMethod := shared.SourceSftpAuthenticationWildcardPasswordAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthMethod.ValueString()) + authUserPassword := r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthUserPassword.ValueString() + sourceSftpAuthenticationWildcardPasswordAuthentication = &shared.SourceSftpAuthenticationWildcardPasswordAuthentication{ + AuthMethod: authMethod, + AuthUserPassword: authUserPassword, + } } - } - if sourceSftpAuthenticationWildcardPasswordAuthentication != nil { - credentials = &shared.SourceSftpAuthenticationWildcard{ - SourceSftpAuthenticationWildcardPasswordAuthentication: sourceSftpAuthenticationWildcardPasswordAuthentication, + if sourceSftpAuthenticationWildcardPasswordAuthentication != nil { + credentials = &shared.SourceSftpAuthenticationWildcard{ + SourceSftpAuthenticationWildcardPasswordAuthentication: sourceSftpAuthenticationWildcardPasswordAuthentication, + } } - } - var sourceSftpAuthenticationWildcardSSHKeyAuthentication *shared.SourceSftpAuthenticationWildcardSSHKeyAuthentication - if r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { - authMethod1 := shared.SourceSftpAuthenticationWildcardSSHKeyAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthMethod.ValueString()) - authSSHKey := r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthSSHKey.ValueString() - sourceSftpAuthenticationWildcardSSHKeyAuthentication = &shared.SourceSftpAuthenticationWildcardSSHKeyAuthentication{ - AuthMethod: authMethod1, - AuthSSHKey: authSSHKey, + var sourceSftpAuthenticationWildcardSSHKeyAuthentication *shared.SourceSftpAuthenticationWildcardSSHKeyAuthentication + if r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { + authMethod1 := shared.SourceSftpAuthenticationWildcardSSHKeyAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthMethod.ValueString()) + authSSHKey := r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthSSHKey.ValueString() + sourceSftpAuthenticationWildcardSSHKeyAuthentication = &shared.SourceSftpAuthenticationWildcardSSHKeyAuthentication{ + AuthMethod: authMethod1, + AuthSSHKey: authSSHKey, + } } - } - if sourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { - credentials = &shared.SourceSftpAuthenticationWildcard{ - SourceSftpAuthenticationWildcardSSHKeyAuthentication: sourceSftpAuthenticationWildcardSSHKeyAuthentication, + if sourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { + credentials = &shared.SourceSftpAuthenticationWildcard{ + SourceSftpAuthenticationWildcardSSHKeyAuthentication: sourceSftpAuthenticationWildcardSSHKeyAuthentication, + } } } filePattern := new(string) @@ -93,32 +95,34 @@ func (r *SourceSftpResourceModel) ToGetSDKType() *shared.SourceSftpCreateRequest func (r *SourceSftpResourceModel) ToUpdateSDKType() *shared.SourceSftpPutRequest { var credentials *shared.SourceSftpUpdateAuthenticationWildcard - var sourceSftpUpdateAuthenticationWildcardPasswordAuthentication *shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthentication - if r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication != nil { - authMethod := shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthMethod.ValueString()) - authUserPassword := r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthUserPassword.ValueString() - sourceSftpUpdateAuthenticationWildcardPasswordAuthentication = &shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthentication{ - AuthMethod: authMethod, - AuthUserPassword: authUserPassword, + if r.Configuration.Credentials != nil { + var sourceSftpUpdateAuthenticationWildcardPasswordAuthentication *shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthentication + if r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication != nil { + authMethod := shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthMethod.ValueString()) + authUserPassword := r.Configuration.Credentials.SourceSftpAuthenticationWildcardPasswordAuthentication.AuthUserPassword.ValueString() + sourceSftpUpdateAuthenticationWildcardPasswordAuthentication = &shared.SourceSftpUpdateAuthenticationWildcardPasswordAuthentication{ + AuthMethod: authMethod, + AuthUserPassword: authUserPassword, + } } - } - if sourceSftpUpdateAuthenticationWildcardPasswordAuthentication != nil { - credentials = &shared.SourceSftpUpdateAuthenticationWildcard{ - SourceSftpUpdateAuthenticationWildcardPasswordAuthentication: sourceSftpUpdateAuthenticationWildcardPasswordAuthentication, + if sourceSftpUpdateAuthenticationWildcardPasswordAuthentication != nil { + credentials = &shared.SourceSftpUpdateAuthenticationWildcard{ + SourceSftpUpdateAuthenticationWildcardPasswordAuthentication: sourceSftpUpdateAuthenticationWildcardPasswordAuthentication, + } } - } - var sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication *shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication - if r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { - authMethod1 := shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthMethod.ValueString()) - authSSHKey := r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthSSHKey.ValueString() - sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication = &shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication{ - AuthMethod: authMethod1, - AuthSSHKey: authSSHKey, + var sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication *shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication + if r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication != nil { + authMethod1 := shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthenticationAuthMethod(r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthMethod.ValueString()) + authSSHKey := r.Configuration.Credentials.SourceSftpAuthenticationWildcardSSHKeyAuthentication.AuthSSHKey.ValueString() + sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication = &shared.SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication{ + AuthMethod: authMethod1, + AuthSSHKey: authSSHKey, + } } - } - if sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication != nil { - credentials = &shared.SourceSftpUpdateAuthenticationWildcard{ - SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication: sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication, + if sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication != nil { + credentials = &shared.SourceSftpUpdateAuthenticationWildcard{ + SourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication: sourceSftpUpdateAuthenticationWildcardSSHKeyAuthentication, + } } } filePattern := new(string) diff --git a/internal/provider/source_shopify_resource_sdk.go b/internal/provider/source_shopify_resource_sdk.go index 13fa75153..cc27e5f2d 100755 --- a/internal/provider/source_shopify_resource_sdk.go +++ b/internal/provider/source_shopify_resource_sdk.go @@ -10,51 +10,53 @@ import ( func (r *SourceShopifyResourceModel) ToCreateSDKType() *shared.SourceShopifyCreateRequest { var credentials *shared.SourceShopifyShopifyAuthorizationMethod - var sourceShopifyShopifyAuthorizationMethodAPIPassword *shared.SourceShopifyShopifyAuthorizationMethodAPIPassword - if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword != nil { - apiPassword := r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.APIPassword.ValueString() - authMethod := shared.SourceShopifyShopifyAuthorizationMethodAPIPasswordAuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.AuthMethod.ValueString()) - sourceShopifyShopifyAuthorizationMethodAPIPassword = &shared.SourceShopifyShopifyAuthorizationMethodAPIPassword{ - APIPassword: apiPassword, - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourceShopifyShopifyAuthorizationMethodAPIPassword *shared.SourceShopifyShopifyAuthorizationMethodAPIPassword + if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword != nil { + apiPassword := r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.APIPassword.ValueString() + authMethod := shared.SourceShopifyShopifyAuthorizationMethodAPIPasswordAuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.AuthMethod.ValueString()) + sourceShopifyShopifyAuthorizationMethodAPIPassword = &shared.SourceShopifyShopifyAuthorizationMethodAPIPassword{ + APIPassword: apiPassword, + AuthMethod: authMethod, + } } - } - if sourceShopifyShopifyAuthorizationMethodAPIPassword != nil { - credentials = &shared.SourceShopifyShopifyAuthorizationMethod{ - SourceShopifyShopifyAuthorizationMethodAPIPassword: sourceShopifyShopifyAuthorizationMethodAPIPassword, - } - } - var sourceShopifyShopifyAuthorizationMethodOAuth20 *shared.SourceShopifyShopifyAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.ValueString() - } else { - accessToken = nil + if sourceShopifyShopifyAuthorizationMethodAPIPassword != nil { + credentials = &shared.SourceShopifyShopifyAuthorizationMethod{ + SourceShopifyShopifyAuthorizationMethodAPIPassword: sourceShopifyShopifyAuthorizationMethodAPIPassword, + } } - authMethod1 := shared.SourceShopifyShopifyAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AuthMethod.ValueString()) - clientID := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsNull() { - *clientID = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.ValueString() - } else { - clientID = nil + var sourceShopifyShopifyAuthorizationMethodOAuth20 *shared.SourceShopifyShopifyAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authMethod1 := shared.SourceShopifyShopifyAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AuthMethod.ValueString()) + clientID := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsNull() { + *clientID = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.ValueString() + } else { + clientID = nil + } + clientSecret := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsNull() { + *clientSecret = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.ValueString() + } else { + clientSecret = nil + } + sourceShopifyShopifyAuthorizationMethodOAuth20 = &shared.SourceShopifyShopifyAuthorizationMethodOAuth20{ + AccessToken: accessToken, + AuthMethod: authMethod1, + ClientID: clientID, + ClientSecret: clientSecret, + } } - clientSecret := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsNull() { - *clientSecret = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.ValueString() - } else { - clientSecret = nil - } - sourceShopifyShopifyAuthorizationMethodOAuth20 = &shared.SourceShopifyShopifyAuthorizationMethodOAuth20{ - AccessToken: accessToken, - AuthMethod: authMethod1, - ClientID: clientID, - ClientSecret: clientSecret, - } - } - if sourceShopifyShopifyAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceShopifyShopifyAuthorizationMethod{ - SourceShopifyShopifyAuthorizationMethodOAuth20: sourceShopifyShopifyAuthorizationMethodOAuth20, + if sourceShopifyShopifyAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceShopifyShopifyAuthorizationMethod{ + SourceShopifyShopifyAuthorizationMethodOAuth20: sourceShopifyShopifyAuthorizationMethodOAuth20, + } } } shop := r.Configuration.Shop.ValueString() @@ -90,51 +92,53 @@ func (r *SourceShopifyResourceModel) ToGetSDKType() *shared.SourceShopifyCreateR func (r *SourceShopifyResourceModel) ToUpdateSDKType() *shared.SourceShopifyPutRequest { var credentials *shared.SourceShopifyUpdateShopifyAuthorizationMethod - var sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword *shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword - if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword != nil { - apiPassword := r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.APIPassword.ValueString() - authMethod := shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPasswordAuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.AuthMethod.ValueString()) - sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword = &shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword{ - APIPassword: apiPassword, - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword *shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword + if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword != nil { + apiPassword := r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.APIPassword.ValueString() + authMethod := shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPasswordAuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodAPIPassword.AuthMethod.ValueString()) + sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword = &shared.SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword{ + APIPassword: apiPassword, + AuthMethod: authMethod, + } } - } - if sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword != nil { - credentials = &shared.SourceShopifyUpdateShopifyAuthorizationMethod{ - SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword: sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword, - } - } - var sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 *shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.ValueString() - } else { - accessToken = nil + if sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword != nil { + credentials = &shared.SourceShopifyUpdateShopifyAuthorizationMethod{ + SourceShopifyUpdateShopifyAuthorizationMethodAPIPassword: sourceShopifyUpdateShopifyAuthorizationMethodAPIPassword, + } } - authMethod1 := shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AuthMethod.ValueString()) - clientID := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsNull() { - *clientID = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.ValueString() - } else { - clientID = nil + var sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 *shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authMethod1 := shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.AuthMethod.ValueString()) + clientID := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.IsNull() { + *clientID = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientID.ValueString() + } else { + clientID = nil + } + clientSecret := new(string) + if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsNull() { + *clientSecret = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.ValueString() + } else { + clientSecret = nil + } + sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 = &shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20{ + AccessToken: accessToken, + AuthMethod: authMethod1, + ClientID: clientID, + ClientSecret: clientSecret, + } } - clientSecret := new(string) - if !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsUnknown() && !r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.IsNull() { - *clientSecret = r.Configuration.Credentials.SourceShopifyShopifyAuthorizationMethodOAuth20.ClientSecret.ValueString() - } else { - clientSecret = nil - } - sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 = &shared.SourceShopifyUpdateShopifyAuthorizationMethodOAuth20{ - AccessToken: accessToken, - AuthMethod: authMethod1, - ClientID: clientID, - ClientSecret: clientSecret, - } - } - if sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceShopifyUpdateShopifyAuthorizationMethod{ - SourceShopifyUpdateShopifyAuthorizationMethodOAuth20: sourceShopifyUpdateShopifyAuthorizationMethodOAuth20, + if sourceShopifyUpdateShopifyAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceShopifyUpdateShopifyAuthorizationMethod{ + SourceShopifyUpdateShopifyAuthorizationMethodOAuth20: sourceShopifyUpdateShopifyAuthorizationMethodOAuth20, + } } } shop := r.Configuration.Shop.ValueString() diff --git a/internal/provider/source_slack_resource_sdk.go b/internal/provider/source_slack_resource_sdk.go index c4903717b..e210f736b 100755 --- a/internal/provider/source_slack_resource_sdk.go +++ b/internal/provider/source_slack_resource_sdk.go @@ -9,33 +9,35 @@ import ( ) func (r *SourceSlackResourceModel) ToCreateSDKType() *shared.SourceSlackCreateRequest { - channelFilter := make([]string, 0) + var channelFilter []string = nil for _, channelFilterItem := range r.Configuration.ChannelFilter { channelFilter = append(channelFilter, channelFilterItem.ValueString()) } var credentials *shared.SourceSlackAuthenticationMechanism - var sourceSlackAuthenticationMechanismSignInViaSlackOAuth *shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuth - if r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken != nil { - optionTitle := shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuthOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken.OptionTitle.ValueString()) - sourceSlackAuthenticationMechanismSignInViaSlackOAuth = &shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuth{ - OptionTitle: optionTitle, + if r.Configuration.Credentials != nil { + var sourceSlackAuthenticationMechanismSignInViaSlackOAuth *shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuth + if r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken != nil { + optionTitle := shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuthOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken.OptionTitle.ValueString()) + sourceSlackAuthenticationMechanismSignInViaSlackOAuth = &shared.SourceSlackAuthenticationMechanismSignInViaSlackOAuth{ + OptionTitle: optionTitle, + } } - } - if sourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { - credentials = &shared.SourceSlackAuthenticationMechanism{ - SourceSlackAuthenticationMechanismSignInViaSlackOAuth: sourceSlackAuthenticationMechanismSignInViaSlackOAuth, + if sourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { + credentials = &shared.SourceSlackAuthenticationMechanism{ + SourceSlackAuthenticationMechanismSignInViaSlackOAuth: sourceSlackAuthenticationMechanismSignInViaSlackOAuth, + } } - } - var sourceSlackAuthenticationMechanismAPIToken *shared.SourceSlackAuthenticationMechanismAPIToken - if r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { - optionTitle1 := shared.SourceSlackAuthenticationMechanismAPITokenOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth.OptionTitle.ValueString()) - sourceSlackAuthenticationMechanismAPIToken = &shared.SourceSlackAuthenticationMechanismAPIToken{ - OptionTitle: optionTitle1, + var sourceSlackAuthenticationMechanismAPIToken *shared.SourceSlackAuthenticationMechanismAPIToken + if r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { + optionTitle1 := shared.SourceSlackAuthenticationMechanismAPITokenOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth.OptionTitle.ValueString()) + sourceSlackAuthenticationMechanismAPIToken = &shared.SourceSlackAuthenticationMechanismAPIToken{ + OptionTitle: optionTitle1, + } } - } - if sourceSlackAuthenticationMechanismAPIToken != nil { - credentials = &shared.SourceSlackAuthenticationMechanism{ - SourceSlackAuthenticationMechanismAPIToken: sourceSlackAuthenticationMechanismAPIToken, + if sourceSlackAuthenticationMechanismAPIToken != nil { + credentials = &shared.SourceSlackAuthenticationMechanism{ + SourceSlackAuthenticationMechanismAPIToken: sourceSlackAuthenticationMechanismAPIToken, + } } } joinChannels := r.Configuration.JoinChannels.ValueBool() @@ -73,33 +75,35 @@ func (r *SourceSlackResourceModel) ToGetSDKType() *shared.SourceSlackCreateReque } func (r *SourceSlackResourceModel) ToUpdateSDKType() *shared.SourceSlackPutRequest { - channelFilter := make([]string, 0) + var channelFilter []string = nil for _, channelFilterItem := range r.Configuration.ChannelFilter { channelFilter = append(channelFilter, channelFilterItem.ValueString()) } var credentials *shared.SourceSlackUpdateAuthenticationMechanism - var sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth *shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth - if r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken != nil { - optionTitle := shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuthOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken.OptionTitle.ValueString()) - sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth = &shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth{ - OptionTitle: optionTitle, + if r.Configuration.Credentials != nil { + var sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth *shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth + if r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken != nil { + optionTitle := shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuthOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismAPIToken.OptionTitle.ValueString()) + sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth = &shared.SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth{ + OptionTitle: optionTitle, + } } - } - if sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth != nil { - credentials = &shared.SourceSlackUpdateAuthenticationMechanism{ - SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth: sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth, + if sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth != nil { + credentials = &shared.SourceSlackUpdateAuthenticationMechanism{ + SourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth: sourceSlackUpdateAuthenticationMechanismSignInViaSlackOAuth, + } } - } - var sourceSlackUpdateAuthenticationMechanismAPIToken *shared.SourceSlackUpdateAuthenticationMechanismAPIToken - if r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { - optionTitle1 := shared.SourceSlackUpdateAuthenticationMechanismAPITokenOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth.OptionTitle.ValueString()) - sourceSlackUpdateAuthenticationMechanismAPIToken = &shared.SourceSlackUpdateAuthenticationMechanismAPIToken{ - OptionTitle: optionTitle1, + var sourceSlackUpdateAuthenticationMechanismAPIToken *shared.SourceSlackUpdateAuthenticationMechanismAPIToken + if r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth != nil { + optionTitle1 := shared.SourceSlackUpdateAuthenticationMechanismAPITokenOptionTitle(r.Configuration.Credentials.SourceSlackAuthenticationMechanismSignInViaSlackOAuth.OptionTitle.ValueString()) + sourceSlackUpdateAuthenticationMechanismAPIToken = &shared.SourceSlackUpdateAuthenticationMechanismAPIToken{ + OptionTitle: optionTitle1, + } } - } - if sourceSlackUpdateAuthenticationMechanismAPIToken != nil { - credentials = &shared.SourceSlackUpdateAuthenticationMechanism{ - SourceSlackUpdateAuthenticationMechanismAPIToken: sourceSlackUpdateAuthenticationMechanismAPIToken, + if sourceSlackUpdateAuthenticationMechanismAPIToken != nil { + credentials = &shared.SourceSlackUpdateAuthenticationMechanism{ + SourceSlackUpdateAuthenticationMechanismAPIToken: sourceSlackUpdateAuthenticationMechanismAPIToken, + } } } joinChannels := r.Configuration.JoinChannels.ValueBool() diff --git a/internal/provider/source_snowflake_resource_sdk.go b/internal/provider/source_snowflake_resource_sdk.go index cffd9d33d..376159b06 100755 --- a/internal/provider/source_snowflake_resource_sdk.go +++ b/internal/provider/source_snowflake_resource_sdk.go @@ -9,50 +9,52 @@ import ( func (r *SourceSnowflakeResourceModel) ToCreateSDKType() *shared.SourceSnowflakeCreateRequest { var credentials *shared.SourceSnowflakeAuthorizationMethod - var sourceSnowflakeAuthorizationMethodOAuth20 *shared.SourceSnowflakeAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceSnowflakeAuthorizationMethodOAuth20 *shared.SourceSnowflakeAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := shared.SourceSnowflakeAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) + clientID := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientSecret.ValueString() + refreshToken := new(string) + if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsNull() { + *refreshToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.ValueString() + } else { + refreshToken = nil + } + sourceSnowflakeAuthorizationMethodOAuth20 = &shared.SourceSnowflakeAuthorizationMethodOAuth20{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := shared.SourceSnowflakeAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) - clientID := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientSecret.ValueString() - refreshToken := new(string) - if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsNull() { - *refreshToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.ValueString() - } else { - refreshToken = nil + if sourceSnowflakeAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceSnowflakeAuthorizationMethod{ + SourceSnowflakeAuthorizationMethodOAuth20: sourceSnowflakeAuthorizationMethodOAuth20, + } } - sourceSnowflakeAuthorizationMethodOAuth20 = &shared.SourceSnowflakeAuthorizationMethodOAuth20{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceSnowflakeAuthorizationMethodUsernameAndPassword *shared.SourceSnowflakeAuthorizationMethodUsernameAndPassword + if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { + authType1 := shared.SourceSnowflakeAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) + password := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() + username := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Username.ValueString() + sourceSnowflakeAuthorizationMethodUsernameAndPassword = &shared.SourceSnowflakeAuthorizationMethodUsernameAndPassword{ + AuthType: authType1, + Password: password, + Username: username, + } } - } - if sourceSnowflakeAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceSnowflakeAuthorizationMethod{ - SourceSnowflakeAuthorizationMethodOAuth20: sourceSnowflakeAuthorizationMethodOAuth20, - } - } - var sourceSnowflakeAuthorizationMethodUsernameAndPassword *shared.SourceSnowflakeAuthorizationMethodUsernameAndPassword - if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { - authType1 := shared.SourceSnowflakeAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) - password := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() - username := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Username.ValueString() - sourceSnowflakeAuthorizationMethodUsernameAndPassword = &shared.SourceSnowflakeAuthorizationMethodUsernameAndPassword{ - AuthType: authType1, - Password: password, - Username: username, - } - } - if sourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { - credentials = &shared.SourceSnowflakeAuthorizationMethod{ - SourceSnowflakeAuthorizationMethodUsernameAndPassword: sourceSnowflakeAuthorizationMethodUsernameAndPassword, + if sourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { + credentials = &shared.SourceSnowflakeAuthorizationMethod{ + SourceSnowflakeAuthorizationMethodUsernameAndPassword: sourceSnowflakeAuthorizationMethodUsernameAndPassword, + } } } database := r.Configuration.Database.ValueString() @@ -106,50 +108,52 @@ func (r *SourceSnowflakeResourceModel) ToGetSDKType() *shared.SourceSnowflakeCre func (r *SourceSnowflakeResourceModel) ToUpdateSDKType() *shared.SourceSnowflakePutRequest { var credentials *shared.SourceSnowflakeUpdateAuthorizationMethod - var sourceSnowflakeUpdateAuthorizationMethodOAuth20 *shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20 != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceSnowflakeUpdateAuthorizationMethodOAuth20 *shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20 != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AccessToken.ValueString() + } else { + accessToken = nil + } + authType := shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) + clientID := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientID.ValueString() + clientSecret := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientSecret.ValueString() + refreshToken := new(string) + if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsNull() { + *refreshToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.ValueString() + } else { + refreshToken = nil + } + sourceSnowflakeUpdateAuthorizationMethodOAuth20 = &shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20{ + AccessToken: accessToken, + AuthType: authType, + ClientID: clientID, + ClientSecret: clientSecret, + RefreshToken: refreshToken, + } } - authType := shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20AuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.AuthType.ValueString()) - clientID := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientID.ValueString() - clientSecret := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.ClientSecret.ValueString() - refreshToken := new(string) - if !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsUnknown() && !r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.IsNull() { - *refreshToken = r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodOAuth20.RefreshToken.ValueString() - } else { - refreshToken = nil + if sourceSnowflakeUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceSnowflakeUpdateAuthorizationMethod{ + SourceSnowflakeUpdateAuthorizationMethodOAuth20: sourceSnowflakeUpdateAuthorizationMethodOAuth20, + } } - sourceSnowflakeUpdateAuthorizationMethodOAuth20 = &shared.SourceSnowflakeUpdateAuthorizationMethodOAuth20{ - AccessToken: accessToken, - AuthType: authType, - ClientID: clientID, - ClientSecret: clientSecret, - RefreshToken: refreshToken, + var sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword *shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword + if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { + authType1 := shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) + password := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() + username := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Username.ValueString() + sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword = &shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword{ + AuthType: authType1, + Password: password, + Username: username, + } } - } - if sourceSnowflakeUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceSnowflakeUpdateAuthorizationMethod{ - SourceSnowflakeUpdateAuthorizationMethodOAuth20: sourceSnowflakeUpdateAuthorizationMethodOAuth20, - } - } - var sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword *shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword - if r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword != nil { - authType1 := shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPasswordAuthType(r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.AuthType.ValueString()) - password := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Password.ValueString() - username := r.Configuration.Credentials.SourceSnowflakeAuthorizationMethodUsernameAndPassword.Username.ValueString() - sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword = &shared.SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword{ - AuthType: authType1, - Password: password, - Username: username, - } - } - if sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword != nil { - credentials = &shared.SourceSnowflakeUpdateAuthorizationMethod{ - SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword: sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword, + if sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword != nil { + credentials = &shared.SourceSnowflakeUpdateAuthorizationMethod{ + SourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword: sourceSnowflakeUpdateAuthorizationMethodUsernameAndPassword, + } } } database := r.Configuration.Database.ValueString() diff --git a/internal/provider/source_sonarcloud_resource_sdk.go b/internal/provider/source_sonarcloud_resource_sdk.go index 04f6a84a1..1bfbf7e12 100755 --- a/internal/provider/source_sonarcloud_resource_sdk.go +++ b/internal/provider/source_sonarcloud_resource_sdk.go @@ -10,7 +10,7 @@ import ( ) func (r *SourceSonarCloudResourceModel) ToCreateSDKType() *shared.SourceSonarCloudCreateRequest { - componentKeys := make([]interface{}, 0) + var componentKeys []interface{} = nil for _, componentKeysItem := range r.Configuration.ComponentKeys { var componentKeysTmp interface{} _ = json.Unmarshal([]byte(componentKeysItem.ValueString()), &componentKeysTmp) @@ -62,7 +62,7 @@ func (r *SourceSonarCloudResourceModel) ToGetSDKType() *shared.SourceSonarCloudC } func (r *SourceSonarCloudResourceModel) ToUpdateSDKType() *shared.SourceSonarCloudPutRequest { - componentKeys := make([]interface{}, 0) + var componentKeys []interface{} = nil for _, componentKeysItem := range r.Configuration.ComponentKeys { var componentKeysTmp interface{} _ = json.Unmarshal([]byte(componentKeysItem.ValueString()), &componentKeysTmp) diff --git a/internal/provider/source_square_resource_sdk.go b/internal/provider/source_square_resource_sdk.go index 78acc6098..87ea8bd61 100755 --- a/internal/provider/source_square_resource_sdk.go +++ b/internal/provider/source_square_resource_sdk.go @@ -10,28 +10,30 @@ import ( func (r *SourceSquareResourceModel) ToCreateSDKType() *shared.SourceSquareCreateRequest { var credentials *shared.SourceSquareAuthentication - var sourceSquareAuthenticationOauthAuthentication *shared.SourceSquareAuthenticationOauthAuthentication - if r.Configuration.Credentials.SourceSquareAuthenticationAPIKey != nil { - authType := shared.SourceSquareAuthenticationOauthAuthenticationAuthType(r.Configuration.Credentials.SourceSquareAuthenticationAPIKey.AuthType.ValueString()) - sourceSquareAuthenticationOauthAuthentication = &shared.SourceSquareAuthenticationOauthAuthentication{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceSquareAuthenticationOauthAuthentication *shared.SourceSquareAuthenticationOauthAuthentication + if r.Configuration.Credentials.SourceSquareAuthenticationAPIKey != nil { + authType := shared.SourceSquareAuthenticationOauthAuthenticationAuthType(r.Configuration.Credentials.SourceSquareAuthenticationAPIKey.AuthType.ValueString()) + sourceSquareAuthenticationOauthAuthentication = &shared.SourceSquareAuthenticationOauthAuthentication{ + AuthType: authType, + } } - } - if sourceSquareAuthenticationOauthAuthentication != nil { - credentials = &shared.SourceSquareAuthentication{ - SourceSquareAuthenticationOauthAuthentication: sourceSquareAuthenticationOauthAuthentication, + if sourceSquareAuthenticationOauthAuthentication != nil { + credentials = &shared.SourceSquareAuthentication{ + SourceSquareAuthenticationOauthAuthentication: sourceSquareAuthenticationOauthAuthentication, + } } - } - var sourceSquareAuthenticationAPIKey *shared.SourceSquareAuthenticationAPIKey - if r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication != nil { - authType1 := shared.SourceSquareAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication.AuthType.ValueString()) - sourceSquareAuthenticationAPIKey = &shared.SourceSquareAuthenticationAPIKey{ - AuthType: authType1, + var sourceSquareAuthenticationAPIKey *shared.SourceSquareAuthenticationAPIKey + if r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication != nil { + authType1 := shared.SourceSquareAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication.AuthType.ValueString()) + sourceSquareAuthenticationAPIKey = &shared.SourceSquareAuthenticationAPIKey{ + AuthType: authType1, + } } - } - if sourceSquareAuthenticationAPIKey != nil { - credentials = &shared.SourceSquareAuthentication{ - SourceSquareAuthenticationAPIKey: sourceSquareAuthenticationAPIKey, + if sourceSquareAuthenticationAPIKey != nil { + credentials = &shared.SourceSquareAuthentication{ + SourceSquareAuthenticationAPIKey: sourceSquareAuthenticationAPIKey, + } } } includeDeletedObjects := new(bool) @@ -79,28 +81,30 @@ func (r *SourceSquareResourceModel) ToGetSDKType() *shared.SourceSquareCreateReq func (r *SourceSquareResourceModel) ToUpdateSDKType() *shared.SourceSquarePutRequest { var credentials *shared.SourceSquareUpdateAuthentication - var sourceSquareUpdateAuthenticationOauthAuthentication *shared.SourceSquareUpdateAuthenticationOauthAuthentication - if r.Configuration.Credentials.SourceSquareAuthenticationAPIKey != nil { - authType := shared.SourceSquareUpdateAuthenticationOauthAuthenticationAuthType(r.Configuration.Credentials.SourceSquareAuthenticationAPIKey.AuthType.ValueString()) - sourceSquareUpdateAuthenticationOauthAuthentication = &shared.SourceSquareUpdateAuthenticationOauthAuthentication{ - AuthType: authType, + if r.Configuration.Credentials != nil { + var sourceSquareUpdateAuthenticationOauthAuthentication *shared.SourceSquareUpdateAuthenticationOauthAuthentication + if r.Configuration.Credentials.SourceSquareAuthenticationAPIKey != nil { + authType := shared.SourceSquareUpdateAuthenticationOauthAuthenticationAuthType(r.Configuration.Credentials.SourceSquareAuthenticationAPIKey.AuthType.ValueString()) + sourceSquareUpdateAuthenticationOauthAuthentication = &shared.SourceSquareUpdateAuthenticationOauthAuthentication{ + AuthType: authType, + } } - } - if sourceSquareUpdateAuthenticationOauthAuthentication != nil { - credentials = &shared.SourceSquareUpdateAuthentication{ - SourceSquareUpdateAuthenticationOauthAuthentication: sourceSquareUpdateAuthenticationOauthAuthentication, + if sourceSquareUpdateAuthenticationOauthAuthentication != nil { + credentials = &shared.SourceSquareUpdateAuthentication{ + SourceSquareUpdateAuthenticationOauthAuthentication: sourceSquareUpdateAuthenticationOauthAuthentication, + } } - } - var sourceSquareUpdateAuthenticationAPIKey *shared.SourceSquareUpdateAuthenticationAPIKey - if r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication != nil { - authType1 := shared.SourceSquareUpdateAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication.AuthType.ValueString()) - sourceSquareUpdateAuthenticationAPIKey = &shared.SourceSquareUpdateAuthenticationAPIKey{ - AuthType: authType1, + var sourceSquareUpdateAuthenticationAPIKey *shared.SourceSquareUpdateAuthenticationAPIKey + if r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication != nil { + authType1 := shared.SourceSquareUpdateAuthenticationAPIKeyAuthType(r.Configuration.Credentials.SourceSquareAuthenticationOauthAuthentication.AuthType.ValueString()) + sourceSquareUpdateAuthenticationAPIKey = &shared.SourceSquareUpdateAuthenticationAPIKey{ + AuthType: authType1, + } } - } - if sourceSquareUpdateAuthenticationAPIKey != nil { - credentials = &shared.SourceSquareUpdateAuthentication{ - SourceSquareUpdateAuthenticationAPIKey: sourceSquareUpdateAuthenticationAPIKey, + if sourceSquareUpdateAuthenticationAPIKey != nil { + credentials = &shared.SourceSquareUpdateAuthentication{ + SourceSquareUpdateAuthenticationAPIKey: sourceSquareUpdateAuthenticationAPIKey, + } } } includeDeletedObjects := new(bool) diff --git a/internal/provider/source_surveymonkey_resource_sdk.go b/internal/provider/source_surveymonkey_resource_sdk.go index 679f3163e..f852d1b72 100755 --- a/internal/provider/source_surveymonkey_resource_sdk.go +++ b/internal/provider/source_surveymonkey_resource_sdk.go @@ -40,7 +40,7 @@ func (r *SourceSurveymonkeyResourceModel) ToCreateSDKType() *shared.SourceSurvey } sourceType := shared.SourceSurveymonkeySurveymonkey(r.Configuration.SourceType.ValueString()) startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) - surveyIds := make([]string, 0) + var surveyIds []string = nil for _, surveyIdsItem := range r.Configuration.SurveyIds { surveyIds = append(surveyIds, surveyIdsItem.ValueString()) } @@ -104,7 +104,7 @@ func (r *SourceSurveymonkeyResourceModel) ToUpdateSDKType() *shared.SourceSurvey origin = nil } startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) - surveyIds := make([]string, 0) + var surveyIds []string = nil for _, surveyIdsItem := range r.Configuration.SurveyIds { surveyIds = append(surveyIds, surveyIdsItem.ValueString()) } diff --git a/internal/provider/source_surveysparrow_resource_sdk.go b/internal/provider/source_surveysparrow_resource_sdk.go index 36f03a8d9..a38bfdd19 100755 --- a/internal/provider/source_surveysparrow_resource_sdk.go +++ b/internal/provider/source_surveysparrow_resource_sdk.go @@ -11,42 +11,44 @@ import ( func (r *SourceSurveySparrowResourceModel) ToCreateSDKType() *shared.SourceSurveySparrowCreateRequest { accessToken := r.Configuration.AccessToken.ValueString() var region *shared.SourceSurveySparrowBaseURL - var sourceSurveySparrowBaseURLEUBasedAccount *shared.SourceSurveySparrowBaseURLEUBasedAccount - if r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount != nil { - urlBase := new(shared.SourceSurveySparrowBaseURLEUBasedAccountURLBase) - if !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsNull() { - *urlBase = shared.SourceSurveySparrowBaseURLEUBasedAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.ValueString()) - } else { - urlBase = nil + if r.Configuration.Region != nil { + var sourceSurveySparrowBaseURLEUBasedAccount *shared.SourceSurveySparrowBaseURLEUBasedAccount + if r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount != nil { + urlBase := new(shared.SourceSurveySparrowBaseURLEUBasedAccountURLBase) + if !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsNull() { + *urlBase = shared.SourceSurveySparrowBaseURLEUBasedAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.ValueString()) + } else { + urlBase = nil + } + sourceSurveySparrowBaseURLEUBasedAccount = &shared.SourceSurveySparrowBaseURLEUBasedAccount{ + URLBase: urlBase, + } } - sourceSurveySparrowBaseURLEUBasedAccount = &shared.SourceSurveySparrowBaseURLEUBasedAccount{ - URLBase: urlBase, + if sourceSurveySparrowBaseURLEUBasedAccount != nil { + region = &shared.SourceSurveySparrowBaseURL{ + SourceSurveySparrowBaseURLEUBasedAccount: sourceSurveySparrowBaseURLEUBasedAccount, + } } - } - if sourceSurveySparrowBaseURLEUBasedAccount != nil { - region = &shared.SourceSurveySparrowBaseURL{ - SourceSurveySparrowBaseURLEUBasedAccount: sourceSurveySparrowBaseURLEUBasedAccount, - } - } - var sourceSurveySparrowBaseURLGlobalAccount *shared.SourceSurveySparrowBaseURLGlobalAccount - if r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount != nil { - urlBase1 := new(shared.SourceSurveySparrowBaseURLGlobalAccountURLBase) - if !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsNull() { - *urlBase1 = shared.SourceSurveySparrowBaseURLGlobalAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.ValueString()) - } else { - urlBase1 = nil + var sourceSurveySparrowBaseURLGlobalAccount *shared.SourceSurveySparrowBaseURLGlobalAccount + if r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount != nil { + urlBase1 := new(shared.SourceSurveySparrowBaseURLGlobalAccountURLBase) + if !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsNull() { + *urlBase1 = shared.SourceSurveySparrowBaseURLGlobalAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.ValueString()) + } else { + urlBase1 = nil + } + sourceSurveySparrowBaseURLGlobalAccount = &shared.SourceSurveySparrowBaseURLGlobalAccount{ + URLBase: urlBase1, + } } - sourceSurveySparrowBaseURLGlobalAccount = &shared.SourceSurveySparrowBaseURLGlobalAccount{ - URLBase: urlBase1, - } - } - if sourceSurveySparrowBaseURLGlobalAccount != nil { - region = &shared.SourceSurveySparrowBaseURL{ - SourceSurveySparrowBaseURLGlobalAccount: sourceSurveySparrowBaseURLGlobalAccount, + if sourceSurveySparrowBaseURLGlobalAccount != nil { + region = &shared.SourceSurveySparrowBaseURL{ + SourceSurveySparrowBaseURLGlobalAccount: sourceSurveySparrowBaseURLGlobalAccount, + } } } sourceType := shared.SourceSurveySparrowSurveySparrow(r.Configuration.SourceType.ValueString()) - surveyID := make([]interface{}, 0) + var surveyID []interface{} = nil for _, surveyIDItem := range r.Configuration.SurveyID { var surveyIDTmp interface{} _ = json.Unmarshal([]byte(surveyIDItem.ValueString()), &surveyIDTmp) @@ -83,41 +85,43 @@ func (r *SourceSurveySparrowResourceModel) ToGetSDKType() *shared.SourceSurveySp func (r *SourceSurveySparrowResourceModel) ToUpdateSDKType() *shared.SourceSurveySparrowPutRequest { accessToken := r.Configuration.AccessToken.ValueString() var region *shared.SourceSurveySparrowUpdateBaseURL - var sourceSurveySparrowUpdateBaseURLEUBasedAccount *shared.SourceSurveySparrowUpdateBaseURLEUBasedAccount - if r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount != nil { - urlBase := new(shared.SourceSurveySparrowUpdateBaseURLEUBasedAccountURLBase) - if !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsNull() { - *urlBase = shared.SourceSurveySparrowUpdateBaseURLEUBasedAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.ValueString()) - } else { - urlBase = nil + if r.Configuration.Region != nil { + var sourceSurveySparrowUpdateBaseURLEUBasedAccount *shared.SourceSurveySparrowUpdateBaseURLEUBasedAccount + if r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount != nil { + urlBase := new(shared.SourceSurveySparrowUpdateBaseURLEUBasedAccountURLBase) + if !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.IsNull() { + *urlBase = shared.SourceSurveySparrowUpdateBaseURLEUBasedAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLEUBasedAccount.URLBase.ValueString()) + } else { + urlBase = nil + } + sourceSurveySparrowUpdateBaseURLEUBasedAccount = &shared.SourceSurveySparrowUpdateBaseURLEUBasedAccount{ + URLBase: urlBase, + } } - sourceSurveySparrowUpdateBaseURLEUBasedAccount = &shared.SourceSurveySparrowUpdateBaseURLEUBasedAccount{ - URLBase: urlBase, + if sourceSurveySparrowUpdateBaseURLEUBasedAccount != nil { + region = &shared.SourceSurveySparrowUpdateBaseURL{ + SourceSurveySparrowUpdateBaseURLEUBasedAccount: sourceSurveySparrowUpdateBaseURLEUBasedAccount, + } } - } - if sourceSurveySparrowUpdateBaseURLEUBasedAccount != nil { - region = &shared.SourceSurveySparrowUpdateBaseURL{ - SourceSurveySparrowUpdateBaseURLEUBasedAccount: sourceSurveySparrowUpdateBaseURLEUBasedAccount, - } - } - var sourceSurveySparrowUpdateBaseURLGlobalAccount *shared.SourceSurveySparrowUpdateBaseURLGlobalAccount - if r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount != nil { - urlBase1 := new(shared.SourceSurveySparrowUpdateBaseURLGlobalAccountURLBase) - if !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsNull() { - *urlBase1 = shared.SourceSurveySparrowUpdateBaseURLGlobalAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.ValueString()) - } else { - urlBase1 = nil + var sourceSurveySparrowUpdateBaseURLGlobalAccount *shared.SourceSurveySparrowUpdateBaseURLGlobalAccount + if r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount != nil { + urlBase1 := new(shared.SourceSurveySparrowUpdateBaseURLGlobalAccountURLBase) + if !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsUnknown() && !r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.IsNull() { + *urlBase1 = shared.SourceSurveySparrowUpdateBaseURLGlobalAccountURLBase(r.Configuration.Region.SourceSurveySparrowBaseURLGlobalAccount.URLBase.ValueString()) + } else { + urlBase1 = nil + } + sourceSurveySparrowUpdateBaseURLGlobalAccount = &shared.SourceSurveySparrowUpdateBaseURLGlobalAccount{ + URLBase: urlBase1, + } } - sourceSurveySparrowUpdateBaseURLGlobalAccount = &shared.SourceSurveySparrowUpdateBaseURLGlobalAccount{ - URLBase: urlBase1, - } - } - if sourceSurveySparrowUpdateBaseURLGlobalAccount != nil { - region = &shared.SourceSurveySparrowUpdateBaseURL{ - SourceSurveySparrowUpdateBaseURLGlobalAccount: sourceSurveySparrowUpdateBaseURLGlobalAccount, + if sourceSurveySparrowUpdateBaseURLGlobalAccount != nil { + region = &shared.SourceSurveySparrowUpdateBaseURL{ + SourceSurveySparrowUpdateBaseURLGlobalAccount: sourceSurveySparrowUpdateBaseURLGlobalAccount, + } } } - surveyID := make([]interface{}, 0) + var surveyID []interface{} = nil for _, surveyIDItem := range r.Configuration.SurveyID { var surveyIDTmp interface{} _ = json.Unmarshal([]byte(surveyIDItem.ValueString()), &surveyIDTmp) diff --git a/internal/provider/source_tiktokmarketing_resource_sdk.go b/internal/provider/source_tiktokmarketing_resource_sdk.go index dea5c7b96..e97a6e850 100755 --- a/internal/provider/source_tiktokmarketing_resource_sdk.go +++ b/internal/provider/source_tiktokmarketing_resource_sdk.go @@ -16,55 +16,57 @@ func (r *SourceTiktokMarketingResourceModel) ToCreateSDKType() *shared.SourceTik attributionWindow = nil } var credentials *shared.SourceTiktokMarketingAuthenticationMethod - var sourceTiktokMarketingAuthenticationMethodOAuth20 *shared.SourceTiktokMarketingAuthenticationMethodOAuth20 - if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20 != nil { - accessToken := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AccessToken.ValueString() - advertiserID := new(string) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsNull() { - *advertiserID = r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.ValueString() - } else { - advertiserID = nil + if r.Configuration.Credentials != nil { + var sourceTiktokMarketingAuthenticationMethodOAuth20 *shared.SourceTiktokMarketingAuthenticationMethodOAuth20 + if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20 != nil { + accessToken := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AccessToken.ValueString() + advertiserID := new(string) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsNull() { + *advertiserID = r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.ValueString() + } else { + advertiserID = nil + } + appID := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AppID.ValueString() + authType := new(shared.SourceTiktokMarketingAuthenticationMethodOAuth20AuthType) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsNull() { + *authType = shared.SourceTiktokMarketingAuthenticationMethodOAuth20AuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.ValueString()) + } else { + authType = nil + } + secret := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.Secret.ValueString() + sourceTiktokMarketingAuthenticationMethodOAuth20 = &shared.SourceTiktokMarketingAuthenticationMethodOAuth20{ + AccessToken: accessToken, + AdvertiserID: advertiserID, + AppID: appID, + AuthType: authType, + Secret: secret, + } } - appID := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AppID.ValueString() - authType := new(shared.SourceTiktokMarketingAuthenticationMethodOAuth20AuthType) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsNull() { - *authType = shared.SourceTiktokMarketingAuthenticationMethodOAuth20AuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.ValueString()) - } else { - authType = nil + if sourceTiktokMarketingAuthenticationMethodOAuth20 != nil { + credentials = &shared.SourceTiktokMarketingAuthenticationMethod{ + SourceTiktokMarketingAuthenticationMethodOAuth20: sourceTiktokMarketingAuthenticationMethodOAuth20, + } } - secret := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.Secret.ValueString() - sourceTiktokMarketingAuthenticationMethodOAuth20 = &shared.SourceTiktokMarketingAuthenticationMethodOAuth20{ - AccessToken: accessToken, - AdvertiserID: advertiserID, - AppID: appID, - AuthType: authType, - Secret: secret, + var sourceTiktokMarketingAuthenticationMethodSandboxAccessToken *shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken + if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { + accessToken1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AccessToken.ValueString() + advertiserId1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AdvertiserID.ValueString() + authType1 := new(shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessTokenAuthType) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsNull() { + *authType1 = shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessTokenAuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.ValueString()) + } else { + authType1 = nil + } + sourceTiktokMarketingAuthenticationMethodSandboxAccessToken = &shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken{ + AccessToken: accessToken1, + AdvertiserID: advertiserId1, + AuthType: authType1, + } } - } - if sourceTiktokMarketingAuthenticationMethodOAuth20 != nil { - credentials = &shared.SourceTiktokMarketingAuthenticationMethod{ - SourceTiktokMarketingAuthenticationMethodOAuth20: sourceTiktokMarketingAuthenticationMethodOAuth20, - } - } - var sourceTiktokMarketingAuthenticationMethodSandboxAccessToken *shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken - if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { - accessToken1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AccessToken.ValueString() - advertiserId1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AdvertiserID.ValueString() - authType1 := new(shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessTokenAuthType) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsNull() { - *authType1 = shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessTokenAuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.ValueString()) - } else { - authType1 = nil - } - sourceTiktokMarketingAuthenticationMethodSandboxAccessToken = &shared.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken{ - AccessToken: accessToken1, - AdvertiserID: advertiserId1, - AuthType: authType1, - } - } - if sourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { - credentials = &shared.SourceTiktokMarketingAuthenticationMethod{ - SourceTiktokMarketingAuthenticationMethodSandboxAccessToken: sourceTiktokMarketingAuthenticationMethodSandboxAccessToken, + if sourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { + credentials = &shared.SourceTiktokMarketingAuthenticationMethod{ + SourceTiktokMarketingAuthenticationMethodSandboxAccessToken: sourceTiktokMarketingAuthenticationMethodSandboxAccessToken, + } } } endDate := new(customTypes.Date) @@ -122,55 +124,57 @@ func (r *SourceTiktokMarketingResourceModel) ToUpdateSDKType() *shared.SourceTik attributionWindow = nil } var credentials *shared.SourceTiktokMarketingUpdateAuthenticationMethod - var sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 *shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20 - if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20 != nil { - accessToken := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AccessToken.ValueString() - advertiserID := new(string) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsNull() { - *advertiserID = r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.ValueString() - } else { - advertiserID = nil + if r.Configuration.Credentials != nil { + var sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 *shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20 + if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20 != nil { + accessToken := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AccessToken.ValueString() + advertiserID := new(string) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.IsNull() { + *advertiserID = r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AdvertiserID.ValueString() + } else { + advertiserID = nil + } + appID := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AppID.ValueString() + authType := new(shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20AuthType) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsNull() { + *authType = shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20AuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.ValueString()) + } else { + authType = nil + } + secret := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.Secret.ValueString() + sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 = &shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20{ + AccessToken: accessToken, + AdvertiserID: advertiserID, + AppID: appID, + AuthType: authType, + Secret: secret, + } } - appID := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AppID.ValueString() - authType := new(shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20AuthType) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.IsNull() { - *authType = shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20AuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.AuthType.ValueString()) - } else { - authType = nil + if sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 != nil { + credentials = &shared.SourceTiktokMarketingUpdateAuthenticationMethod{ + SourceTiktokMarketingUpdateAuthenticationMethodOAuth20: sourceTiktokMarketingUpdateAuthenticationMethodOAuth20, + } } - secret := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodOAuth20.Secret.ValueString() - sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 = &shared.SourceTiktokMarketingUpdateAuthenticationMethodOAuth20{ - AccessToken: accessToken, - AdvertiserID: advertiserID, - AppID: appID, - AuthType: authType, - Secret: secret, + var sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken *shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken + if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { + accessToken1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AccessToken.ValueString() + advertiserId1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AdvertiserID.ValueString() + authType1 := new(shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessTokenAuthType) + if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsNull() { + *authType1 = shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessTokenAuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.ValueString()) + } else { + authType1 = nil + } + sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken = &shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken{ + AccessToken: accessToken1, + AdvertiserID: advertiserId1, + AuthType: authType1, + } } - } - if sourceTiktokMarketingUpdateAuthenticationMethodOAuth20 != nil { - credentials = &shared.SourceTiktokMarketingUpdateAuthenticationMethod{ - SourceTiktokMarketingUpdateAuthenticationMethodOAuth20: sourceTiktokMarketingUpdateAuthenticationMethodOAuth20, - } - } - var sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken *shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken - if r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken != nil { - accessToken1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AccessToken.ValueString() - advertiserId1 := r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AdvertiserID.ValueString() - authType1 := new(shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessTokenAuthType) - if !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.IsNull() { - *authType1 = shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessTokenAuthType(r.Configuration.Credentials.SourceTiktokMarketingAuthenticationMethodSandboxAccessToken.AuthType.ValueString()) - } else { - authType1 = nil - } - sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken = &shared.SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken{ - AccessToken: accessToken1, - AdvertiserID: advertiserId1, - AuthType: authType1, - } - } - if sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken != nil { - credentials = &shared.SourceTiktokMarketingUpdateAuthenticationMethod{ - SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken: sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken, + if sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken != nil { + credentials = &shared.SourceTiktokMarketingUpdateAuthenticationMethod{ + SourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken: sourceTiktokMarketingUpdateAuthenticationMethodSandboxAccessToken, + } } } endDate := new(customTypes.Date) diff --git a/internal/provider/source_trello_resource_sdk.go b/internal/provider/source_trello_resource_sdk.go index 1aedbae1a..94418a2d9 100755 --- a/internal/provider/source_trello_resource_sdk.go +++ b/internal/provider/source_trello_resource_sdk.go @@ -9,7 +9,7 @@ import ( ) func (r *SourceTrelloResourceModel) ToCreateSDKType() *shared.SourceTrelloCreateRequest { - boardIds := make([]string, 0) + var boardIds []string = nil for _, boardIdsItem := range r.Configuration.BoardIds { boardIds = append(boardIds, boardIdsItem.ValueString()) } @@ -47,7 +47,7 @@ func (r *SourceTrelloResourceModel) ToGetSDKType() *shared.SourceTrelloCreateReq } func (r *SourceTrelloResourceModel) ToUpdateSDKType() *shared.SourceTrelloPutRequest { - boardIds := make([]string, 0) + var boardIds []string = nil for _, boardIdsItem := range r.Configuration.BoardIds { boardIds = append(boardIds, boardIdsItem.ValueString()) } diff --git a/internal/provider/source_trustpilot_resource_sdk.go b/internal/provider/source_trustpilot_resource_sdk.go index c81f8f16f..9d2945da3 100755 --- a/internal/provider/source_trustpilot_resource_sdk.go +++ b/internal/provider/source_trustpilot_resource_sdk.go @@ -8,7 +8,7 @@ import ( ) func (r *SourceTrustpilotResourceModel) ToCreateSDKType() *shared.SourceTrustpilotCreateRequest { - businessUnits := make([]string, 0) + var businessUnits []string = nil for _, businessUnitsItem := range r.Configuration.BusinessUnits { businessUnits = append(businessUnits, businessUnitsItem.ValueString()) } @@ -82,7 +82,7 @@ func (r *SourceTrustpilotResourceModel) ToGetSDKType() *shared.SourceTrustpilotC } func (r *SourceTrustpilotResourceModel) ToUpdateSDKType() *shared.SourceTrustpilotPutRequest { - businessUnits := make([]string, 0) + var businessUnits []string = nil for _, businessUnitsItem := range r.Configuration.BusinessUnits { businessUnits = append(businessUnits, businessUnitsItem.ValueString()) } diff --git a/internal/provider/source_typeform_resource_sdk.go b/internal/provider/source_typeform_resource_sdk.go index 764f18cb7..d25eee9c4 100755 --- a/internal/provider/source_typeform_resource_sdk.go +++ b/internal/provider/source_typeform_resource_sdk.go @@ -9,7 +9,7 @@ import ( ) func (r *SourceTypeformResourceModel) ToCreateSDKType() *shared.SourceTypeformCreateRequest { - formIds := make([]string, 0) + var formIds []string = nil for _, formIdsItem := range r.Configuration.FormIds { formIds = append(formIds, formIdsItem.ValueString()) } @@ -45,7 +45,7 @@ func (r *SourceTypeformResourceModel) ToGetSDKType() *shared.SourceTypeformCreat } func (r *SourceTypeformResourceModel) ToUpdateSDKType() *shared.SourceTypeformPutRequest { - formIds := make([]string, 0) + var formIds []string = nil for _, formIdsItem := range r.Configuration.FormIds { formIds = append(formIds, formIdsItem.ValueString()) } diff --git a/internal/provider/source_zendeskchat_resource_sdk.go b/internal/provider/source_zendeskchat_resource_sdk.go index 5de056643..cdb1c616c 100755 --- a/internal/provider/source_zendeskchat_resource_sdk.go +++ b/internal/provider/source_zendeskchat_resource_sdk.go @@ -10,37 +10,39 @@ import ( func (r *SourceZendeskChatResourceModel) ToCreateSDKType() *shared.SourceZendeskChatCreateRequest { var credentials *shared.SourceZendeskChatAuthorizationMethod - var sourceZendeskChatAuthorizationMethodOAuth20 *shared.SourceZendeskChatAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceZendeskChatAuthorizationMethodOAuth20 *shared.SourceZendeskChatAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.ValueString() + } else { + accessToken = nil + } + credentials1 := shared.SourceZendeskChatAuthorizationMethodOAuth20Credentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.Credentials.ValueString()) + sourceZendeskChatAuthorizationMethodOAuth20 = &shared.SourceZendeskChatAuthorizationMethodOAuth20{ + AccessToken: accessToken, + Credentials: credentials1, + } } - credentials1 := shared.SourceZendeskChatAuthorizationMethodOAuth20Credentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.Credentials.ValueString()) - sourceZendeskChatAuthorizationMethodOAuth20 = &shared.SourceZendeskChatAuthorizationMethodOAuth20{ - AccessToken: accessToken, - Credentials: credentials1, + if sourceZendeskChatAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceZendeskChatAuthorizationMethod{ + SourceZendeskChatAuthorizationMethodOAuth20: sourceZendeskChatAuthorizationMethodOAuth20, + } } - } - if sourceZendeskChatAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceZendeskChatAuthorizationMethod{ - SourceZendeskChatAuthorizationMethodOAuth20: sourceZendeskChatAuthorizationMethodOAuth20, - } - } - var sourceZendeskChatAuthorizationMethodAccessToken *shared.SourceZendeskChatAuthorizationMethodAccessToken - if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20 != nil { - accessToken1 := r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.AccessToken.ValueString() - credentials2 := shared.SourceZendeskChatAuthorizationMethodAccessTokenCredentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.Credentials.ValueString()) - sourceZendeskChatAuthorizationMethodAccessToken = &shared.SourceZendeskChatAuthorizationMethodAccessToken{ - AccessToken: accessToken1, - Credentials: credentials2, + var sourceZendeskChatAuthorizationMethodAccessToken *shared.SourceZendeskChatAuthorizationMethodAccessToken + if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20 != nil { + accessToken1 := r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.AccessToken.ValueString() + credentials2 := shared.SourceZendeskChatAuthorizationMethodAccessTokenCredentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.Credentials.ValueString()) + sourceZendeskChatAuthorizationMethodAccessToken = &shared.SourceZendeskChatAuthorizationMethodAccessToken{ + AccessToken: accessToken1, + Credentials: credentials2, + } } - } - if sourceZendeskChatAuthorizationMethodAccessToken != nil { - credentials = &shared.SourceZendeskChatAuthorizationMethod{ - SourceZendeskChatAuthorizationMethodAccessToken: sourceZendeskChatAuthorizationMethodAccessToken, + if sourceZendeskChatAuthorizationMethodAccessToken != nil { + credentials = &shared.SourceZendeskChatAuthorizationMethod{ + SourceZendeskChatAuthorizationMethodAccessToken: sourceZendeskChatAuthorizationMethodAccessToken, + } } } sourceType := shared.SourceZendeskChatZendeskChat(r.Configuration.SourceType.ValueString()) @@ -81,37 +83,39 @@ func (r *SourceZendeskChatResourceModel) ToGetSDKType() *shared.SourceZendeskCha func (r *SourceZendeskChatResourceModel) ToUpdateSDKType() *shared.SourceZendeskChatPutRequest { var credentials *shared.SourceZendeskChatUpdateAuthorizationMethod - var sourceZendeskChatUpdateAuthorizationMethodOAuth20 *shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken != nil { - accessToken := new(string) - if !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsNull() { - *accessToken = r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.ValueString() - } else { - accessToken = nil + if r.Configuration.Credentials != nil { + var sourceZendeskChatUpdateAuthorizationMethodOAuth20 *shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken != nil { + accessToken := new(string) + if !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsUnknown() && !r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.IsNull() { + *accessToken = r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.AccessToken.ValueString() + } else { + accessToken = nil + } + credentials1 := shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20Credentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.Credentials.ValueString()) + sourceZendeskChatUpdateAuthorizationMethodOAuth20 = &shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20{ + AccessToken: accessToken, + Credentials: credentials1, + } } - credentials1 := shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20Credentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodAccessToken.Credentials.ValueString()) - sourceZendeskChatUpdateAuthorizationMethodOAuth20 = &shared.SourceZendeskChatUpdateAuthorizationMethodOAuth20{ - AccessToken: accessToken, - Credentials: credentials1, + if sourceZendeskChatUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceZendeskChatUpdateAuthorizationMethod{ + SourceZendeskChatUpdateAuthorizationMethodOAuth20: sourceZendeskChatUpdateAuthorizationMethodOAuth20, + } } - } - if sourceZendeskChatUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceZendeskChatUpdateAuthorizationMethod{ - SourceZendeskChatUpdateAuthorizationMethodOAuth20: sourceZendeskChatUpdateAuthorizationMethodOAuth20, - } - } - var sourceZendeskChatUpdateAuthorizationMethodAccessToken *shared.SourceZendeskChatUpdateAuthorizationMethodAccessToken - if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20 != nil { - accessToken1 := r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.AccessToken.ValueString() - credentials2 := shared.SourceZendeskChatUpdateAuthorizationMethodAccessTokenCredentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.Credentials.ValueString()) - sourceZendeskChatUpdateAuthorizationMethodAccessToken = &shared.SourceZendeskChatUpdateAuthorizationMethodAccessToken{ - AccessToken: accessToken1, - Credentials: credentials2, + var sourceZendeskChatUpdateAuthorizationMethodAccessToken *shared.SourceZendeskChatUpdateAuthorizationMethodAccessToken + if r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20 != nil { + accessToken1 := r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.AccessToken.ValueString() + credentials2 := shared.SourceZendeskChatUpdateAuthorizationMethodAccessTokenCredentials(r.Configuration.Credentials.SourceZendeskChatAuthorizationMethodOAuth20.Credentials.ValueString()) + sourceZendeskChatUpdateAuthorizationMethodAccessToken = &shared.SourceZendeskChatUpdateAuthorizationMethodAccessToken{ + AccessToken: accessToken1, + Credentials: credentials2, + } } - } - if sourceZendeskChatUpdateAuthorizationMethodAccessToken != nil { - credentials = &shared.SourceZendeskChatUpdateAuthorizationMethod{ - SourceZendeskChatUpdateAuthorizationMethodAccessToken: sourceZendeskChatUpdateAuthorizationMethodAccessToken, + if sourceZendeskChatUpdateAuthorizationMethodAccessToken != nil { + credentials = &shared.SourceZendeskChatUpdateAuthorizationMethod{ + SourceZendeskChatUpdateAuthorizationMethodAccessToken: sourceZendeskChatUpdateAuthorizationMethodAccessToken, + } } } startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) diff --git a/internal/provider/source_zendesksunshine_resource_sdk.go b/internal/provider/source_zendesksunshine_resource_sdk.go index d458d8631..6db636200 100755 --- a/internal/provider/source_zendesksunshine_resource_sdk.go +++ b/internal/provider/source_zendesksunshine_resource_sdk.go @@ -9,28 +9,30 @@ import ( func (r *SourceZendeskSunshineResourceModel) ToCreateSDKType() *shared.SourceZendeskSunshineCreateRequest { var credentials *shared.SourceZendeskSunshineAuthorizationMethod - var sourceZendeskSunshineAuthorizationMethodOAuth20 *shared.SourceZendeskSunshineAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken != nil { - authMethod := shared.SourceZendeskSunshineAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken.AuthMethod.ValueString()) - sourceZendeskSunshineAuthorizationMethodOAuth20 = &shared.SourceZendeskSunshineAuthorizationMethodOAuth20{ - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourceZendeskSunshineAuthorizationMethodOAuth20 *shared.SourceZendeskSunshineAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken != nil { + authMethod := shared.SourceZendeskSunshineAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken.AuthMethod.ValueString()) + sourceZendeskSunshineAuthorizationMethodOAuth20 = &shared.SourceZendeskSunshineAuthorizationMethodOAuth20{ + AuthMethod: authMethod, + } } - } - if sourceZendeskSunshineAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceZendeskSunshineAuthorizationMethod{ - SourceZendeskSunshineAuthorizationMethodOAuth20: sourceZendeskSunshineAuthorizationMethodOAuth20, + if sourceZendeskSunshineAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceZendeskSunshineAuthorizationMethod{ + SourceZendeskSunshineAuthorizationMethodOAuth20: sourceZendeskSunshineAuthorizationMethodOAuth20, + } } - } - var sourceZendeskSunshineAuthorizationMethodAPIToken *shared.SourceZendeskSunshineAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20 != nil { - authMethod1 := shared.SourceZendeskSunshineAuthorizationMethodAPITokenAuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20.AuthMethod.ValueString()) - sourceZendeskSunshineAuthorizationMethodAPIToken = &shared.SourceZendeskSunshineAuthorizationMethodAPIToken{ - AuthMethod: authMethod1, + var sourceZendeskSunshineAuthorizationMethodAPIToken *shared.SourceZendeskSunshineAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20 != nil { + authMethod1 := shared.SourceZendeskSunshineAuthorizationMethodAPITokenAuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20.AuthMethod.ValueString()) + sourceZendeskSunshineAuthorizationMethodAPIToken = &shared.SourceZendeskSunshineAuthorizationMethodAPIToken{ + AuthMethod: authMethod1, + } } - } - if sourceZendeskSunshineAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceZendeskSunshineAuthorizationMethod{ - SourceZendeskSunshineAuthorizationMethodAPIToken: sourceZendeskSunshineAuthorizationMethodAPIToken, + if sourceZendeskSunshineAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceZendeskSunshineAuthorizationMethod{ + SourceZendeskSunshineAuthorizationMethodAPIToken: sourceZendeskSunshineAuthorizationMethodAPIToken, + } } } sourceType := shared.SourceZendeskSunshineZendeskSunshine(r.Configuration.SourceType.ValueString()) @@ -66,28 +68,30 @@ func (r *SourceZendeskSunshineResourceModel) ToGetSDKType() *shared.SourceZendes func (r *SourceZendeskSunshineResourceModel) ToUpdateSDKType() *shared.SourceZendeskSunshinePutRequest { var credentials *shared.SourceZendeskSunshineUpdateAuthorizationMethod - var sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 *shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20 - if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken != nil { - authMethod := shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken.AuthMethod.ValueString()) - sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 = &shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20{ - AuthMethod: authMethod, + if r.Configuration.Credentials != nil { + var sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 *shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20 + if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken != nil { + authMethod := shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20AuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodAPIToken.AuthMethod.ValueString()) + sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 = &shared.SourceZendeskSunshineUpdateAuthorizationMethodOAuth20{ + AuthMethod: authMethod, + } } - } - if sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 != nil { - credentials = &shared.SourceZendeskSunshineUpdateAuthorizationMethod{ - SourceZendeskSunshineUpdateAuthorizationMethodOAuth20: sourceZendeskSunshineUpdateAuthorizationMethodOAuth20, + if sourceZendeskSunshineUpdateAuthorizationMethodOAuth20 != nil { + credentials = &shared.SourceZendeskSunshineUpdateAuthorizationMethod{ + SourceZendeskSunshineUpdateAuthorizationMethodOAuth20: sourceZendeskSunshineUpdateAuthorizationMethodOAuth20, + } } - } - var sourceZendeskSunshineUpdateAuthorizationMethodAPIToken *shared.SourceZendeskSunshineUpdateAuthorizationMethodAPIToken - if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20 != nil { - authMethod1 := shared.SourceZendeskSunshineUpdateAuthorizationMethodAPITokenAuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20.AuthMethod.ValueString()) - sourceZendeskSunshineUpdateAuthorizationMethodAPIToken = &shared.SourceZendeskSunshineUpdateAuthorizationMethodAPIToken{ - AuthMethod: authMethod1, + var sourceZendeskSunshineUpdateAuthorizationMethodAPIToken *shared.SourceZendeskSunshineUpdateAuthorizationMethodAPIToken + if r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20 != nil { + authMethod1 := shared.SourceZendeskSunshineUpdateAuthorizationMethodAPITokenAuthMethod(r.Configuration.Credentials.SourceZendeskSunshineAuthorizationMethodOAuth20.AuthMethod.ValueString()) + sourceZendeskSunshineUpdateAuthorizationMethodAPIToken = &shared.SourceZendeskSunshineUpdateAuthorizationMethodAPIToken{ + AuthMethod: authMethod1, + } } - } - if sourceZendeskSunshineUpdateAuthorizationMethodAPIToken != nil { - credentials = &shared.SourceZendeskSunshineUpdateAuthorizationMethod{ - SourceZendeskSunshineUpdateAuthorizationMethodAPIToken: sourceZendeskSunshineUpdateAuthorizationMethodAPIToken, + if sourceZendeskSunshineUpdateAuthorizationMethodAPIToken != nil { + credentials = &shared.SourceZendeskSunshineUpdateAuthorizationMethod{ + SourceZendeskSunshineUpdateAuthorizationMethodAPIToken: sourceZendeskSunshineUpdateAuthorizationMethodAPIToken, + } } } startDate := r.Configuration.StartDate.ValueString() diff --git a/internal/provider/source_zendesksupport_resource_sdk.go b/internal/provider/source_zendesksupport_resource_sdk.go index 312b3d268..d90be2094 100755 --- a/internal/provider/source_zendesksupport_resource_sdk.go +++ b/internal/provider/source_zendesksupport_resource_sdk.go @@ -11,48 +11,50 @@ import ( func (r *SourceZendeskSupportResourceModel) ToCreateSDKType() *shared.SourceZendeskSupportCreateRequest { var credentials *shared.SourceZendeskSupportAuthentication - var sourceZendeskSupportAuthenticationOAuth20 *shared.SourceZendeskSupportAuthenticationOAuth20 - if r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken != nil { - credentials1 := new(shared.SourceZendeskSupportAuthenticationOAuth20Credentials) - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsNull() { - *credentials1 = shared.SourceZendeskSupportAuthenticationOAuth20Credentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.ValueString()) - } else { - credentials1 = nil - } - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceZendeskSupportAuthenticationOAuth20 = &shared.SourceZendeskSupportAuthenticationOAuth20{ - Credentials: credentials1, - AdditionalProperties: additionalProperties, - } - } - if sourceZendeskSupportAuthenticationOAuth20 != nil { - credentials = &shared.SourceZendeskSupportAuthentication{ - SourceZendeskSupportAuthenticationOAuth20: sourceZendeskSupportAuthenticationOAuth20, - } - } - var sourceZendeskSupportAuthenticationAPIToken *shared.SourceZendeskSupportAuthenticationAPIToken - if r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20 != nil { - credentials2 := new(shared.SourceZendeskSupportAuthenticationAPITokenCredentials) - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsNull() { - *credentials2 = shared.SourceZendeskSupportAuthenticationAPITokenCredentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.ValueString()) - } else { - credentials2 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceZendeskSupportAuthenticationAPIToken = &shared.SourceZendeskSupportAuthenticationAPIToken{ - Credentials: credentials2, - AdditionalProperties: additionalProperties1, - } - } - if sourceZendeskSupportAuthenticationAPIToken != nil { - credentials = &shared.SourceZendeskSupportAuthentication{ - SourceZendeskSupportAuthenticationAPIToken: sourceZendeskSupportAuthenticationAPIToken, + if r.Configuration.Credentials != nil { + var sourceZendeskSupportAuthenticationOAuth20 *shared.SourceZendeskSupportAuthenticationOAuth20 + if r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken != nil { + credentials1 := new(shared.SourceZendeskSupportAuthenticationOAuth20Credentials) + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsNull() { + *credentials1 = shared.SourceZendeskSupportAuthenticationOAuth20Credentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.ValueString()) + } else { + credentials1 = nil + } + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceZendeskSupportAuthenticationOAuth20 = &shared.SourceZendeskSupportAuthenticationOAuth20{ + Credentials: credentials1, + AdditionalProperties: additionalProperties, + } + } + if sourceZendeskSupportAuthenticationOAuth20 != nil { + credentials = &shared.SourceZendeskSupportAuthentication{ + SourceZendeskSupportAuthenticationOAuth20: sourceZendeskSupportAuthenticationOAuth20, + } + } + var sourceZendeskSupportAuthenticationAPIToken *shared.SourceZendeskSupportAuthenticationAPIToken + if r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20 != nil { + credentials2 := new(shared.SourceZendeskSupportAuthenticationAPITokenCredentials) + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsNull() { + *credentials2 = shared.SourceZendeskSupportAuthenticationAPITokenCredentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.ValueString()) + } else { + credentials2 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceZendeskSupportAuthenticationAPIToken = &shared.SourceZendeskSupportAuthenticationAPIToken{ + Credentials: credentials2, + AdditionalProperties: additionalProperties1, + } + } + if sourceZendeskSupportAuthenticationAPIToken != nil { + credentials = &shared.SourceZendeskSupportAuthentication{ + SourceZendeskSupportAuthenticationAPIToken: sourceZendeskSupportAuthenticationAPIToken, + } } } ignorePagination := new(bool) @@ -95,48 +97,50 @@ func (r *SourceZendeskSupportResourceModel) ToGetSDKType() *shared.SourceZendesk func (r *SourceZendeskSupportResourceModel) ToUpdateSDKType() *shared.SourceZendeskSupportPutRequest { var credentials *shared.SourceZendeskSupportUpdateAuthentication - var sourceZendeskSupportUpdateAuthenticationOAuth20 *shared.SourceZendeskSupportUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken != nil { - credentials1 := new(shared.SourceZendeskSupportUpdateAuthenticationOAuth20Credentials) - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsNull() { - *credentials1 = shared.SourceZendeskSupportUpdateAuthenticationOAuth20Credentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.ValueString()) - } else { - credentials1 = nil - } - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceZendeskSupportUpdateAuthenticationOAuth20 = &shared.SourceZendeskSupportUpdateAuthenticationOAuth20{ - Credentials: credentials1, - AdditionalProperties: additionalProperties, - } - } - if sourceZendeskSupportUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceZendeskSupportUpdateAuthentication{ - SourceZendeskSupportUpdateAuthenticationOAuth20: sourceZendeskSupportUpdateAuthenticationOAuth20, - } - } - var sourceZendeskSupportUpdateAuthenticationAPIToken *shared.SourceZendeskSupportUpdateAuthenticationAPIToken - if r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20 != nil { - credentials2 := new(shared.SourceZendeskSupportUpdateAuthenticationAPITokenCredentials) - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsNull() { - *credentials2 = shared.SourceZendeskSupportUpdateAuthenticationAPITokenCredentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.ValueString()) - } else { - credentials2 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceZendeskSupportUpdateAuthenticationAPIToken = &shared.SourceZendeskSupportUpdateAuthenticationAPIToken{ - Credentials: credentials2, - AdditionalProperties: additionalProperties1, - } - } - if sourceZendeskSupportUpdateAuthenticationAPIToken != nil { - credentials = &shared.SourceZendeskSupportUpdateAuthentication{ - SourceZendeskSupportUpdateAuthenticationAPIToken: sourceZendeskSupportUpdateAuthenticationAPIToken, + if r.Configuration.Credentials != nil { + var sourceZendeskSupportUpdateAuthenticationOAuth20 *shared.SourceZendeskSupportUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken != nil { + credentials1 := new(shared.SourceZendeskSupportUpdateAuthenticationOAuth20Credentials) + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.IsNull() { + *credentials1 = shared.SourceZendeskSupportUpdateAuthenticationOAuth20Credentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.Credentials.ValueString()) + } else { + credentials1 = nil + } + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceZendeskSupportUpdateAuthenticationOAuth20 = &shared.SourceZendeskSupportUpdateAuthenticationOAuth20{ + Credentials: credentials1, + AdditionalProperties: additionalProperties, + } + } + if sourceZendeskSupportUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceZendeskSupportUpdateAuthentication{ + SourceZendeskSupportUpdateAuthenticationOAuth20: sourceZendeskSupportUpdateAuthenticationOAuth20, + } + } + var sourceZendeskSupportUpdateAuthenticationAPIToken *shared.SourceZendeskSupportUpdateAuthenticationAPIToken + if r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20 != nil { + credentials2 := new(shared.SourceZendeskSupportUpdateAuthenticationAPITokenCredentials) + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.IsNull() { + *credentials2 = shared.SourceZendeskSupportUpdateAuthenticationAPITokenCredentials(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.Credentials.ValueString()) + } else { + credentials2 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskSupportAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceZendeskSupportUpdateAuthenticationAPIToken = &shared.SourceZendeskSupportUpdateAuthenticationAPIToken{ + Credentials: credentials2, + AdditionalProperties: additionalProperties1, + } + } + if sourceZendeskSupportUpdateAuthenticationAPIToken != nil { + credentials = &shared.SourceZendeskSupportUpdateAuthentication{ + SourceZendeskSupportUpdateAuthenticationAPIToken: sourceZendeskSupportUpdateAuthenticationAPIToken, + } } } ignorePagination := new(bool) diff --git a/internal/provider/source_zendesktalk_resource_sdk.go b/internal/provider/source_zendesktalk_resource_sdk.go index 2ea62bc7e..c651517e7 100755 --- a/internal/provider/source_zendesktalk_resource_sdk.go +++ b/internal/provider/source_zendesktalk_resource_sdk.go @@ -11,54 +11,56 @@ import ( func (r *SourceZendeskTalkResourceModel) ToCreateSDKType() *shared.SourceZendeskTalkCreateRequest { var credentials *shared.SourceZendeskTalkAuthentication - var sourceZendeskTalkAuthenticationAPIToken *shared.SourceZendeskTalkAuthenticationAPIToken - if r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken != nil { - apiToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.APIToken.ValueString() - authType := new(shared.SourceZendeskTalkAuthenticationAPITokenAuthType) - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsNull() { - *authType = shared.SourceZendeskTalkAuthenticationAPITokenAuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.ValueString()) - } else { - authType = nil - } - email := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.Email.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceZendeskTalkAuthenticationAPIToken = &shared.SourceZendeskTalkAuthenticationAPIToken{ - APIToken: apiToken, - AuthType: authType, - Email: email, - AdditionalProperties: additionalProperties, - } - } - if sourceZendeskTalkAuthenticationAPIToken != nil { - credentials = &shared.SourceZendeskTalkAuthentication{ - SourceZendeskTalkAuthenticationAPIToken: sourceZendeskTalkAuthenticationAPIToken, - } - } - var sourceZendeskTalkAuthenticationOAuth20 *shared.SourceZendeskTalkAuthenticationOAuth20 - if r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20 != nil { - accessToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AccessToken.ValueString() - authType1 := new(shared.SourceZendeskTalkAuthenticationOAuth20AuthType) - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsNull() { - *authType1 = shared.SourceZendeskTalkAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceZendeskTalkAuthenticationOAuth20 = &shared.SourceZendeskTalkAuthenticationOAuth20{ - AccessToken: accessToken, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceZendeskTalkAuthenticationOAuth20 != nil { - credentials = &shared.SourceZendeskTalkAuthentication{ - SourceZendeskTalkAuthenticationOAuth20: sourceZendeskTalkAuthenticationOAuth20, + if r.Configuration.Credentials != nil { + var sourceZendeskTalkAuthenticationAPIToken *shared.SourceZendeskTalkAuthenticationAPIToken + if r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken != nil { + apiToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.APIToken.ValueString() + authType := new(shared.SourceZendeskTalkAuthenticationAPITokenAuthType) + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsNull() { + *authType = shared.SourceZendeskTalkAuthenticationAPITokenAuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.ValueString()) + } else { + authType = nil + } + email := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.Email.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceZendeskTalkAuthenticationAPIToken = &shared.SourceZendeskTalkAuthenticationAPIToken{ + APIToken: apiToken, + AuthType: authType, + Email: email, + AdditionalProperties: additionalProperties, + } + } + if sourceZendeskTalkAuthenticationAPIToken != nil { + credentials = &shared.SourceZendeskTalkAuthentication{ + SourceZendeskTalkAuthenticationAPIToken: sourceZendeskTalkAuthenticationAPIToken, + } + } + var sourceZendeskTalkAuthenticationOAuth20 *shared.SourceZendeskTalkAuthenticationOAuth20 + if r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20 != nil { + accessToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AccessToken.ValueString() + authType1 := new(shared.SourceZendeskTalkAuthenticationOAuth20AuthType) + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsNull() { + *authType1 = shared.SourceZendeskTalkAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceZendeskTalkAuthenticationOAuth20 = &shared.SourceZendeskTalkAuthenticationOAuth20{ + AccessToken: accessToken, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceZendeskTalkAuthenticationOAuth20 != nil { + credentials = &shared.SourceZendeskTalkAuthentication{ + SourceZendeskTalkAuthenticationOAuth20: sourceZendeskTalkAuthenticationOAuth20, + } } } sourceType := shared.SourceZendeskTalkZendeskTalk(r.Configuration.SourceType.ValueString()) @@ -94,54 +96,56 @@ func (r *SourceZendeskTalkResourceModel) ToGetSDKType() *shared.SourceZendeskTal func (r *SourceZendeskTalkResourceModel) ToUpdateSDKType() *shared.SourceZendeskTalkPutRequest { var credentials *shared.SourceZendeskTalkUpdateAuthentication - var sourceZendeskTalkUpdateAuthenticationAPIToken *shared.SourceZendeskTalkUpdateAuthenticationAPIToken - if r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken != nil { - apiToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.APIToken.ValueString() - authType := new(shared.SourceZendeskTalkUpdateAuthenticationAPITokenAuthType) - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsNull() { - *authType = shared.SourceZendeskTalkUpdateAuthenticationAPITokenAuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.ValueString()) - } else { - authType = nil - } - email := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.Email.ValueString() - var additionalProperties interface{} - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) - } - sourceZendeskTalkUpdateAuthenticationAPIToken = &shared.SourceZendeskTalkUpdateAuthenticationAPIToken{ - APIToken: apiToken, - AuthType: authType, - Email: email, - AdditionalProperties: additionalProperties, - } - } - if sourceZendeskTalkUpdateAuthenticationAPIToken != nil { - credentials = &shared.SourceZendeskTalkUpdateAuthentication{ - SourceZendeskTalkUpdateAuthenticationAPIToken: sourceZendeskTalkUpdateAuthenticationAPIToken, - } - } - var sourceZendeskTalkUpdateAuthenticationOAuth20 *shared.SourceZendeskTalkUpdateAuthenticationOAuth20 - if r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20 != nil { - accessToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AccessToken.ValueString() - authType1 := new(shared.SourceZendeskTalkUpdateAuthenticationOAuth20AuthType) - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsNull() { - *authType1 = shared.SourceZendeskTalkUpdateAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.ValueString()) - } else { - authType1 = nil - } - var additionalProperties1 interface{} - if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsNull() { - _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) - } - sourceZendeskTalkUpdateAuthenticationOAuth20 = &shared.SourceZendeskTalkUpdateAuthenticationOAuth20{ - AccessToken: accessToken, - AuthType: authType1, - AdditionalProperties: additionalProperties1, - } - } - if sourceZendeskTalkUpdateAuthenticationOAuth20 != nil { - credentials = &shared.SourceZendeskTalkUpdateAuthentication{ - SourceZendeskTalkUpdateAuthenticationOAuth20: sourceZendeskTalkUpdateAuthenticationOAuth20, + if r.Configuration.Credentials != nil { + var sourceZendeskTalkUpdateAuthenticationAPIToken *shared.SourceZendeskTalkUpdateAuthenticationAPIToken + if r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken != nil { + apiToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.APIToken.ValueString() + authType := new(shared.SourceZendeskTalkUpdateAuthenticationAPITokenAuthType) + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.IsNull() { + *authType = shared.SourceZendeskTalkUpdateAuthenticationAPITokenAuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AuthType.ValueString()) + } else { + authType = nil + } + email := r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.Email.ValueString() + var additionalProperties interface{} + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationAPIToken.AdditionalProperties.ValueString()), &additionalProperties) + } + sourceZendeskTalkUpdateAuthenticationAPIToken = &shared.SourceZendeskTalkUpdateAuthenticationAPIToken{ + APIToken: apiToken, + AuthType: authType, + Email: email, + AdditionalProperties: additionalProperties, + } + } + if sourceZendeskTalkUpdateAuthenticationAPIToken != nil { + credentials = &shared.SourceZendeskTalkUpdateAuthentication{ + SourceZendeskTalkUpdateAuthenticationAPIToken: sourceZendeskTalkUpdateAuthenticationAPIToken, + } + } + var sourceZendeskTalkUpdateAuthenticationOAuth20 *shared.SourceZendeskTalkUpdateAuthenticationOAuth20 + if r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20 != nil { + accessToken := r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AccessToken.ValueString() + authType1 := new(shared.SourceZendeskTalkUpdateAuthenticationOAuth20AuthType) + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.IsNull() { + *authType1 = shared.SourceZendeskTalkUpdateAuthenticationOAuth20AuthType(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AuthType.ValueString()) + } else { + authType1 = nil + } + var additionalProperties1 interface{} + if !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsUnknown() && !r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.IsNull() { + _ = json.Unmarshal([]byte(r.Configuration.Credentials.SourceZendeskTalkAuthenticationOAuth20.AdditionalProperties.ValueString()), &additionalProperties1) + } + sourceZendeskTalkUpdateAuthenticationOAuth20 = &shared.SourceZendeskTalkUpdateAuthenticationOAuth20{ + AccessToken: accessToken, + AuthType: authType1, + AdditionalProperties: additionalProperties1, + } + } + if sourceZendeskTalkUpdateAuthenticationOAuth20 != nil { + credentials = &shared.SourceZendeskTalkUpdateAuthentication{ + SourceZendeskTalkUpdateAuthenticationOAuth20: sourceZendeskTalkUpdateAuthenticationOAuth20, + } } } startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) diff --git a/internal/provider/type_destination_databricks.go b/internal/provider/type_destination_databricks.go index 874e22800..4a730084b 100755 --- a/internal/provider/type_destination_databricks.go +++ b/internal/provider/type_destination_databricks.go @@ -5,14 +5,14 @@ package provider import "github.com/hashicorp/terraform-plugin-framework/types" type DestinationDatabricks struct { - AcceptTerms types.Bool `tfsdk:"accept_terms"` - DataSource DestinationDatabricksDataSource `tfsdk:"data_source"` - Database types.String `tfsdk:"database"` - DatabricksHTTPPath types.String `tfsdk:"databricks_http_path"` - DatabricksPersonalAccessToken types.String `tfsdk:"databricks_personal_access_token"` - DatabricksPort types.String `tfsdk:"databricks_port"` - DatabricksServerHostname types.String `tfsdk:"databricks_server_hostname"` - DestinationType types.String `tfsdk:"destination_type"` - PurgeStagingData types.Bool `tfsdk:"purge_staging_data"` - Schema types.String `tfsdk:"schema"` + AcceptTerms types.Bool `tfsdk:"accept_terms"` + DataSource DestinationDatabricksDataSource1 `tfsdk:"data_source"` + Database types.String `tfsdk:"database"` + DatabricksHTTPPath types.String `tfsdk:"databricks_http_path"` + DatabricksPersonalAccessToken types.String `tfsdk:"databricks_personal_access_token"` + DatabricksPort types.String `tfsdk:"databricks_port"` + DatabricksServerHostname types.String `tfsdk:"databricks_server_hostname"` + DestinationType types.String `tfsdk:"destination_type"` + PurgeStagingData types.Bool `tfsdk:"purge_staging_data"` + Schema types.String `tfsdk:"schema"` } diff --git a/internal/provider/type_destination_databricks_data_source.go b/internal/provider/type_destination_databricks_data_source.go deleted file mode 100755 index 9cb42c21c..000000000 --- a/internal/provider/type_destination_databricks_data_source.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package provider - -type DestinationDatabricksDataSource struct { - DestinationDatabricksDataSourceRecommendedManagedTables *DestinationDatabricksDataSourceRecommendedManagedTables `tfsdk:"destination_databricks_data_source_recommended_managed_tables"` - DestinationDatabricksDataSourceAmazonS3 *DestinationDatabricksDataSourceAmazonS3 `tfsdk:"destination_databricks_data_source_amazon_s3"` - DestinationDatabricksDataSourceAzureBlobStorage *DestinationDatabricksDataSourceAzureBlobStorage `tfsdk:"destination_databricks_data_source_azure_blob_storage"` - DestinationDatabricksUpdateDataSourceRecommendedManagedTables *DestinationDatabricksDataSourceRecommendedManagedTables `tfsdk:"destination_databricks_update_data_source_recommended_managed_tables"` - DestinationDatabricksUpdateDataSourceAmazonS3 *DestinationDatabricksUpdateDataSourceAmazonS3 `tfsdk:"destination_databricks_update_data_source_amazon_s3"` - DestinationDatabricksUpdateDataSourceAzureBlobStorage *DestinationDatabricksDataSourceAzureBlobStorage `tfsdk:"destination_databricks_update_data_source_azure_blob_storage"` -} diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go index c8e0feeba..b1f03e8eb 100755 --- a/internal/sdk/sdk.go +++ b/internal/sdk/sdk.go @@ -122,8 +122,8 @@ func New(opts ...SDKOption) *SDK { sdkConfiguration: sdkConfiguration{ Language: "terraform", OpenAPIDocVersion: "1.0.0", - SDKVersion: "0.2.0", - GenVersion: "2.73.1", + SDKVersion: "0.2.1", + GenVersion: "2.77.1", }, } for _, opt := range opts { diff --git a/internal/validators/ExactlyOneChild.go b/internal/validators/ExactlyOneChild.go index 839ef01ec..5741558cf 100755 --- a/internal/validators/ExactlyOneChild.go +++ b/internal/validators/ExactlyOneChild.go @@ -15,6 +15,10 @@ type exactlyOneChild struct { } func (validator exactlyOneChild) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse) { + // Only validate the attribute configuration value if it is known. + if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() { + return + } defined := make(map[string]bool) count := 0 for key, attr := range req.ConfigValue.Attributes() {