diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 488a74092..d2a141270 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 83e5483d-e9a0-4437-bced-361e3d1a002e management: - docChecksum: 6a58a667436875db40aa409a888c47c1 + docChecksum: f4fd4d7fa7b66fed557afd0da34c6d79 docVersion: 1.0.0 - speakeasyVersion: 1.326.0 - generationVersion: 2.359.0 - releaseVersion: 0.7.0 - configChecksum: 1c7f50b6a94006f98a421e082288d58f + speakeasyVersion: 1.335.2 + generationVersion: 2.372.3 + releaseVersion: 0.7.1 + configChecksum: 70a295d2cf4a28b42867fbba6bc0f0de repoURL: https://github.com/airbytehq/terraform-provider-airbyte.git features: terraform: additionalDependencies: 0.1.0 additionalProperties: 0.1.2 constsAndDefaults: 0.1.4 - core: 3.23.0 + core: 3.23.5 globalSecurity: 2.81.6 globalServerURLs: 2.82.1 groups: 2.81.2 @@ -71,7 +71,6 @@ generatedFiles: - internal/sdk/models/operations/createdestinationfirestore.go - internal/sdk/models/operations/createdestinationgcs.go - internal/sdk/models/operations/createdestinationgooglesheets.go - - internal/sdk/models/operations/createdestinationlangchain.go - internal/sdk/models/operations/createdestinationmilvus.go - internal/sdk/models/operations/createdestinationmongodb.go - internal/sdk/models/operations/createdestinationmssql.go @@ -110,7 +109,6 @@ generatedFiles: - internal/sdk/models/operations/deletedestinationfirestore.go - internal/sdk/models/operations/deletedestinationgcs.go - internal/sdk/models/operations/deletedestinationgooglesheets.go - - internal/sdk/models/operations/deletedestinationlangchain.go - internal/sdk/models/operations/deletedestinationmilvus.go - internal/sdk/models/operations/deletedestinationmongodb.go - internal/sdk/models/operations/deletedestinationmssql.go @@ -149,7 +147,6 @@ generatedFiles: - internal/sdk/models/operations/getdestinationfirestore.go - internal/sdk/models/operations/getdestinationgcs.go - internal/sdk/models/operations/getdestinationgooglesheets.go - - internal/sdk/models/operations/getdestinationlangchain.go - internal/sdk/models/operations/getdestinationmilvus.go - internal/sdk/models/operations/getdestinationmongodb.go - internal/sdk/models/operations/getdestinationmssql.go @@ -190,7 +187,6 @@ generatedFiles: - internal/sdk/models/operations/putdestinationfirestore.go - internal/sdk/models/operations/putdestinationgcs.go - internal/sdk/models/operations/putdestinationgooglesheets.go - - internal/sdk/models/operations/putdestinationlangchain.go - internal/sdk/models/operations/putdestinationmilvus.go - internal/sdk/models/operations/putdestinationmongodb.go - internal/sdk/models/operations/putdestinationmssql.go @@ -246,6 +242,7 @@ generatedFiles: - internal/sdk/models/operations/createsourcecart.go - internal/sdk/models/operations/createsourcechargebee.go - internal/sdk/models/operations/createsourcechartmogul.go + - internal/sdk/models/operations/createsourceclazar.go - internal/sdk/models/operations/createsourceclickhouse.go - internal/sdk/models/operations/createsourceclickupapi.go - internal/sdk/models/operations/createsourceclockify.go @@ -257,6 +254,7 @@ generatedFiles: - internal/sdk/models/operations/createsourceconfluence.go - internal/sdk/models/operations/createsourceconvex.go - internal/sdk/models/operations/createsourcecustom.go + - internal/sdk/models/operations/createsourcedatadog.go - internal/sdk/models/operations/createsourcedatascope.go - internal/sdk/models/operations/createsourcedelighted.go - internal/sdk/models/operations/createsourcedixa.go @@ -281,9 +279,9 @@ generatedFiles: - internal/sdk/models/operations/createsourcegitlab.go - internal/sdk/models/operations/createsourceglassfrog.go - internal/sdk/models/operations/createsourcegnews.go + - internal/sdk/models/operations/createsourcegoldcast.go - internal/sdk/models/operations/createsourcegoogleads.go - internal/sdk/models/operations/createsourcegoogleanalyticsdataapi.go - - internal/sdk/models/operations/createsourcegoogleanalyticsv4serviceaccountonly.go - internal/sdk/models/operations/createsourcegoogledirectory.go - internal/sdk/models/operations/createsourcegoogledrive.go - internal/sdk/models/operations/createsourcegooglepagespeedinsights.go @@ -353,7 +351,6 @@ generatedFiles: - internal/sdk/models/operations/createsourceposthog.go - internal/sdk/models/operations/createsourcepostmarkapp.go - internal/sdk/models/operations/createsourceprestashop.go - - internal/sdk/models/operations/createsourcepunkapi.go - internal/sdk/models/operations/createsourcepypi.go - internal/sdk/models/operations/createsourcequalaroo.go - internal/sdk/models/operations/createsourcerailz.go @@ -442,6 +439,7 @@ generatedFiles: - internal/sdk/models/operations/deletesourcecart.go - internal/sdk/models/operations/deletesourcechargebee.go - internal/sdk/models/operations/deletesourcechartmogul.go + - internal/sdk/models/operations/deletesourceclazar.go - internal/sdk/models/operations/deletesourceclickhouse.go - internal/sdk/models/operations/deletesourceclickupapi.go - internal/sdk/models/operations/deletesourceclockify.go @@ -453,6 +451,7 @@ generatedFiles: - internal/sdk/models/operations/deletesourceconfluence.go - internal/sdk/models/operations/deletesourceconvex.go - internal/sdk/models/operations/deletesourcecustom.go + - internal/sdk/models/operations/deletesourcedatadog.go - internal/sdk/models/operations/deletesourcedatascope.go - internal/sdk/models/operations/deletesourcedelighted.go - internal/sdk/models/operations/deletesourcedixa.go @@ -477,9 +476,9 @@ generatedFiles: - internal/sdk/models/operations/deletesourcegitlab.go - internal/sdk/models/operations/deletesourceglassfrog.go - internal/sdk/models/operations/deletesourcegnews.go + - internal/sdk/models/operations/deletesourcegoldcast.go - internal/sdk/models/operations/deletesourcegoogleads.go - internal/sdk/models/operations/deletesourcegoogleanalyticsdataapi.go - - internal/sdk/models/operations/deletesourcegoogleanalyticsv4serviceaccountonly.go - internal/sdk/models/operations/deletesourcegoogledirectory.go - internal/sdk/models/operations/deletesourcegoogledrive.go - internal/sdk/models/operations/deletesourcegooglepagespeedinsights.go @@ -549,7 +548,6 @@ generatedFiles: - internal/sdk/models/operations/deletesourceposthog.go - internal/sdk/models/operations/deletesourcepostmarkapp.go - internal/sdk/models/operations/deletesourceprestashop.go - - internal/sdk/models/operations/deletesourcepunkapi.go - internal/sdk/models/operations/deletesourcepypi.go - internal/sdk/models/operations/deletesourcequalaroo.go - internal/sdk/models/operations/deletesourcerailz.go @@ -638,6 +636,7 @@ generatedFiles: - internal/sdk/models/operations/getsourcecart.go - internal/sdk/models/operations/getsourcechargebee.go - internal/sdk/models/operations/getsourcechartmogul.go + - internal/sdk/models/operations/getsourceclazar.go - internal/sdk/models/operations/getsourceclickhouse.go - internal/sdk/models/operations/getsourceclickupapi.go - internal/sdk/models/operations/getsourceclockify.go @@ -649,6 +648,7 @@ generatedFiles: - internal/sdk/models/operations/getsourceconfluence.go - internal/sdk/models/operations/getsourceconvex.go - internal/sdk/models/operations/getsourcecustom.go + - internal/sdk/models/operations/getsourcedatadog.go - internal/sdk/models/operations/getsourcedatascope.go - internal/sdk/models/operations/getsourcedelighted.go - internal/sdk/models/operations/getsourcedixa.go @@ -673,9 +673,9 @@ generatedFiles: - internal/sdk/models/operations/getsourcegitlab.go - internal/sdk/models/operations/getsourceglassfrog.go - internal/sdk/models/operations/getsourcegnews.go + - internal/sdk/models/operations/getsourcegoldcast.go - internal/sdk/models/operations/getsourcegoogleads.go - internal/sdk/models/operations/getsourcegoogleanalyticsdataapi.go - - internal/sdk/models/operations/getsourcegoogleanalyticsv4serviceaccountonly.go - internal/sdk/models/operations/getsourcegoogledirectory.go - internal/sdk/models/operations/getsourcegoogledrive.go - internal/sdk/models/operations/getsourcegooglepagespeedinsights.go @@ -745,7 +745,6 @@ generatedFiles: - internal/sdk/models/operations/getsourceposthog.go - internal/sdk/models/operations/getsourcepostmarkapp.go - internal/sdk/models/operations/getsourceprestashop.go - - internal/sdk/models/operations/getsourcepunkapi.go - internal/sdk/models/operations/getsourcepypi.go - internal/sdk/models/operations/getsourcequalaroo.go - internal/sdk/models/operations/getsourcerailz.go @@ -837,6 +836,7 @@ generatedFiles: - internal/sdk/models/operations/putsourcecart.go - internal/sdk/models/operations/putsourcechargebee.go - internal/sdk/models/operations/putsourcechartmogul.go + - internal/sdk/models/operations/putsourceclazar.go - internal/sdk/models/operations/putsourceclickhouse.go - internal/sdk/models/operations/putsourceclickupapi.go - internal/sdk/models/operations/putsourceclockify.go @@ -848,6 +848,7 @@ generatedFiles: - internal/sdk/models/operations/putsourceconfluence.go - internal/sdk/models/operations/putsourceconvex.go - internal/sdk/models/operations/putsourcecustom.go + - internal/sdk/models/operations/putsourcedatadog.go - internal/sdk/models/operations/putsourcedatascope.go - internal/sdk/models/operations/putsourcedelighted.go - internal/sdk/models/operations/putsourcedixa.go @@ -872,9 +873,9 @@ generatedFiles: - internal/sdk/models/operations/putsourcegitlab.go - internal/sdk/models/operations/putsourceglassfrog.go - internal/sdk/models/operations/putsourcegnews.go + - internal/sdk/models/operations/putsourcegoldcast.go - internal/sdk/models/operations/putsourcegoogleads.go - internal/sdk/models/operations/putsourcegoogleanalyticsdataapi.go - - internal/sdk/models/operations/putsourcegoogleanalyticsv4serviceaccountonly.go - internal/sdk/models/operations/putsourcegoogledirectory.go - internal/sdk/models/operations/putsourcegoogledrive.go - internal/sdk/models/operations/putsourcegooglepagespeedinsights.go @@ -944,7 +945,6 @@ generatedFiles: - internal/sdk/models/operations/putsourceposthog.go - internal/sdk/models/operations/putsourcepostmarkapp.go - internal/sdk/models/operations/putsourceprestashop.go - - internal/sdk/models/operations/putsourcepunkapi.go - internal/sdk/models/operations/putsourcepypi.go - internal/sdk/models/operations/putsourcequalaroo.go - internal/sdk/models/operations/putsourcerailz.go @@ -1070,8 +1070,6 @@ generatedFiles: - internal/sdk/models/shared/destinationgcs.go - internal/sdk/models/shared/destinationgooglesheetscreaterequest.go - internal/sdk/models/shared/destinationgooglesheets.go - - internal/sdk/models/shared/destinationlangchaincreaterequest.go - - internal/sdk/models/shared/destinationlangchain.go - internal/sdk/models/shared/destinationmilvuscreaterequest.go - internal/sdk/models/shared/destinationmilvus.go - internal/sdk/models/shared/destinationmongodbcreaterequest.go @@ -1148,8 +1146,6 @@ generatedFiles: - internal/sdk/models/shared/destinationgcsupdate.go - internal/sdk/models/shared/destinationgooglesheetsputrequest.go - internal/sdk/models/shared/destinationgooglesheetsupdate.go - - internal/sdk/models/shared/destinationlangchainputrequest.go - - internal/sdk/models/shared/destinationlangchainupdate.go - internal/sdk/models/shared/destinationmilvusputrequest.go - internal/sdk/models/shared/destinationmilvusupdate.go - internal/sdk/models/shared/destinationmongodbputrequest.go @@ -1253,6 +1249,8 @@ generatedFiles: - internal/sdk/models/shared/sourcechargebee.go - internal/sdk/models/shared/sourcechartmogulcreaterequest.go - internal/sdk/models/shared/sourcechartmogul.go + - internal/sdk/models/shared/sourceclazarcreaterequest.go + - internal/sdk/models/shared/sourceclazar.go - internal/sdk/models/shared/sourceclickhousecreaterequest.go - internal/sdk/models/shared/sourceclickhouse.go - internal/sdk/models/shared/sourceclickupapicreaterequest.go @@ -1274,6 +1272,8 @@ generatedFiles: - internal/sdk/models/shared/sourceconvexcreaterequest.go - internal/sdk/models/shared/sourceconvex.go - internal/sdk/models/shared/sourcecustomcreaterequest.go + - internal/sdk/models/shared/sourcedatadogcreaterequest.go + - internal/sdk/models/shared/sourcedatadog.go - internal/sdk/models/shared/sourcedatascopecreaterequest.go - internal/sdk/models/shared/sourcedatascope.go - internal/sdk/models/shared/sourcedelightedcreaterequest.go @@ -1322,12 +1322,12 @@ generatedFiles: - internal/sdk/models/shared/sourceglassfrog.go - internal/sdk/models/shared/sourcegnewscreaterequest.go - internal/sdk/models/shared/sourcegnews.go + - internal/sdk/models/shared/sourcegoldcastcreaterequest.go + - internal/sdk/models/shared/sourcegoldcast.go - internal/sdk/models/shared/sourcegoogleadscreaterequest.go - internal/sdk/models/shared/sourcegoogleads.go - internal/sdk/models/shared/sourcegoogleanalyticsdataapicreaterequest.go - internal/sdk/models/shared/sourcegoogleanalyticsdataapi.go - - internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlycreaterequest.go - - internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonly.go - internal/sdk/models/shared/sourcegoogledirectorycreaterequest.go - internal/sdk/models/shared/sourcegoogledirectory.go - internal/sdk/models/shared/sourcegoogledrivecreaterequest.go @@ -1466,8 +1466,6 @@ generatedFiles: - internal/sdk/models/shared/sourcepostmarkapp.go - internal/sdk/models/shared/sourceprestashopcreaterequest.go - internal/sdk/models/shared/sourceprestashop.go - - internal/sdk/models/shared/sourcepunkapicreaterequest.go - - internal/sdk/models/shared/sourcepunkapi.go - internal/sdk/models/shared/sourcepypicreaterequest.go - internal/sdk/models/shared/sourcepypi.go - internal/sdk/models/shared/sourcequalaroocreaterequest.go @@ -1646,6 +1644,8 @@ generatedFiles: - internal/sdk/models/shared/sourcechargebeeupdate.go - internal/sdk/models/shared/sourcechartmogulputrequest.go - internal/sdk/models/shared/sourcechartmogulupdate.go + - internal/sdk/models/shared/sourceclazarputrequest.go + - internal/sdk/models/shared/sourceclazarupdate.go - internal/sdk/models/shared/sourceclickhouseputrequest.go - internal/sdk/models/shared/sourceclickhouseupdate.go - internal/sdk/models/shared/sourceclickupapiputrequest.go @@ -1667,6 +1667,8 @@ generatedFiles: - internal/sdk/models/shared/sourceconvexputrequest.go - internal/sdk/models/shared/sourceconvexupdate.go - internal/sdk/models/shared/sourcecustomputrequest.go + - internal/sdk/models/shared/sourcedatadogputrequest.go + - internal/sdk/models/shared/sourcedatadogupdate.go - internal/sdk/models/shared/sourcedatascopeputrequest.go - internal/sdk/models/shared/sourcedatascopeupdate.go - internal/sdk/models/shared/sourcedelightedputrequest.go @@ -1715,12 +1717,12 @@ generatedFiles: - internal/sdk/models/shared/sourceglassfrogupdate.go - internal/sdk/models/shared/sourcegnewsputrequest.go - internal/sdk/models/shared/sourcegnewsupdate.go + - internal/sdk/models/shared/sourcegoldcastputrequest.go + - internal/sdk/models/shared/sourcegoldcastupdate.go - internal/sdk/models/shared/sourcegoogleadsputrequest.go - internal/sdk/models/shared/sourcegoogleadsupdate.go - internal/sdk/models/shared/sourcegoogleanalyticsdataapiputrequest.go - internal/sdk/models/shared/sourcegoogleanalyticsdataapiupdate.go - - internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyputrequest.go - - internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyupdate.go - internal/sdk/models/shared/sourcegoogledirectoryputrequest.go - internal/sdk/models/shared/sourcegoogledirectoryupdate.go - internal/sdk/models/shared/sourcegoogledriveputrequest.go @@ -1859,8 +1861,6 @@ generatedFiles: - internal/sdk/models/shared/sourcepostmarkappupdate.go - internal/sdk/models/shared/sourceprestashopputrequest.go - internal/sdk/models/shared/sourceprestashopupdate.go - - internal/sdk/models/shared/sourcepunkapiputrequest.go - - internal/sdk/models/shared/sourcepunkapiupdate.go - internal/sdk/models/shared/sourcepypiputrequest.go - internal/sdk/models/shared/sourcepypiupdate.go - internal/sdk/models/shared/sourcequalarooputrequest.go @@ -2005,6 +2005,7 @@ generatedFiles: - internal/sdk/models/shared/schemeclientcredentials.go - internal/sdk/models/shared/schemebasicauth.go - internal/sdk/.gitignore + - internal/sdk/models/operations/options.go - internal/sdk/.gitattributes - internal/sdk/internal/hooks/registration.go - internal/sdk/internal/hooks/hooks.go @@ -2128,13 +2129,6 @@ generatedFiles: - internal/provider/types/destination_gcs.go - internal/provider/types/destination_google_sheets_authentication_via_google_o_auth.go - internal/provider/types/destination_google_sheets.go - - internal/provider/types/destination_langchain_embedding.go - - internal/provider/types/chroma_local_persistance.go - - internal/provider/types/doc_array_hnsw_search.go - - internal/provider/types/destination_langchain_pinecone.go - - internal/provider/types/destination_langchain_indexing.go - - internal/provider/types/destination_langchain_processing_config_model.go - - internal/provider/types/destination_langchain.go - internal/provider/types/destination_milvus_api_token.go - internal/provider/types/destination_milvus_authentication.go - internal/provider/types/destination_milvus_indexing.go @@ -2150,6 +2144,7 @@ generatedFiles: - internal/provider/types/destination_mssql.go - internal/provider/types/destination_mysql.go - internal/provider/types/destination_oracle.go + - internal/provider/types/destination_pinecone_indexing.go - internal/provider/types/destination_pinecone.go - internal/provider/types/verify_ca.go - internal/provider/types/verify_full.go @@ -2162,8 +2157,6 @@ generatedFiles: - internal/provider/types/destination_qdrant.go - internal/provider/types/destination_redis_ssl_modes.go - internal/provider/types/destination_redis.go - - internal/provider/types/aescbc_envelope_encryption.go - - internal/provider/types/destination_redshift_encryption.go - internal/provider/types/awss3_staging.go - internal/provider/types/destination_redshift_uploading_method.go - internal/provider/types/destination_redshift.go @@ -2213,6 +2206,7 @@ generatedFiles: - internal/provider/types/o_auth2_confidential_application.go - internal/provider/types/source_auth0_authentication_method.go - internal/provider/types/source_auth0.go + - internal/provider/types/source_aws_cloudtrail_filter_applied_while_fetching_records_based_on_attribute_key_and_attribute_value_which_will_be_appended_on_the_request_body.go - internal/provider/types/source_aws_cloudtrail.go - internal/provider/types/authenticate_via_oauth2.go - internal/provider/types/authenticate_via_storage_account_key.go @@ -2249,6 +2243,8 @@ generatedFiles: - internal/provider/types/source_coin_api.go - internal/provider/types/source_coinmarketcap.go - internal/provider/types/source_confluence.go + - internal/provider/types/queries.go + - internal/provider/types/source_datadog.go - internal/provider/types/source_datascope.go - internal/provider/types/source_delighted.go - internal/provider/types/source_dixa.go @@ -2259,6 +2255,8 @@ generatedFiles: - internal/provider/types/source_dynamodb_credentials.go - internal/provider/types/source_dynamodb.go - internal/provider/types/source_exchange_rates.go + - internal/provider/types/authenticate_via_facebook_marketing_oauth.go + - internal/provider/types/source_facebook_marketing_authentication.go - internal/provider/types/insight_config.go - internal/provider/types/source_facebook_marketing.go - internal/provider/types/source_faker.go @@ -2289,11 +2287,12 @@ generatedFiles: - internal/provider/types/source_gitlab_authorization_method.go - internal/provider/types/source_gitlab.go - internal/provider/types/source_gnews.go + - internal/provider/types/source_goldcast.go - internal/provider/types/source_google_ads_google_credentials.go - internal/provider/types/custom_queries_array.go - internal/provider/types/source_google_ads.go - internal/provider/types/authenticate_via_google_oauth.go - - internal/provider/types/service_account_key_authentication.go + - internal/provider/types/source_google_analytics_data_api_service_account_key_authentication.go - internal/provider/types/source_google_analytics_data_api_credentials.go - internal/provider/types/source_google_analytics_data_api_cohort_report_settings.go - internal/provider/types/source_google_analytics_data_api_date_range.go @@ -2315,8 +2314,6 @@ generatedFiles: - internal/provider/types/source_google_analytics_data_api_dimensions_filter.go - internal/provider/types/source_google_analytics_data_api_custom_report_config.go - internal/provider/types/source_google_analytics_data_api.go - - internal/provider/types/source_google_analytics_v4_service_account_only_credentials.go - - internal/provider/types/source_google_analytics_v4_service_account_only.go - internal/provider/types/service_account_key.go - internal/provider/types/source_google_directory_google_credentials.go - internal/provider/types/source_google_directory.go @@ -2367,6 +2364,8 @@ generatedFiles: - internal/provider/types/source_metabase.go - internal/provider/types/service_key_authentication.go - internal/provider/types/source_microsoft_onedrive_authentication.go + - internal/provider/types/source_microsoft_onedrive_format.go + - internal/provider/types/source_microsoft_onedrive_file_based_stream_config.go - internal/provider/types/source_microsoft_onedrive.go - internal/provider/types/source_microsoft_sharepoint_authenticate_via_microsoft_o_auth.go - internal/provider/types/source_microsoft_sharepoint_authentication.go @@ -2435,7 +2434,6 @@ generatedFiles: - internal/provider/types/source_posthog.go - internal/provider/types/source_postmarkapp.go - internal/provider/types/source_prestashop.go - - internal/provider/types/source_punk_api.go - internal/provider/types/source_pypi.go - internal/provider/types/source_qualaroo.go - internal/provider/types/source_railz.go @@ -2454,6 +2452,8 @@ generatedFiles: - internal/provider/types/parquet.go - internal/provider/types/source_s3_file_format.go - internal/provider/types/source_s3_s3_amazon_web_services.go + - internal/provider/types/source_s3_format.go + - internal/provider/types/source_s3_file_based_stream_config.go - internal/provider/types/source_s3.go - internal/provider/types/streams_criteria.go - internal/provider/types/source_salesforce.go @@ -2485,6 +2485,7 @@ generatedFiles: - internal/provider/types/source_smartsheets_authorization_method.go - internal/provider/types/source_smartsheets.go - internal/provider/types/source_snapchat_marketing.go + - internal/provider/types/source_snowflake_key_pair_authentication.go - internal/provider/types/source_snowflake_o_auth20.go - internal/provider/types/source_snowflake_authorization_method.go - internal/provider/types/source_snowflake.go @@ -2604,10 +2605,6 @@ generatedFiles: - internal/provider/destination_googlesheets_resource.go - internal/provider/destination_googlesheets_resource_sdk.go - examples/resources/airbyte_destination_google_sheets/resource.tf - - examples/resources/airbyte_destination_langchain/import.sh - - internal/provider/destination_langchain_resource.go - - internal/provider/destination_langchain_resource_sdk.go - - examples/resources/airbyte_destination_langchain/resource.tf - examples/resources/airbyte_destination_milvus/import.sh - internal/provider/destination_milvus_resource.go - internal/provider/destination_milvus_resource_sdk.go @@ -2784,6 +2781,10 @@ generatedFiles: - internal/provider/source_chartmogul_resource.go - internal/provider/source_chartmogul_resource_sdk.go - examples/resources/airbyte_source_chartmogul/resource.tf + - examples/resources/airbyte_source_clazar/import.sh + - internal/provider/source_clazar_resource.go + - internal/provider/source_clazar_resource_sdk.go + - examples/resources/airbyte_source_clazar/resource.tf - examples/resources/airbyte_source_clickhouse/import.sh - internal/provider/source_clickhouse_resource.go - internal/provider/source_clickhouse_resource_sdk.go @@ -2828,6 +2829,10 @@ generatedFiles: - internal/provider/source_custom_resource.go - internal/provider/source_custom_resource_sdk.go - examples/resources/airbyte_source_custom/resource.tf + - examples/resources/airbyte_source_datadog/import.sh + - internal/provider/source_datadog_resource.go + - internal/provider/source_datadog_resource_sdk.go + - examples/resources/airbyte_source_datadog/resource.tf - examples/resources/airbyte_source_datascope/import.sh - internal/provider/source_datascope_resource.go - internal/provider/source_datascope_resource_sdk.go @@ -2924,6 +2929,10 @@ generatedFiles: - internal/provider/source_gnews_resource.go - internal/provider/source_gnews_resource_sdk.go - examples/resources/airbyte_source_gnews/resource.tf + - examples/resources/airbyte_source_goldcast/import.sh + - internal/provider/source_goldcast_resource.go + - internal/provider/source_goldcast_resource_sdk.go + - examples/resources/airbyte_source_goldcast/resource.tf - examples/resources/airbyte_source_google_ads/import.sh - internal/provider/source_googleads_resource.go - internal/provider/source_googleads_resource_sdk.go @@ -2932,10 +2941,6 @@ generatedFiles: - internal/provider/source_googleanalyticsdataapi_resource.go - internal/provider/source_googleanalyticsdataapi_resource_sdk.go - examples/resources/airbyte_source_google_analytics_data_api/resource.tf - - examples/resources/airbyte_source_google_analytics_v4_service_account_only/import.sh - - internal/provider/source_googleanalyticsv4serviceaccountonly_resource.go - - internal/provider/source_googleanalyticsv4serviceaccountonly_resource_sdk.go - - examples/resources/airbyte_source_google_analytics_v4_service_account_only/resource.tf - examples/resources/airbyte_source_google_directory/import.sh - internal/provider/source_googledirectory_resource.go - internal/provider/source_googledirectory_resource_sdk.go @@ -3212,10 +3217,6 @@ generatedFiles: - internal/provider/source_prestashop_resource.go - internal/provider/source_prestashop_resource_sdk.go - examples/resources/airbyte_source_prestashop/resource.tf - - examples/resources/airbyte_source_punk_api/import.sh - - internal/provider/source_punkapi_resource.go - - internal/provider/source_punkapi_resource_sdk.go - - examples/resources/airbyte_source_punk_api/resource.tf - examples/resources/airbyte_source_pypi/import.sh - internal/provider/source_pypi_resource.go - internal/provider/source_pypi_resource_sdk.go @@ -3531,9 +3532,6 @@ generatedFiles: - 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_langchain_data_source.go - - internal/provider/destination_langchain_data_source_sdk.go - - examples/data-sources/airbyte_destination_langchain/data-source.tf - internal/provider/destination_milvus_data_source.go - internal/provider/destination_milvus_data_source_sdk.go - examples/data-sources/airbyte_destination_milvus/data-source.tf @@ -3666,6 +3664,9 @@ generatedFiles: - 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_clazar_data_source.go + - internal/provider/source_clazar_data_source_sdk.go + - examples/data-sources/airbyte_source_clazar/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 @@ -3699,6 +3700,9 @@ generatedFiles: - internal/provider/source_custom_data_source.go - internal/provider/source_custom_data_source_sdk.go - examples/data-sources/airbyte_source_custom/data-source.tf + - internal/provider/source_datadog_data_source.go + - internal/provider/source_datadog_data_source_sdk.go + - examples/data-sources/airbyte_source_datadog/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 @@ -3771,15 +3775,15 @@ generatedFiles: - 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_goldcast_data_source.go + - internal/provider/source_goldcast_data_source_sdk.go + - examples/data-sources/airbyte_source_goldcast/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_googleanalyticsv4serviceaccountonly_data_source.go - - internal/provider/source_googleanalyticsv4serviceaccountonly_data_source_sdk.go - - examples/data-sources/airbyte_source_google_analytics_v4_service_account_only/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 @@ -3987,9 +3991,6 @@ generatedFiles: - 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_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 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 202bfc7e1..7279f86d0 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.326.0 +speakeasyVersion: 1.335.2 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:7c049828b8d9b72461c5a1f491f53e16c2a9f066a72cd6b81905a7f74aef6762 - sourceBlobDigest: sha256:bb31cea6549192e0e90dda8d97fa05daa2cf2debac4223ee19e46b59b1c18ce3 + sourceRevisionDigest: sha256:11bc6c5cce07b8124f88147cb7e73b56ed406eefd4374dce9f478c06a1fd3d7d + sourceBlobDigest: sha256:20143bd569af5fe53d9cc6d46c85db6b8bdfa07d2f1adfd286931ba24c8cb1a6 tags: - latest - main @@ -11,8 +11,8 @@ targets: terraform-provider-airbyte: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:7c049828b8d9b72461c5a1f491f53e16c2a9f066a72cd6b81905a7f74aef6762 - sourceBlobDigest: sha256:bb31cea6549192e0e90dda8d97fa05daa2cf2debac4223ee19e46b59b1c18ce3 + sourceRevisionDigest: sha256:11bc6c5cce07b8124f88147cb7e73b56ed406eefd4374dce9f478c06a1fd3d7d + sourceBlobDigest: sha256:20143bd569af5fe53d9cc6d46c85db6b8bdfa07d2f1adfd286931ba24c8cb1a6 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 3fb632d2a..7a203e0ac 100755 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.7.0" + version = "0.7.1" } } } diff --git a/RELEASES.md b/RELEASES.md index 27b3fbb96..45b000102 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [terraform v0.7.0] . ### Releases -- [Terraform v0.7.0] https://registry.terraform.io/providers/airbytehq/airbyte/0.7.0 - . \ No newline at end of file +- [Terraform v0.7.0] https://registry.terraform.io/providers/airbytehq/airbyte/0.7.0 - . + +## 2024-07-15 18:17:47 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.335.2 (2.372.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [terraform v0.7.1] . +### Releases +- [Terraform v0.7.1] https://registry.terraform.io/providers/airbytehq/airbyte/0.7.1 - . \ No newline at end of file diff --git a/docs/data-sources/destination_langchain.md b/docs/data-sources/destination_langchain.md deleted file mode 100644 index 361be815d..000000000 --- a/docs/data-sources/destination_langchain.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_destination_langchain Data Source - terraform-provider-airbyte" -subcategory: "" -description: |- - DestinationLangchain DataSource ---- - -# airbyte_destination_langchain (Data Source) - -DestinationLangchain DataSource - -## Example Usage - -```terraform -data "airbyte_destination_langchain" "my_destination_langchain" { - destination_id = "...my_destination_id..." -} -``` - - -## Schema - -### Required - -- `destination_id` (String) - -### Read-Only - -- `configuration` (String) The values required to configure the destination. Parsed as JSON. -- `destination_type` (String) -- `name` (String) -- `workspace_id` (String) - - diff --git a/docs/data-sources/source_google_analytics_v4_service_account_only.md b/docs/data-sources/source_clazar.md similarity index 52% rename from docs/data-sources/source_google_analytics_v4_service_account_only.md rename to docs/data-sources/source_clazar.md index 0f0cd2c76..e6a92cd5b 100644 --- a/docs/data-sources/source_google_analytics_v4_service_account_only.md +++ b/docs/data-sources/source_clazar.md @@ -1,19 +1,19 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_source_google_analytics_v4_service_account_only Data Source - terraform-provider-airbyte" +page_title: "airbyte_source_clazar Data Source - terraform-provider-airbyte" subcategory: "" description: |- - SourceGoogleAnalyticsV4ServiceAccountOnly DataSource + SourceClazar DataSource --- -# airbyte_source_google_analytics_v4_service_account_only (Data Source) +# airbyte_source_clazar (Data Source) -SourceGoogleAnalyticsV4ServiceAccountOnly DataSource +SourceClazar DataSource ## Example Usage ```terraform -data "airbyte_source_google_analytics_v4_service_account_only" "my_source_googleanalyticsv4serviceaccountonly" { +data "airbyte_source_clazar" "my_source_clazar" { source_id = "...my_source_id..." } ``` diff --git a/docs/data-sources/source_datadog.md b/docs/data-sources/source_datadog.md new file mode 100644 index 000000000..021efa874 --- /dev/null +++ b/docs/data-sources/source_datadog.md @@ -0,0 +1,35 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "airbyte_source_datadog Data Source - terraform-provider-airbyte" +subcategory: "" +description: |- + SourceDatadog DataSource +--- + +# airbyte_source_datadog (Data Source) + +SourceDatadog DataSource + +## Example Usage + +```terraform +data "airbyte_source_datadog" "my_source_datadog" { + source_id = "...my_source_id..." +} +``` + + +## Schema + +### Required + +- `source_id` (String) + +### Read-Only + +- `configuration` (String) The values required to configure the source. Parsed as JSON. +- `name` (String) +- `source_type` (String) +- `workspace_id` (String) + + diff --git a/docs/data-sources/source_punk_api.md b/docs/data-sources/source_goldcast.md similarity index 68% rename from docs/data-sources/source_punk_api.md rename to docs/data-sources/source_goldcast.md index a7283778a..9b40d3abc 100644 --- a/docs/data-sources/source_punk_api.md +++ b/docs/data-sources/source_goldcast.md @@ -1,19 +1,19 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_source_punk_api Data Source - terraform-provider-airbyte" +page_title: "airbyte_source_goldcast Data Source - terraform-provider-airbyte" subcategory: "" description: |- - SourcePunkAPI DataSource + SourceGoldcast DataSource --- -# airbyte_source_punk_api (Data Source) +# airbyte_source_goldcast (Data Source) -SourcePunkAPI DataSource +SourceGoldcast DataSource ## Example Usage ```terraform -data "airbyte_source_punk_api" "my_source_punkapi" { +data "airbyte_source_goldcast" "my_source_goldcast" { source_id = "...my_source_id..." } ``` diff --git a/docs/index.md b/docs/index.md index da8ba8565..9d4a6f7fa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,7 +17,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.7.0" + version = "0.7.1" } } } diff --git a/docs/resources/destination_langchain.md b/docs/resources/destination_langchain.md deleted file mode 100644 index 40a07acff..000000000 --- a/docs/resources/destination_langchain.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_destination_langchain Resource - terraform-provider-airbyte" -subcategory: "" -description: |- - DestinationLangchain Resource ---- - -# airbyte_destination_langchain (Resource) - -DestinationLangchain Resource - -## Example Usage - -```terraform -resource "airbyte_destination_langchain" "my_destination_langchain" { - configuration = { - embedding = { - fake = {} - } - indexing = { - chroma_local_persistance = { - collection_name = "...my_collection_name..." - destination_path = "/local/my_chroma_db" - } - } - processing = { - chunk_overlap = 7 - chunk_size = 3 - text_fields = [ - "...", - ] - } - } - definition_id = "a735a4e1-8012-43f0-976f-b78bf74fa22d" - name = "Jack Christiansen" - workspace_id = "1b5f134d-0007-4497-b4ae-87c30892ffb0" -} -``` - - -## Schema - -### Required - -- `configuration` (Attributes) (see [below for nested schema](#nestedatt--configuration)) -- `name` (String) Name of the destination e.g. dev-mysql-instance. -- `workspace_id` (String) - -### Optional - -- `definition_id` (String) The UUID of the connector definition. One of configuration.destinationType or definitionId must be provided. Requires replacement if changed. - -### Read-Only - -- `destination_id` (String) -- `destination_type` (String) - - -### Nested Schema for `configuration` - -Required: - -- `embedding` (Attributes) Embedding configuration (see [below for nested schema](#nestedatt--configuration--embedding)) -- `indexing` (Attributes) Indexing configuration (see [below for nested schema](#nestedatt--configuration--indexing)) -- `processing` (Attributes) (see [below for nested schema](#nestedatt--configuration--processing)) - - -### Nested Schema for `configuration.embedding` - -Optional: - -- `fake` (Attributes) Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. (see [below for nested schema](#nestedatt--configuration--embedding--fake)) -- `open_ai` (Attributes) Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. (see [below for nested schema](#nestedatt--configuration--embedding--open_ai)) - - -### Nested Schema for `configuration.embedding.fake` - - - -### Nested Schema for `configuration.embedding.open_ai` - -Required: - -- `openai_key` (String, Sensitive) - - - - -### Nested Schema for `configuration.indexing` - -Optional: - -- `chroma_local_persistance` (Attributes) Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync. (see [below for nested schema](#nestedatt--configuration--indexing--chroma_local_persistance)) -- `doc_array_hnsw_search` (Attributes) DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite. (see [below for nested schema](#nestedatt--configuration--indexing--doc_array_hnsw_search)) -- `pinecone` (Attributes) Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain. (see [below for nested schema](#nestedatt--configuration--indexing--pinecone)) - - -### Nested Schema for `configuration.indexing.chroma_local_persistance` - -Required: - -- `destination_path` (String) Path to the directory where chroma files will be written. The files will be placed inside that local mount. - -Optional: - -- `collection_name` (String) Name of the collection to use. Default: "langchain" - - - -### Nested Schema for `configuration.indexing.doc_array_hnsw_search` - -Required: - -- `destination_path` (String) Path to the directory where hnswlib and meta data files will be written. The files will be placed inside that local mount. All files in the specified destination directory will be deleted on each run. - - - -### Nested Schema for `configuration.indexing.pinecone` - -Required: - -- `index` (String) Pinecone index to use -- `pinecone_environment` (String) Pinecone environment to use -- `pinecone_key` (String, Sensitive) - - - - -### Nested Schema for `configuration.processing` - -Required: - -- `chunk_size` (Number) Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) -- `text_fields` (List of String) List of fields in the record that should be used to calculate the embedding. All other fields are passed along as meta fields. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. - -Optional: - -- `chunk_overlap` (Number) Size of overlap between chunks in tokens to store in vector store to better capture relevant context. Default: 0 - -## Import - -Import is supported using the following syntax: - -```shell -terraform import airbyte_destination_langchain.my_airbyte_destination_langchain "" -``` diff --git a/docs/resources/destination_milvus.md b/docs/resources/destination_milvus.md index 5f0a12b07..4370a1891 100644 --- a/docs/resources/destination_milvus.md +++ b/docs/resources/destination_milvus.md @@ -30,14 +30,14 @@ resource "airbyte_destination_milvus" "my_destination_milvus" { } collection = "...my_collection..." db = "...my_db..." - host = "tcp://my-local-milvus:19530" + host = "tcp://host.docker.internal:19530" text_field = "...my_text_field..." vector_field = "...my_vector_field..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 1 - chunk_size = 10 + chunk_overlap = 6 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -52,14 +52,14 @@ resource "airbyte_destination_milvus" "my_destination_milvus" { ] text_splitter = { by_markdown_header = { - split_level = 6 + split_level = 2 } } } } - definition_id = "2248d601-2833-484b-987b-5cce36148543" - name = "Sylvia Smitham" - workspace_id = "3c5e509f-4525-421a-8478-78c254cd184f" + definition_id = "5a4e1801-23f0-4d76-bb78-bf74fa22de12" + name = "Jenny Braun" + workspace_id = "f134d000-7497-474a-a87c-30892ffb0f41" } ``` diff --git a/docs/resources/destination_mongodb.md b/docs/resources/destination_mongodb.md index 6d2c8e49b..c0d7af7a3 100644 --- a/docs/resources/destination_mongodb.md +++ b/docs/resources/destination_mongodb.md @@ -18,7 +18,7 @@ resource "airbyte_destination_mongodb" "my_destination_mongodb" { auth_type = { login_password = { password = "...my_password..." - username = "Ryleigh43" + username = "Ubaldo12" } } database = "...my_database..." @@ -32,9 +32,9 @@ resource "airbyte_destination_mongodb" "my_destination_mongodb" { no_tunnel = {} } } - definition_id = "e75f1c50-c9ec-4767-87b0-6cf86fe4a6f8" - name = "Mr. Malcolm Lubowitz" - workspace_id = "d646f802-e7b2-4183-b2bc-4f6db7afdaca" + definition_id = "48d60128-3384-4bd8-bb5c-ce3614854333" + name = "Courtney Considine" + workspace_id = "5e509f45-2521-4a04-b878-c254cd184fd1" } ``` diff --git a/docs/resources/destination_mssql.md b/docs/resources/destination_mssql.md index 7a8f0eff4..8b688991e 100644 --- a/docs/resources/destination_mssql.md +++ b/docs/resources/destination_mssql.md @@ -28,11 +28,11 @@ resource "airbyte_destination_mssql" "my_destination_mssql" { tunnel_method = { no_tunnel = {} } - username = "Brian25" + username = "Hope.Toy" } - definition_id = "cf17a668-3bb7-46cb-9d42-c04b7b603cc8" - name = "Bryant Lynch" - workspace_id = "e7603813-ef7f-4c0d-976e-5f414549f124" + definition_id = "f1c50c9e-c767-447b-86cf-86fe4a6f8bb8" + name = "Lisa Von" + workspace_id = "46f802e7-b218-43b2-bc4f-6db7afdacad2" } ``` diff --git a/docs/resources/destination_mysql.md b/docs/resources/destination_mysql.md index 7776b7745..29b96e841 100644 --- a/docs/resources/destination_mysql.md +++ b/docs/resources/destination_mysql.md @@ -16,7 +16,7 @@ DestinationMysql Resource resource "airbyte_destination_mysql" "my_destination_mysql" { configuration = { database = "...my_database..." - disable_type_dedupe = true + disable_type_dedupe = false host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." @@ -25,11 +25,11 @@ resource "airbyte_destination_mysql" "my_destination_mysql" { tunnel_method = { no_tunnel = {} } - username = "Jimmy.Cummings31" + username = "Deon.Russel49" } - definition_id = "ef4e895c-9212-4618-852d-1432f33897fe" - name = "Francis Rutherford" - workspace_id = "c8c4bf88-2725-4c3c-abc3-9a6d3f396b39" + definition_id = "a6683bb7-6cbd-4d42-804b-7b603cc8cd88" + name = "Tricia Klocko I" + workspace_id = "813ef7fc-0d17-46e5-b414-549f1242182d" } ``` diff --git a/docs/resources/destination_oracle.md b/docs/resources/destination_oracle.md index ae4dd5af1..017511bca 100644 --- a/docs/resources/destination_oracle.md +++ b/docs/resources/destination_oracle.md @@ -25,11 +25,11 @@ resource "airbyte_destination_oracle" "my_destination_oracle" { tunnel_method = { no_tunnel = {} } - username = "Louvenia.Bartell4" + username = "Emmalee.Towne89" } - definition_id = "16590e1a-2bc7-4de0-bf63-7374915d3efc" - name = "Kara Stroman" - workspace_id = "0e36acc1-e6f1-4291-9604-b55b326e06d2" + definition_id = "895c9212-6184-452d-9432-f33897fec4ca" + name = "Adrienne Lockman" + workspace_id = "bf882725-c3c6-4bc3-9a6d-3f396b39ea0e" } ``` diff --git a/docs/resources/destination_pinecone.md b/docs/resources/destination_pinecone.md index 2ff4ef66b..dd6205e58 100644 --- a/docs/resources/destination_pinecone.md +++ b/docs/resources/destination_pinecone.md @@ -27,10 +27,10 @@ resource "airbyte_destination_pinecone" "my_destination_pinecone" { pinecone_environment = "us-west1-gcp" pinecone_key = "...my_pinecone_key..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 5 - chunk_size = 9 + chunk_overlap = 0 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -50,9 +50,9 @@ resource "airbyte_destination_pinecone" "my_destination_pinecone" { } } } - definition_id = "e42a5305-0a9a-4fbc-a6c9-13a5b78062a6" - name = "Gregory Flatley" - workspace_id = "b7f63598-ffb0-4429-a4fa-eae5018c3193" + definition_id = "90e1a2bc-7de0-4ff6-b737-4915d3efc2cd" + name = "Jorge Beahan" + workspace_id = "6acc1e6f-1291-4560-8b55-b326e06d2448" } ``` diff --git a/docs/resources/destination_postgres.md b/docs/resources/destination_postgres.md index 3b1f3a0a8..c114d668f 100644 --- a/docs/resources/destination_postgres.md +++ b/docs/resources/destination_postgres.md @@ -16,8 +16,8 @@ DestinationPostgres Resource resource "airbyte_destination_postgres" "my_destination_postgres" { configuration = { database = "...my_database..." - disable_type_dedupe = false - drop_cascade = true + disable_type_dedupe = true + drop_cascade = false host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." @@ -30,11 +30,11 @@ resource "airbyte_destination_postgres" "my_destination_postgres" { tunnel_method = { no_tunnel = {} } - username = "Ladarius_Abernathy72" + username = "Ed.Crooks" } - definition_id = "22db6fe0-864a-4856-a041-70ff8566dc32" - name = "Gladys Hintz" - workspace_id = "7b07bf07-28b7-4077-958c-67348eaa4356" + definition_id = "3050a9af-bc66-4c91-ba5b-78062a6a13d9" + name = "Cody Williamson" + workspace_id = "598ffb04-2924-4fae-ae50-18c319374090" } ``` diff --git a/docs/resources/destination_pubsub.md b/docs/resources/destination_pubsub.md index ecfd7d33d..01ac43b94 100644 --- a/docs/resources/destination_pubsub.md +++ b/docs/resources/destination_pubsub.md @@ -16,17 +16,17 @@ DestinationPubsub Resource resource "airbyte_destination_pubsub" "my_destination_pubsub" { configuration = { batching_delay_threshold = 10 - batching_element_count_threshold = 2 - batching_enabled = true - batching_request_bytes_threshold = 6 + batching_element_count_threshold = 10 + batching_enabled = false + batching_request_bytes_threshold = 1 credentials_json = "...my_credentials_json..." - ordering_enabled = true + ordering_enabled = false project_id = "...my_project_id..." topic_id = "...my_topic_id..." } - definition_id = "d49dbc4f-abbf-4199-8382-023b4de2c1a7" - name = "Bobby Lemke" - workspace_id = "d3cde3c9-d6fa-494b-b4b9-38f85ce1dfc1" + definition_id = "db6fe086-4a85-46a0-8170-ff8566dc3233" + name = "Belinda Kuhn" + workspace_id = "07bf0728-b707-4755-8c67-348eaa4356f3" } ``` diff --git a/docs/resources/destination_qdrant.md b/docs/resources/destination_qdrant.md index 2a0a5b18a..3c18557da 100644 --- a/docs/resources/destination_qdrant.md +++ b/docs/resources/destination_qdrant.md @@ -29,15 +29,15 @@ resource "airbyte_destination_qdrant" "my_destination_qdrant" { } } collection = "...my_collection..." - distance_metric = "euc" + distance_metric = "cos" prefer_grpc = true text_field = "...my_text_field..." url = "...my_url..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 6 - chunk_size = 5 + chunk_overlap = 9 + chunk_size = 2 field_name_mappings = [ { from_field = "...my_from_field..." @@ -52,14 +52,14 @@ resource "airbyte_destination_qdrant" "my_destination_qdrant" { ] text_splitter = { by_markdown_header = { - split_level = 9 + split_level = 6 } } } } - definition_id = "b19e64b8-3f63-4d34-8370-e173ec9d4f32" - name = "Ms. Antonio Thiel" - workspace_id = "a8a43c0f-29f7-4cbd-92b3-20943801c367" + definition_id = "dbc4fabb-f199-4438-a023-b4de2c1a7f28" + name = "Gerard Simonis" + workspace_id = "de3c9d6f-a94b-474b-938f-85ce1dfc1b27" } ``` diff --git a/docs/resources/destination_redis.md b/docs/resources/destination_redis.md index 36c816fcc..3f5b40cae 100644 --- a/docs/resources/destination_redis.md +++ b/docs/resources/destination_redis.md @@ -18,7 +18,7 @@ resource "airbyte_destination_redis" "my_destination_redis" { cache_type = "hash" host = "localhost,127.0.0.1" password = "...my_password..." - port = 5 + port = 6 ssl = true ssl_mode = { disable = {} @@ -26,11 +26,11 @@ resource "airbyte_destination_redis" "my_destination_redis" { tunnel_method = { no_tunnel = {} } - username = "Ellen.Champlin16" + username = "Salma59" } - definition_id = "94a31a29-aaf3-4c68-870e-ca1537042295" - name = "Hector Turner" - workspace_id = "dc306165-86b7-4399-8fea-69beba7dc7cd" + definition_id = "e64b83f6-3d34-4837-8e17-3ec9d4f32d3e" + name = "Shelly Connelly" + workspace_id = "a43c0f29-f7cb-4d12-b320-943801c3678d" } ``` diff --git a/docs/resources/destination_redshift.md b/docs/resources/destination_redshift.md index 4f57e9f15..b705416c4 100644 --- a/docs/resources/destination_redshift.md +++ b/docs/resources/destination_redshift.md @@ -16,7 +16,7 @@ DestinationRedshift Resource resource "airbyte_destination_redshift" "my_destination_redshift" { configuration = { database = "...my_database..." - disable_type_dedupe = false + disable_type_dedupe = true drop_cascade = true host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." @@ -29,25 +29,20 @@ resource "airbyte_destination_redshift" "my_destination_redshift" { } uploading_method = { awss3_staging = { - access_key_id = "...my_access_key_id..." - encryption = { - aescbc_envelope_encryption = { - key_encrypting_key = "...my_key_encrypting_key..." - } - } + access_key_id = "...my_access_key_id..." file_name_pattern = "{timestamp}" purge_staging_data = false s3_bucket_name = "airbyte.staging" s3_bucket_path = "data_sync/test" - s3_bucket_region = "eu-central-2" + s3_bucket_region = "eu-south-2" secret_access_key = "...my_secret_access_key..." } } - username = "Clark65" + username = "Devante10" } - definition_id = "ab15fb45-8bad-49ea-b671-d5852a459de5" - name = "Jessica Runolfsdottir" - workspace_id = "420a295e-5c09-4962-877b-187a09875344" + definition_id = "a29aaf3c-6807-40ec-a153-7042295e6e54" + name = "Ms. Edmund Douglas III" + workspace_id = "586b7399-0fea-469b-aba7-dc7cde8f8d83" } ``` @@ -150,31 +145,11 @@ Required: Optional: -- `encryption` (Attributes) How to encrypt the staging data (see [below for nested schema](#nestedatt--configuration--uploading_method--awss3_staging--encryption)) - `file_name_pattern` (String) The pattern allows you to set the file-name format for the S3 staging file(s) - `purge_staging_data` (Boolean) Whether to delete the staging files from S3 after completing the sync. See docs for details. Default: true - `s3_bucket_path` (String) The directory under the S3 bucket where data will be written. If not provided, then defaults to the root directory. See path's name recommendations for more details. - `s3_bucket_region` (String) The region of the S3 staging bucket. must be one of ["", "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-south-2", "ap-southeast-1", "ap-southeast-2", "ap-southeast-3", "ap-southeast-4", "ca-central-1", "ca-west-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-central-2", "eu-north-1", "eu-south-1", "eu-south-2", "eu-west-1", "eu-west-2", "eu-west-3", "il-central-1", "me-central-1", "me-south-1", "sa-east-1", "us-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"]; Default: "" - -### Nested Schema for `configuration.uploading_method.awss3_staging.s3_bucket_region` - -Optional: - -- `aescbc_envelope_encryption` (Attributes) Staging data will be encrypted using AES-CBC envelope encryption. (see [below for nested schema](#nestedatt--configuration--uploading_method--awss3_staging--s3_bucket_region--aescbc_envelope_encryption)) -- `no_encryption` (Attributes) Staging data will be stored in plaintext. (see [below for nested schema](#nestedatt--configuration--uploading_method--awss3_staging--s3_bucket_region--no_encryption)) - - -### Nested Schema for `configuration.uploading_method.awss3_staging.s3_bucket_region.aescbc_envelope_encryption` - -Optional: - -- `key_encrypting_key` (String, Sensitive) The key, base64-encoded. Must be either 128, 192, or 256 bits. Leave blank to have Airbyte generate an ephemeral key for each sync. - - - -### Nested Schema for `configuration.uploading_method.awss3_staging.s3_bucket_region.no_encryption` - ## Import Import is supported using the following syntax: diff --git a/docs/resources/destination_s3.md b/docs/resources/destination_s3.md index 2c812ee70..c66b9a025 100644 --- a/docs/resources/destination_s3.md +++ b/docs/resources/destination_s3.md @@ -16,7 +16,7 @@ DestinationS3 Resource resource "airbyte_destination_s3" "my_destination_s3" { configuration = { access_key_id = "A012345678910EXAMPLE" - file_name_pattern = "{date}" + file_name_pattern = "{timestamp}" format = { avro_apache_avro = { compression_codec = { @@ -35,9 +35,9 @@ resource "airbyte_destination_s3" "my_destination_s3" { s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - definition_id = "bc3217ac-be2a-4d9f-b186-486fc7b23d6b" - name = "Kyle Luettgen" - workspace_id = "0346c04b-193f-4b28-918e-382726ed560c" + definition_id = "aab15fb4-58ba-4d9e-a767-1d5852a459de" + name = "Bonnie Beatty" + workspace_id = "3420a295-e5c0-4996-a877-b187a0987534" } ``` diff --git a/docs/resources/destination_s3_glue.md b/docs/resources/destination_s3_glue.md index cce33c626..274f9034e 100644 --- a/docs/resources/destination_s3_glue.md +++ b/docs/resources/destination_s3_glue.md @@ -16,7 +16,7 @@ DestinationS3Glue Resource resource "airbyte_destination_s3_glue" "my_destination_s3glue" { configuration = { access_key_id = "A012345678910EXAMPLE" - file_name_pattern = "{sync_id}" + file_name_pattern = "{date:yyyy_MM}" format = { json_lines_newline_delimited_json = { compression = { @@ -29,17 +29,17 @@ resource "airbyte_destination_s3_glue" "my_destination_s3glue" { } } glue_database = "airbyte_database" - glue_serialization_library = "org.apache.hive.hcatalog.data.JsonSerDe" + glue_serialization_library = "org.openx.data.jsonserde.JsonSerDe" s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "eu-south-1" + s3_bucket_region = "me-central-1" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - definition_id = "e1f9eaf9-a8e2-4157-a856-0c89e77fd0c2" - name = "Marilyn Abshire" - workspace_id = "d396de60-f942-4f93-ba3c-59508dd11c7e" + definition_id = "c3217acb-e2ad-49f3-9864-86fc7b23d6b8" + name = "Billie Wisoky I" + workspace_id = "46c04b19-3fb2-4891-8e38-2726ed560cd3" } ``` diff --git a/docs/resources/destination_sftp_json.md b/docs/resources/destination_sftp_json.md index b89b538fa..ecd35855b 100644 --- a/docs/resources/destination_sftp_json.md +++ b/docs/resources/destination_sftp_json.md @@ -19,11 +19,11 @@ resource "airbyte_destination_sftp_json" "my_destination_sftpjson" { host = "...my_host..." password = "...my_password..." port = 22 - username = "Araceli.Kiehn85" + username = "Kristin95" } - definition_id = "5b00289a-0dc0-4232-9a5c-ae9f3888495e" - name = "Dr. Bennie Cassin" - workspace_id = "b305f362-4c43-4900-b25f-a3e33722ced9" + definition_id = "9eaf9a8e-2157-4a85-a0c8-9e77fd0c2020" + name = "Rick Sporer" + workspace_id = "6de60f94-2f93-47a3-8595-08dd11c7ed17" } ``` diff --git a/docs/resources/destination_snowflake.md b/docs/resources/destination_snowflake.md index 1ef7a5f61..8ac826852 100644 --- a/docs/resources/destination_snowflake.md +++ b/docs/resources/destination_snowflake.md @@ -23,18 +23,18 @@ resource "airbyte_destination_snowflake" "my_destination_snowflake" { } database = "AIRBYTE_DATABASE" disable_type_dedupe = false - host = "accountname.snowflakecomputing.com" + host = "accountname.us-east-2.aws.snowflakecomputing.com" jdbc_url_params = "...my_jdbc_url_params..." raw_data_schema = "...my_raw_data_schema..." - retention_period_days = 5 + retention_period_days = 9 role = "AIRBYTE_ROLE" schema = "AIRBYTE_SCHEMA" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - definition_id = "f6fed365-1e7d-4549-a735-da213c86a8b9" - name = "Santiago Will" - workspace_id = "53876e3d-e30a-486e-8df1-9faac84c3184" + definition_id = "289a0dc0-2329-4a5c-ae9f-3888495eab20" + name = "Ira Ratke II" + workspace_id = "f3624c43-9007-425f-a3e3-3722ced92f8e" } ``` @@ -66,7 +66,7 @@ Required: - `role` (String) Enter the role that you want to use to access Snowflake - `schema` (String) Enter the name of the default schema - `username` (String) Enter the name of the user you want to use to access the database -- `warehouse` (String) Enter the name of the warehouse that you want to sync data into +- `warehouse` (String) Enter the name of the warehouse that you want to use as a compute cluster Optional: diff --git a/docs/resources/destination_snowflake_cortex.md b/docs/resources/destination_snowflake_cortex.md index 257e3aac3..0174fe592 100644 --- a/docs/resources/destination_snowflake_cortex.md +++ b/docs/resources/destination_snowflake_cortex.md @@ -33,10 +33,10 @@ resource "airbyte_destination_snowflake_cortex" "my_destination_snowflakecortex" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 2 - chunk_size = 0 + chunk_overlap = 9 + chunk_size = 2 field_name_mappings = [ { from_field = "...my_from_field..." @@ -51,14 +51,14 @@ resource "airbyte_destination_snowflake_cortex" "my_destination_snowflakecortex" ] text_splitter = { by_markdown_header = { - split_level = 6 + split_level = 4 } } } } - definition_id = "6a04bb96-66e7-4d15-a7ee-dd4643586b68" - name = "Tommie Sporer I" - workspace_id = "c292fcfa-b73b-49ba-9d30-45674ad28dce" + definition_id = "51e7d549-6735-4da2-93c8-6a8b9fef8f53" + name = "Jessie Jones" + workspace_id = "de30a86e-4df1-49fa-ac84-c31846ef3644" } ``` @@ -169,7 +169,7 @@ Required: - `host` (String) Enter the account name you want to use to access the database. This is usually the identifier before .snowflakecomputing.com - `role` (String) Enter the role that you want to use to access Snowflake - `username` (String) Enter the name of the user you want to use to access the database -- `warehouse` (String) Enter the name of the warehouse that you want to sync data into +- `warehouse` (String) Enter the name of the warehouse that you want to use as a compute cluster ### Nested Schema for `configuration.indexing.credentials` diff --git a/docs/resources/destination_teradata.md b/docs/resources/destination_teradata.md index 695ebbf8a..7e0d6d2cf 100644 --- a/docs/resources/destination_teradata.md +++ b/docs/resources/destination_teradata.md @@ -23,11 +23,11 @@ resource "airbyte_destination_teradata" "my_destination_teradata" { ssl_mode = { allow = {} } - username = "Arch_Stehr" + username = "Lillian.Keebler" } - definition_id = "d713664c-8ab0-488c-a48e-91396f340754" - name = "Mr. Eula Heidenreich" - workspace_id = "86d04e60-8039-4bc7-ab07-32a47524bb49" + definition_id = "4bb9666e-7d15-4e7e-add4-643586b689fd" + name = "Eric Fadel" + workspace_id = "92fcfab7-3b9b-4a5d-b045-674ad28dce71" } ``` diff --git a/docs/resources/destination_typesense.md b/docs/resources/destination_typesense.md index 7c1616323..40b361f9b 100644 --- a/docs/resources/destination_typesense.md +++ b/docs/resources/destination_typesense.md @@ -16,15 +16,15 @@ DestinationTypesense Resource resource "airbyte_destination_typesense" "my_destination_typesense" { configuration = { api_key = "...my_api_key..." - batch_size = 0 + batch_size = 9 host = "...my_host..." path = "...my_path..." port = "...my_port..." protocol = "...my_protocol..." } - definition_id = "aa753ad1-1902-4ba1-8886-0231ad193af4" - name = "Raymond McDermott" - workspace_id = "c92d33ca-e7ed-4b40-9c23-9e69c6f21d65" + definition_id = "7fd71366-4c8a-4b08-8c24-8e91396f3407" + name = "Pauline Hayes" + workspace_id = "00686d04-e608-4039-bc7e-b0732a47524b" } ``` diff --git a/docs/resources/destination_vectara.md b/docs/resources/destination_vectara.md index 1399e1504..63a76bad5 100644 --- a/docs/resources/destination_vectara.md +++ b/docs/resources/destination_vectara.md @@ -30,9 +30,9 @@ resource "airbyte_destination_vectara" "my_destination_vectara" { ] title_field = "document_key" } - definition_id = "173cccbb-c51a-43ca-a62e-557cba0d3380" - name = "Beverly Murray" - workspace_id = "67fcf379-fa40-411e-ae8d-b1144f7f4dcb" + definition_id = "490aa753-ad11-4902-ba18-8860231ad193" + name = "Emilio Gerhold V" + workspace_id = "85c92d33-cae7-4edb-801c-239e69c6f21d" } ``` diff --git a/docs/resources/destination_weaviate.md b/docs/resources/destination_weaviate.md index 6d5bcc7e2..2c94bfcfc 100644 --- a/docs/resources/destination_weaviate.md +++ b/docs/resources/destination_weaviate.md @@ -34,16 +34,16 @@ resource "airbyte_destination_weaviate" "my_destination_weaviate" { token = "...my_token..." } } - batch_size = 1 - default_vectorizer = "text2vec-palm" + batch_size = 4 + default_vectorizer = "text2vec-huggingface" host = "https://my-cluster.weaviate.network" tenant_id = "...my_tenant_id..." text_field = "...my_text_field..." } omit_raw_text = false processing = { - chunk_overlap = 0 - chunk_size = 5 + chunk_overlap = 1 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -58,14 +58,14 @@ resource "airbyte_destination_weaviate" "my_destination_weaviate" { ] text_splitter = { by_markdown_header = { - split_level = 4 + split_level = 2 } } } } - definition_id = "8467e5cd-3332-485c-bcc3-fde334f786aa" - name = "Dale Padberg" - workspace_id = "527fe19e-b1bf-48ee-a339-467597e801e6" + definition_id = "cccbbc51-a3ca-4a62-a557-cba0d338002a" + name = "Delores Jakubowski" + workspace_id = "cf379fa4-011e-4ae8-9b11-44f7f4dcb281" } ``` diff --git a/docs/resources/destination_yellowbrick.md b/docs/resources/destination_yellowbrick.md index 665aa9f04..145c7c1f1 100644 --- a/docs/resources/destination_yellowbrick.md +++ b/docs/resources/destination_yellowbrick.md @@ -28,11 +28,11 @@ resource "airbyte_destination_yellowbrick" "my_destination_yellowbrick" { tunnel_method = { no_tunnel = {} } - username = "Jonathan.Mante" + username = "Freida38" } - definition_id = "6f396c7c-6bf7-4372-8213-ca1059f1e303" - name = "Nancy Weimann PhD" - workspace_id = "aa50681b-c3ad-4b09-8c01-3842c101e265" + definition_id = "7e5cd333-285c-47cc-bfde-334f786aae3a" + name = "Boyd Hamill" + workspace_id = "fe19eb1b-f8ee-4233-9467-597e801e6768" } ``` diff --git a/docs/resources/permission.md b/docs/resources/permission.md index dd63c8a85..5fe071003 100644 --- a/docs/resources/permission.md +++ b/docs/resources/permission.md @@ -14,10 +14,10 @@ Permission Resource ```terraform resource "airbyte_permission" "my_permission" { - organization_id = "eebc230b-1509-44cc-a185-4edb75e7d1c9" - permission_type = "workspace_reader" - user_id = "dc2da362-faf1-4b28-be26-cb1bb0550b4e" - workspace_id = "344126e7-f293-436e-a378-18d15373da8d" + organization_id = "9a46f396-c7c6-4bf7-b724-213ca1059f1e" + permission_type = "organization_editor" + user_id = "0360fc0e-aa50-4681-bc3a-db090c013842" + workspace_id = "c101e265-eebc-4230-b150-94cc21854edb" } ``` diff --git a/docs/resources/source_aha.md b/docs/resources/source_aha.md index 1e1a66d87..d7da17830 100644 --- a/docs/resources/source_aha.md +++ b/docs/resources/source_aha.md @@ -18,10 +18,10 @@ resource "airbyte_source_aha" "my_source_aha" { api_key = "...my_api_key..." url = "...my_url..." } - definition_id = "6eef0475-7630-4ddb-82db-f188dfabd571" - name = "Joyce Pagac" + definition_id = "75e7d1c9-ddc2-4da3-a2fa-f1b28fe26cb1" + name = "Jonathon Bahringer" secret_id = "...my_secret_id..." - workspace_id = "1dffa69f-e714-43a3-a9a2-44d7bc1a5a6e" + workspace_id = "0b4e3441-26e7-4f29-b36e-237818d15373" } ``` diff --git a/docs/resources/source_aircall.md b/docs/resources/source_aircall.md index f0d77310a..4202a34df 100644 --- a/docs/resources/source_aircall.md +++ b/docs/resources/source_aircall.md @@ -19,10 +19,10 @@ resource "airbyte_source_aircall" "my_source_aircall" { api_token = "...my_api_token..." start_date = "2022-03-01T00:00:00.000Z" } - definition_id = "c1931372-2140-427e-a71b-638bd648d548" - name = "Lucille O'Conner" + definition_id = "8d6eef04-7576-430d-9bc2-dbf188dfabd5" + name = "Miss Ann Bode" secret_id = "...my_secret_id..." - workspace_id = "b93d4bbd-e9f2-4bb8-8cd3-fe4ad282938c" + workspace_id = "61dffa69-fe71-443a-be9a-244d7bc1a5a6" } ``` diff --git a/docs/resources/source_airtable.md b/docs/resources/source_airtable.md index 9fa5a6208..770feae00 100644 --- a/docs/resources/source_airtable.md +++ b/docs/resources/source_airtable.md @@ -21,14 +21,14 @@ resource "airbyte_source_airtable" "my_source_airtable" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-08-20T20:34:02.471Z" + token_expiry_date = "2022-09-01T07:21:46.506Z" } } } - definition_id = "27564451-7930-4ed8-943c-0dabba6ef9fc" - name = "Krista Franecki" + definition_id = "cc193137-2214-4027-ae71-b638bd648d54" + name = "Ryan Green" secret_id = "...my_secret_id..." - workspace_id = "4fd252e5-7aa6-473d-a825-9f0c220e39e1" + workspace_id = "eb93d4bb-de9f-42bb-80cd-3fe4ad282938" } ``` diff --git a/docs/resources/source_amazon_ads.md b/docs/resources/source_amazon_ads.md index 8f64a13f8..fd3814b76 100644 --- a/docs/resources/source_amazon_ads.md +++ b/docs/resources/source_amazon_ads.md @@ -17,7 +17,7 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { configuration = { client_id = "...my_client_id..." client_secret = "...my_client_secret..." - look_back_window = 3 + look_back_window = 10 marketplace_ids = [ "...", ] @@ -25,19 +25,19 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { 4, ] refresh_token = "...my_refresh_token..." - region = "FE" + region = "NA" report_record_types = [ - "targets", + "asins_targets", ] start_date = "2022-10-10" state_filter = [ - "archived", + "enabled", ] } - definition_id = "849b0bdf-3d5c-4a96-8633-54ae1d23c3d1" - name = "Jaime Weimann" + definition_id = "517930ed-8d43-4c0d-abba-6ef9fc3c3744" + name = "Bryant Christiansen" secret_id = "...my_secret_id..." - workspace_id = "4df0d756-d8b0-4d90-9af9-186ab63a7b2e" + workspace_id = "e57aa673-d282-459f-8c22-0e39e10d6ef0" } ``` diff --git a/docs/resources/source_amazon_seller_partner.md b/docs/resources/source_amazon_seller_partner.md index 7d6807646..c802c1182 100644 --- a/docs/resources/source_amazon_seller_partner.md +++ b/docs/resources/source_amazon_seller_partner.md @@ -15,13 +15,13 @@ SourceAmazonSellerPartner Resource ```terraform resource "airbyte_source_amazon_seller_partner" "my_source_amazonsellerpartner" { configuration = { - account_type = "Seller" + account_type = "Vendor" aws_environment = "SANDBOX" lwa_app_id = "...my_lwa_app_id..." lwa_client_secret = "...my_lwa_client_secret..." - period_in_days = 5 + period_in_days = 7 refresh_token = "...my_refresh_token..." - region = "MX" + region = "IT" replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" report_options_list = [ @@ -32,15 +32,15 @@ resource "airbyte_source_amazon_seller_partner" "my_source_amazonsellerpartner" option_value = "...my_option_value..." }, ] - report_name = "GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING" + report_name = "GET_MERCHANT_LISTINGS_DATA" stream_name = "...my_stream_name..." }, ] } - definition_id = "b1d1d8bb-57bf-4001-9db3-cf074d627d20" - name = "Karla Adams III" + definition_id = "df3d5ca9-6c63-4354-ae1d-23c3d11ff934" + name = "Irvin Berge" secret_id = "...my_secret_id..." - workspace_id = "9bb26e6b-9f25-4aa9-b8c7-d4107048d9ff" + workspace_id = "56d8b0d9-0daf-4918-aab6-3a7b2e3879ec" } ``` @@ -79,7 +79,7 @@ Optional: - `period_in_days` (Number) For syncs spanning a large date range, this option is used to request data in a smaller fixed window to improve sync reliability. This time window can be configured granularly by day. Default: 90 - `region` (String) Select the AWS Region. must be one of ["AE", "AU", "BE", "BR", "CA", "DE", "EG", "ES", "FR", "GB", "IN", "IT", "JP", "MX", "NL", "PL", "SA", "SE", "SG", "TR", "UK", "US"]; Default: "US" - `replication_end_date` (String) UTC date and time in the format 2017-01-25T00:00:00Z. Any data after this date will not be replicated. -- `replication_start_date` (String) UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided, the date 2 years ago from today will be used. +- `replication_start_date` (String) UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided or older than 2 years ago from today, the date 2 years ago from today will be used. - `report_options_list` (Attributes List) Additional information passed to reports. This varies by report type. (see [below for nested schema](#nestedatt--configuration--report_options_list)) diff --git a/docs/resources/source_amazon_sqs.md b/docs/resources/source_amazon_sqs.md index 30e133b0b..37cf8bb3c 100644 --- a/docs/resources/source_amazon_sqs.md +++ b/docs/resources/source_amazon_sqs.md @@ -21,14 +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 = "ap-southeast-4" + region = "eu-west-3" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" visibility_timeout = 15 } - definition_id = "afeef69e-ad1e-45d3-a90e-fc6e828b1d2d" - name = "Wm Herman" + definition_id = "d1d8bb57-bf00-41dd-b3cf-074d627d201b" + name = "Betsy Baumbach" secret_id = "...my_secret_id..." - workspace_id = "a9ea927c-ae7b-429c-85e6-b85628652e0f" + workspace_id = "bb26e6b9-f25a-4a9f-8c7d-4107048d9ffe" } ``` diff --git a/docs/resources/source_amplitude.md b/docs/resources/source_amplitude.md index 7aa74977b..b8cee089d 100644 --- a/docs/resources/source_amplitude.md +++ b/docs/resources/source_amplitude.md @@ -17,14 +17,14 @@ resource "airbyte_source_amplitude" "my_source_amplitude" { configuration = { api_key = "...my_api_key..." data_region = "EU Residency Server" - request_time_range = 5 + request_time_range = 6 secret_key = "...my_secret_key..." start_date = "2021-01-25T00:00:00Z" } - definition_id = "21b517b1-6f1f-4884-abcd-5137451945c4" - name = "Mrs. Sylvia Howe" + definition_id = "afeef69e-ad1e-45d3-a90e-fc6e828b1d2d" + name = "Wm Herman" secret_id = "...my_secret_id..." - workspace_id = "6ae8aa3c-4f28-4791-bb86-68105e1180fb" + workspace_id = "a9ea927c-ae7b-429c-85e6-b85628652e0f" } ``` diff --git a/docs/resources/source_apify_dataset.md b/docs/resources/source_apify_dataset.md index 1ff43cdfc..8ea7e2357 100644 --- a/docs/resources/source_apify_dataset.md +++ b/docs/resources/source_apify_dataset.md @@ -18,10 +18,10 @@ resource "airbyte_source_apify_dataset" "my_source_apifydataset" { dataset_id = "rHuMdwm6xCFt6WiGU" token = "apify_api_PbVwb1cBbuvbfg2jRmAIHZKgx3NQyfEMG7uk" } - definition_id = "2a875a1c-a190-4e95-bd11-82a17eb0af63" - name = "Darin Windler" + definition_id = "f83c21b5-17b1-46f1-b884-6bcd51374519" + name = "Renee Schamberger" secret_id = "...my_secret_id..." - workspace_id = "3356f39b-ea5e-4208-9f0e-8905c8543b91" + workspace_id = "360526ae-8aa3-4c4f-a879-13b8668105e1" } ``` diff --git a/docs/resources/source_appfollow.md b/docs/resources/source_appfollow.md index 1f4f7283e..996caad97 100644 --- a/docs/resources/source_appfollow.md +++ b/docs/resources/source_appfollow.md @@ -17,10 +17,10 @@ resource "airbyte_source_appfollow" "my_source_appfollow" { configuration = { api_secret = "...my_api_secret..." } - definition_id = "84cac7dc-adad-4293-8da5-765e7880f00a" - name = "Brenda Stanton" + definition_id = "180fb2a8-75a1-4ca1-90e9-5bd1182a17eb" + name = "Kayla Weimann" secret_id = "...my_secret_id..." - workspace_id = "f9a90fa7-f8f4-441b-98df-c559a0bee1c5" + workspace_id = "defa7335-6f39-4bea-9e20-89f0e8905c85" } ``` diff --git a/docs/resources/source_asana.md b/docs/resources/source_asana.md index 78adae440..67d74514a 100644 --- a/docs/resources/source_asana.md +++ b/docs/resources/source_asana.md @@ -25,12 +25,12 @@ resource "airbyte_source_asana" "my_source_asana" { organization_export_ids = [ "{ \"see\": \"documentation\" }", ] - test_mode = true + test_mode = false } - definition_id = "f2233892-0422-4616-84e7-3ef602c915f5" - name = "Ron Schimmel" + definition_id = "3b9184ca-c7dc-4ada-9293-8da5765e7880" + name = "Matthew Bednar" secret_id = "...my_secret_id..." - workspace_id = "896557ce-17cc-4d6b-90d6-388d4fdfb9af" + workspace_id = "0ddef9a9-0fa7-4f8f-841b-58dfc559a0be" } ``` diff --git a/docs/resources/source_auth0.md b/docs/resources/source_auth0.md index aa75e042e..e0ac1a662 100644 --- a/docs/resources/source_auth0.md +++ b/docs/resources/source_auth0.md @@ -23,10 +23,10 @@ resource "airbyte_source_auth0" "my_source_auth0" { } start_date = "2023-08-05T00:43:59.244Z" } - definition_id = "007bc041-91be-4b05-bf07-c546621bdba9" - name = "Victoria Haley" + definition_id = "e1c5ff22-3389-4204-a261-684e73ef602c" + name = "Raymond Halvorson" secret_id = "...my_secret_id..." - workspace_id = "51ed0a81-81e6-4e55-bd9e-be7b2f5ca6ec" + workspace_id = "97cf5896-557c-4e17-8cd6-b10d6388d4fd" } ``` diff --git a/docs/resources/source_aws_cloudtrail.md b/docs/resources/source_aws_cloudtrail.md index 07b55c5aa..48d446ba4 100644 --- a/docs/resources/source_aws_cloudtrail.md +++ b/docs/resources/source_aws_cloudtrail.md @@ -18,12 +18,16 @@ resource "airbyte_source_aws_cloudtrail" "my_source_awscloudtrail" { aws_key_id = "...my_aws_key_id..." aws_region_name = "...my_aws_region_name..." aws_secret_key = "...my_aws_secret_key..." - start_date = "2021-01-01" + lookup_attributes_filter = { + attribute_key = "EventName" + attribute_value = "ConsoleLogin" + } + start_date = "2021-01-01" } - definition_id = "af2b0521-0208-4e03-ab26-8d758466c963" - name = "Justin Bauch MD" + definition_id = "af007bc0-4191-4beb-857f-07c546621bdb" + name = "Ross Abshire" secret_id = "...my_secret_id..." - workspace_id = "394b84ac-df8d-4b6a-8f7e-23711b260f5d" + workspace_id = "4f51ed0a-8181-4e6e-95fd-9ebe7b2f5ca6" } ``` @@ -52,12 +56,21 @@ resource "airbyte_source_aws_cloudtrail" "my_source_awscloudtrail" { Required: - `aws_key_id` (String, Sensitive) AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. -- `aws_region_name` (String) The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name. - `aws_secret_key` (String, Sensitive) AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. Optional: -- `start_date` (String) The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD. Default: "1970-01-01" +- `aws_region_name` (String) The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name. Default: "us-east-1" +- `lookup_attributes_filter` (Attributes) (see [below for nested schema](#nestedatt--configuration--lookup_attributes_filter)) +- `start_date` (String) The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD. + + +### Nested Schema for `configuration.lookup_attributes_filter` + +Optional: + +- `attribute_key` (String, Sensitive) Default: "EventName" +- `attribute_value` (String) Default: "ListInstanceAssociations" ## Import diff --git a/docs/resources/source_azure_blob_storage.md b/docs/resources/source_azure_blob_storage.md index aa70c82de..5798c1d5b 100644 --- a/docs/resources/source_azure_blob_storage.md +++ b/docs/resources/source_azure_blob_storage.md @@ -29,10 +29,10 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 7 + days_to_sync_if_history_is_full = 9 format = { avro_format = { - double_as_string = true + double_as_string = false } } globs = [ @@ -40,17 +40,17 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Al Sanford" + name = "Brendan Crist II" primary_key = "...my_primary_key..." schemaless = true - validation_policy = "Wait for Discover" + validation_policy = "Emit Record" }, ] } - definition_id = "da3d51cb-c156-423e-8645-3ce6c3cf0d0e" - name = "Sandra Stroman III" + definition_id = "0208e036-b268-4d75-8466-c963e10b1b39" + name = "Karla Luettgen" secret_id = "...my_secret_id..." - workspace_id = "b8da7b81-43f8-451c-b99c-7fd70e50457d" + workspace_id = "cdf8db6a-4f7e-4237-91b2-60f5d38a1edc" } ``` diff --git a/docs/resources/source_azure_table.md b/docs/resources/source_azure_table.md index ac39484cc..afc7668c9 100644 --- a/docs/resources/source_azure_table.md +++ b/docs/resources/source_azure_table.md @@ -19,10 +19,10 @@ resource "airbyte_source_azure_table" "my_source_azuretable" { storage_account_name = "...my_storage_account_name..." storage_endpoint_suffix = "core.chinacloudapi.cn" } - definition_id = "f4f64874-e62c-458d-8792-fd48887cb19c" - name = "Vickie Ullrich" + definition_id = "36cda3d5-1cbc-4156-a3ec-6453ce6c3cf0" + name = "Joseph VonRueden PhD" secret_id = "...my_secret_id..." - workspace_id = "b4573d66-d007-4e52-a2e4-396e7403ea2d" + workspace_id = "e16b8da7-b814-43f8-91cf-99c7fd70e504" } ``` diff --git a/docs/resources/source_bamboo_hr.md b/docs/resources/source_bamboo_hr.md index 07a33bdfa..214fd0154 100644 --- a/docs/resources/source_bamboo_hr.md +++ b/docs/resources/source_bamboo_hr.md @@ -17,13 +17,13 @@ resource "airbyte_source_bamboo_hr" "my_source_bamboohr" { configuration = { api_key = "...my_api_key..." custom_reports_fields = "...my_custom_reports_fields..." - custom_reports_include_default_fields = false + custom_reports_include_default_fields = true subdomain = "...my_subdomain..." } - definition_id = "0959a4fa-50e8-407c-86bd-0cbf5314eea0" - name = "Miss Oliver Crooks" + definition_id = "7dcf4f64-874e-462c-98d8-792fd48887cb" + name = "Toni Schaefer" secret_id = "...my_secret_id..." - workspace_id = "37367271-c78a-49aa-9603-df323c7d7845" + workspace_id = "ec8b4573-d66d-4007-a52a-2e4396e7403e" } ``` diff --git a/docs/resources/source_bigquery.md b/docs/resources/source_bigquery.md index 30c1845dd..dc0c4b9ec 100644 --- a/docs/resources/source_bigquery.md +++ b/docs/resources/source_bigquery.md @@ -19,10 +19,10 @@ resource "airbyte_source_bigquery" "my_source_bigquery" { dataset_id = "...my_dataset_id..." project_id = "...my_project_id..." } - definition_id = "b7f8882a-1973-48b2-98b7-0494da21b79c" - name = "Lionel McKenzie" + definition_id = "a2d50959-a4fa-450e-807c-86bd0cbf5314" + name = "Dr. Tomas Nolan" secret_id = "...my_secret_id..." - workspace_id = "f3821deb-7264-4dad-9e5f-b53126691bfb" + workspace_id = "21aa3736-7271-4c78-a9aa-9603df323c7d" } ``` diff --git a/docs/resources/source_bing_ads.md b/docs/resources/source_bing_ads.md index 3393ac576..640c2d64f 100644 --- a/docs/resources/source_bing_ads.md +++ b/docs/resources/source_bing_ads.md @@ -17,32 +17,32 @@ resource "airbyte_source_bing_ads" "my_source_bingads" { configuration = { account_names = [ { - name = "Eula Ritchie" - operator = "Equals" + name = "Jennie Gleason" + operator = "Contains" }, ] client_id = "...my_client_id..." client_secret = "...my_client_secret..." custom_reports = [ { - name = "Account Performance" + name = "custom report" report_aggregation = "...my_report_aggregation..." report_columns = [ "...", ] - reporting_object = "ProductNegativeKeywordConflictReportRequest" + reporting_object = "AdExtensionByKeywordReportRequest" }, ] developer_token = "...my_developer_token..." - lookback_window = 5 + lookback_window = 6 refresh_token = "...my_refresh_token..." - reports_start_date = "2022-01-16" + reports_start_date = "2022-10-18" tenant_id = "...my_tenant_id..." } - definition_id = "472f2e8b-bfe1-4822-ba33-308df445f49b" - name = "Chester Dach" + definition_id = "8b218b70-494d-4a21-b79c-fd9baf3821de" + name = "Kurt D'Amore" secret_id = "...my_secret_id..." - workspace_id = "9f17b5c6-1c8d-42f7-9d6e-e9c7e7401902" + workspace_id = "dad9e5fb-5312-4669-9bfb-5db9ea24da51" } ``` diff --git a/docs/resources/source_braintree.md b/docs/resources/source_braintree.md index 7da4cd46a..22336461d 100644 --- a/docs/resources/source_braintree.md +++ b/docs/resources/source_braintree.md @@ -15,16 +15,16 @@ SourceBraintree Resource ```terraform resource "airbyte_source_braintree" "my_source_braintree" { configuration = { - environment = "Development" + environment = "Qa" merchant_id = "...my_merchant_id..." private_key = "...my_private_key..." public_key = "...my_public_key..." - start_date = "2020" + start_date = "2020-12-30" } - definition_id = "430f8964-a321-4f43-9fb3-aad078a3612f" - name = "Abraham Herzog" + definition_id = "472f2e8b-bfe1-4822-ba33-308df445f49b" + name = "Chester Dach" secret_id = "...my_secret_id..." - workspace_id = "fdd854e0-c39c-422f-a17d-f57adf10725f" + workspace_id = "9f17b5c6-1c8d-42f7-9d6e-e9c7e7401902" } ``` diff --git a/docs/resources/source_braze.md b/docs/resources/source_braze.md index 72fe46691..105ae5fd6 100644 --- a/docs/resources/source_braze.md +++ b/docs/resources/source_braze.md @@ -16,13 +16,13 @@ SourceBraze Resource resource "airbyte_source_braze" "my_source_braze" { configuration = { api_key = "...my_api_key..." - start_date = "2021-08-21" + start_date = "2022-08-21" url = "...my_url..." } - definition_id = "f1a27e8f-d2f1-493d-8f9a-b29a2f8317de" - name = "Herbert Torphy" + definition_id = "195430f8-964a-4321-b431-fb3aad078a36" + name = "Wanda Wisoky" secret_id = "...my_secret_id..." - workspace_id = "ab02ccb9-0852-43df-96a0-cc4991982a68" + workspace_id = "5a7fdd85-4e0c-439c-a2fe-17df57adf107" } ``` diff --git a/docs/resources/source_cart.md b/docs/resources/source_cart.md index f23dbb815..365f39dc4 100644 --- a/docs/resources/source_cart.md +++ b/docs/resources/source_cart.md @@ -18,16 +18,16 @@ resource "airbyte_source_cart" "my_source_cart" { credentials = { central_api_router = { site_id = "...my_site_id..." - user_name = "Ceasar63" + user_name = "Briana_Hettinger45" user_secret = "...my_user_secret..." } } start_date = "2021-01-01T00:00:00Z" } - definition_id = "7074f016-f721-427f-b3f8-652b2551b023" - name = "Mr. Spencer Casper" + definition_id = "f1a27e8f-d2f1-493d-8f9a-b29a2f8317de" + name = "Herbert Torphy" secret_id = "...my_secret_id..." - workspace_id = "a7ffb268-dc18-4708-bd37-ac99fd785161" + workspace_id = "ab02ccb9-0852-43df-96a0-cc4991982a68" } ``` diff --git a/docs/resources/source_chargebee.md b/docs/resources/source_chargebee.md index 50e2d61f2..0728d7ad6 100644 --- a/docs/resources/source_chargebee.md +++ b/docs/resources/source_chargebee.md @@ -20,10 +20,10 @@ resource "airbyte_source_chargebee" "my_source_chargebee" { site_api_key = "...my_site_api_key..." start_date = "2021-01-25T00:00:00Z" } - definition_id = "5e0c1f4b-65d9-4ebd-b57e-5946981cb460" - name = "Ms. Franklin Mraz" + definition_id = "a7074f01-6f72-4127-b33f-8652b2551b02" + name = "Mr. Jana Runolfsson" secret_id = "...my_secret_id..." - workspace_id = "6308eadb-73c3-469b-a0c1-2ece59b9fbae" + workspace_id = "4a7ffb26-8dc1-4870-87d3-7ac99fd78516" } ``` diff --git a/docs/resources/source_chartmogul.md b/docs/resources/source_chartmogul.md index e018813cc..48fca59fd 100644 --- a/docs/resources/source_chartmogul.md +++ b/docs/resources/source_chartmogul.md @@ -18,10 +18,10 @@ resource "airbyte_source_chartmogul" "my_source_chartmogul" { api_key = "...my_api_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "e4749058-8d0e-4293-9574-a681eea74b87" - name = "Harold Willms IV" + definition_id = "305e0c1f-4b65-4d9e-bd75-7e5946981cb4" + name = "Maria Lubowitz" secret_id = "...my_secret_id..." - workspace_id = "7d33223d-80bb-4993-a2d2-f45974a2ebc3" + workspace_id = "1686308e-adb7-43c3-a9be-0c12ece59b9f" } ``` diff --git a/docs/resources/source_clazar.md b/docs/resources/source_clazar.md new file mode 100644 index 000000000..5e06ac6be --- /dev/null +++ b/docs/resources/source_clazar.md @@ -0,0 +1,61 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "airbyte_source_clazar Resource - terraform-provider-airbyte" +subcategory: "" +description: |- + SourceClazar Resource +--- + +# airbyte_source_clazar (Resource) + +SourceClazar Resource + +## Example Usage + +```terraform +resource "airbyte_source_clazar" "my_source_clazar" { + configuration = { + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + } + definition_id = "baef8e47-4905-488d-8e29-39574a681eea" + name = "Danielle Rice" + secret_id = "...my_secret_id..." + workspace_id = "a1fb187d-3322-43d8-8bb9-9362d2f45974" +} +``` + + +## Schema + +### Required + +- `configuration` (Attributes) (see [below for nested schema](#nestedatt--configuration)) +- `name` (String) Name of the source e.g. dev-mysql-instance. +- `workspace_id` (String) + +### Optional + +- `definition_id` (String) The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. Requires replacement if changed. +- `secret_id` (String) Optional secretID obtained through the public API OAuth redirect flow. Requires replacement if changed. + +### Read-Only + +- `source_id` (String) +- `source_type` (String) + + +### Nested Schema for `configuration` + +Required: + +- `client_id` (String) +- `client_secret` (String) + +## Import + +Import is supported using the following syntax: + +```shell +terraform import airbyte_source_clazar.my_airbyte_source_clazar "" +``` diff --git a/docs/resources/source_clickhouse.md b/docs/resources/source_clickhouse.md index 7b4bc15f8..7f8b6c868 100644 --- a/docs/resources/source_clickhouse.md +++ b/docs/resources/source_clickhouse.md @@ -23,12 +23,12 @@ resource "airbyte_source_clickhouse" "my_source_clickhouse" { tunnel_method = { no_tunnel = {} } - username = "Johnpaul_Barton69" + username = "Camille_Walsh19" } - definition_id = "376bce66-a7c0-4ce2-8da3-e9aab71454cb" - name = "Charlotte Blick" + definition_id = "680abb37-6bce-466a-bc0c-e20da3e9aab7" + name = "Debbie Haley" secret_id = "...my_secret_id..." - workspace_id = "3e1da46c-4f68-45d2-8501-1b8862473b75" + workspace_id = "b241893e-1da4-46c4-b685-d205011b8862" } ``` diff --git a/docs/resources/source_clickup_api.md b/docs/resources/source_clickup_api.md index 5b3f23414..e4793f906 100644 --- a/docs/resources/source_clickup_api.md +++ b/docs/resources/source_clickup_api.md @@ -17,15 +17,15 @@ resource "airbyte_source_clickup_api" "my_source_clickupapi" { configuration = { api_token = "...my_api_token..." folder_id = "...my_folder_id..." - include_closed_tasks = false + include_closed_tasks = true list_id = "...my_list_id..." space_id = "...my_space_id..." team_id = "...my_team_id..." } - definition_id = "39108618-e914-445d-83c4-94a849cd517f" - name = "Sonja Douglas" + definition_id = "73b75739-1086-418e-9144-5d83c494a849" + name = "Ms. Kristopher Hammes" secret_id = "...my_secret_id..." - workspace_id = "2e302e6d-e92b-43e4-b098-446f9835e642" + workspace_id = "0e32c2e3-02e6-4de9-ab3e-43098446f983" } ``` diff --git a/docs/resources/source_clockify.md b/docs/resources/source_clockify.md index 185d00749..018d89936 100644 --- a/docs/resources/source_clockify.md +++ b/docs/resources/source_clockify.md @@ -19,10 +19,10 @@ resource "airbyte_source_clockify" "my_source_clockify" { api_url = "...my_api_url..." workspace_id = "...my_workspace_id..." } - definition_id = "2d15b828-621a-4877-92e6-25cdd80ba5ff" - name = "Tiffany Runolfsdottir" + definition_id = "5e6422d1-5b82-4862-9a87-7d2e625cdd80" + name = "Matt Hermiston" secret_id = "...my_secret_id..." - workspace_id = "c10ca67a-827c-43d3-89f4-44d8a8589d84" + workspace_id = "53c6fc10-ca67-4a82-bc3d-349f444d8a85" } ``` diff --git a/docs/resources/source_close_com.md b/docs/resources/source_close_com.md index 855385084..c5bfaf8e7 100644 --- a/docs/resources/source_close_com.md +++ b/docs/resources/source_close_com.md @@ -18,10 +18,10 @@ resource "airbyte_source_close_com" "my_source_closecom" { api_key = "...my_api_key..." start_date = "2021-01-01" } - definition_id = "dcfaea55-0038-401e-9f44-6900c8feba7b" - name = "Annette Schiller" + definition_id = "d8494dcf-aea5-4500-b801-e9f446900c8f" + name = "Geoffrey Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "a08abdda-328f-46c3-b3e0-6663420a6a3a" + workspace_id = "45cfea08-abdd-4a32-8f6c-373e06663420" } ``` diff --git a/docs/resources/source_coda.md b/docs/resources/source_coda.md index e86c64150..09d4161f2 100644 --- a/docs/resources/source_coda.md +++ b/docs/resources/source_coda.md @@ -17,10 +17,10 @@ resource "airbyte_source_coda" "my_source_coda" { configuration = { auth_token = "...my_auth_token..." } - definition_id = "b4d44755-b910-4e5c-999e-89cbd0e8f2a3" - name = "Dr. Alexandra Runolfsson" + definition_id = "a6a3ab4d-4475-45b9-90e5-c999e89cbd0e" + name = "Emmett Christiansen" secret_id = "...my_secret_id..." - workspace_id = "ec883da2-fecd-42ca-b29e-0bc6002c3cc1" + workspace_id = "7cc1fbec-883d-4a2f-acd2-cab29e0bc600" } ``` diff --git a/docs/resources/source_coin_api.md b/docs/resources/source_coin_api.md index 9a24d8193..02406986e 100644 --- a/docs/resources/source_coin_api.md +++ b/docs/resources/source_coin_api.md @@ -18,15 +18,15 @@ resource "airbyte_source_coin_api" "my_source_coinapi" { api_key = "...my_api_key..." end_date = "2019-01-01T00:00:00" environment = "sandbox" - limit = 2 - period = "2MTH" + limit = 8 + period = "5SEC" start_date = "2019-01-01T00:00:00" symbol_id = "...my_symbol_id..." } - definition_id = "8783d50d-4d2b-480c-90dc-344f66cbf0e9" - name = "Larry Hayes" + definition_id = "cc123e87-83d5-40d4-92b8-0c50dc344f66" + name = "Dr. Randolph Wilderman" secret_id = "...my_secret_id..." - workspace_id = "94ace41d-c5b4-42f2-a228-e88647f2d427" + workspace_id = "a05e994a-ce41-4dc5-b42f-2a228e88647f" } ``` diff --git a/docs/resources/source_coinmarketcap.md b/docs/resources/source_coinmarketcap.md index fb9ef6efc..9ac9ded61 100644 --- a/docs/resources/source_coinmarketcap.md +++ b/docs/resources/source_coinmarketcap.md @@ -21,10 +21,10 @@ resource "airbyte_source_coinmarketcap" "my_source_coinmarketcap" { "...", ] } - definition_id = "06042c1c-6566-41b2-885a-060238eba136" - name = "Angelina Feeney Jr." + definition_id = "d4275060-42c1-4c65-a61b-2485a060238e" + name = "Shaun Brakus" secret_id = "...my_secret_id..." - workspace_id = "cfe1ba68-d340-4502-b960-29febd39e6ab" + workspace_id = "1d3c00cf-e1ba-468d-b405-02b96029febd" } ``` diff --git a/docs/resources/source_configcat.md b/docs/resources/source_configcat.md index 818d1f9cd..5d81393b0 100644 --- a/docs/resources/source_configcat.md +++ b/docs/resources/source_configcat.md @@ -16,12 +16,12 @@ SourceConfigcat Resource resource "airbyte_source_configcat" "my_source_configcat" { configuration = { password = "...my_password..." - username = "Wilmer_Bernier" + username = "Clara.McDermott63" } - definition_id = "2d50cb6e-6ff3-432b-9f14-5775fcbb81a7" - name = "Tonya Kautzer" + definition_id = "bf17c2d5-0cb6-4e6f-b332-bdf145775fcb" + name = "Casey Boyer" secret_id = "...my_secret_id..." - workspace_id = "78b3b7de-de54-47fc-bc1c-b53c351689dd" + workspace_id = "466bf78b-3b7d-4ede-947f-c7c1cb53c351" } ``` diff --git a/docs/resources/source_confluence.md b/docs/resources/source_confluence.md index eff83453a..e59592eb1 100644 --- a/docs/resources/source_confluence.md +++ b/docs/resources/source_confluence.md @@ -19,10 +19,10 @@ resource "airbyte_source_confluence" "my_source_confluence" { domain_name = "...my_domain_name..." email = "abc@example.com" } - definition_id = "740139dc-2cf2-4cb4-9644-2d85f5b6382e" - name = "Ms. Laura Upton" + definition_id = "3b3d7401-39dc-42cf-acb4-16442d85f5b6" + name = "Olga Collins" secret_id = "...my_secret_id..." - workspace_id = "8172f932-271c-49f9-8baa-542e6e080961" + workspace_id = "0e18a817-2f93-4227-9c9f-9cbaa542e6e0" } ``` diff --git a/docs/resources/source_convex.md b/docs/resources/source_convex.md index 28c1f6113..d5fc28ce2 100644 --- a/docs/resources/source_convex.md +++ b/docs/resources/source_convex.md @@ -18,10 +18,10 @@ resource "airbyte_source_convex" "my_source_convex" { access_key = "...my_access_key..." deployment_url = "https://cluttered-owl-337.convex.cloud" } - definition_id = "84c3fbc2-4f86-40fc-a851-98c116e72658" - name = "Kellie Torphy" + definition_id = "0961d84c-3fbc-424f-860f-ce85198c116e" + name = "Nicole Howe" secret_id = "...my_secret_id..." - workspace_id = "70fa8ec1-ba80-44bd-a457-a40e8851a354" + workspace_id = "1ee6770f-a8ec-41ba-804b-d6457a40e885" } ``` diff --git a/docs/resources/source_custom.md b/docs/resources/source_custom.md index 43e897221..a375ffd9d 100644 --- a/docs/resources/source_custom.md +++ b/docs/resources/source_custom.md @@ -15,10 +15,10 @@ SourceCustom Resource ```terraform resource "airbyte_source_custom" "my_source_custom" { configuration = { "user" : "charles" } - definition_id = "1ba6f5d9-0d5a-48a3-89e2-072bdff3818d" - name = "Dr. Rogelio Harris" + definition_id = "1a3541ba-6f5d-490d-9a8a-349e2072bdff" + name = "Carole Buckridge" secret_id = "...my_secret_id..." - workspace_id = "b32a7817-3abb-482e-aa71-89e9256d7463" + workspace_id = "be50fcb3-2a78-4173-abb8-2e6a7189e925" } ``` diff --git a/docs/resources/source_datadog.md b/docs/resources/source_datadog.md new file mode 100644 index 000000000..3027fdaf1 --- /dev/null +++ b/docs/resources/source_datadog.md @@ -0,0 +1,91 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "airbyte_source_datadog Resource - terraform-provider-airbyte" +subcategory: "" +description: |- + SourceDatadog Resource +--- + +# airbyte_source_datadog (Resource) + +SourceDatadog Resource + +## Example Usage + +```terraform +resource "airbyte_source_datadog" "my_source_datadog" { + configuration = { + api_key = "...my_api_key..." + application_key = "...my_application_key..." + end_date = "2022-10-01T00:00:00Z" + max_records_per_request = 4 + queries = [ + { + data_source = "rum" + name = "Alicia Jakubowski" + query = "...my_query..." + }, + ] + query = "...my_query..." + site = "ddog-gov.com" + start_date = "2022-10-01T00:00:00Z" + } + definition_id = "14094639-cf5d-4d4a-8c05-f536f6b9b8b8" + name = "Sidney Ziemann" + secret_id = "...my_secret_id..." + workspace_id = "fbf365d6-87e0-487e-b905-b6a417faeb4f" +} +``` + + +## Schema + +### Required + +- `configuration` (Attributes) (see [below for nested schema](#nestedatt--configuration)) +- `name` (String) Name of the source e.g. dev-mysql-instance. +- `workspace_id` (String) + +### Optional + +- `definition_id` (String) The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. Requires replacement if changed. +- `secret_id` (String) Optional secretID obtained through the public API OAuth redirect flow. Requires replacement if changed. + +### Read-Only + +- `source_id` (String) +- `source_type` (String) + + +### Nested Schema for `configuration` + +Required: + +- `api_key` (String, Sensitive) Datadog API key +- `application_key` (String, Sensitive) Datadog application key + +Optional: + +- `end_date` (String) UTC date and time in the format 2017-01-25T00:00:00Z. Data after this date will not be replicated. An empty value will represent the current datetime for each execution. This just applies to Incremental syncs. +- `max_records_per_request` (Number) Maximum number of records to collect per request. Default: 5000 +- `queries` (Attributes List) List of queries to be run and used as inputs. (see [below for nested schema](#nestedatt--configuration--queries)) +- `query` (String) The search query. This just applies to Incremental syncs. If empty, it'll collect all logs. +- `site` (String) The site where Datadog data resides in. must be one of ["datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ddog-gov.com"]; Default: "datadoghq.com" +- `start_date` (String) UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. This just applies to Incremental syncs. + + +### Nested Schema for `configuration.queries` + +Required: + +- `data_source` (String) A data source that is powered by the platform. must be one of ["metrics", "cloud_cost", "logs", "rum"] +- `name` (String) The variable name for use in queries. +- `query` (String) A classic query string. + +## Import + +Import is supported using the following syntax: + +```shell +terraform import airbyte_source_datadog.my_airbyte_source_datadog "" +``` diff --git a/docs/resources/source_datascope.md b/docs/resources/source_datascope.md index d7d394024..0fa35bae3 100644 --- a/docs/resources/source_datascope.md +++ b/docs/resources/source_datascope.md @@ -18,10 +18,10 @@ resource "airbyte_source_datascope" "my_source_datascope" { api_key = "...my_api_key..." start_date = "dd/mm/YYYY HH:MM" } - definition_id = "8d140946-39cf-45dd-8a0c-05f536f6b9b8" - name = "Dave Willms" + definition_id = "73b7e8dc-371e-4cbe-a105-11b439ed171c" + name = "Carroll Mayer" secret_id = "...my_secret_id..." - workspace_id = "6afbf365-d687-4e08-be39-05b6a417faeb" + workspace_id = "b4783ac2-32bf-4a41-880b-23345c949a95" } ``` diff --git a/docs/resources/source_delighted.md b/docs/resources/source_delighted.md index 586d392fe..fa88a856f 100644 --- a/docs/resources/source_delighted.md +++ b/docs/resources/source_delighted.md @@ -18,10 +18,10 @@ resource "airbyte_source_delighted" "my_source_delighted" { api_key = "...my_api_key..." since = "2022-05-30T04:50:23Z" } - definition_id = "3b7e8dc3-71ec-4bee-9051-1b439ed171c9" - name = "Kirk Windler" + definition_id = "f5a34ff6-80c8-48d8-a9f7-431721e4227f" + name = "Clyde Boehm" secret_id = "...my_secret_id..." - workspace_id = "4783ac23-2bfa-441c-80b2-3345c949a955" + workspace_id = "6ec345b5-c1ba-4e74-b26a-8cd9c5aad47a" } ``` diff --git a/docs/resources/source_dixa.md b/docs/resources/source_dixa.md index 24f5fdc40..29167da99 100644 --- a/docs/resources/source_dixa.md +++ b/docs/resources/source_dixa.md @@ -16,13 +16,13 @@ SourceDixa Resource resource "airbyte_source_dixa" "my_source_dixa" { configuration = { api_token = "...my_api_token..." - batch_size = 1 + batch_size = 31 start_date = "YYYY-MM-DD" } - definition_id = "a34ff680-c88d-48e9-b743-1721e4227fd5" - name = "Patty Huel" + definition_id = "1e10d002-e1c7-43f9-ba1e-39a63be209ca" + name = "Vernon Mosciski" secret_id = "...my_secret_id..." - workspace_id = "c345b5c1-bae7-4472-aa8c-d9c5aad47afd" + workspace_id = "b808ec8c-0a1f-4116-b1a5-6d068f4b5e4c" } ``` diff --git a/docs/resources/source_dockerhub.md b/docs/resources/source_dockerhub.md index 246ed4a93..9dcb38032 100644 --- a/docs/resources/source_dockerhub.md +++ b/docs/resources/source_dockerhub.md @@ -17,10 +17,10 @@ resource "airbyte_source_dockerhub" "my_source_dockerhub" { configuration = { docker_username = "airbyte" } - definition_id = "a11e10d0-02e1-4c73-b9ba-1e39a63be209" - name = "Ernesto Murazik" + definition_id = "19596433-e1d5-4148-8aac-586d055244c5" + name = "Stacey Herzog" secret_id = "...my_secret_id..." - workspace_id = "3eb808ec-8c0a-41f1-9671-a56d068f4b5e" + workspace_id = "57a2c261-8fe1-4b91-9cce-8e649d7675fb" } ``` diff --git a/docs/resources/source_dremio.md b/docs/resources/source_dremio.md index df652cba1..52f074de9 100644 --- a/docs/resources/source_dremio.md +++ b/docs/resources/source_dremio.md @@ -18,10 +18,10 @@ resource "airbyte_source_dremio" "my_source_dremio" { api_key = "...my_api_key..." base_url = "...my_base_url..." } - definition_id = "4c195964-33e1-4d51-884a-ac586d055244" - name = "Floyd Hackett" + definition_id = "58122af6-a8ac-4655-b6a2-05f1e4d309ea" + name = "Mrs. Carole Beer" secret_id = "...my_secret_id..." - workspace_id = "b457a2c2-618f-4e1b-91dc-ce8e649d7675" + workspace_id = "4fbd8663-14ca-4ce0-af96-b833556f7e41" } ``` diff --git a/docs/resources/source_dynamodb.md b/docs/resources/source_dynamodb.md index a2897ed97..e9760f04f 100644 --- a/docs/resources/source_dynamodb.md +++ b/docs/resources/source_dynamodb.md @@ -24,13 +24,13 @@ resource "airbyte_source_dynamodb" "my_source_dynamodb" { } endpoint = "https://{aws_dynamo_db_url}.com" ignore_missing_read_permissions_tables = false - region = "me-central-1" + region = "ap-northeast-1" reserved_attribute_names = "name, field_name, field-name" } - definition_id = "58122af6-a8ac-4655-b6a2-05f1e4d309ea" - name = "Mrs. Carole Beer" + definition_id = "b36cf1af-cf94-4e3c-b9cb-eca1c7573a5b" + name = "Randolph Olson" secret_id = "...my_secret_id..." - workspace_id = "4fbd8663-14ca-4ce0-af96-b833556f7e41" + workspace_id = "d4c0a2ce-f781-4247-9bca-9a4804a9e0dd" } ``` diff --git a/docs/resources/source_emailoctopus.md b/docs/resources/source_emailoctopus.md index 3ac65c60e..c498d762f 100644 --- a/docs/resources/source_emailoctopus.md +++ b/docs/resources/source_emailoctopus.md @@ -17,10 +17,10 @@ resource "airbyte_source_emailoctopus" "my_source_emailoctopus" { configuration = { api_key = "...my_api_key..." } - definition_id = "81b36cf1-afcf-494e-bc79-cbeca1c7573a" - name = "Candice Rath" + definition_id = "c3156b2f-fd5d-46c6-9da5-497add71ffde" + name = "Herman Lesch" secret_id = "...my_secret_id..." - workspace_id = "82d4c0a2-cef7-4812-875b-ca9a4804a9e0" + workspace_id = "09709edc-ef2c-4435-be7e-b149e6fe9a76" } ``` diff --git a/docs/resources/source_exchange_rates.md b/docs/resources/source_exchange_rates.md index 0d44abbf5..f62b5d9fd 100644 --- a/docs/resources/source_exchange_rates.md +++ b/docs/resources/source_exchange_rates.md @@ -20,10 +20,10 @@ resource "airbyte_source_exchange_rates" "my_source_exchangerates" { ignore_weekends = false start_date = "YYYY-MM-DD" } - definition_id = "156b2ffd-5d6c-469d-a549-7add71ffdea5" - name = "Ms. Reginald Nienow" + definition_id = "1d6f7a77-e51b-404b-8d52-e6bc1e22381c" + name = "Salvatore Conroy" secret_id = "...my_secret_id..." - workspace_id = "09edcef2-c435-47e7-ab14-9e6fe9a76bd2" + workspace_id = "642f3c2f-e19c-432e-9fee-92bc3373ad2c" } ``` diff --git a/docs/resources/source_facebook_marketing.md b/docs/resources/source_facebook_marketing.md index e9440f184..9a1d901fe 100644 --- a/docs/resources/source_facebook_marketing.md +++ b/docs/resources/source_facebook_marketing.md @@ -19,50 +19,57 @@ resource "airbyte_source_facebook_marketing" "my_source_facebookmarketing" { account_ids = [ "...", ] - action_breakdowns_allow_empty = true + action_breakdowns_allow_empty = false ad_statuses = [ - "ADSET_PAUSED", + "IN_PROCESS", ] adset_statuses = [ - "PAUSED", + "DELETED", ] campaign_statuses = [ - "DELETED", + "WITH_ISSUES", ] client_id = "...my_client_id..." client_secret = "...my_client_secret..." + credentials = { + authenticate_via_facebook_marketing_oauth = { + access_token = "...my_access_token..." + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + } + } custom_insights = [ { action_breakdowns = [ - "standard_event_content_type", + "action_carousel_card_id", ] action_report_time = "impression" breakdowns = [ - "media_text_content", + "skan_conversion_id", ] end_date = "2017-01-26T00:00:00Z" fields = [ - "video_play_curve_actions", + "dda_results", ] - insights_job_timeout = 3 - insights_lookback_window = 1 - level = "campaign" - name = "Eleanor Prosacco" + insights_job_timeout = 4 + insights_lookback_window = 7 + level = "adset" + name = "Scott Baumbach" start_date = "2017-01-25T00:00:00Z" - time_increment = 10 + time_increment = 5 }, ] end_date = "2017-01-26T00:00:00Z" - fetch_thumbnail_images = false - insights_job_timeout = 1 - insights_lookback_window = 9 - page_size = 2 + fetch_thumbnail_images = true + insights_job_timeout = 3 + insights_lookback_window = 7 + page_size = 1 start_date = "2017-01-25T00:00:00Z" } - definition_id = "81cdc2e9-642f-43c2-be19-c32edfee92bc" - name = "Wendy Kunze" + definition_id = "49e5b0b6-8d5f-4b4b-99e2-f7dc2833c76b" + name = "Sammy Hauck" secret_id = "...my_secret_id..." - workspace_id = "d2c887f2-8ef9-475a-bb10-2e5487915a2f" + workspace_id = "566b4ade-0498-4ec4-8fd8-ad9161a05c5e" } ``` @@ -101,6 +108,7 @@ Optional: - `campaign_statuses` (List of String) Select the statuses you want to be loaded in the stream. If no specific statuses are selected, the API's default behavior applies, and some statuses may be filtered out. - `client_id` (String) The Client Id for your OAuth app - `client_secret` (String) The Client Secret for your OAuth app +- `credentials` (Attributes) Credentials for connecting to the Facebook Marketing API (see [below for nested schema](#nestedatt--configuration--credentials)) - `custom_insights` (Attributes List) A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. Click on "add" to fill this field. (see [below for nested schema](#nestedatt--configuration--custom_insights)) - `end_date` (String) The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated between the start date and this end date will be replicated. Not setting this option will result in always syncing the latest data. - `fetch_thumbnail_images` (Boolean) Set to active if you want to fetch the thumbnail_url and store the result in thumbnail_data_url for each Ad Creative. Default: false @@ -109,6 +117,36 @@ Optional: - `page_size` (Number) Page size used when sending requests to Facebook API to specify number of records per page when response has pagination. Most users do not need to set this field unless they specifically need to tune the connector to address specific issues or use cases. Default: 100 - `start_date` (String) The date from which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. If not set then all data will be replicated for usual streams and only last 2 years for insight streams. + +### Nested Schema for `configuration.credentials` + +Optional: + +- `authenticate_via_facebook_marketing_oauth` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--authenticate_via_facebook_marketing_oauth)) +- `service_account_key_authentication` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--service_account_key_authentication)) + + +### Nested Schema for `configuration.credentials.authenticate_via_facebook_marketing_oauth` + +Required: + +- `client_id` (String) Client ID for the Facebook Marketing API +- `client_secret` (String) Client Secret for the Facebook Marketing API + +Optional: + +- `access_token` (String, Sensitive) The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + + + +### Nested Schema for `configuration.credentials.service_account_key_authentication` + +Required: + +- `access_token` (String, Sensitive) The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + + + ### Nested Schema for `configuration.custom_insights` diff --git a/docs/resources/source_faker.md b/docs/resources/source_faker.md index 8884fdb4e..c18f9edbc 100644 --- a/docs/resources/source_faker.md +++ b/docs/resources/source_faker.md @@ -15,16 +15,16 @@ SourceFaker Resource ```terraform resource "airbyte_source_faker" "my_source_faker" { configuration = { - always_updated = false - count = 2 + always_updated = true + count = 5 parallelism = 6 - records_per_slice = 9 - seed = 3 + records_per_slice = 6 + seed = 5 } - definition_id = "b0b68d5f-b4b9-49e2-b7dc-2833c76bbd55" - name = "Jon Howell" + definition_id = "7eae086e-3c2d-4330-82ab-840e56112c1f" + name = "Homer Bartoletti Jr." secret_id = "...my_secret_id..." - workspace_id = "4ade0498-ec40-4fd8-ad91-61a05c5e8899" + workspace_id = "a5cfbec2-8765-44f1-abc8-4028fbb0cddc" } ``` diff --git a/docs/resources/source_fauna.md b/docs/resources/source_fauna.md index 660ecb8fe..c670e0512 100644 --- a/docs/resources/source_fauna.md +++ b/docs/resources/source_fauna.md @@ -19,17 +19,17 @@ resource "airbyte_source_fauna" "my_source_fauna" { deletions = { disabled = {} } - page_size = 5 + page_size = 10 } domain = "...my_domain..." port = 5 scheme = "...my_scheme..." secret = "...my_secret..." } - definition_id = "eae086e3-c2d3-4308-aab8-40e56112c1fd" - name = "Mr. Kenneth Corkery" + definition_id = "02e3e601-6546-4635-ada9-b04e26c5d5cf" + name = "Elizabeth Ziemann" secret_id = "...my_secret_id..." - workspace_id = "5cfbec28-7654-4f12-bc84-028fbb0cddcf" + workspace_id = "713464ed-5bf6-4d67-b06c-c548e68cfaef" } ``` diff --git a/docs/resources/source_file.md b/docs/resources/source_file.md index 3e7b8bda0..1492cb3bc 100644 --- a/docs/resources/source_file.md +++ b/docs/resources/source_file.md @@ -16,7 +16,7 @@ SourceFile Resource resource "airbyte_source_file" "my_source_file" { configuration = { dataset_name = "...my_dataset_name..." - format = "excel_binary" + format = "yaml" provider = { az_blob_azure_blob_storage = { sas_token = "...my_sas_token..." @@ -25,12 +25,12 @@ resource "airbyte_source_file" "my_source_file" { } } reader_options = "{}" - url = "https://storage.googleapis.com/covid19-open-data/v2/latest/epidemiology.csv" + url = "gs://my-google-bucket/data.csv" } - definition_id = "e3e60165-4663-452d-a9b0-4e26c5d5cf50" - name = "Robin Wolf I" + definition_id = "0df143ee-10f8-4279-a427-b2c340e1d4b4" + name = "Mr. Carole Predovic" secret_id = "...my_secret_id..." - workspace_id = "464ed5bf-6d67-4306-8c54-8e68cfaeff48" + workspace_id = "62aeeab6-a16b-4c0f-9be5-567777324c6c" } ``` diff --git a/docs/resources/source_firebolt.md b/docs/resources/source_firebolt.md index 83a36a051..64033ab08 100644 --- a/docs/resources/source_firebolt.md +++ b/docs/resources/source_firebolt.md @@ -22,10 +22,10 @@ resource "airbyte_source_firebolt" "my_source_firebolt" { engine = "...my_engine..." host = "api.app.firebolt.io" } - definition_id = "0df143ee-10f8-4279-a427-b2c340e1d4b4" - name = "Mr. Carole Predovic" + definition_id = "a7fcdac6-3878-454b-a9c4-2e8b9a534c06" + name = "Merle Hills" secret_id = "...my_secret_id..." - workspace_id = "62aeeab6-a16b-4c0f-9be5-567777324c6c" + workspace_id = "e94eff21-1adf-4c72-9dd1-f80239a92966" } ``` diff --git a/docs/resources/source_fleetio.md b/docs/resources/source_fleetio.md index 4ce17d0b8..32738f253 100644 --- a/docs/resources/source_fleetio.md +++ b/docs/resources/source_fleetio.md @@ -18,10 +18,10 @@ resource "airbyte_source_fleetio" "my_source_fleetio" { account_token = "...my_account_token..." api_key = "...my_api_key..." } - definition_id = "a7fcdac6-3878-454b-a9c4-2e8b9a534c06" - name = "Merle Hills" + definition_id = "0c93eb11-448c-41cd-bafe-5ef85381e22d" + name = "Miss Emilio Watsica" secret_id = "...my_secret_id..." - workspace_id = "e94eff21-1adf-4c72-9dd1-f80239a92966" + workspace_id = "2224121e-6315-4be3-86a4-e83994413a7c" } ``` diff --git a/docs/resources/source_freshcaller.md b/docs/resources/source_freshcaller.md index 1047eae86..d6421e677 100644 --- a/docs/resources/source_freshcaller.md +++ b/docs/resources/source_freshcaller.md @@ -17,14 +17,14 @@ resource "airbyte_source_freshcaller" "my_source_freshcaller" { configuration = { api_key = "...my_api_key..." domain = "snaptravel" - requests_per_minute = 0 + requests_per_minute = 5 start_date = "2022-01-01T12:00:00Z" - sync_lag_minutes = 2 + sync_lag_minutes = 3 } - definition_id = "eb11448c-1cd3-4afe-9ef8-5381e22d9fe1" - name = "Kristopher Champlin" + definition_id = "c70b5882-c881-4a08-b8bf-df7e2fa4a636" + name = "Kim Tremblay" secret_id = "...my_secret_id..." - workspace_id = "4121e631-5be3-406a-8e83-994413a7c75d" + workspace_id = "bba48ed6-d0ea-4f7f-94c7-c369f9cb0a3d" } ``` diff --git a/docs/resources/source_freshdesk.md b/docs/resources/source_freshdesk.md index b3b5b9456..34f03e5cc 100644 --- a/docs/resources/source_freshdesk.md +++ b/docs/resources/source_freshdesk.md @@ -17,14 +17,14 @@ resource "airbyte_source_freshdesk" "my_source_freshdesk" { configuration = { api_key = "...my_api_key..." domain = "myaccount.freshdesk.com" - lookback_window_in_days = 3 - requests_per_minute = 8 + lookback_window_in_days = 9 + requests_per_minute = 0 start_date = "2020-12-01T00:00:00Z" } - definition_id = "b5882c88-1a08-478b-bdf7-e2fa4a63623e" - name = "Lucille Purdy" + definition_id = "7daef770-c81f-495c-9b8d-d2d32b37f6fe" + name = "Corey Schmitt MD" secret_id = "...my_secret_id..." - workspace_id = "48ed6d0e-af7f-454c-bc36-9f9cb0a3dd00" + workspace_id = "4fda52f6-9543-4b86-a0d9-bb50480aaaf7" } ``` diff --git a/docs/resources/source_freshsales.md b/docs/resources/source_freshsales.md index 7c7b99a1d..39d2572db 100644 --- a/docs/resources/source_freshsales.md +++ b/docs/resources/source_freshsales.md @@ -18,10 +18,10 @@ resource "airbyte_source_freshsales" "my_source_freshsales" { api_key = "...my_api_key..." domain_name = "mydomain.myfreshworks.com" } - definition_id = "07daef77-0c81-4f95-85b8-dd2d32b37f6f" - name = "Wilbert Hettinger" + definition_id = "7ae08fd2-caf8-43f0-8591-0a7c570570b8" + name = "Wendell Cartwright" secret_id = "...my_secret_id..." - workspace_id = "0a4fda52-f695-443b-8620-d9bb50480aaa" + workspace_id = "da4e6d7c-2fca-4a38-ada1-d2ddf0351c49" } ``` diff --git a/docs/resources/source_gainsight_px.md b/docs/resources/source_gainsight_px.md index 24a5ad044..67941e5bb 100644 --- a/docs/resources/source_gainsight_px.md +++ b/docs/resources/source_gainsight_px.md @@ -17,10 +17,10 @@ resource "airbyte_source_gainsight_px" "my_source_gainsightpx" { configuration = { api_key = "...my_api_key..." } - definition_id = "f77ae08f-d2ca-4f83-b045-910a7c570570" - name = "Guy Langosh III" + definition_id = "c6869005-1741-4425-a4d3-8a30ea56cdfa" + name = "Courtney Witting" secret_id = "...my_secret_id..." - workspace_id = "9da4e6d7-c2fc-4aa3-86da-1d2ddf0351c4" + workspace_id = "6225b4ba-e611-4122-913e-87b490ecc6bf" } ``` diff --git a/docs/resources/source_gcs.md b/docs/resources/source_gcs.md index 8911f06e0..426084f22 100644 --- a/docs/resources/source_gcs.md +++ b/docs/resources/source_gcs.md @@ -20,7 +20,7 @@ resource "airbyte_source_gcs" "my_source_gcs" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 4 + days_to_sync_if_history_is_full = 1 format = { csv_format = { delimiter = "...my_delimiter..." @@ -34,13 +34,13 @@ resource "airbyte_source_gcs" "my_source_gcs" { autogenerated = {} } ignore_errors_on_fields_mismatch = true - inference_type = "Primitive Types Only" + inference_type = "None" null_values = [ "...", ] quote_char = "...my_quote_char..." - skip_rows_after_header = 0 - skip_rows_before_header = 0 + skip_rows_after_header = 4 + skip_rows_before_header = 10 strings_can_be_null = true true_values = [ "...", @@ -52,17 +52,17 @@ resource "airbyte_source_gcs" "my_source_gcs" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Mrs. Colleen Gusikowski" + name = "Robert Franey" primary_key = "...my_primary_key..." - schemaless = false - validation_policy = "Wait for Discover" + schemaless = true + validation_policy = "Emit Record" }, ] } - definition_id = "4d38a30e-a56c-4dfa-a7fb-f6225b4bae61" - name = "Anna Collier Sr." + definition_id = "1a97a1ae-8949-4629-832a-02ceacfe7e01" + name = "Mrs. Tabitha Moen" secret_id = "...my_secret_id..." - workspace_id = "3e87b490-ecc6-4bf7-9161-16fc803c8311" + workspace_id = "f2040e06-9282-4dd6-a12c-b01cbd9faeed" } ``` diff --git a/docs/resources/source_getlago.md b/docs/resources/source_getlago.md index 01507a091..9bd685e71 100644 --- a/docs/resources/source_getlago.md +++ b/docs/resources/source_getlago.md @@ -18,10 +18,10 @@ resource "airbyte_source_getlago" "my_source_getlago" { api_key = "...my_api_key..." api_url = "...my_api_url..." } - definition_id = "a97a1ae8-9496-4294-b2a0-2ceacfe7e017" - name = "Fredrick Ankunding" + definition_id = "a0582852-7913-4edf-8f9c-9058e69d20ee" + name = "Raquel Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "f2040e06-9282-4dd6-a12c-b01cbd9faeed" + workspace_id = "55c695e2-f08e-4b76-a351-cef20de4cfc3" } ``` diff --git a/docs/resources/source_github.md b/docs/resources/source_github.md index b93aefd9a..e9ffb94b7 100644 --- a/docs/resources/source_github.md +++ b/docs/resources/source_github.md @@ -15,7 +15,7 @@ SourceGithub Resource ```terraform resource "airbyte_source_github" "my_source_github" { configuration = { - api_url = "https://github.company.org" + api_url = "https://github.com" branch = "airbytehq/airbyte/master airbytehq/airbyte/my-branch" branches = [ "...", @@ -31,13 +31,13 @@ resource "airbyte_source_github" "my_source_github" { repositories = [ "...", ] - repository = "airbytehq/*" + repository = "airbytehq/airbyte airbytehq/another-repo" start_date = "2021-03-01T00:00:00Z" } - definition_id = "527913ed-fcf9-4c90-98e6-9d20ee3e4cb5" - name = "Rosalie Hoppe" + definition_id = "84cd8bc6-076e-4714-bbf0-cfd3aed54ef2" + name = "Lynette Bartoletti" secret_id = "...my_secret_id..." - workspace_id = "e2f08eb7-6e35-41ce-b20d-e4cfc332b42c" + workspace_id = "80e3db90-5020-415d-ade4-b8db33d2b3a2" } ``` diff --git a/docs/resources/source_gitlab.md b/docs/resources/source_gitlab.md index 2cd5b8925..5006fd0b5 100644 --- a/docs/resources/source_gitlab.md +++ b/docs/resources/source_gitlab.md @@ -22,7 +22,7 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-03-12T08:01:10.085Z" + token_expiry_date = "2022-12-09T20:11:03.938Z" } } groups = "airbyte.io" @@ -35,10 +35,10 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { ] start_date = "2021-03-01T00:00:00Z" } - definition_id = "bc6076e7-14fb-4f0c-bd3a-ed54ef24d0de" - name = "Jeffrey Terry" + definition_id = "42a10fbc-47ca-4706-9390-37c7eef972df" + name = "Rachael Boyer" secret_id = "...my_secret_id..." - workspace_id = "b9050201-5d2d-4e4b-8db3-3d2b3a27b0b3" + workspace_id = "349fde89-ab27-46cb-ad00-caee12c4e65b" } ``` diff --git a/docs/resources/source_glassfrog.md b/docs/resources/source_glassfrog.md index 683fd3b93..56f30e595 100644 --- a/docs/resources/source_glassfrog.md +++ b/docs/resources/source_glassfrog.md @@ -17,10 +17,10 @@ resource "airbyte_source_glassfrog" "my_source_glassfrog" { configuration = { api_key = "...my_api_key..." } - definition_id = "42a10fbc-47ca-4706-9390-37c7eef972df" - name = "Rachael Boyer" + definition_id = "57e54a27-b617-4a01-ae6b-f68e1922df28" + name = "Mrs. Iris Jast" secret_id = "...my_secret_id..." - workspace_id = "349fde89-ab27-46cb-ad00-caee12c4e65b" + workspace_id = "13a52314-031f-4d7b-82b3-c164c1950da3" } ``` diff --git a/docs/resources/source_gnews.md b/docs/resources/source_gnews.md index b2d005be4..0b3973c79 100644 --- a/docs/resources/source_gnews.md +++ b/docs/resources/source_gnews.md @@ -16,25 +16,25 @@ SourceGnews Resource resource "airbyte_source_gnews" "my_source_gnews" { configuration = { api_key = "...my_api_key..." - country = "in" + country = "cn" end_date = "2022-08-21 16:27:09" in = [ - "description", + "content", ] - language = "te" + language = "ru" nullable = [ - "description", + "content", ] - query = "Apple OR Microsoft" + query = "(Windows 7) AND (Windows 10)" sortby = "relevance" start_date = "2022-08-21 16:27:09" - top_headlines_query = "Microsoft Windows 10" - top_headlines_topic = "technology" + top_headlines_query = "Apple AND NOT iPhone" + top_headlines_topic = "sports" } - definition_id = "b617a012-e6bf-468e-9922-df283a614313" - name = "Darrell Cummerata II" + definition_id = "5a75a7c5-fc21-4d72-ab31-0b676fb731c6" + name = "Pedro Champlin PhD" secret_id = "...my_secret_id..." - workspace_id = "031fd7b8-2b3c-4164-8195-0da31ebecd9b" + workspace_id = "9821d4fc-0324-42cc-9276-3a0d30eb91c3" } ``` diff --git a/docs/resources/source_punk_api.md b/docs/resources/source_goldcast.md similarity index 58% rename from docs/resources/source_punk_api.md rename to docs/resources/source_goldcast.md index b4a90184a..d56187cd4 100644 --- a/docs/resources/source_punk_api.md +++ b/docs/resources/source_goldcast.md @@ -1,28 +1,26 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_source_punk_api Resource - terraform-provider-airbyte" +page_title: "airbyte_source_goldcast Resource - terraform-provider-airbyte" subcategory: "" description: |- - SourcePunkAPI Resource + SourceGoldcast Resource --- -# airbyte_source_punk_api (Resource) +# airbyte_source_goldcast (Resource) -SourcePunkAPI Resource +SourceGoldcast Resource ## Example Usage ```terraform -resource "airbyte_source_punk_api" "my_source_punkapi" { +resource "airbyte_source_goldcast" "my_source_goldcast" { configuration = { - brewed_after = "MM-YYYY" - brewed_before = "MM-YYYY" - id = 22 + access_key = "...my_access_key..." } - definition_id = "d21cf346-58e5-420f-854a-567309cc0ee4" - name = "Randolph Murphy" + definition_id = "df259349-552d-4c82-98f3-0a27183b00ec" + name = "Melissa Gutmann" secret_id = "...my_secret_id..." - workspace_id = "aed57205-4daa-484a-8e28-fea10a8a64b7" + workspace_id = "56c03ec7-b8b6-48fd-bc06-92b4fd673f59" } ``` @@ -50,17 +48,12 @@ resource "airbyte_source_punk_api" "my_source_punkapi" { Required: -- `brewed_after` (String) To extract specific data with Unique ID -- `brewed_before` (String) To extract specific data with Unique ID - -Optional: - -- `id` (String) To extract specific data with Unique ID +- `access_key` (String, Sensitive) Your API Access Key. See here. The key is case sensitive. ## Import Import is supported using the following syntax: ```shell -terraform import airbyte_source_punk_api.my_airbyte_source_punk_api "" +terraform import airbyte_source_goldcast.my_airbyte_source_goldcast "" ``` diff --git a/docs/resources/source_google_ads.md b/docs/resources/source_google_ads.md index 3b9b7c944..a7cf0f052 100644 --- a/docs/resources/source_google_ads.md +++ b/docs/resources/source_google_ads.md @@ -31,15 +31,15 @@ resource "airbyte_source_google_ads" "my_source_googleads" { ] customer_id = "6783948572,5839201945" customer_status_filter = [ - "SUSPENDED", + "CANCELED", ] end_date = "2017-01-30" start_date = "2017-01-25" } - definition_id = "c5fc21d7-22b3-410b-a76f-b731c6d5241e" - name = "Dr. Armando Dibbert" + definition_id = "c9948b00-6105-49fa-81d6-c9b0f0f35d94" + name = "Pearl Batz" secret_id = "...my_secret_id..." - workspace_id = "fc03242c-cd27-463a-8d30-eb91c3df2593" + workspace_id = "93ebb36d-8aae-4a00-b0c4-c84b89e625ba" } ``` diff --git a/docs/resources/source_google_analytics_data_api.md b/docs/resources/source_google_analytics_data_api.md index c4a98e125..4f7b77ae6 100644 --- a/docs/resources/source_google_analytics_data_api.md +++ b/docs/resources/source_google_analytics_data_api.md @@ -38,12 +38,12 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda between_filter = { from_value = { double_value = { - value = 57.56 + value = 54.51 } } to_value = { double_value = { - value = 31.93 + value = 44.08 } } } @@ -64,12 +64,12 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda between_filter = { from_value = { double_value = { - value = 35.8 + value = 41.77 } } to_value = { double_value = { - value = 18.49 + value = 64.64 } } } @@ -81,21 +81,21 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda metrics = [ "...", ] - name = "Edmund Legros" + name = "Julia Stracke" }, ] date_ranges_start_date = "2021-01-01" - keep_empty_rows = false - lookback_window = 2 + keep_empty_rows = true + lookback_window = 14 property_ids = [ "...", ] - window_in_days = 30 + window_in_days = 200 } - definition_id = "183b00ec-7045-4956-803e-c7b8b68fdfc0" - name = "Miriam Deckow" + definition_id = "7e953bf2-defe-4a2f-9145-f48d36313985" + name = "Kim Marvin" secret_id = "...my_secret_id..." - workspace_id = "fd673f59-a8d0-4acc-9948-b0061059fac1" + workspace_id = "52d3206a-fb3a-4724-a60d-40134e58876c" } ``` diff --git a/docs/resources/source_google_analytics_v4_service_account_only.md b/docs/resources/source_google_analytics_v4_service_account_only.md deleted file mode 100644 index 012e02c44..000000000 --- a/docs/resources/source_google_analytics_v4_service_account_only.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "airbyte_source_google_analytics_v4_service_account_only Resource - terraform-provider-airbyte" -subcategory: "" -description: |- - SourceGoogleAnalyticsV4ServiceAccountOnly Resource ---- - -# airbyte_source_google_analytics_v4_service_account_only (Resource) - -SourceGoogleAnalyticsV4ServiceAccountOnly Resource - -## Example Usage - -```terraform -resource "airbyte_source_google_analytics_v4_service_account_only" "my_source_googleanalyticsv4serviceaccountonly" { - configuration = { - credentials = { - service_account_key_authentication = { - credentials_json = "{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }" - } - } - custom_reports = "...my_custom_reports..." - end_date = "2020-06-01" - start_date = "2020-06-01" - view_id = "...my_view_id..." - window_in_days = 200 - } - definition_id = "f0f35d94-2704-4e93-abb3-6d8aaea00f0c" - name = "Kara Macejkovic" - secret_id = "...my_secret_id..." - workspace_id = "89e625ba-e876-4a32-9c31-e1b4b67e953b" -} -``` - - -## Schema - -### Required - -- `configuration` (Attributes) (see [below for nested schema](#nestedatt--configuration)) -- `name` (String) Name of the source e.g. dev-mysql-instance. -- `workspace_id` (String) - -### Optional - -- `definition_id` (String) The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. Requires replacement if changed. -- `secret_id` (String) Optional secretID obtained through the public API OAuth redirect flow. Requires replacement if changed. - -### Read-Only - -- `source_id` (String) -- `source_type` (String) - - -### Nested Schema for `configuration` - -Required: - -- `start_date` (String) The date in the format YYYY-MM-DD. Any data before this date will not be replicated. -- `view_id` (String) The ID for the Google Analytics View you want to fetch data from. This can be found from the Google Analytics Account Explorer. - -Optional: - -- `credentials` (Attributes) Credentials for the service (see [below for nested schema](#nestedatt--configuration--credentials)) -- `custom_reports` (String) A JSON array describing the custom reports you want to sync from Google Analytics. See the docs for more information about the exact format you can use to fill out this field. -- `end_date` (String) The date in the format YYYY-MM-DD. Any data after this date will not be replicated. -- `window_in_days` (Number) The time increment used by the connector when requesting data from the Google Analytics API. More information is available in the the docs. The bigger this value is, the faster the sync will be, but the more likely that sampling will be applied to your data, potentially causing inaccuracies in the returned results. We recommend setting this to 1 unless you have a hard requirement to make the sync faster at the expense of accuracy. The minimum allowed value for this field is 1, and the maximum is 364. . Default: 1 - - -### Nested Schema for `configuration.credentials` - -Optional: - -- `service_account_key_authentication` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--service_account_key_authentication)) - - -### Nested Schema for `configuration.credentials.service_account_key_authentication` - -Required: - -- `credentials_json` (String) The JSON key of the service account to use for authorization - -## Import - -Import is supported using the following syntax: - -```shell -terraform import airbyte_source_google_analytics_v4_service_account_only.my_airbyte_source_google_analytics_v4_service_account_only "" -``` diff --git a/docs/resources/source_google_directory.md b/docs/resources/source_google_directory.md index ea82164cd..90196a286 100644 --- a/docs/resources/source_google_directory.md +++ b/docs/resources/source_google_directory.md @@ -18,14 +18,14 @@ resource "airbyte_source_google_directory" "my_source_googledirectory" { credentials = { service_account_key = { credentials_json = "...my_credentials_json..." - email = "Brittany_Steuber89@hotmail.com" + email = "Allan67@hotmail.com" } } } - definition_id = "a2fd145f-48d3-4631-b985-539f352d3206" - name = "Amos Rath" + definition_id = "128ae06a-57c7-4c57-baf1-e5baddd2747b" + name = "Sylvester Konopelski" secret_id = "...my_secret_id..." - workspace_id = "724a60d4-0134-4e58-876c-b030a128ae06" + workspace_id = "41709ce4-fe16-45bc-8840-e7fb5df25477" } ``` diff --git a/docs/resources/source_google_drive.md b/docs/resources/source_google_drive.md index d5974fb01..41d297ff9 100644 --- a/docs/resources/source_google_drive.md +++ b/docs/resources/source_google_drive.md @@ -36,17 +36,17 @@ resource "airbyte_source_google_drive" "my_source_googledrive" { "...", ] input_schema = "...my_input_schema..." - name = "Marianne Hartmann" + name = "Jose Walter" primary_key = "...my_primary_key..." schemaless = true - validation_policy = "Wait for Discover" + validation_policy = "Skip Record" }, ] } - definition_id = "1e5baddd-2747-4bbc-bf24-1709ce4fe165" - name = "Edmund Gleichner" + definition_id = "9bfb0cb9-d8df-4c27-a8c7-2c3eb5dc5571" + name = "Ms. Angelina Reilly" secret_id = "...my_secret_id..." - workspace_id = "0e7fb5df-2547-47f3-b0b0-ec7c89bfb0cb" + workspace_id = "76987333-86b5-43a4-b9a0-805ff1793bf9" } ``` diff --git a/docs/resources/source_google_pagespeed_insights.md b/docs/resources/source_google_pagespeed_insights.md index 6d9a59b84..82db0c038 100644 --- a/docs/resources/source_google_pagespeed_insights.md +++ b/docs/resources/source_google_pagespeed_insights.md @@ -17,19 +17,19 @@ resource "airbyte_source_google_pagespeed_insights" "my_source_googlepagespeedin configuration = { api_key = "...my_api_key..." categories = [ - "performance", + "pwa", ] strategies = [ - "mobile", + "desktop", ] urls = [ "...", ] } - definition_id = "8dfc27a8-c72c-43eb-9dc5-5714db07d769" - name = "Lance Dicki" + definition_id = "99d63199-bd6b-4468-885e-c21a9ab567f1" + name = "Leticia Kling" secret_id = "...my_secret_id..." - workspace_id = "86b53a47-9a08-405f-b179-3bf9b799d631" + workspace_id = "51fa773f-cf1a-4430-ae08-2909d97bfabb" } ``` diff --git a/docs/resources/source_google_search_console.md b/docs/resources/source_google_search_console.md index f1d5e6e4b..80e4961f4 100644 --- a/docs/resources/source_google_search_console.md +++ b/docs/resources/source_google_search_console.md @@ -29,20 +29,20 @@ resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" dimensions = [ "page", ] - name = "Randolph Stanton" + name = "Allen Jenkins MD" }, ] - data_state = "final" + data_state = "all" end_date = "2021-12-12" site_urls = [ "...", ] - start_date = "2021-06-12" + start_date = "2022-03-09" } - definition_id = "5ec21a9a-b567-4f13-877e-51fa773fcf1a" - name = "Connie Baumbach" + definition_id = "9c174fee-4145-4562-9275-76235e52bb8a" + name = "Roosevelt Lebsack" secret_id = "...my_secret_id..." - workspace_id = "082909d9-7bfa-4bba-9367-1a9ca1d9c174" + workspace_id = "2a7f940d-ec44-4e21-adff-8929e4d23a00" } ``` diff --git a/docs/resources/source_google_sheets.md b/docs/resources/source_google_sheets.md index 51521d6b0..b79546671 100644 --- a/docs/resources/source_google_sheets.md +++ b/docs/resources/source_google_sheets.md @@ -15,7 +15,7 @@ SourceGoogleSheets Resource ```terraform resource "airbyte_source_google_sheets" "my_source_googlesheets" { configuration = { - batch_size = 10 + batch_size = 7 credentials = { authenticate_via_google_o_auth = { client_id = "...my_client_id..." @@ -26,10 +26,10 @@ resource "airbyte_source_google_sheets" "my_source_googlesheets" { names_conversion = false spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit" } - definition_id = "e4145562-d275-4762-b5e5-2bb8adc8fd2a" - name = "Ebony McDermott PhD" + definition_id = "94f7d68d-64a8-410b-a959-587ed0c47c0f" + name = "Roosevelt Waters" secret_id = "...my_secret_id..." - workspace_id = "ec44e216-dff8-4929-a4d2-3a00b494f7d6" + workspace_id = "c0f294c1-1e4e-4993-9294-74281bb54dff" } ``` diff --git a/docs/resources/source_google_webfonts.md b/docs/resources/source_google_webfonts.md index 3506ffbd5..a3741bc9c 100644 --- a/docs/resources/source_google_webfonts.md +++ b/docs/resources/source_google_webfonts.md @@ -20,10 +20,10 @@ resource "airbyte_source_google_webfonts" "my_source_googlewebfonts" { pretty_print = "...my_pretty_print..." sort = "...my_sort..." } - definition_id = "8d64a810-b295-4958-bed0-c47c0f9ce33c" - name = "Kristie Davis" + definition_id = "6cf9b79e-2328-488b-abde-25154a52da80" + name = "Todd Rodriguez" secret_id = "...my_secret_id..." - workspace_id = "c11e4e99-3d29-4474-a81b-b54dff6cf9b7" + workspace_id = "49853a69-5093-45ad-936c-5004734e30b4" } ``` diff --git a/docs/resources/source_greenhouse.md b/docs/resources/source_greenhouse.md index 25a001cb3..184186891 100644 --- a/docs/resources/source_greenhouse.md +++ b/docs/resources/source_greenhouse.md @@ -17,10 +17,10 @@ resource "airbyte_source_greenhouse" "my_source_greenhouse" { configuration = { api_key = "...my_api_key..." } - definition_id = "9e232888-b6bd-4e25-954a-52da80f2bfa4" - name = "Isaac Hessel" + definition_id = "6b959e4e-758a-4c09-a271-19b95b60c98b" + name = "Mitchell Altenwerth" secret_id = "...my_secret_id..." - workspace_id = "6950935a-d536-4c50-8473-4e30b46b959e" + workspace_id = "ab5561ce-1bb1-4cad-aa0e-328a3bd5563e" } ``` diff --git a/docs/resources/source_gridly.md b/docs/resources/source_gridly.md index c5875987f..e1c0e9974 100644 --- a/docs/resources/source_gridly.md +++ b/docs/resources/source_gridly.md @@ -18,10 +18,10 @@ resource "airbyte_source_gridly" "my_source_gridly" { api_key = "...my_api_key..." grid_id = "...my_grid_id..." } - definition_id = "4e758ac0-9227-4119-b95b-60c98bb7037a" - name = "Floyd Hermann DDS" + definition_id = "04de287b-7526-45fd-bf2d-eb8cbf2674a9" + name = "Mary Fay" secret_id = "...my_secret_id..." - workspace_id = "e1bb1cad-aa0e-4328-a3bd-5563e04de287" + workspace_id = "17bfcc52-6af1-40da-801f-b0fc52730b39" } ``` diff --git a/docs/resources/source_harvest.md b/docs/resources/source_harvest.md index 1ac4d435b..a8bff4219 100644 --- a/docs/resources/source_harvest.md +++ b/docs/resources/source_harvest.md @@ -27,10 +27,10 @@ resource "airbyte_source_harvest" "my_source_harvest" { replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" } - definition_id = "65fdff2d-eb8c-4bf2-a74a-92033b17bfcc" - name = "Theresa Kertzmann" + definition_id = "41e4a898-5c78-4fa7-986b-df5bf91acb12" + name = "Helen Legros" secret_id = "...my_secret_id..." - workspace_id = "10da401f-b0fc-4527-b0b3-9994a41e4a89" + workspace_id = "28d89e35-1e86-48df-9f2c-5ad84a46153e" } ``` diff --git a/docs/resources/source_hubplanner.md b/docs/resources/source_hubplanner.md index f9e515fa6..6b5157051 100644 --- a/docs/resources/source_hubplanner.md +++ b/docs/resources/source_hubplanner.md @@ -17,10 +17,10 @@ resource "airbyte_source_hubplanner" "my_source_hubplanner" { configuration = { api_key = "...my_api_key..." } - definition_id = "85c78fa7-d86b-4df5-bf91-acb121083728" - name = "Johnnie Maggio" + definition_id = "b240d626-d488-47cc-aaf5-8e0f5c1159d6" + name = "Frances Gutmann" secret_id = "...my_secret_id..." - workspace_id = "51e868df-1f2c-45ad-84a4-6153eb240d62" + workspace_id = "10eecfc7-f384-4ec6-8405-7d0451918db5" } ``` diff --git a/docs/resources/source_hubspot.md b/docs/resources/source_hubspot.md index f30cd255f..45d92d55c 100644 --- a/docs/resources/source_hubspot.md +++ b/docs/resources/source_hubspot.md @@ -25,10 +25,10 @@ resource "airbyte_source_hubspot" "my_source_hubspot" { enable_experimental_streams = false start_date = "2017-01-25T00:00:00Z" } - definition_id = "887ccaaf-58e0-4f5c-9159-d60149910eec" - name = "Leland Kshlerin" + definition_id = "bbbdb311-964f-499d-a774-5afb65f1720b" + name = "Javier Murray" secret_id = "...my_secret_id..." - workspace_id = "84ec6040-57d0-4451-918d-b5cccbbbdb31" + workspace_id = "c1916264-7e68-40e4-817c-6f4b509c8206" } ``` diff --git a/docs/resources/source_insightly.md b/docs/resources/source_insightly.md index b33833f3a..7bb005013 100644 --- a/docs/resources/source_insightly.md +++ b/docs/resources/source_insightly.md @@ -18,10 +18,10 @@ resource "airbyte_source_insightly" "my_source_insightly" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - definition_id = "64f99d67-745a-4fb6-9f17-20bd7a7ec191" - name = "Irene Huels" + definition_id = "b043ef09-e61b-475b-b267-65eab1ad8429" + name = "Eva Reinger" secret_id = "...my_secret_id..." - workspace_id = "e680e441-7c6f-44b5-89c8-206a4b043ef0" + workspace_id = "59bdc8b9-3f80-4b7f-9570-94a97b6356d5" } ``` diff --git a/docs/resources/source_instagram.md b/docs/resources/source_instagram.md index a9edd7696..ceca59a26 100644 --- a/docs/resources/source_instagram.md +++ b/docs/resources/source_instagram.md @@ -20,10 +20,10 @@ resource "airbyte_source_instagram" "my_source_instagram" { client_secret = "...my_client_secret..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "61b75b72-6765-4eab-9ad8-42954bd759bd" - name = "Clayton Prosacco" + definition_id = "91630fd2-f131-4d4f-bef2-53f33ac135dc" + name = "Kevin Weissnat" secret_id = "...my_secret_id..." - workspace_id = "f80b7f55-7094-4a97-b635-6d53391630fd" + workspace_id = "794a97d5-acf5-4625-ba66-e5ad39192931" } ``` diff --git a/docs/resources/source_instatus.md b/docs/resources/source_instatus.md index 4554553fc..882d28376 100644 --- a/docs/resources/source_instatus.md +++ b/docs/resources/source_instatus.md @@ -17,10 +17,10 @@ resource "airbyte_source_instatus" "my_source_instatus" { configuration = { api_key = "...my_api_key..." } - definition_id = "2f131d4f-bef2-453f-b3ac-135dc90f6379" - name = "Eunice Mayert" + definition_id = "4c65ed70-eb17-4cb4-bc24-002ca0d01711" + name = "Bobby Heidenreich" secret_id = "...my_secret_id..." - workspace_id = "5acf5625-3a66-4e5a-9391-929314c65ed7" + workspace_id = "8dde04a9-ce3b-4e57-bfa4-6127442775ed" } ``` diff --git a/docs/resources/source_intercom.md b/docs/resources/source_intercom.md index abeb68054..9005cd51c 100644 --- a/docs/resources/source_intercom.md +++ b/docs/resources/source_intercom.md @@ -21,10 +21,10 @@ resource "airbyte_source_intercom" "my_source_intercom" { client_secret = "...my_client_secret..." start_date = "2020-11-16T00:00:00Z" } - definition_id = "7cb4fc24-002c-4a0d-8171-1f25a28dde04" - name = "Marshall Schinner" + definition_id = "4e17a648-8571-41ab-94fe-75a513e00977" + name = "Geneva Fisher" secret_id = "...my_secret_id..." - workspace_id = "be57bfa4-6127-4442-b75e-d08074e17a64" + workspace_id = "7c06dd86-b4fb-4de6-ae53-955108cd8df8" } ``` diff --git a/docs/resources/source_ip2whois.md b/docs/resources/source_ip2whois.md index 032bd1800..46a40dec8 100644 --- a/docs/resources/source_ip2whois.md +++ b/docs/resources/source_ip2whois.md @@ -18,10 +18,10 @@ resource "airbyte_source_ip2whois" "my_source_ip2whois" { api_key = "...my_api_key..." domain = "www.facebook.com" } - definition_id = "85711ab9-4fe7-45a5-93e0-0977793827c0" - name = "Mable Stroman" + definition_id = "ddacae82-61af-48b9-bb48-50d654be1e78" + name = "Mercedes Turcotte" secret_id = "...my_secret_id..." - workspace_id = "b4fbde6a-e539-4551-88cd-8df8fddacae8" + workspace_id = "327e7787-5126-4eb5-a944-312d5d5e6a2d" } ``` diff --git a/docs/resources/source_iterable.md b/docs/resources/source_iterable.md index 9a69f37d0..2ce80de15 100644 --- a/docs/resources/source_iterable.md +++ b/docs/resources/source_iterable.md @@ -18,10 +18,10 @@ resource "airbyte_source_iterable" "my_source_iterable" { api_key = "...my_api_key..." start_date = "2021-04-01T00:00:00Z" } - definition_id = "1af8b9bb-4850-4d65-8be1-e785de7e327e" - name = "Georgia Ledner" + definition_id = "c0cc98dd-5412-4256-9139-361b0488926a" + name = "Marion Schimmel" secret_id = "...my_secret_id..." - workspace_id = "126eb569-4431-42d5-95e6-a2d83c0cc98d" + workspace_id = "2e85afcc-9acc-46e7-a95c-9a7c9f197511" } ``` diff --git a/docs/resources/source_jira.md b/docs/resources/source_jira.md index 89f22ec08..bd09acac3 100644 --- a/docs/resources/source_jira.md +++ b/docs/resources/source_jira.md @@ -17,9 +17,9 @@ resource "airbyte_source_jira" "my_source_jira" { configuration = { api_token = "...my_api_token..." domain = "jira..com" - email = "Efren18@yahoo.com" + email = "Celestino_Grimes@yahoo.com" enable_experimental_streams = false - expand_issue_changelog = false + expand_issue_changelog = true expand_issue_transition = false issues_stream_expand_with = [ "renderedFields", @@ -28,13 +28,13 @@ resource "airbyte_source_jira" "my_source_jira" { projects = [ "...", ] - render_fields = false + render_fields = true start_date = "2021-03-01T00:00:00Z" } - definition_id = "1b048892-6ab9-4cfe-ae85-afcc9acc6e7e" - name = "Herman Schowalter" + definition_id = "01aad5e5-f9cf-4b0d-9e8d-3acce90aeed1" + name = "Penny Koepp" secret_id = "...my_secret_id..." - workspace_id = "7c9f1975-11d6-4247-9658-5095001aad5e" + workspace_id = "882d54ce-598c-4c59-ab95-2f06231c57fd" } ``` diff --git a/docs/resources/source_k6_cloud.md b/docs/resources/source_k6_cloud.md index 87eea07ed..8b60baa79 100644 --- a/docs/resources/source_k6_cloud.md +++ b/docs/resources/source_k6_cloud.md @@ -17,10 +17,10 @@ resource "airbyte_source_k6_cloud" "my_source_k6cloud" { configuration = { api_token = "...my_api_token..." } - definition_id = "5f9cfb0d-1e8d-43ac-8e90-aeed1087b988" - name = "Eula Hane" + definition_id = "8f9d1baa-c6e0-45b1-a50c-14468d231cdd" + name = "Jordan Wunsch PhD" secret_id = "...my_secret_id..." - workspace_id = "e598cc59-eb95-42f0-a231-c57fd8f9d1ba" + workspace_id = "deee1be4-e723-4eea-b419-bc59e04a869e" } ``` diff --git a/docs/resources/source_klarna.md b/docs/resources/source_klarna.md index 0f120dc11..20e728b06 100644 --- a/docs/resources/source_klarna.md +++ b/docs/resources/source_klarna.md @@ -18,12 +18,12 @@ resource "airbyte_source_klarna" "my_source_klarna" { password = "...my_password..." playground = true region = "oc" - username = "Gretchen35" + username = "Ben_Greenholt" } - definition_id = "b1e50c14-468d-4231-8dd9-8f81edeee1be" - name = "Sophia Kunze" + definition_id = "3b04e32d-c649-4b6b-88e2-c7d0de0f8a2b" + name = "Tanya Padberg" secret_id = "...my_secret_id..." - workspace_id = "eeaf419b-c59e-404a-869e-9d149f3b04e3" + workspace_id = "e20e7511-1fd0-4612-bfd3-df11978b3859" } ``` diff --git a/docs/resources/source_klaviyo.md b/docs/resources/source_klaviyo.md index 7b917ffb9..bb62d4a73 100644 --- a/docs/resources/source_klaviyo.md +++ b/docs/resources/source_klaviyo.md @@ -18,10 +18,10 @@ resource "airbyte_source_klaviyo" "my_source_klaviyo" { api_key = "...my_api_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "c649b6bc-8e2c-47d0-9e0f-8a2b57adde20" - name = "Mr. Erik Heathcote DVM" + definition_id = "e3c921cc-9284-4a21-955c-54910609be9a" + name = "Ivan Grimes" secret_id = "...my_secret_id..." - workspace_id = "d0612ffd-3df1-4197-8b38-5957e3c921cc" + workspace_id = "b07bcaf1-3ed5-4606-ac59-e7c8aeeeb09f" } ``` diff --git a/docs/resources/source_kyve.md b/docs/resources/source_kyve.md index 1b56eec27..48b1a30f7 100644 --- a/docs/resources/source_kyve.md +++ b/docs/resources/source_kyve.md @@ -15,16 +15,16 @@ SourceKyve Resource ```terraform resource "airbyte_source_kyve" "my_source_kyve" { configuration = { - max_pages = 6 - page_size = 1 - pool_ids = "0,1" + max_pages = 10 + page_size = 9 + pool_ids = "0" start_ids = "0" - url_base = "https://api.korellia.kyve.network/" + url_base = "https://api.kaon.kyve.network/" } - definition_id = "21155c54-9106-409b-a9a9-84e4b07bcaf1" - name = "Gwen Stark" + definition_id = "3fe46a14-03ba-41bd-8103-cfb422849b58" + name = "Constance Harris" secret_id = "...my_secret_id..." - workspace_id = "06ac59e7-c8ae-4eeb-89ff-d3753fe46a14" + workspace_id = "d79d74aa-20ea-469f-9b1a-975dd1b5a029" } ``` diff --git a/docs/resources/source_launchdarkly.md b/docs/resources/source_launchdarkly.md index dcb4ef606..2b431e4d7 100644 --- a/docs/resources/source_launchdarkly.md +++ b/docs/resources/source_launchdarkly.md @@ -17,10 +17,10 @@ resource "airbyte_source_launchdarkly" "my_source_launchdarkly" { configuration = { access_token = "...my_access_token..." } - definition_id = "03ba1bd8-103c-4fb4-a284-9b585759fd79" - name = "Neil Gleichner" + definition_id = "5b197bbb-0227-4d62-9c31-55f731c6e6bc" + name = "Kara O'Keefe III" secret_id = "...my_secret_id..." - workspace_id = "20ea69f1-b1a9-475d-91b5-a0295b197bbb" + workspace_id = "6aee7892-5477-4f38-bc53-022ba4aed299" } ``` diff --git a/docs/resources/source_lemlist.md b/docs/resources/source_lemlist.md index 67149f168..99f4ee488 100644 --- a/docs/resources/source_lemlist.md +++ b/docs/resources/source_lemlist.md @@ -17,10 +17,10 @@ resource "airbyte_source_lemlist" "my_source_lemlist" { configuration = { api_key = "...my_api_key..." } - definition_id = "0227d625-c315-45f7-b1c6-e6bc1caf166a" - name = "Bert Kohler" + definition_id = "5c663b6d-13c6-4e3b-bb93-bd413d75c669" + name = "Molly Huels" secret_id = "...my_secret_id..." - workspace_id = "25477f38-7c53-4022-ba4a-ed2995c663b6" + workspace_id = "2ef16650-e4c3-4120-977a-566ac796fdac" } ``` diff --git a/docs/resources/source_lever_hiring.md b/docs/resources/source_lever_hiring.md index 86959abb3..bc931f744 100644 --- a/docs/resources/source_lever_hiring.md +++ b/docs/resources/source_lever_hiring.md @@ -20,13 +20,13 @@ resource "airbyte_source_lever_hiring" "my_source_leverhiring" { api_key = "...my_api_key..." } } - environment = "Sandbox" + environment = "Production" start_date = "2021-03-01T00:00:00Z" } - definition_id = "13c6e3bb-b93b-4d41-bd75-c6693a6b92ef" - name = "Rosemary Hyatt PhD" + definition_id = "f48b8f86-7010-454c-9db1-ce49a8fc7f8e" + name = "Anita Jacobson" secret_id = "...my_secret_id..." - workspace_id = "4c3120d7-7a56-46ac-b96f-dac1f48b8f86" + workspace_id = "645cfb24-49ee-4f87-a4eb-4b875ea1fa63" } ``` diff --git a/docs/resources/source_linkedin_ads.md b/docs/resources/source_linkedin_ads.md index bfe294e6f..9707f47c6 100644 --- a/docs/resources/source_linkedin_ads.md +++ b/docs/resources/source_linkedin_ads.md @@ -16,11 +16,11 @@ SourceLinkedinAds Resource resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { configuration = { account_ids = [ - 4, + 10, ] ad_analytics_reports = [ { - name = "Carolyn Bednar" + name = "Lynne Baumbach" pivot_by = "MEMBER_COUNTRY_V2" time_granularity = "ALL" }, @@ -32,10 +32,10 @@ resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { } start_date = "2021-05-17" } - definition_id = "1ce49a8f-c7f8-4e24-a726-45cfb2449eef" - name = "Cory Johnson" + definition_id = "3cfd915c-c53a-4e1f-9c37-b350ebb3981c" + name = "Marshall Yundt" secret_id = "...my_secret_id..." - workspace_id = "b4b875ea-1fa6-43f6-80fa-c1403cfd915c" + workspace_id = "3f1e6164-cc87-488f-b77a-58933f7738d6" } ``` diff --git a/docs/resources/source_linkedin_pages.md b/docs/resources/source_linkedin_pages.md index acf346859..c11d1e7d9 100644 --- a/docs/resources/source_linkedin_pages.md +++ b/docs/resources/source_linkedin_pages.md @@ -21,13 +21,13 @@ resource "airbyte_source_linkedin_pages" "my_source_linkedinpages" { } } org_id = "123456789" - start_date = "2022-01-06T04:41:29.233Z" - time_granularity_type = "DAY" + start_date = "2022-02-20T02:33:55.102Z" + time_granularity_type = "MONTH" } - definition_id = "ae1f1c37-b350-4ebb-b981-c89f963f1e61" - name = "Anita Ryan" + definition_id = "7b7f8b16-c616-47f1-a8f0-042f92210b5c" + name = "Mrs. Edmond Cronin" secret_id = "...my_secret_id..." - workspace_id = "788ff77a-5893-43f7-b38d-63dc7b7f8b16" + workspace_id = "6a775647-eb6b-4abc-8f9b-18b2eafdc453" } ``` diff --git a/docs/resources/source_linnworks.md b/docs/resources/source_linnworks.md index 4155ce4e5..3f847a769 100644 --- a/docs/resources/source_linnworks.md +++ b/docs/resources/source_linnworks.md @@ -17,13 +17,13 @@ resource "airbyte_source_linnworks" "my_source_linnworks" { configuration = { application_id = "...my_application_id..." application_secret = "...my_application_secret..." - start_date = "2021-09-13T06:35:49.884Z" + start_date = "2020-11-23T19:16:47.007Z" token = "...my_token..." } - definition_id = "167f1e8f-0042-4f92-a10b-5c8f204e6a77" - name = "Gertrude Gutkowski" + definition_id = "6a0192c4-4771-42b4-a020-8830aabeffb8" + name = "Luther Kunde" secret_id = "...my_secret_id..." - workspace_id = "b6babc0f-9b18-4b2e-afdc-453fb6a0192c" + workspace_id = "1059b440-a5f2-4f61-a4e4-66849f7bbeaa" } ``` diff --git a/docs/resources/source_lokalise.md b/docs/resources/source_lokalise.md index 229f795b3..e7bef34bc 100644 --- a/docs/resources/source_lokalise.md +++ b/docs/resources/source_lokalise.md @@ -18,10 +18,10 @@ resource "airbyte_source_lokalise" "my_source_lokalise" { api_key = "...my_api_key..." project_id = "...my_project_id..." } - definition_id = "447712b4-a020-4883-8aab-effb8d976510" - name = "Lindsey Pouros" + definition_id = "ef524043-cb4c-4473-a8c7-bd5915174a55" + name = "Melba Shields" secret_id = "...my_secret_id..." - workspace_id = "0a5f2f61-a4e4-4668-89f7-bbeaaef52404" + workspace_id = "1daf7626-ef51-4c5f-a52e-0c6c0cc93e76" } ``` diff --git a/docs/resources/source_mailchimp.md b/docs/resources/source_mailchimp.md index 5f21c3b99..e8150146a 100644 --- a/docs/resources/source_mailchimp.md +++ b/docs/resources/source_mailchimp.md @@ -23,10 +23,10 @@ resource "airbyte_source_mailchimp" "my_source_mailchimp" { data_center = "...my_data_center..." start_date = "2020-01-01T00:00:00.000Z" } - definition_id = "b4c473e8-c7bd-4591-9174-a553fda41daf" - name = "Agnes Cronin" + definition_id = "fdef541f-06ca-413b-9e89-c1488faa411d" + name = "Mack Maggio" secret_id = "...my_secret_id..." - workspace_id = "f51c5fa5-2e0c-46c0-8c93-e76e9fdef541" + workspace_id = "269c9d64-8f0b-4ccd-92e9-5af6ed3c47c1" } ``` diff --git a/docs/resources/source_mailgun.md b/docs/resources/source_mailgun.md index 6d629023b..12d2faded 100644 --- a/docs/resources/source_mailgun.md +++ b/docs/resources/source_mailgun.md @@ -15,14 +15,14 @@ SourceMailgun Resource ```terraform resource "airbyte_source_mailgun" "my_source_mailgun" { configuration = { - domain_region = "EU" + domain_region = "US" private_key = "...my_private_key..." start_date = "2023-08-01T00:00:00Z" } - definition_id = "ca13b1e8-9c14-488f-aa41-1d9d922269c9" - name = "Ricardo Gutmann" + definition_id = "0113c2d3-cb5e-4aa6-8b86-a42dbbb853ec" + name = "Jeannette Hayes" secret_id = "...my_secret_id..." - workspace_id = "0bccdd2e-95af-46ed-bc47-c14160113c2d" + workspace_id = "a18b0d79-003d-4e8d-a443-bfaadd29a6df" } ``` diff --git a/docs/resources/source_mailjet_sms.md b/docs/resources/source_mailjet_sms.md index 5f5092f85..4a73cf3a5 100644 --- a/docs/resources/source_mailjet_sms.md +++ b/docs/resources/source_mailjet_sms.md @@ -19,10 +19,10 @@ resource "airbyte_source_mailjet_sms" "my_source_mailjetsms" { start_date = 1666261656 token = "...my_token..." } - definition_id = "b5eaa64b-86a4-42db-bb85-3ec4b5e6a18b" - name = "Christie Kshlerin Jr." + definition_id = "cb6bf32f-af82-45be-a4ec-87aaffeb9ea2" + name = "Robert Windler" secret_id = "...my_secret_id..." - workspace_id = "3de8da44-3bfa-4add-a9a6-dff6cb6bf32f" + workspace_id = "9f4166b4-2b69-4c61-927b-bad3f0bf8ca7" } ``` diff --git a/docs/resources/source_marketo.md b/docs/resources/source_marketo.md index 6200a7841..74dfa5cfc 100644 --- a/docs/resources/source_marketo.md +++ b/docs/resources/source_marketo.md @@ -20,10 +20,10 @@ resource "airbyte_source_marketo" "my_source_marketo" { domain_url = "https://000-AAA-000.mktorest.com" start_date = "2020-09-25T00:00:00Z" } - definition_id = "825bea4e-c87a-4aff-ab9e-a290f7e9f416" - name = "Bridget Gutmann" + definition_id = "bfb1506e-5d6d-4eb8-b49c-82f283fdf1b3" + name = "Judith Pfannerstill" secret_id = "...my_secret_id..." - workspace_id = "69c61d27-bbad-43f0-bf8c-a743bfb1506e" + workspace_id = "f9cacc87-9ba7-4ac0-9647-dc7c271c5044" } ``` diff --git a/docs/resources/source_metabase.md b/docs/resources/source_metabase.md index a8960ea12..44abc65d0 100644 --- a/docs/resources/source_metabase.md +++ b/docs/resources/source_metabase.md @@ -18,12 +18,12 @@ resource "airbyte_source_metabase" "my_source_metabase" { instance_api_url = "https://localhost:3000/api/" password = "...my_password..." session_token = "...my_session_token..." - username = "Fatima_Simonis" + username = "Lisandro_Champlin" } - definition_id = "eb8b49c8-2f28-43fd-b1b3-62a3ef9cacc8" - name = "Misty Price" + definition_id = "4f7e4eab-e3a9-4776-8e79-345d14463033" + name = "Priscilla Zulauf" secret_id = "...my_secret_id..." - workspace_id = "ac01647d-c7c2-471c-9044-a25a4f7e4eab" + workspace_id = "cf10b074-2b93-4b49-9111-a320ccad5adc" } ``` diff --git a/docs/resources/source_microsoft_onedrive.md b/docs/resources/source_microsoft_onedrive.md index bcbfb6739..0b3bdd4c0 100644 --- a/docs/resources/source_microsoft_onedrive.md +++ b/docs/resources/source_microsoft_onedrive.md @@ -25,11 +25,11 @@ resource "airbyte_source_microsoft_onedrive" "my_source_microsoftonedrive" { } drive_name = "...my_drive_name..." folder_path = "...my_folder_path..." - search_scope = "ALL" + search_scope = "ACCESSIBLE_DRIVES" start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 6 + days_to_sync_if_history_is_full = 0 format = { avro_format = { double_as_string = true @@ -39,17 +39,17 @@ resource "airbyte_source_microsoft_onedrive" "my_source_microsoftonedrive" { "...", ] input_schema = "...my_input_schema..." - name = "Jeanette Larson" + name = "Derek Kuhlman" primary_key = "...my_primary_key..." schemaless = true validation_policy = "Emit Record" }, ] } - definition_id = "45d14463-0331-48f2-9cf1-0b0742b93b49" - name = "Miss Joshua Brekke" + definition_id = "95b5ae04-23a6-4249-a514-955fa2ea25a5" + name = "Rosemarie Kulas Sr." secret_id = "...my_secret_id..." - workspace_id = "20ccad5a-dc13-430e-b574-88395b5ae042" + workspace_id = "e389cc42-00a4-4abb-b299-a611cc7be3e8" } ``` @@ -145,12 +145,12 @@ Optional: - `avro_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--avro_format)) - `csv_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--csv_format)) -- `document_file_type_format_experimental` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--document_file_type_format_experimental)) - `jsonl_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--jsonl_format)) - `parquet_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format)) +- `unstructured_document_format` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format)) -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -158,7 +158,7 @@ Optional: -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -167,7 +167,7 @@ Optional: - `encoding` (String) The character encoding of the CSV data. Leave blank to default to UTF8. See list of python encodings for allowable options. Default: "utf8" - `escape_char` (String) The character used for escaping special characters. To disallow escaping, leave this field blank. - `false_values` (List of String) A set of case-sensitive strings that should be interpreted as false values. -- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition)) +- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition)) - `ignore_errors_on_fields_mismatch` (Boolean) Whether to ignore errors that occur when the number of fields in the CSV does not match the number of columns in the schema. Default: false - `null_values` (List of String) A set of case-sensitive strings that should be interpreted as null values. For example, if the value 'NA' should be interpreted as null, enter 'NA' in this field. - `quote_char` (String) The character used for quoting CSV values. To disallow quoting, make this field blank. Default: "\"" @@ -176,25 +176,25 @@ Optional: - `strings_can_be_null` (Boolean) Whether strings can be interpreted as null values. If true, strings that match the null_values set will be interpreted as null. If false, strings that match the null_values set will be interpreted as the string itself. Default: true - `true_values` (List of String) A set of case-sensitive strings that should be interpreted as true values. - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition` Optional: -- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--autogenerated)) -- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--from_csv)) -- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--user_provided)) +- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--autogenerated)) +- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--from_csv)) +- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--user_provided)) - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` Required: @@ -203,38 +203,36 @@ Required: - -### Nested Schema for `configuration.streams.format.parquet_format` - -Optional: + +### Nested Schema for `configuration.streams.format.unstructured_document_format` -- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing)) -- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true -- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" - -### Nested Schema for `configuration.streams.format.parquet_format.processing` + +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: -- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing--local)) - - -### Nested Schema for `configuration.streams.format.parquet_format.processing.local` - +- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false + +### Nested Schema for `configuration.streams.format.unstructured_document_format` - -### Nested Schema for `configuration.streams.format.parquet_format` +Optional: +- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing)) +- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true +- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" - -### Nested Schema for `configuration.streams.format.parquet_format` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing` Optional: -- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false +- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing--local)) + + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing.local` ## Import diff --git a/docs/resources/source_microsoft_sharepoint.md b/docs/resources/source_microsoft_sharepoint.md index 70a409e23..cffdaf77c 100644 --- a/docs/resources/source_microsoft_sharepoint.md +++ b/docs/resources/source_microsoft_sharepoint.md @@ -24,31 +24,31 @@ resource "airbyte_source_microsoft_sharepoint" "my_source_microsoftsharepoint" { } } folder_path = "...my_folder_path..." - search_scope = "ACCESSIBLE_DRIVES" + search_scope = "ALL" start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 1 + days_to_sync_if_history_is_full = 0 format = { avro_format = { - double_as_string = false + double_as_string = true } } globs = [ "...", ] input_schema = "...my_input_schema..." - name = "Mrs. Alfonso Hayes" + name = "Mrs. Al Schamberger" primary_key = "...my_primary_key..." - schemaless = false - validation_policy = "Skip Record" + schemaless = true + validation_policy = "Emit Record" }, ] } - definition_id = "fa2ea25a-51d7-4622-a389-cc4200a4abb3" - name = "Bobbie McCullough" + definition_id = "c2050fdf-2ba7-4d43-920d-3384e15ed535" + name = "Marilyn Kunde" secret_id = "...my_secret_id..." - workspace_id = "11cc7be3-e8ba-4718-8dc0-5c92c2050fdf" + workspace_id = "faeabade-b93c-4772-879b-6069b6a28df3" } ``` @@ -146,12 +146,12 @@ Optional: - `avro_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--avro_format)) - `csv_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--csv_format)) -- `document_file_type_format_experimental` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--document_file_type_format_experimental)) - `jsonl_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--jsonl_format)) - `parquet_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format)) +- `unstructured_document_format` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format)) -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -159,7 +159,7 @@ Optional: -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -168,7 +168,7 @@ Optional: - `encoding` (String) The character encoding of the CSV data. Leave blank to default to UTF8. See list of python encodings for allowable options. Default: "utf8" - `escape_char` (String) The character used for escaping special characters. To disallow escaping, leave this field blank. - `false_values` (List of String) A set of case-sensitive strings that should be interpreted as false values. -- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition)) +- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition)) - `ignore_errors_on_fields_mismatch` (Boolean) Whether to ignore errors that occur when the number of fields in the CSV does not match the number of columns in the schema. Default: false - `null_values` (List of String) A set of case-sensitive strings that should be interpreted as null values. For example, if the value 'NA' should be interpreted as null, enter 'NA' in this field. - `quote_char` (String) The character used for quoting CSV values. To disallow quoting, make this field blank. Default: "\"" @@ -177,25 +177,25 @@ Optional: - `strings_can_be_null` (Boolean) Whether strings can be interpreted as null values. If true, strings that match the null_values set will be interpreted as null. If false, strings that match the null_values set will be interpreted as the string itself. Default: true - `true_values` (List of String) A set of case-sensitive strings that should be interpreted as true values. - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition` Optional: -- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--autogenerated)) -- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--from_csv)) -- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--user_provided)) +- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--autogenerated)) +- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--from_csv)) +- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--user_provided)) - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` Required: @@ -204,38 +204,36 @@ Required: - -### Nested Schema for `configuration.streams.format.parquet_format` - -Optional: + +### Nested Schema for `configuration.streams.format.unstructured_document_format` -- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing)) -- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true -- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" - -### Nested Schema for `configuration.streams.format.parquet_format.processing` + +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: -- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing--local)) - - -### Nested Schema for `configuration.streams.format.parquet_format.processing.local` - +- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false + +### Nested Schema for `configuration.streams.format.unstructured_document_format` - -### Nested Schema for `configuration.streams.format.parquet_format` +Optional: +- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing)) +- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true +- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" - -### Nested Schema for `configuration.streams.format.parquet_format` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing` Optional: -- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false +- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing--local)) + + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing.local` ## Import diff --git a/docs/resources/source_microsoft_teams.md b/docs/resources/source_microsoft_teams.md index 60cba0d5c..9ee5a9087 100644 --- a/docs/resources/source_microsoft_teams.md +++ b/docs/resources/source_microsoft_teams.md @@ -24,10 +24,10 @@ resource "airbyte_source_microsoft_teams" "my_source_microsoftteams" { } period = "D7" } - definition_id = "2ba7d43d-20d3-4384-a15e-d53522788fae" - name = "Ed Ondricka" + definition_id = "196ea920-3cb7-4876-a75a-531f3b4802a3" + name = "Terrence Smith" secret_id = "...my_secret_id..." - workspace_id = "b93c7728-79b6-4069-b6a2-8df3196ea920" + workspace_id = "4976dbe1-16c7-4811-ac70-bfb32667c47d" } ``` diff --git a/docs/resources/source_mixpanel.md b/docs/resources/source_mixpanel.md index 7332c74ea..c65c54a72 100644 --- a/docs/resources/source_mixpanel.md +++ b/docs/resources/source_mixpanel.md @@ -15,23 +15,23 @@ SourceMixpanel Resource ```terraform resource "airbyte_source_mixpanel" "my_source_mixpanel" { configuration = { - attribution_window = 2 + attribution_window = 3 credentials = { project_secret = { api_secret = "...my_api_secret..." } } - date_window_size = 8 + date_window_size = 0 end_date = "2021-11-16" - project_timezone = "UTC" + project_timezone = "US/Pacific" region = "US" select_properties_by_default = false start_date = "2021-11-16" } - definition_id = "5a531f3b-4802-4a3b-9d67-4976dbe116c7" - name = "Raymond Boyer" + definition_id = "c03f8392-0634-4c9d-b1c4-26709282f0b3" + name = "Nora Waelchi" secret_id = "...my_secret_id..." - workspace_id = "70bfb326-67c4-47d5-8361-6107c03f8392" + workspace_id = "729ff502-4b69-40b2-b36f-2f7a3b95d4ab" } ``` diff --git a/docs/resources/source_monday.md b/docs/resources/source_monday.md index ed3aefe60..3df7140b6 100644 --- a/docs/resources/source_monday.md +++ b/docs/resources/source_monday.md @@ -21,10 +21,10 @@ resource "airbyte_source_monday" "my_source_monday" { } } } - definition_id = "0634c9db-1c42-4670-9282-f0b308e78729" - name = "Mr. Emmett Hermiston" + definition_id = "cb3edfbb-ab6a-4d0e-84a4-dc970c078573" + name = "Benjamin Bartell" secret_id = "...my_secret_id..." - workspace_id = "b690b273-6f2f-47a3-b95d-4abcb3edfbba" + workspace_id = "990f9b2c-e7a6-47a8-9150-ea86120cd618" } ``` diff --git a/docs/resources/source_mongodb_internal_poc.md b/docs/resources/source_mongodb_internal_poc.md index 777692bba..eee24e385 100644 --- a/docs/resources/source_mongodb_internal_poc.md +++ b/docs/resources/source_mongodb_internal_poc.md @@ -21,10 +21,10 @@ resource "airbyte_source_mongodb_internal_poc" "my_source_mongodbinternalpoc" { replica_set = "...my_replica_set..." user = "...my_user..." } - definition_id = "6ad0e44a-4dc9-470c-8785-73a20ac990f9" - name = "Steve Sauer" + definition_id = "74280681-2ca7-4b26-9526-15553a713498" + name = "Luis Wilderman" secret_id = "...my_secret_id..." - workspace_id = "a67a8515-0ea8-4612-8cd6-18d742806812" + workspace_id = "99a12d6e-33e6-46d7-80d4-772456d0d26d" } ``` diff --git a/docs/resources/source_mongodb_v2.md b/docs/resources/source_mongodb_v2.md index a98679326..b01a1b6d1 100644 --- a/docs/resources/source_mongodb_v2.md +++ b/docs/resources/source_mongodb_v2.md @@ -22,20 +22,20 @@ resource "airbyte_source_mongodb_v2" "my_source_mongodbv2" { connection_string = "mongodb+srv://cluster0.abcd1.mongodb.net/" database = "...my_database..." password = "...my_password..." - schema_enforced = false - username = "Luciano.King42" + schema_enforced = true + username = "Ashley_Gerhold" } } - discover_sample_size = 6 - initial_waiting_seconds = 4 + discover_sample_size = 8 + initial_waiting_seconds = 2 invalid_cdc_cursor_position_behavior = "Fail sync" queue_size = 4 update_capture_mode = "Lookup" } - definition_id = "5553a713-498a-43f9-b99a-12d6e33e66d7" - name = "Melissa Stoltenberg" + definition_id = "ca647ba4-f7aa-4ba2-9784-141a21c8938a" + name = "Marc Willms" secret_id = "...my_secret_id..." - workspace_id = "72456d0d-26d9-4147-bb35-66ca647ba4f7" + workspace_id = "b78bed98-212c-4704-ae19-387527d5e3ef" } ``` diff --git a/docs/resources/source_mssql.md b/docs/resources/source_mssql.md index d16c9fd0d..a53fb420f 100644 --- a/docs/resources/source_mssql.md +++ b/docs/resources/source_mssql.md @@ -22,9 +22,9 @@ resource "airbyte_source_mssql" "my_source_mssql" { port = 1433 replication_method = { read_changes_using_change_data_capture_cdc = { - initial_waiting_seconds = 7 - invalid_cdc_cursor_position_behavior = "Re-sync data" - queue_size = 7 + initial_waiting_seconds = 1 + invalid_cdc_cursor_position_behavior = "Fail sync" + queue_size = 4 } } schemas = [ @@ -36,12 +36,12 @@ resource "airbyte_source_mssql" "my_source_mssql" { tunnel_method = { no_tunnel = {} } - username = "Caroline_Harvey" + username = "Raymond.Armstrong73" } - definition_id = "4141a21c-8938-4ad6-bcbb-78bed98212c7" - name = "Eleanor O'Hara V" + definition_id = "7968b724-2137-4fe2-a9e2-6c4c104f1dbe" + name = "Luz Brown" secret_id = "...my_secret_id..." - workspace_id = "387527d5-e3ef-4724-ad0c-0b7968b72421" + workspace_id = "90447757-3847-465c-b741-8014d1f26365" } ``` diff --git a/docs/resources/source_my_hours.md b/docs/resources/source_my_hours.md index a5fb315df..f431f065a 100644 --- a/docs/resources/source_my_hours.md +++ b/docs/resources/source_my_hours.md @@ -20,10 +20,10 @@ resource "airbyte_source_my_hours" "my_source_myhours" { password = "...my_password..." start_date = "2016-01-01" } - definition_id = "26c4c104-f1db-4e3b-9f29-044775738476" - name = "Brooke Kihn" + definition_id = "e0e5e5f3-86d0-4ac5-af3c-6558d9b03d25" + name = "Percy Walker" secret_id = "...my_secret_id..." - workspace_id = "18014d1f-2636-451b-b7f9-fe0e5e5f386d" + workspace_id = "badc477c-b62b-459b-9f1e-e4249578a5bc" } ``` diff --git a/docs/resources/source_mysql.md b/docs/resources/source_mysql.md index 160183145..115f47146 100644 --- a/docs/resources/source_mysql.md +++ b/docs/resources/source_mysql.md @@ -22,8 +22,9 @@ resource "airbyte_source_mysql" "my_source_mysql" { port = 3306 replication_method = { read_changes_using_binary_log_cdc = { - initial_waiting_seconds = 7 - invalid_cdc_cursor_position_behavior = "Re-sync data" + initial_load_timeout_hours = 7 + initial_waiting_seconds = 8 + invalid_cdc_cursor_position_behavior = "Fail sync" server_time_zone = "...my_server_time_zone..." } } @@ -33,12 +34,12 @@ resource "airbyte_source_mysql" "my_source_mysql" { tunnel_method = { no_tunnel = {} } - username = "Flossie.Padberg78" + username = "Rachelle.Rippin" } - definition_id = "6558d9b0-3d25-4bee-bdba-dc477cb62b59" - name = "Dr. Kirk Welch" + definition_id = "b2c4dd4d-4290-4774-9ee0-bbab0457d926" + name = "Miriam Lynch" secret_id = "...my_secret_id..." - workspace_id = "4249578a-5bcb-4bc2-8b83-b2c4dd4d4290" + workspace_id = "ecd841e7-2a76-46a6-86fa-a512d8044b05" } ``` @@ -92,6 +93,7 @@ Optional: Optional: +- `initial_load_timeout_hours` (Number) The amount of time an initial load is allowed to continue for before catching up on CDC logs. Default: 8 - `initial_waiting_seconds` (Number) The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 1200 seconds. Read about initial waiting time. Default: 300 - `invalid_cdc_cursor_position_behavior` (String) Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss. must be one of ["Fail sync", "Re-sync data"]; Default: "Fail sync" - `server_time_zone` (String) Enter the configured MySQL server timezone. This should only be done if the configured timezone in your MySQL instance does not conform to IANNA standard. diff --git a/docs/resources/source_netsuite.md b/docs/resources/source_netsuite.md index 11d25465b..02b84e357 100644 --- a/docs/resources/source_netsuite.md +++ b/docs/resources/source_netsuite.md @@ -24,12 +24,12 @@ 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 = 8 } - definition_id = "741ee0bb-ab04-457d-9263-98e6ecd841e7" - name = "Jan Kub" + definition_id = "5b711236-1f26-4d47-b86c-dec1a2bc2b81" + name = "Francisco Hegmann" secret_id = "...my_secret_id..." - workspace_id = "a686faa5-12d8-4044-b05c-5b7112361f26" + workspace_id = "ceb6c910-dc95-4a96-8b5f-3bc4b3253e6b" } ``` diff --git a/docs/resources/source_notion.md b/docs/resources/source_notion.md index 47f227ed2..573378737 100644 --- a/docs/resources/source_notion.md +++ b/docs/resources/source_notion.md @@ -22,10 +22,10 @@ resource "airbyte_source_notion" "my_source_notion" { } start_date = "2020-11-16T00:00:00.000Z" } - definition_id = "7b86cdec-1a2b-4c2b-81e4-5e3ceb6c910d" - name = "Terrence Haley" + definition_id = "91e25444-d223-44fd-9d8e-a1c7d43320fa" + name = "Miss Marshall Sauer" secret_id = "...my_secret_id..." - workspace_id = "6cb5f3bc-4b32-453e-abd5-91e25444d223" + workspace_id = "dab7e73a-5971-4814-a4dc-1f633abc58a5" } ``` diff --git a/docs/resources/source_nytimes.md b/docs/resources/source_nytimes.md index 1171a532d..6a1c53034 100644 --- a/docs/resources/source_nytimes.md +++ b/docs/resources/source_nytimes.md @@ -21,10 +21,10 @@ resource "airbyte_source_nytimes" "my_source_nytimes" { share_type = "facebook" start_date = "1851-01" } - definition_id = "a1c7d433-20fa-4c9c-9a8d-ab7e73a59718" - name = "Suzanne Terry" + definition_id = "517fc88b-c499-48d7-9efe-dea337d55b15" + name = "Sabrina Kuvalis" secret_id = "...my_secret_id..." - workspace_id = "c1f633ab-c58a-4542-9517-fc88bc4998d7" + workspace_id = "92c72d54-1f53-4892-8a50-561c1cc6291a" } ``` diff --git a/docs/resources/source_okta.md b/docs/resources/source_okta.md index b9de7b8c1..c65e52644 100644 --- a/docs/resources/source_okta.md +++ b/docs/resources/source_okta.md @@ -23,10 +23,10 @@ resource "airbyte_source_okta" "my_source_okta" { domain = "...my_domain..." start_date = "2022-07-22T00:00:00Z" } - definition_id = "fedea337-d55b-4155-98db-92c72d541f53" - name = "Marion Champlin" + definition_id = "d7b3d761-e29e-4f26-ae07-d2b59ab56edb" + name = "Mr. Pearl Ruecker DDS" secret_id = "...my_secret_id..." - workspace_id = "50561c1c-c629-41a1-ad7b-3d761e29ef26" + workspace_id = "cdeed12b-d5eb-473d-822a-608737f9f9cf" } ``` diff --git a/docs/resources/source_omnisend.md b/docs/resources/source_omnisend.md index 831c6c09b..758071b7b 100644 --- a/docs/resources/source_omnisend.md +++ b/docs/resources/source_omnisend.md @@ -17,10 +17,10 @@ resource "airbyte_source_omnisend" "my_source_omnisend" { configuration = { api_key = "...my_api_key..." } - definition_id = "ae07d2b5-9ab5-46ed-b57c-000ccdeed12b" - name = "Corey Walker" + definition_id = "17c9c1c9-1886-4190-8dfc-35041fcdcac2" + name = "Andrea Howe" secret_id = "...my_secret_id..." - workspace_id = "3d022a60-8737-4f9f-9cf1-7c9c1c918861" + workspace_id = "f24d9236-9b1f-4f5a-bba2-88f10a0635ff" } ``` diff --git a/docs/resources/source_onesignal.md b/docs/resources/source_onesignal.md index d7afd99f1..f0848f913 100644 --- a/docs/resources/source_onesignal.md +++ b/docs/resources/source_onesignal.md @@ -26,10 +26,10 @@ resource "airbyte_source_onesignal" "my_source_onesignal" { start_date = "2020-11-16T00:00:00Z" user_auth_key = "...my_user_auth_key..." } - definition_id = "0dfc3504-1fcd-4cac-a226-2ef24d92369b" - name = "Shawna Wilkinson" + definition_id = "f388685d-8941-4e7d-b072-3f94739cc80e" + name = "Pedro Prohaska Sr." secret_id = "...my_secret_id..." - workspace_id = "7ba288f1-0a06-435f-b19f-388685d8941e" + workspace_id = "25778f7a-023c-41e0-8d80-f694c48e9d0f" } ``` diff --git a/docs/resources/source_oracle.md b/docs/resources/source_oracle.md index 3cbd5cd17..0dbb05dfc 100644 --- a/docs/resources/source_oracle.md +++ b/docs/resources/source_oracle.md @@ -28,19 +28,19 @@ resource "airbyte_source_oracle" "my_source_oracle" { host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." - port = 9 + port = 2 schemas = [ "...", ] tunnel_method = { no_tunnel = {} } - username = "Neha.Abbott" + username = "Orin_Romaguera85" } - definition_id = "3f94739c-c80e-4e5b-b122-5778f7a023c1" - name = "Charles Littel" + definition_id = "71dab038-014a-4124-b6e7-b2083a37b0c9" + name = "Harry Kuhic" secret_id = "...my_secret_id..." - workspace_id = "0f694c48-e9d0-4f84-8cba-d71dab038014" + workspace_id = "a38aa73d-79a8-45cb-b246-518021619872" } ``` diff --git a/docs/resources/source_orb.md b/docs/resources/source_orb.md index 49f3470a6..4765f9855 100644 --- a/docs/resources/source_orb.md +++ b/docs/resources/source_orb.md @@ -17,7 +17,7 @@ resource "airbyte_source_orb" "my_source_orb" { configuration = { api_key = "...my_api_key..." end_date = "2024-03-01T00:00:00Z" - lookback_window_days = 7 + lookback_window_days = 2 numeric_event_properties_keys = [ "...", ] @@ -28,10 +28,10 @@ resource "airbyte_source_orb" "my_source_orb" { ] subscription_usage_grouping_key = "...my_subscription_usage_grouping_key..." } - definition_id = "124b6e7b-2083-4a37-b0c9-92762a38aa73" - name = "Julio Mayer" + definition_id = "e09a2aae-62d9-4d77-8257-55e6995c5765" + name = "Miss Nadine Wunsch" secret_id = "...my_secret_id..." - workspace_id = "5cb72465-1802-4161-9872-363e09a2aae6" + workspace_id = "422b3629-976b-4741-9bfa-fbdd349afd0c" } ``` diff --git a/docs/resources/source_orbit.md b/docs/resources/source_orbit.md index 12e5a1efc..dc60eb3df 100644 --- a/docs/resources/source_orbit.md +++ b/docs/resources/source_orbit.md @@ -19,10 +19,10 @@ resource "airbyte_source_orbit" "my_source_orbit" { start_date = "...my_start_date..." workspace = "...my_workspace..." } - definition_id = "2d9d7702-5755-4e69-95c5-7652df199422" - name = "Danny Jakubowski" + definition_id = "d95bcfe3-342d-4c40-aaef-61635af9f94f" + name = "Ivan Hansen" secret_id = "...my_secret_id..." - workspace_id = "976b741d-bfaf-4bdd-b49a-fd0cd95bcfe3" + workspace_id = "22e677c7-7be4-4e42-84a4-1ce525b48930" } ``` diff --git a/docs/resources/source_outbrain_amplify.md b/docs/resources/source_outbrain_amplify.md index 5bfdb6f70..621da4a91 100644 --- a/docs/resources/source_outbrain_amplify.md +++ b/docs/resources/source_outbrain_amplify.md @@ -22,13 +22,13 @@ resource "airbyte_source_outbrain_amplify" "my_source_outbrainamplify" { } end_date = "...my_end_date..." geo_location_breakdown = "country" - report_granularity = "daily" + report_granularity = "weekly" start_date = "...my_start_date..." } - definition_id = "2dc402ae-f616-435a-b9f9-4f985aa22e67" - name = "Della Koepp" + definition_id = "e9c1af99-61b1-4c88-ba57-2712d8f3b643" + name = "Marianne Reilly" secret_id = "...my_secret_id..." - workspace_id = "e4e4244a-41ce-4525-b489-3048e9c1af99" + workspace_id = "b32ad03f-d9a9-4d8b-a9b0-df86503c4743" } ``` diff --git a/docs/resources/source_outreach.md b/docs/resources/source_outreach.md index 2d5d692d6..260821659 100644 --- a/docs/resources/source_outreach.md +++ b/docs/resources/source_outreach.md @@ -21,10 +21,10 @@ resource "airbyte_source_outreach" "my_source_outreach" { refresh_token = "...my_refresh_token..." start_date = "2020-11-16T00:00:00Z" } - definition_id = "61b1c883-a572-4712-98f3-b6433cb82b32" - name = "Sammy Aufderhar" + definition_id = "ee79bd13-e204-4659-bbdc-56c2f2e20259" + name = "Mrs. Ramon Quitzon" secret_id = "...my_secret_id..." - workspace_id = "d9a9d8ba-9b0d-4f86-903c-4743ee79bd13" + workspace_id = "98d3fc54-30ae-4066-94a9-1bbbc35ba892" } ``` diff --git a/docs/resources/source_paypal_transaction.md b/docs/resources/source_paypal_transaction.md index 720501d17..b5de8316a 100644 --- a/docs/resources/source_paypal_transaction.md +++ b/docs/resources/source_paypal_transaction.md @@ -18,16 +18,16 @@ resource "airbyte_source_paypal_transaction" "my_source_paypaltransaction" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." dispute_start_date = "2021-06-11T23:59:59.000Z" - end_date = "2021-06-11T23:59:59Z" - is_sandbox = false + end_date = "2021-06-11T23:59:59+00:00" + is_sandbox = true refresh_token = "...my_refresh_token..." - start_date = "2021-06-11T23:59:59+00:00" - time_window = 9 + start_date = "2021-06-11T23:59:59Z" + time_window = 5 } - definition_id = "c56c2f2e-2025-49c6-b139-98d3fc5430ae" - name = "Jeanette Howe" + definition_id = "b9331a5d-dafa-4d6a-b5ec-8caacd8d2abf" + name = "Leland Altenwerth" secret_id = "...my_secret_id..." - workspace_id = "a91bbbc3-5ba8-492b-ad58-05ab7b9331a5" + workspace_id = "3811ddad-7d79-4aa2-af68-e00dcdadd479" } ``` diff --git a/docs/resources/source_paystack.md b/docs/resources/source_paystack.md index 00939b963..05e0054a8 100644 --- a/docs/resources/source_paystack.md +++ b/docs/resources/source_paystack.md @@ -15,14 +15,14 @@ SourcePaystack Resource ```terraform resource "airbyte_source_paystack" "my_source_paystack" { configuration = { - lookback_window_days = 9 + lookback_window_days = 4 secret_key = "...my_secret_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "fad6ab5e-c8ca-4acd-8d2a-bfdc0f33811d" - name = "Omar Sporer" + definition_id = "68b4fa72-62d2-4a48-b976-dd11df098493" + name = "Sally West" secret_id = "...my_secret_id..." - workspace_id = "79aa2af6-8e00-4dcd-add4-7961168b4fa7" + workspace_id = "27890d41-f139-419c-925e-386517a80112" } ``` diff --git a/docs/resources/source_pendo.md b/docs/resources/source_pendo.md index e74c10b40..dd8b0e3eb 100644 --- a/docs/resources/source_pendo.md +++ b/docs/resources/source_pendo.md @@ -17,10 +17,10 @@ resource "airbyte_source_pendo" "my_source_pendo" { configuration = { api_key = "...my_api_key..." } - definition_id = "262d2a48-f976-4dd1-9df0-9849375f6227" - name = "Terrence Anderson" + definition_id = "166a5ec4-6f2b-4ce2-a77b-bccef588ac54" + name = "Randolph Walker" secret_id = "...my_secret_id..." - workspace_id = "1f13919c-925e-4386-917a-80112166a5ec" + workspace_id = "7a9dbf52-c792-493e-a8aa-81903348b38f" } ``` diff --git a/docs/resources/source_persistiq.md b/docs/resources/source_persistiq.md index 433795e63..45f8aa6ef 100644 --- a/docs/resources/source_persistiq.md +++ b/docs/resources/source_persistiq.md @@ -17,10 +17,10 @@ resource "airbyte_source_persistiq" "my_source_persistiq" { configuration = { api_key = "...my_api_key..." } - definition_id = "46f2bce2-e77b-4bcc-af58-8ac548be8a7a" - name = "Wilfred Quitzon" + definition_id = "e3b52011-25b2-4925-aa78-4d2d0f170747" + name = "Sonja Dibbert" secret_id = "...my_secret_id..." - workspace_id = "2c79293e-28aa-4819-8334-8b38fe3b5201" + workspace_id = "a49780ba-1d6a-428c-aeef-e59b72db2240" } ``` diff --git a/docs/resources/source_pexels_api.md b/docs/resources/source_pexels_api.md index 01bf169cf..ab865bbd7 100644 --- a/docs/resources/source_pexels_api.md +++ b/docs/resources/source_pexels_api.md @@ -17,15 +17,15 @@ resource "airbyte_source_pexels_api" "my_source_pexelsapi" { configuration = { api_key = "...my_api_key..." color = "red" - locale = "en-US" - orientation = "square" - query = "oceans" + locale = "pt-BR" + orientation = "landscape" + query = "people" size = "large" } - definition_id = "9252a784-d2d0-4f17-8747-5e2d6a49780b" - name = "Jack Swaniawski" + definition_id = "0da76331-50ac-4fec-a41f-73646e1c8795" + name = "Lee Nikolaus" secret_id = "...my_secret_id..." - workspace_id = "28c6eefe-59b7-42db-a240-7ce310da7633" + workspace_id = "a8255310-1401-4784-96a4-c1173de2c277" } ``` diff --git a/docs/resources/source_pinterest.md b/docs/resources/source_pinterest.md index 87ebd2d05..13e708f1c 100644 --- a/docs/resources/source_pinterest.md +++ b/docs/resources/source_pinterest.md @@ -23,30 +23,30 @@ resource "airbyte_source_pinterest" "my_source_pinterest" { custom_reports = [ { attribution_types = [ - "INDIVIDUAL", + "HOUSEHOLD", ] - click_window_days = "7" + click_window_days = "14" columns = [ - "CAMPAIGN_DAILY_SPEND_CAP", + "VIDEO_LENGTH", ] - conversion_report_time = "TIME_OF_CONVERSION" - engagement_window_days = "30" - granularity = "MONTH" - level = "PRODUCT_GROUP_TARGETING" - name = "Dr. Fred Grady" + conversion_report_time = "TIME_OF_AD_ACTION" + engagement_window_days = "1" + granularity = "HOUR" + level = "PIN_PROMOTION" + name = "Mr. Marcos Baumbach DVM" start_date = "2022-07-28" - view_window_days = "1" + view_window_days = "30" }, ] start_date = "2022-07-28" status = [ - "ACTIVE", + "ARCHIVED", ] } - definition_id = "c879583a-59a8-4255-b101-40178456a4c1" - name = "Bessie Emard" + definition_id = "2676b4d9-282a-4d19-925d-5253fa02ef00" + name = "Ms. Moses Boehm" secret_id = "...my_secret_id..." - workspace_id = "2c277a8e-2388-4fd0-920f-62c51a2676b4" + workspace_id = "81572f72-4d1e-40e7-a708-b9f815bf9f13" } ``` diff --git a/docs/resources/source_pipedrive.md b/docs/resources/source_pipedrive.md index e9dbfd070..314f76201 100644 --- a/docs/resources/source_pipedrive.md +++ b/docs/resources/source_pipedrive.md @@ -18,10 +18,10 @@ resource "airbyte_source_pipedrive" "my_source_pipedrive" { api_token = "...my_api_token..." replication_start_date = "2017-01-25 00:00:00Z" } - definition_id = "d9282ad1-9d25-4d52-93fa-02ef008f118d" - name = "Peter Hilll" + definition_id = "70c28b27-8d25-4e4e-a4a5-1abe7bbe4e8d" + name = "Derrick Wehner" secret_id = "...my_secret_id..." - workspace_id = "f724d1e0-e7e7-408b-9f81-5bf9f1370c28" + workspace_id = "7ba5cf8d-b48a-42cc-8047-b120c3ecc155" } ``` diff --git a/docs/resources/source_pocket.md b/docs/resources/source_pocket.md index fa9aeaf10..bce161b5f 100644 --- a/docs/resources/source_pocket.md +++ b/docs/resources/source_pocket.md @@ -17,20 +17,20 @@ resource "airbyte_source_pocket" "my_source_pocket" { configuration = { access_token = "...my_access_token..." consumer_key = "...my_consumer_key..." - content_type = "image" - detail_type = "simple" + content_type = "video" + detail_type = "complete" domain = "...my_domain..." - favorite = false + favorite = true search = "...my_search..." since = "2022-10-20 14:14:14" sort = "title" - state = "all" + state = "unread" tag = "...my_tag..." } - definition_id = "25e4ee4a-51ab-4e7b-be4e-8da5f867ba5c" - name = "Felix Swaniawski" + definition_id = "f33bbc2f-8e75-4b95-ae5d-d11c77a4e3aa" + name = "Nadine Breitenberg" secret_id = "...my_secret_id..." - workspace_id = "8a2cc404-7b12-40c3-acc1-558e983f33bb" + workspace_id = "4fcd7d93-9b8b-46b2-8092-0aa8be086075" } ``` diff --git a/docs/resources/source_pokeapi.md b/docs/resources/source_pokeapi.md index b34580a3f..e0aa70e76 100644 --- a/docs/resources/source_pokeapi.md +++ b/docs/resources/source_pokeapi.md @@ -15,12 +15,12 @@ SourcePokeapi Resource ```terraform resource "airbyte_source_pokeapi" "my_source_pokeapi" { configuration = { - pokemon_name = "snorlax" + pokemon_name = "ditto" } - definition_id = "2f8e75b9-5ee5-4dd1-9c77-a4e3aa4d1c74" - name = "Gregg Smitham" + definition_id = "1b21ea9b-c9d1-4c88-b1ee-12f8a7db098a" + name = "Lucille Blanda" secret_id = "...my_secret_id..." - workspace_id = "939b8b6b-2c09-420a-a8be-08607521b21e" + workspace_id = "6a87d389-094e-4fa6-bbbe-a9f5a35d1bd0" } ``` diff --git a/docs/resources/source_polygon_stock_api.md b/docs/resources/source_polygon_stock_api.md index 15ceacc6d..33a89c037 100644 --- a/docs/resources/source_polygon_stock_api.md +++ b/docs/resources/source_polygon_stock_api.md @@ -18,17 +18,17 @@ resource "airbyte_source_polygon_stock_api" "my_source_polygonstockapi" { adjusted = "false" api_key = "...my_api_key..." end_date = "2020-10-14" - limit = 120 - multiplier = 2 - sort = "desc" + limit = 100 + multiplier = 1 + sort = "asc" start_date = "2020-10-14" stocks_ticker = "MSFT" timespan = "day" } - definition_id = "1ee12f8a-7db0-498a-b412-66a87d389094" - name = "Emanuel Paucek" + definition_id = "a6472a5f-8aec-48fe-9b8f-c35367bfee52" + name = "Olive Durgan" secret_id = "...my_secret_id..." - workspace_id = "bbea9f5a-35d1-4bd0-bb63-21f6b4ca6472" + workspace_id = "74e8f7b8-37d7-46b0-aa3d-797c2fd02395" } ``` diff --git a/docs/resources/source_postgres.md b/docs/resources/source_postgres.md index 9b3fd1158..3c4056446 100644 --- a/docs/resources/source_postgres.md +++ b/docs/resources/source_postgres.md @@ -34,12 +34,12 @@ resource "airbyte_source_postgres" "my_source_postgres" { tunnel_method = { no_tunnel = {} } - username = "Era_Wisoky" + username = "Jayme_Boyer" } - definition_id = "ec8fedb8-fc35-4367-bfee-523e36b74e8f" - name = "Lula Lemke" + definition_id = "206b8fda-8b48-4bf3-b0e9-631ebcafaa2e" + name = "Dr. Clinton Osinski DDS" secret_id = "...my_secret_id..." - workspace_id = "d76b02a3-d797-4c2f-9023-950717b206b8" + workspace_id = "b6197095-b91e-4126-900f-09eb706bb016" } ``` diff --git a/docs/resources/source_posthog.md b/docs/resources/source_posthog.md index 291fc3eed..764dce386 100644 --- a/docs/resources/source_posthog.md +++ b/docs/resources/source_posthog.md @@ -20,10 +20,10 @@ resource "airbyte_source_posthog" "my_source_posthog" { events_time_step = 5 start_date = "2021-01-01T00:00:00Z" } - definition_id = "b48bf3f0-e963-41eb-8afa-a2ee7a1e0cb6" - name = "Ms. Jenny Konopelski" + definition_id = "c6bfae2b-40c1-473d-8d61-133ddb2a9593" + name = "Rosalie Walter Jr." secret_id = "...my_secret_id..." - workspace_id = "b91e1261-00f0-49eb-b06b-b016ea0ac6bf" + workspace_id = "62e7b59a-4e78-4152-8bd2-66e4c12d05e7" } ``` diff --git a/docs/resources/source_postmarkapp.md b/docs/resources/source_postmarkapp.md index 9a9806930..fa85f49c3 100644 --- a/docs/resources/source_postmarkapp.md +++ b/docs/resources/source_postmarkapp.md @@ -18,10 +18,10 @@ 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..." } - definition_id = "ae2b40c1-73d4-4d61-933d-db2a95937ced" - name = "Sandra Hodkiewicz" + definition_id = "f58d4a06-25cb-4ff5-b31f-2b9304d3ebf3" + name = "Cora Barton" secret_id = "...my_secret_id..." - workspace_id = "7b59a4e7-8152-4cbd-a66e-4c12d05e7f58" + workspace_id = "e61711be-8829-424e-a80a-a2980d84713e" } ``` diff --git a/docs/resources/source_prestashop.md b/docs/resources/source_prestashop.md index 31ce18a6b..5fc053b06 100644 --- a/docs/resources/source_prestashop.md +++ b/docs/resources/source_prestashop.md @@ -19,10 +19,10 @@ resource "airbyte_source_prestashop" "my_source_prestashop" { start_date = "2022-01-01" url = "...my_url..." } - definition_id = "a0625cbf-f5b3-41f2-b930-4d3ebf32902d" - name = "Hector Breitenberg Jr." + definition_id = "f014dd9a-f7c7-4e9c-8620-9ea52c707cb0" + name = "Rosalie Hagenes" secret_id = "...my_secret_id..." - workspace_id = "be882924-ee80-4aa2-980d-84713ebef014" + workspace_id = "d21cf346-58e5-420f-854a-567309cc0ee4" } ``` diff --git a/docs/resources/source_pypi.md b/docs/resources/source_pypi.md index 2dfd1cb3a..92ee28d68 100644 --- a/docs/resources/source_pypi.md +++ b/docs/resources/source_pypi.md @@ -18,10 +18,10 @@ resource "airbyte_source_pypi" "my_source_pypi" { project_name = "sampleproject" version = "1.2.0" } - definition_id = "7a4fe630-3928-48c9-9001-e515b2e74052" - name = "Sandy Homenick" + definition_id = "bba7faed-5720-454d-aa84-a4e28fea10a8" + name = "Elmer Grady" secret_id = "...my_secret_id..." - workspace_id = "ad65e8ae-1d21-47c0-bcbe-7d2d3433ea86" + workspace_id = "7a4fe630-3928-48c9-9001-e515b2e74052" } ``` diff --git a/docs/resources/source_qualaroo.md b/docs/resources/source_qualaroo.md index 62ba6050c..749a0bc6f 100644 --- a/docs/resources/source_qualaroo.md +++ b/docs/resources/source_qualaroo.md @@ -22,10 +22,10 @@ resource "airbyte_source_qualaroo" "my_source_qualaroo" { ] token = "...my_token..." } - definition_id = "2799cad5-c4b8-4334-a9d3-410e395a0aac" - name = "Beatrice Stamm" + definition_id = "2a67dad6-5e8a-4e1d-a17c-0fcbe7d2d343" + name = "Jana O'Hara" secret_id = "...my_secret_id..." - workspace_id = "d0978821-4279-492f-a5a7-105f2e570ad3" + workspace_id = "2799cad5-c4b8-4334-a9d3-410e395a0aac" } ``` diff --git a/docs/resources/source_railz.md b/docs/resources/source_railz.md index e668b4286..01bb7ff85 100644 --- a/docs/resources/source_railz.md +++ b/docs/resources/source_railz.md @@ -19,10 +19,10 @@ resource "airbyte_source_railz" "my_source_railz" { secret_key = "...my_secret_key..." start_date = "...my_start_date..." } - definition_id = "72ede129-9d48-4414-90fd-6e7ec48816b0" - name = "Reginald Dibbert" + definition_id = "55dc9d09-7882-4142-b992-f65a7105f2e5" + name = "Deborah Nader" secret_id = "...my_secret_id..." - workspace_id = "975147c3-e6c8-4bd1-8cca-d3b1c4065293" + workspace_id = "72ede129-9d48-4414-90fd-6e7ec48816b0" } ``` diff --git a/docs/resources/source_recharge.md b/docs/resources/source_recharge.md index 26e4d4eb1..5fac8b7ae 100644 --- a/docs/resources/source_recharge.md +++ b/docs/resources/source_recharge.md @@ -19,10 +19,10 @@ resource "airbyte_source_recharge" "my_source_recharge" { start_date = "2021-05-14T00:00:00Z" use_orders_deprecated_api = false } - definition_id = "648ca783-b586-4523-84bd-b821f9c8efa4" - name = "Christie Schiller IV" + definition_id = "b8975147-c3e6-4c8b-91cc-cad3b1c40652" + name = "Earl Bins" secret_id = "...my_secret_id..." - workspace_id = "c50e6f12-11e1-4fcb-a6b9-0cc0df941919" + workspace_id = "648ca783-b586-4523-84bd-b821f9c8efa4" } ``` diff --git a/docs/resources/source_recreation.md b/docs/resources/source_recreation.md index 0f57ba990..635f93991 100644 --- a/docs/resources/source_recreation.md +++ b/docs/resources/source_recreation.md @@ -18,10 +18,10 @@ resource "airbyte_source_recreation" "my_source_recreation" { apikey = "...my_apikey..." query_campsites = "...my_query_campsites..." } - definition_id = "892a209c-167a-4f7b-834c-463b838dc5f9" - name = "Vanessa Hammes" + definition_id = "0dc207c5-0e6f-4121-9e1f-cb26b90cc0df" + name = "Randall Carroll V" secret_id = "...my_secret_id..." - workspace_id = "f73a4553-5fff-45d1-934f-0cce5486a3a1" + workspace_id = "892a209c-167a-4f7b-834c-463b838dc5f9" } ``` diff --git a/docs/resources/source_recruitee.md b/docs/resources/source_recruitee.md index 730e7992a..f08839650 100644 --- a/docs/resources/source_recruitee.md +++ b/docs/resources/source_recruitee.md @@ -16,12 +16,12 @@ SourceRecruitee Resource resource "airbyte_source_recruitee" "my_source_recruitee" { configuration = { api_key = "...my_api_key..." - company_id = 4 + company_id = 5 } - definition_id = "1dc53f64-148a-4cb8-b41d-5bf94a01397d" - name = "Muriel Wunsch" + definition_id = "6535f73a-4553-45ff-b5d1-d34f0cce5486" + name = "Ms. Nathan O'Reilly PhD" secret_id = "...my_secret_id..." - workspace_id = "0aff6604-97cb-4974-a7d8-001cbe4b7daa" + workspace_id = "c53f6414-8acb-48b4-9d5b-f94a01397d3d" } ``` diff --git a/docs/resources/source_recurly.md b/docs/resources/source_recurly.md index cfa95a851..470105cc0 100644 --- a/docs/resources/source_recurly.md +++ b/docs/resources/source_recurly.md @@ -19,10 +19,10 @@ resource "airbyte_source_recurly" "my_source_recurly" { begin_time = "2021-12-01T00:00:00" end_time = "2021-12-01T00:00:00" } - definition_id = "2d7b0215-50aa-4da4-9f01-cf56ee294adb" - name = "Pedro Rodriguez" + definition_id = "fd90aff6-6049-47cb-974a-7d8001cbe4b7" + name = "Carlton Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "40789cf0-b8d2-4c04-9244-36569fd64cd2" + workspace_id = "7b021550-aada-44df-81cf-56ee294adbc5" } ``` diff --git a/docs/resources/source_redshift.md b/docs/resources/source_redshift.md index b07263e80..036c355e9 100644 --- a/docs/resources/source_redshift.md +++ b/docs/resources/source_redshift.md @@ -23,12 +23,12 @@ resource "airbyte_source_redshift" "my_source_redshift" { schemas = [ "...", ] - username = "Ralph52" + username = "Riley3" } - definition_id = "a635d7a8-c386-4cec-8fae-93f7f0f8c4b4" - name = "Ivan Stanton" + definition_id = "789cf0b8-d2c0-4412-8436-569fd64cd2bc" + name = "Jeffrey Lebsack" secret_id = "...my_secret_id..." - workspace_id = "6833e1f3-303a-4b04-9c89-1fe9c8dcb6cc" + workspace_id = "35d7a8c3-86ce-4ccf-ae93-f7f0f8c4b4f8" } ``` diff --git a/docs/resources/source_retently.md b/docs/resources/source_retently.md index 7c799d94a..f17365d99 100644 --- a/docs/resources/source_retently.md +++ b/docs/resources/source_retently.md @@ -24,10 +24,10 @@ resource "airbyte_source_retently" "my_source_retently" { } } } - definition_id = "1cd73d2c-f401-436d-9989-e7dbace4005a" - name = "Sheila Bahringer" + definition_id = "d4f6833e-1f33-403a-b045-c891fe9c8dcb" + name = "Miss Kendra Sauer" secret_id = "...my_secret_id..." - workspace_id = "76c58b5d-a21f-4739-86a7-1e992c2b8105" + workspace_id = "73d2cf40-136d-4598-9e7d-bace4005a630" } ``` diff --git a/docs/resources/source_rki_covid.md b/docs/resources/source_rki_covid.md index 30a1d56de..020be7e59 100644 --- a/docs/resources/source_rki_covid.md +++ b/docs/resources/source_rki_covid.md @@ -17,10 +17,10 @@ resource "airbyte_source_rki_covid" "my_source_rkicovid" { configuration = { start_date = "...my_start_date..." } - definition_id = "6bc977a3-bf4d-4ff8-9d83-5d80427d23a4" - name = "Gerald Stoltenberg" + definition_id = "7276c58b-5da2-41f7-b986-a71e992c2b81" + name = "Erin Hyatt" secret_id = "...my_secret_id..." - workspace_id = "723c8e5e-259f-4e4e-b649-3875b5a324c6" + workspace_id = "977a3bf4-dff8-4dd8-b5d8-0427d23a4e1d" } ``` diff --git a/docs/resources/source_rss.md b/docs/resources/source_rss.md index ec179c4f0..4e437a197 100644 --- a/docs/resources/source_rss.md +++ b/docs/resources/source_rss.md @@ -17,10 +17,10 @@ resource "airbyte_source_rss" "my_source_rss" { configuration = { url = "...my_url..." } - definition_id = "128aabba-d073-4078-ac3e-822825101e3e" - name = "Joann Runolfsson" + definition_id = "8c723c8e-5e25-49fe-8ef6-493875b5a324" + name = "Raul Blick" secret_id = "...my_secret_id..." - workspace_id = "948d0388-851e-4c06-bd3b-8cc64e95a7a3" + workspace_id = "aabbad07-3078-42c3-a822-825101e3e25c" } ``` diff --git a/docs/resources/source_s3.md b/docs/resources/source_s3.md index d063526e6..9a87e916a 100644 --- a/docs/resources/source_s3.md +++ b/docs/resources/source_s3.md @@ -40,10 +40,10 @@ resource "airbyte_source_s3" "my_source_s3" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 4 + days_to_sync_if_history_is_full = 0 format = { avro_format = { - double_as_string = true + double_as_string = false } } globs = [ @@ -51,17 +51,17 @@ resource "airbyte_source_s3" "my_source_s3" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Pam Goldner" + name = "Alfredo Lowe DVM" primary_key = "...my_primary_key..." schemaless = false - validation_policy = "Wait for Discover" + validation_policy = "Emit Record" }, ] } - definition_id = "bdae34af-cb06-4318-8072-9444d2b8965c" - name = "Julius Rau" + definition_id = "6fd3b8cc-64e9-45a7-a369-2db06d3b499d" + name = "Gerardo Stroman" secret_id = "...my_secret_id..." - workspace_id = "ee9d6378-e724-43c0-a1bc-073abf4dfebd" + workspace_id = "34afcb06-3184-4072-9444-d2b8965caaba" } ``` @@ -132,12 +132,12 @@ Optional: - `avro_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--avro_format)) - `csv_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--csv_format)) -- `document_file_type_format_experimental` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--document_file_type_format_experimental)) - `jsonl_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--jsonl_format)) - `parquet_format` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format)) +- `unstructured_document_format` (Attributes) Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format)) -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -145,7 +145,7 @@ Optional: -### Nested Schema for `configuration.streams.format.parquet_format` +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: @@ -154,7 +154,7 @@ Optional: - `encoding` (String) The character encoding of the CSV data. Leave blank to default to UTF8. See list of python encodings for allowable options. Default: "utf8" - `escape_char` (String) The character used for escaping special characters. To disallow escaping, leave this field blank. - `false_values` (List of String) A set of case-sensitive strings that should be interpreted as false values. -- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition)) +- `header_definition` (Attributes) How headers will be defined. `User Provided` assumes the CSV does not have a header row and uses the headers provided and `Autogenerated` assumes the CSV does not have a header row and the CDK will generate headers using for `f{i}` where `i` is the index starting from 0. Else, the default behavior is to use the header from the CSV file. If a user wants to autogenerate or provide column names for a CSV having headers, they can skip rows. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition)) - `ignore_errors_on_fields_mismatch` (Boolean) Whether to ignore errors that occur when the number of fields in the CSV does not match the number of columns in the schema. Default: false - `inference_type` (String) How to infer the types of the columns. If none, inference default to strings. must be one of ["None", "Primitive Types Only"]; Default: "None" - `null_values` (List of String) A set of case-sensitive strings that should be interpreted as null values. For example, if the value 'NA' should be interpreted as null, enter 'NA' in this field. @@ -164,25 +164,25 @@ Optional: - `strings_can_be_null` (Boolean) Whether strings can be interpreted as null values. If true, strings that match the null_values set will be interpreted as null. If false, strings that match the null_values set will be interpreted as the string itself. Default: true - `true_values` (List of String) A set of case-sensitive strings that should be interpreted as true values. - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition` Optional: -- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--autogenerated)) -- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--from_csv)) -- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--header_definition--user_provided)) +- `autogenerated` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--autogenerated)) +- `from_csv` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--from_csv)) +- `user_provided` (Attributes) (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--header_definition--user_provided)) - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` - -### Nested Schema for `configuration.streams.format.parquet_format.header_definition.user_provided` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.header_definition.user_provided` Required: @@ -191,38 +191,38 @@ Required: - -### Nested Schema for `configuration.streams.format.parquet_format` - -Optional: + +### Nested Schema for `configuration.streams.format.unstructured_document_format` -- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing)) -- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true -- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" - -### Nested Schema for `configuration.streams.format.parquet_format.processing` + +### Nested Schema for `configuration.streams.format.unstructured_document_format` Optional: -- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--parquet_format--processing--local)) +- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false + - -### Nested Schema for `configuration.streams.format.parquet_format.processing.local` + +### Nested Schema for `configuration.streams.format.unstructured_document_format` +Optional: +- `processing` (Attributes) Processing configuration (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing)) +- `skip_unprocessable_files` (Boolean) If true, skip files that cannot be parsed and pass the error message along as the _ab_source_file_parse_error field. If false, fail the sync. Default: true +- `strategy` (String) The strategy used to parse documents. `fast` extracts text directly from the document which doesn't work for all files. `ocr_only` is more reliable, but slower. `hi_res` is the most reliable, but requires an API key and a hosted instance of unstructured and can't be used with local mode. See the unstructured.io documentation for more details: https://unstructured-io.github.io/unstructured/core/partition.html#partition-pdf. must be one of ["auto", "fast", "ocr_only", "hi_res"]; Default: "auto" + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing` - -### Nested Schema for `configuration.streams.format.parquet_format` +Optional: +- `local` (Attributes) Process files locally, supporting `fast` and `ocr` modes. This is the default option. (see [below for nested schema](#nestedatt--configuration--streams--format--unstructured_document_format--processing--local)) - -### Nested Schema for `configuration.streams.format.parquet_format` + +### Nested Schema for `configuration.streams.format.unstructured_document_format.processing.local` -Optional: -- `decimal_as_float` (Boolean) Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false diff --git a/docs/resources/source_salesforce.md b/docs/resources/source_salesforce.md index e3e391fb6..a995334f4 100644 --- a/docs/resources/source_salesforce.md +++ b/docs/resources/source_salesforce.md @@ -20,19 +20,19 @@ resource "airbyte_source_salesforce" "my_source_salesforce" { force_use_bulk_api = true is_sandbox = false refresh_token = "...my_refresh_token..." - start_date = "2021-07-25" - stream_slice_step = "P1M" + start_date = "2021-07-25T00:00:00Z" + stream_slice_step = "P30D" streams_criteria = [ { - criteria = "exacts" + criteria = "ends with" value = "...my_value..." }, ] } - definition_id = "03e6b3fc-a03d-492c-b145-10264179a403" - name = "Jean Prosacco" + definition_id = "78e7243c-021b-4c07-babf-4dfebd414e5a" + name = "Barbara Franecki" secret_id = "...my_secret_id..." - workspace_id = "7b13a43b-1ead-4703-a4ee-b23fe553942b" + workspace_id = "b3fca03d-92cb-4145-9026-4179a40301bb" } ``` diff --git a/docs/resources/source_salesloft.md b/docs/resources/source_salesloft.md index 4719fc26f..0a555b0ba 100644 --- a/docs/resources/source_salesloft.md +++ b/docs/resources/source_salesloft.md @@ -22,10 +22,10 @@ resource "airbyte_source_salesloft" "my_source_salesloft" { } start_date = "2020-11-16T00:00:00Z" } - definition_id = "b6d0d209-32d7-4e88-9861-9ec39811786e" - name = "Darlene Vandervort" + definition_id = "b13a43b1-ead7-403a-8eeb-23fe553942b5" + name = "Jonathon Jerde PhD" secret_id = "...my_secret_id..." - workspace_id = "72c20971-d544-4a65-a7d2-b4609d4ec646" + workspace_id = "20932d7e-88d8-4619-ac39-811786e44e52" } ``` diff --git a/docs/resources/source_sap_fieldglass.md b/docs/resources/source_sap_fieldglass.md index 6a2ef1e56..93237c852 100644 --- a/docs/resources/source_sap_fieldglass.md +++ b/docs/resources/source_sap_fieldglass.md @@ -17,10 +17,10 @@ resource "airbyte_source_sap_fieldglass" "my_source_sapfieldglass" { configuration = { api_key = "...my_api_key..." } - definition_id = "7c968cce-9339-44d8-a35d-b32f900f8cfe" - name = "Ethel Kulas" + definition_id = "72c20971-d544-4a65-a7d2-b4609d4ec646" + name = "Vicky Maggio" secret_id = "...my_secret_id..." - workspace_id = "58770229-72e2-437e-83d2-ab4198d2efe5" + workspace_id = "cce93394-d8a3-45db-b2f9-00f8cfe7378a" } ``` diff --git a/docs/resources/source_secoda.md b/docs/resources/source_secoda.md index 32f2066c5..e74c575d3 100644 --- a/docs/resources/source_secoda.md +++ b/docs/resources/source_secoda.md @@ -17,10 +17,10 @@ resource "airbyte_source_secoda" "my_source_secoda" { configuration = { api_key = "...my_api_key..." } - definition_id = "e34c931e-7a72-4ef9-ae22-c4d080cde039" - name = "Marcos Hilll" + definition_id = "58770229-72e2-437e-83d2-ab4198d2efe5" + name = "Allen Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "c5778ddd-1091-40de-87df-e701edbd0d10" + workspace_id = "31e7a72e-f9ee-422c-8d08-0cde039dd5e8" } ``` diff --git a/docs/resources/source_sendgrid.md b/docs/resources/source_sendgrid.md index 90710cffc..29367e21b 100644 --- a/docs/resources/source_sendgrid.md +++ b/docs/resources/source_sendgrid.md @@ -16,12 +16,12 @@ SourceSendgrid Resource resource "airbyte_source_sendgrid" "my_source_sendgrid" { configuration = { api_key = "...my_api_key..." - start_date = "2020-02-29T00:35:24.807Z" + start_date = "2021-12-06T09:47:32.658Z" } - definition_id = "57eb672b-8aa5-45d6-bfb2-a63da0917a61" - name = "Christine Weimann" + definition_id = "778ddd10-910d-4e87-9fe7-01edbd0d10cf" + name = "Stella Torphy" secret_id = "...my_secret_id..." - workspace_id = "3e8ec69b-abb3-4389-b4cd-0d539af2319a" + workspace_id = "72b8aa55-d63f-4b2a-a3da-0917a6151fac" } ``` diff --git a/docs/resources/source_sendinblue.md b/docs/resources/source_sendinblue.md index 6d3729a1e..3ef64e1ee 100644 --- a/docs/resources/source_sendinblue.md +++ b/docs/resources/source_sendinblue.md @@ -17,10 +17,10 @@ resource "airbyte_source_sendinblue" "my_source_sendinblue" { configuration = { api_key = "...my_api_key..." } - definition_id = "6f8898d7-4d7c-4d06-b0b6-3c633751f6c5" - name = "Debbie Sanford PhD" + definition_id = "3e8ec69b-abb3-4389-b4cd-0d539af2319a" + name = "Darla Lockman" secret_id = "...my_secret_id..." - workspace_id = "73f23dc4-6e62-4d66-a727-78d5db92d16e" + workspace_id = "8d74d7cd-0670-4b63-8633-751f6c544c20" } ``` diff --git a/docs/resources/source_senseforce.md b/docs/resources/source_senseforce.md index 068354cb3..967e8d10b 100644 --- a/docs/resources/source_senseforce.md +++ b/docs/resources/source_senseforce.md @@ -18,13 +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 = 1 + slice_range = 360 start_date = "2017-01-25" } - definition_id = "06fc1f7a-171f-47c1-98bf-ddb09b9a903f" - name = "Brenda Toy" + definition_id = "23dc46e6-2d66-4e72-b78d-5db92d16e1dc" + name = "Paul Hyatt" secret_id = "...my_secret_id..." - workspace_id = "a54b7cf5-33c5-45d6-8a56-e1f7b10c6dd1" + workspace_id = "1f7a171f-7c1d-48bf-9db0-9b9a903f60eb" } ``` diff --git a/docs/resources/source_sentry.md b/docs/resources/source_sentry.md index 04b3186de..0e7cdd95d 100644 --- a/docs/resources/source_sentry.md +++ b/docs/resources/source_sentry.md @@ -19,14 +19,14 @@ resource "airbyte_source_sentry" "my_source_sentry" { discover_fields = [ "{ \"see\": \"documentation\" }", ] - hostname = "unimportant-glacier.biz" + hostname = "expert-potato.info" organization = "...my_organization..." project = "...my_project..." } - definition_id = "eb5fcf36-5dcc-4aec-ace4-1cbe1d2ecd01" - name = "Angela Boehm" + definition_id = "4b7cf533-c55d-468a-96e1-f7b10c6dd1e6" + name = "Eloise Robel" secret_id = "...my_secret_id..." - workspace_id = "2f6c56d3-cf89-4e69-a1ce-0c7a6ecf0509" + workspace_id = "cf365dcc-aec2-4ce4-9cbe-1d2ecd01501d" } ``` diff --git a/docs/resources/source_sftp.md b/docs/resources/source_sftp.md index def71e9dd..d19593b1a 100644 --- a/docs/resources/source_sftp.md +++ b/docs/resources/source_sftp.md @@ -23,14 +23,14 @@ resource "airbyte_source_sftp" "my_source_sftp" { file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_types = "csv,json" folder_path = "/logs/2022" - host = "192.0.2.1" + host = "www.host.com" port = 22 user = "...my_user..." } - definition_id = "08d9d001-7533-4842-9733-72c40ec92913" - name = "Gladys Zemlak" + definition_id = "6c56d3cf-89e6-4921-8e0c-7a6ecf05091d" + name = "Jason Lebsack" secret_id = "...my_secret_id..." - workspace_id = "49bcc34d-389b-4bf5-924f-5b1164e1dc4a" + workspace_id = "d0017533-8429-4733-b2c4-0ec9291353f9" } ``` diff --git a/docs/resources/source_sftp_bulk.md b/docs/resources/source_sftp_bulk.md index 8546456c0..622a754b0 100644 --- a/docs/resources/source_sftp_bulk.md +++ b/docs/resources/source_sftp_bulk.md @@ -26,10 +26,10 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 2 + days_to_sync_if_history_is_full = 8 format = { avro_format = { - double_as_string = false + double_as_string = true } } globs = [ @@ -37,18 +37,18 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Rene Kunze Jr." + name = "Jamie Swaniawski" primary_key = "...my_primary_key..." schemaless = false - validation_policy = "Emit Record" + validation_policy = "Wait for Discover" }, ] - username = "Rose_Abshire56" + username = "Milford_Weissnat" } - definition_id = "1eaa4a70-c9cb-4870-ab98-050c39e74506" - name = "Marlene Reichel" + definition_id = "24f5b116-4e1d-4c4a-81d4-4fb97610a4d0" + name = "Dr. Caleb Mann" secret_id = "...my_secret_id..." - workspace_id = "1cb4db2a-ae6c-420a-89c1-9db3e1c883c5" + workspace_id = "a4a70c9c-b870-4eb9-8050-c39e7450657b" } ``` diff --git a/docs/resources/source_shopify.md b/docs/resources/source_shopify.md index 98ab2be11..774c11523 100644 --- a/docs/resources/source_shopify.md +++ b/docs/resources/source_shopify.md @@ -15,20 +15,21 @@ SourceShopify Resource ```terraform resource "airbyte_source_shopify" "my_source_shopify" { configuration = { - bulk_window_in_days = 3 + bulk_window_in_days = 10 credentials = { api_password = { api_password = "...my_api_password..." } } fetch_transactions_user_id = false + job_termination_threshold = 0 shop = "my-store.myshopify.com" - start_date = "2020-04-28" + start_date = "2022-06-27" } - definition_id = "5c37529a-15c3-4606-aa63-f5716d2b265f" - name = "Marguerite Will" + definition_id = "db2aae6c-20ac-49c1-9db3-e1c883c55acc" + name = "Glen Schinner" secret_id = "...my_secret_id..." - workspace_id = "fce7bdd5-81ac-4648-b876-fcad615bcace" + workspace_id = "529a15c3-6062-4a63-b571-6d2b265f2af5" } ``` @@ -63,6 +64,7 @@ Optional: - `bulk_window_in_days` (Number) Defines what would be a date range per single BULK Job. Default: 30 - `credentials` (Attributes) The authorization method to use to retrieve data from Shopify (see [below for nested schema](#nestedatt--configuration--credentials)) - `fetch_transactions_user_id` (Boolean) Defines which API type (REST/BULK) to use to fetch `Transactions` data. If you are a `Shopify Plus` user, leave the default value to speed up the fetch. Default: false +- `job_termination_threshold` (Number) The max time in seconds, after which the single BULK Job should be `CANCELED` and retried. The bigger the value the longer the BULK Job is allowed to run. Default: 3600 - `start_date` (String) The date you would like to replicate data from. Format: YYYY-MM-DD. Any data before this date will not be replicated. Default: "2020-01-01" diff --git a/docs/resources/source_shortio.md b/docs/resources/source_shortio.md index 6ba05a12e..617da3ead 100644 --- a/docs/resources/source_shortio.md +++ b/docs/resources/source_shortio.md @@ -19,10 +19,10 @@ resource "airbyte_source_shortio" "my_source_shortio" { secret_key = "...my_secret_key..." start_date = "2023-07-30T03:43:59.244Z" } - definition_id = "687b3371-0669-486a-bb02-fd25c7727b36" - name = "Yvonne Glover" + definition_id = "6fce7bdd-581a-4c64-8787-6fcad615bcac" + name = "Shane Lebsack" secret_id = "...my_secret_id..." - workspace_id = "1d3e7f0b-c649-4fe5-b08c-82dc40ca1ab7" + workspace_id = "33710669-86a7-4b02-bd25-c7727b363542" } ``` diff --git a/docs/resources/source_slack.md b/docs/resources/source_slack.md index 2900aac6d..d0a1c9598 100644 --- a/docs/resources/source_slack.md +++ b/docs/resources/source_slack.md @@ -23,15 +23,15 @@ resource "airbyte_source_slack" "my_source_slack" { api_token = "...my_api_token..." } } - include_private_channels = false + include_private_channels = true join_channels = true - lookback_window = 7 + lookback_window = 14 start_date = "2017-01-25T00:00:00Z" } - definition_id = "6f1b8331-df02-45a1-9458-6c7cdfb558f8" - name = "Kay Bauch" + definition_id = "f0bc649f-e5b0-48c8-adc4-0ca1ab766397" + name = "Miss Beth Wunsch" secret_id = "...my_secret_id..." - workspace_id = "3d1fcf2b-6755-4110-90ec-6c18f2017e88" + workspace_id = "331df025-a154-4586-87cd-fb558f87809d" } ``` diff --git a/docs/resources/source_smaily.md b/docs/resources/source_smaily.md index fabe12957..bf4b7afe6 100644 --- a/docs/resources/source_smaily.md +++ b/docs/resources/source_smaily.md @@ -19,10 +19,10 @@ resource "airbyte_source_smaily" "my_source_smaily" { api_subdomain = "...my_api_subdomain..." api_username = "...my_api_username..." } - definition_id = "b7a8364f-95e8-44ef-b6a9-353261882dc6" - name = "Hubert Dickens" + definition_id = "3d1fcf2b-6755-4110-90ec-6c18f2017e88" + name = "Neil Pagac" secret_id = "...my_secret_id..." - workspace_id = "e2f3a674-4848-4ac2-b04b-eae9e1753040" + workspace_id = "64f95e84-efb6-4a93-9326-1882dc6ea377" } ``` diff --git a/docs/resources/source_smartengage.md b/docs/resources/source_smartengage.md index 481b64b8b..c776dd868 100644 --- a/docs/resources/source_smartengage.md +++ b/docs/resources/source_smartengage.md @@ -17,10 +17,10 @@ resource "airbyte_source_smartengage" "my_source_smartengage" { configuration = { api_key = "...my_api_key..." } - definition_id = "65f64672-3901-4f87-89df-1af8f5013d5d" - name = "Robyn Weimann I" + definition_id = "e2f3a674-4848-4ac2-b04b-eae9e1753040" + name = "Lorraine Zieme" secret_id = "...my_secret_id..." - workspace_id = "b2856e98-a695-40f0-807e-33047d95358a" + workspace_id = "6723901f-87c9-4df1-af8f-5013d5d0cf40" } ``` diff --git a/docs/resources/source_smartsheets.md b/docs/resources/source_smartsheets.md index b95161931..8fbe7db0f 100644 --- a/docs/resources/source_smartsheets.md +++ b/docs/resources/source_smartsheets.md @@ -21,15 +21,15 @@ resource "airbyte_source_smartsheets" "my_source_smartsheets" { } } metadata_fields = [ - "sheetversion", + "sheetname", ] spreadsheet_id = "...my_spreadsheet_id..." - start_datetime = "2000-01-01T13:00:00" + start_datetime = "2000-01-01T13:00:00-07:00" } - definition_id = "9d2abec2-1d7e-43d2-8dfd-3d512342f997" - name = "Jose Hilpert" + definition_id = "56e98a69-50f0-4007-a330-47d95358a568" + name = "Margarita Sipes" secret_id = "...my_secret_id..." - workspace_id = "38a2e5fc-f99c-4418-b6fa-0cbc1b99ee1e" + workspace_id = "bec21d7e-3d24-4dfd-bd51-2342f997d059" } ``` diff --git a/docs/resources/source_snapchat_marketing.md b/docs/resources/source_snapchat_marketing.md index b4718f3bb..52f9c8810 100644 --- a/docs/resources/source_snapchat_marketing.md +++ b/docs/resources/source_snapchat_marketing.md @@ -21,13 +21,13 @@ resource "airbyte_source_snapchat_marketing" "my_source_snapchatmarketing" { end_date = "2022-01-30" refresh_token = "...my_refresh_token..." start_date = "2022-01-01" - swipe_up_attribution_window = "7_DAY" - view_attribution_window = "1_HOUR" + swipe_up_attribution_window = "28_DAY" + view_attribution_window = "3_HOUR" } - definition_id = "5b0d51b3-114e-49ed-9754-1c3612b0e8c8" - name = "Miss Emilio Botsford PhD" + definition_id = "fcf99c41-876f-4a0c-bc1b-99ee1e960566" + name = "Dr. Beatrice Reilly" secret_id = "...my_secret_id..." - workspace_id = "259943df-a52a-49e4-b5ab-ffba2c1e7b69" + workspace_id = "1b3114e9-ed57-4541-8361-2b0e8c8cf11a" } ``` diff --git a/docs/resources/source_snowflake.md b/docs/resources/source_snowflake.md index b130b2a19..2113262ed 100644 --- a/docs/resources/source_snowflake.md +++ b/docs/resources/source_snowflake.md @@ -16,11 +16,10 @@ SourceSnowflake Resource resource "airbyte_source_snowflake" "my_source_snowflake" { configuration = { credentials = { - o_auth20 = { - access_token = "...my_access_token..." - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + key_pair_authentication = { + private_key = "...my_private_key..." + private_key_password = "...my_private_key_password..." + username = "AIRBYTE_USER" } } database = "AIRBYTE_DATABASE" @@ -30,10 +29,10 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { schema = "AIRBYTE_SCHEMA" warehouse = "AIRBYTE_WAREHOUSE" } - definition_id = "08ecd761-f19b-460a-a080-4c971e60235d" - name = "Frank Marquardt" + definition_id = "9943dfa5-2a9e-4475-abff-ba2c1e7b6908" + name = "Sherman Stokes" secret_id = "...my_secret_id..." - workspace_id = "dad73b79-d20b-448a-8fdc-6fb504a12b77" + workspace_id = "1f19b60a-a080-44c9-b1e6-0235dc09fada" } ``` @@ -77,9 +76,23 @@ Optional: Optional: +- `key_pair_authentication` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--key_pair_authentication)) - `o_auth20` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--o_auth20)) - `username_and_password` (Attributes) (see [below for nested schema](#nestedatt--configuration--credentials--username_and_password)) + +### Nested Schema for `configuration.credentials.key_pair_authentication` + +Required: + +- `private_key` (String, Sensitive) RSA Private key to use for Snowflake connection. See the docs for more information on how to obtain this key. +- `username` (String) The username you created to allow Airbyte to access the database. + +Optional: + +- `private_key_password` (String, Sensitive) Passphrase for private key + + ### Nested Schema for `configuration.credentials.o_auth20` diff --git a/docs/resources/source_sonar_cloud.md b/docs/resources/source_sonar_cloud.md index b1c55e1af..84c83235a 100644 --- a/docs/resources/source_sonar_cloud.md +++ b/docs/resources/source_sonar_cloud.md @@ -23,10 +23,10 @@ resource "airbyte_source_sonar_cloud" "my_source_sonarcloud" { start_date = "YYYY-MM-DD" user_token = "...my_user_token..." } - definition_id = "f0223ae8-22e5-4327-98cb-c0547dc93d7d" - name = "Katie Deckow" + definition_id = "79d20b48-acfd-4c6f-b504-a12b7723cbf0" + name = "Andrea Friesen" secret_id = "...my_secret_id..." - workspace_id = "47813582-a6f5-437d-9dfc-7f458565e715" + workspace_id = "822e5327-d8cb-4c05-87dc-93d7d7628c47" } ``` diff --git a/docs/resources/source_spacex_api.md b/docs/resources/source_spacex_api.md index ca1a105d4..601ea9496 100644 --- a/docs/resources/source_spacex_api.md +++ b/docs/resources/source_spacex_api.md @@ -15,13 +15,13 @@ SourceSpacexAPI Resource ```terraform resource "airbyte_source_spacex_api" "my_source_spacexapi" { configuration = { - id = "5c9f06b5-482c-49eb-b700-3d0337f10a64" + id = "813582a6-f537-4d9d-bc7f-458565e7155c" options = "...my_options..." } - definition_id = "369e4ee3-2ccb-44d5-ada6-128f2436a122" - name = "Travis McCullough" + definition_id = "9f06b548-2c9e-4b77-803d-0337f10a6436" + name = "Conrad Glover" secret_id = "...my_secret_id..." - workspace_id = "c8198a6b-f6f1-4cbd-b35a-96cd0e48f1e4" + workspace_id = "32ccb4d5-2da6-4128-b243-6a122e3949c8" } ``` diff --git a/docs/resources/source_square.md b/docs/resources/source_square.md index 63cb9c95f..35d887075 100644 --- a/docs/resources/source_square.md +++ b/docs/resources/source_square.md @@ -20,14 +20,14 @@ resource "airbyte_source_square" "my_source_square" { api_key = "...my_api_key..." } } - include_deleted_objects = true - is_sandbox = true - start_date = "2022-09-30" + include_deleted_objects = false + is_sandbox = false + start_date = "2021-09-28" } - definition_id = "69b6ca0b-303c-4f01-bcd9-78363f1be7e9" - name = "Tom O'Keefe" + definition_id = "6bf6f1cb-db35-4a96-8d0e-48f1e4b30469" + name = "Angel Sawayn DDS" secret_id = "...my_secret_id..." - workspace_id = "fc5ff714-6c36-4bb7-b37b-f0beca93a8ae" + workspace_id = "303cf017-cd97-4836-bf1b-e7e9b4aabfc5" } ``` diff --git a/docs/resources/source_strava.md b/docs/resources/source_strava.md index cd5a15d22..0271d7039 100644 --- a/docs/resources/source_strava.md +++ b/docs/resources/source_strava.md @@ -21,10 +21,10 @@ resource "airbyte_source_strava" "my_source_strava" { refresh_token = "fc6243f283e51f6ca989aab298b17da125496f50" start_date = "2021-03-01T00:00:00Z" } - definition_id = "1e537d96-eb6d-45dc-9e25-0f80fbc595c3" - name = "Jackie Krajcik" + definition_id = "146c36bb-7337-4bf0-beca-93a8ae78e1e5" + name = "Jackie Schuster" secret_id = "...my_secret_id..." - workspace_id = "cfe70cf1-47e2-493c-ba4b-2d7bbc290ef0" + workspace_id = "eb6d5dc1-e250-4f80-bbc5-95c3777bccfe" } ``` diff --git a/docs/resources/source_stripe.md b/docs/resources/source_stripe.md index 356c802a4..2e0de39dc 100644 --- a/docs/resources/source_stripe.md +++ b/docs/resources/source_stripe.md @@ -18,15 +18,15 @@ resource "airbyte_source_stripe" "my_source_stripe" { account_id = "...my_account_id..." call_rate_limit = 25 client_secret = "...my_client_secret..." - lookback_window_days = 9 - num_workers = 1 - slice_range = 10 + lookback_window_days = 8 + num_workers = 3 + slice_range = 3 start_date = "2017-01-25T00:00:00Z" } - definition_id = "6fe50a2e-7cfe-46f3-8acc-65c56f5fa677" - name = "Sheldon Gerlach" + definition_id = "93c7a4b2-d7bb-4c29-8ef0-0ad5372256fe" + name = "Cynthia O'Reilly" secret_id = "...my_secret_id..." - workspace_id = "91c615d1-2804-40ba-83eb-3c0afcc3c8fa" + workspace_id = "7cfe6f34-acc6-45c5-af5f-a6778e44b91c" } ``` diff --git a/docs/resources/source_survey_sparrow.md b/docs/resources/source_survey_sparrow.md index 3c1157985..fd6a31f79 100644 --- a/docs/resources/source_survey_sparrow.md +++ b/docs/resources/source_survey_sparrow.md @@ -23,10 +23,10 @@ resource "airbyte_source_survey_sparrow" "my_source_surveysparrow" { "{ \"see\": \"documentation\" }", ] } - definition_id = "6dac9959-2aae-4b21-989b-3db558d4aa17" - name = "Margaret Wiza" + definition_id = "84461977-a1b2-471a-9b00-9f29606a36da" + name = "Alejandro Muller" secret_id = "...my_secret_id..." - workspace_id = "1a7b03b3-15af-419b-84a1-418c27e2e49f" + workspace_id = "2aaeb21d-89b3-4db5-98d4-aa1770fe21a7" } ``` diff --git a/docs/resources/source_surveymonkey.md b/docs/resources/source_surveymonkey.md index cba85f0ca..72abec8a4 100644 --- a/docs/resources/source_surveymonkey.md +++ b/docs/resources/source_surveymonkey.md @@ -26,10 +26,10 @@ resource "airbyte_source_surveymonkey" "my_source_surveymonkey" { "...", ] } - definition_id = "fbbc8e3e-7db5-4a3e-846f-c1e0fa91f7ef" - name = "Winifred Graham" + definition_id = "d128040b-a03e-4b3c-8afc-c3c8fa6eafbb" + name = "Alberto Tillman" secret_id = "...my_secret_id..." - workspace_id = "d7c84461-977a-41b2-b1a5-b009f29606a3" + workspace_id = "7db5a3e4-46fc-41e0-ba91-f7ef5f462d7c" } ``` diff --git a/docs/resources/source_tempo.md b/docs/resources/source_tempo.md index 63c0e8f1a..a916c8a5a 100644 --- a/docs/resources/source_tempo.md +++ b/docs/resources/source_tempo.md @@ -17,10 +17,10 @@ resource "airbyte_source_tempo" "my_source_tempo" { configuration = { api_token = "...my_api_token..." } - definition_id = "be84753d-48e3-40cc-8b1d-39ddfc649b7a" - name = "Cassandra O'Reilly" + definition_id = "b03b315a-f19b-4c4a-9418-c27e2e49fbe8" + name = "Stella Hammes" secret_id = "...my_secret_id..." - workspace_id = "3641fd33-8f32-4285-acd8-8e7e494b9e58" + workspace_id = "48e30ccc-b1d3-49dd-bc64-9b7a58a56364" } ``` diff --git a/docs/resources/source_the_guardian_api.md b/docs/resources/source_the_guardian_api.md index 42b0b82d1..daba182eb 100644 --- a/docs/resources/source_the_guardian_api.md +++ b/docs/resources/source_the_guardian_api.md @@ -18,14 +18,14 @@ resource "airbyte_source_the_guardian_api" "my_source_theguardianapi" { api_key = "...my_api_key..." end_date = "YYYY-MM-DD" query = "environment AND NOT water" - section = "media" + section = "housing-network" start_date = "YYYY-MM-DD" tag = "environment/energyefficiency" } - definition_id = "9efbf412-cdca-4e9f-85c7-017380526f88" - name = "Laurie Schiller" + definition_id = "338f3228-56cd-488e-be49-4b9e5830e9ef" + name = "Mr. Timmy Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "3fdefbe1-9992-414f-bffa-48acadc06400" + workspace_id = "dcae9f85-c701-4738-8526-f8856cdf3fde" } ``` diff --git a/docs/resources/source_tiktok_marketing.md b/docs/resources/source_tiktok_marketing.md index 7edeb21e5..3519b98bf 100644 --- a/docs/resources/source_tiktok_marketing.md +++ b/docs/resources/source_tiktok_marketing.md @@ -15,7 +15,7 @@ SourceTiktokMarketing Resource ```terraform resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { configuration = { - attribution_window = 8 + attribution_window = 10 credentials = { o_auth20 = { access_token = "...my_access_token..." @@ -24,14 +24,14 @@ resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { secret = "...my_secret..." } } - end_date = "2022-04-17" + end_date = "2021-02-26" include_deleted = true - start_date = "2021-05-10" + start_date = "2021-10-12" } - definition_id = "13a2ccf2-b1ad-4e2f-8984-bfb0e1b3d2b8" - name = "Jean Dare" + definition_id = "9214f3ff-a48a-4cad-8064-00b7b58d13a2" + name = "Spencer Witting" secret_id = "...my_secret_id..." - workspace_id = "8838cf8d-227f-4318-9424-0654f4782740" + workspace_id = "1ade2f49-84bf-4b0e-9b3d-2b89b26a8838" } ``` @@ -62,7 +62,7 @@ Optional: - `attribution_window` (Number) The attribution window in days. Default: 3 - `credentials` (Attributes) Authentication method (see [below for nested schema](#nestedatt--configuration--credentials)) - `end_date` (String) The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DD. All data generated between start_date and this date will be replicated. Not setting this option will result in always syncing the data till the current date. -- `include_deleted` (Boolean) Set to active if you want to include deleted data in reports. Default: false +- `include_deleted` (Boolean) Set to active if you want to include deleted data in report based streams and Ads, Ad Groups and Campaign streams. Default: false - `start_date` (String) The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated. Default: "2016-09-01" diff --git a/docs/resources/source_trello.md b/docs/resources/source_trello.md index 6f22684a8..7e5349e17 100644 --- a/docs/resources/source_trello.md +++ b/docs/resources/source_trello.md @@ -22,10 +22,10 @@ resource "airbyte_source_trello" "my_source_trello" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - definition_id = "b5a46242-8ebc-45c7-bead-f0c9ce16ebe8" - name = "Josefina Pacocha" + definition_id = "8d227f31-8d42-4406-94f4-782740a2b5a4" + name = "Beverly Grimes" secret_id = "...my_secret_id..." - workspace_id = "aee8d2bd-e48e-4efc-ab9e-0d54b0894bdd" + workspace_id = "ebc5c77e-adf0-4c9c-a16e-be85fa64aee8" } ``` diff --git a/docs/resources/source_trustpilot.md b/docs/resources/source_trustpilot.md index ae7b20643..f2f4ce284 100644 --- a/docs/resources/source_trustpilot.md +++ b/docs/resources/source_trustpilot.md @@ -25,10 +25,10 @@ resource "airbyte_source_trustpilot" "my_source_trustpilot" { } start_date = "%Y-%m-%dT%H:%M:%S" } - definition_id = "98fe3f92-c06a-49aa-b270-2875abb88c39" - name = "Marcos Kuhic" + definition_id = "d2bde48e-efce-4b9e-8d54-b0894bdd98fe" + name = "Lucia McClure" secret_id = "...my_secret_id..." - workspace_id = "66080f3e-cae3-4cb4-91ea-7992cd63d338" + workspace_id = "06a9aa72-7028-475a-bb88-c398d7966608" } ``` diff --git a/docs/resources/source_tvmaze_schedule.md b/docs/resources/source_tvmaze_schedule.md index 26171b170..cec7d1c74 100644 --- a/docs/resources/source_tvmaze_schedule.md +++ b/docs/resources/source_tvmaze_schedule.md @@ -20,10 +20,10 @@ resource "airbyte_source_tvmaze_schedule" "my_source_tvmazeschedule" { start_date = "...my_start_date..." web_schedule_country_code = "global" } - definition_id = "fe3f7d5a-433d-430c-a4aa-9f684d9ab345" - name = "Ms. Moses Dibbert" + definition_id = "3ecae3cb-491e-4a79-92cd-63d3381efe3f" + name = "Mercedes Heathcote" secret_id = "...my_secret_id..." - workspace_id = "cb2e52a8-6adb-4b57-85cb-e7ccff9d0724" + workspace_id = "33d30ca4-aa9f-4684-99ab-345ef3183cb2" } ``` diff --git a/docs/resources/source_twilio.md b/docs/resources/source_twilio.md index 1417f5b59..cc09c8f63 100644 --- a/docs/resources/source_twilio.md +++ b/docs/resources/source_twilio.md @@ -20,10 +20,10 @@ resource "airbyte_source_twilio" "my_source_twilio" { lookback_window = 60 start_date = "2020-10-01T00:00:00Z" } - definition_id = "a4b37eb2-05dd-4b7f-9b71-195e07e10364" - name = "Angie Jenkins" + definition_id = "a86adbb5-7c5c-4be7-8cff-9d0724747a4b" + name = "Marian Torphy" secret_id = "...my_secret_id..." - workspace_id = "d2a60225-b2ac-462e-b10f-1a0d51fb8be0" + workspace_id = "05ddb7f1-b711-495e-87e1-03643a6dfd2a" } ``` diff --git a/docs/resources/source_twilio_taskrouter.md b/docs/resources/source_twilio_taskrouter.md index 2c4d9d0d0..75593c1ce 100644 --- a/docs/resources/source_twilio_taskrouter.md +++ b/docs/resources/source_twilio_taskrouter.md @@ -18,10 +18,10 @@ resource "airbyte_source_twilio_taskrouter" "my_source_twiliotaskrouter" { account_sid = "...my_account_sid..." auth_token = "...my_auth_token..." } - definition_id = "416cb49d-a06c-4239-a7af-3ca2cc2a5392" - name = "Julio Gutmann" + definition_id = "60225b2a-c62e-4b10-b1a0-d51fb8be0416" + name = "Rudolph Gerhold" secret_id = "...my_secret_id..." - workspace_id = "89040904-7267-4ce8-aa32-2e02b7e6dd49" + workspace_id = "a06c239e-7af3-4ca2-8c2a-5392d7458890" } ``` diff --git a/docs/resources/source_twitter.md b/docs/resources/source_twitter.md index dce357f67..b55edca27 100644 --- a/docs/resources/source_twitter.md +++ b/docs/resources/source_twitter.md @@ -16,14 +16,14 @@ SourceTwitter Resource resource "airbyte_source_twitter" "my_source_twitter" { configuration = { api_key = "...my_api_key..." - end_date = "2020-01-18T12:46:16.717Z" + end_date = "2022-12-29T05:52:40.964Z" query = "...my_query..." - start_date = "2022-03-25T00:43:50.915Z" + start_date = "2022-12-24T13:40:20.697Z" } - definition_id = "3592a5dd-7ddb-4d79-bd2e-b894fd682a67" - name = "Whitney Casper" + definition_id = "47267ce8-6a32-42e0-ab7e-6dd49df5c359" + name = "Blanche Hartmann" secret_id = "...my_secret_id..." - workspace_id = "dbbaeb9b-5c2e-42ee-8b85-f41cf2efd5ed" + workspace_id = "7ddbd797-d2eb-4894-bd68-2a677b1b8dbb" } ``` diff --git a/docs/resources/source_typeform.md b/docs/resources/source_typeform.md index 15972f520..228fa4861 100644 --- a/docs/resources/source_typeform.md +++ b/docs/resources/source_typeform.md @@ -21,7 +21,7 @@ resource "airbyte_source_typeform" "my_source_typeform" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-12-23T20:48:01.588Z" + token_expiry_date = "2021-02-27T17:24:02.669Z" } } form_ids = [ @@ -29,10 +29,10 @@ resource "airbyte_source_typeform" "my_source_typeform" { ] start_date = "2021-03-01T00:00:00Z" } - definition_id = "9e4deda3-0dd3-4cfb-8aa2-fad058413083" - name = "Krystal Dietrich" + definition_id = "b5c2e2ee-8b85-4f41-8f2e-fd5ed605e9e4" + name = "Darin Spinka" secret_id = "...my_secret_id..." - workspace_id = "de43c907-f63c-4c02-bc2f-7f5dfb2c26b4" + workspace_id = "0dd3cfb0-aa2f-4ad0-9841-30837d3e5de4" } ``` diff --git a/docs/resources/source_us_census.md b/docs/resources/source_us_census.md index 2aba28b88..d62659dac 100644 --- a/docs/resources/source_us_census.md +++ b/docs/resources/source_us_census.md @@ -16,13 +16,13 @@ SourceUsCensus Resource resource "airbyte_source_us_census" "my_source_uscensus" { configuration = { api_key = "...my_api_key..." - query_params = "get=MOVEDIN,GEOID1,GEOID2,MOVEDOUT,FULL1_NAME,FULL2_NAME,MOVEDNET&for=county:*" - query_path = "data/2018/acs" + query_params = "get=NAME,NAICS2017_LABEL,LFO_LABEL,EMPSZES_LABEL,ESTAB,PAYANN,PAYQTR1,EMP&for=us:*&NAICS2017=72&LFO=001&EMPSZES=001" + query_path = "data/timeseries/healthins/sahie" } - definition_id = "6915d332-4b48-419f-b393-429d3165dd85" - name = "Vernon Tillman" + definition_id = "907f63cc-02bc-42f7-b5df-b2c26b498691" + name = "Christie Emard" secret_id = "...my_secret_id..." - workspace_id = "61e20db5-f4bb-411c-a0c3-a7ba336248be" + workspace_id = "4b4819ff-3934-429d-b165-dd8595e9c61e" } ``` diff --git a/docs/resources/source_vantage.md b/docs/resources/source_vantage.md index 9332dd07b..3e8c288f6 100644 --- a/docs/resources/source_vantage.md +++ b/docs/resources/source_vantage.md @@ -17,10 +17,10 @@ resource "airbyte_source_vantage" "my_source_vantage" { configuration = { access_token = "...my_access_token..." } - definition_id = "45dfad93-24f6-4ab9-b833-4526eae71eb7" - name = "Sheryl Stroman" + definition_id = "20db5f4b-b11c-460c-ba7b-a336248be45d" + name = "Shaun Schultz" secret_id = "...my_secret_id..." - workspace_id = "d0bf2f57-2195-478f-bbe9-226a954fff93" + workspace_id = "24f6ab9f-8334-4526-aae7-1eb759d7dd0b" } ``` diff --git a/docs/resources/source_webflow.md b/docs/resources/source_webflow.md index fbfc8e1c6..16876edd6 100644 --- a/docs/resources/source_webflow.md +++ b/docs/resources/source_webflow.md @@ -19,10 +19,10 @@ resource "airbyte_source_webflow" "my_source_webflow" { api_key = "a very long hex sequence" site_id = "a relatively long hex sequence" } - definition_id = "d12e392c-e90b-4916-9fb3-0db2efb21ef2" - name = "Israel Gleason" + definition_id = "f2f57219-578f-4bbe-9226-a954fff93d12" + name = "Bryan McKenzie" secret_id = "...my_secret_id..." - workspace_id = "f07f2e77-2136-4664-afa9-b2db7532b28c" + workspace_id = "e90b9169-fb30-4db2-afb2-1ef2bc48bf07" } ``` diff --git a/docs/resources/source_whisky_hunter.md b/docs/resources/source_whisky_hunter.md index 7453bcf13..3207632f7 100644 --- a/docs/resources/source_whisky_hunter.md +++ b/docs/resources/source_whisky_hunter.md @@ -15,10 +15,10 @@ SourceWhiskyHunter Resource ```terraform resource "airbyte_source_whisky_hunter" "my_source_whiskyhunter" { configuration = {} - definition_id = "b785b8d4-ad9b-4b4c-ad04-c6ceb0e44096" - name = "Jenny Strosin" + definition_id = "f2e77213-6664-46fa-9b2d-b7532b28cb78" + name = "Olivia Lesch" secret_id = "...my_secret_id..." - workspace_id = "6ecaf35c-15b3-4779-97e3-dccb9fd6e1ad" + workspace_id = "ad9bb4c2-d04c-46ce-b0e4-409659dbf6ec" } ``` diff --git a/docs/resources/source_wikipedia_pageviews.md b/docs/resources/source_wikipedia_pageviews.md index 9429e5ac2..0b9895b60 100644 --- a/docs/resources/source_wikipedia_pageviews.md +++ b/docs/resources/source_wikipedia_pageviews.md @@ -15,18 +15,18 @@ SourceWikipediaPageviews Resource ```terraform resource "airbyte_source_wikipedia_pageviews" "my_source_wikipediapageviews" { configuration = { - access = "desktop" - agent = "user" + access = "mobile-app" + agent = "automated" article = "Are_You_the_One%3F" country = "FR" end = "...my_end..." project = "commons.wikimedia.org" start = "...my_start..." } - definition_id = "8320ef50-a8ca-476b-883e-a280df1804a6" - name = "Hannah Moore" + definition_id = "15b3779d-7e3d-4ccb-9fd6-e1ad7470b832" + name = "Delia Zulauf MD" secret_id = "...my_secret_id..." - workspace_id = "e5814951-2957-4c29-8696-756fe0588102" + workspace_id = "8ca76b08-3ea2-480d-b180-4a67b9f3e581" } ``` @@ -60,7 +60,7 @@ Required: - `country` (String) The ISO 3166-1 alpha-2 code of a country for which to retrieve top articles. - `end` (String) The date of the last day to include, in YYYYMMDD or YYYYMMDDHH format. - `project` (String) If you want to filter by project, use the domain of any Wikimedia project. -- `start` (String) The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. +- `start` (String) The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. Also serves as the date to retrieve data for the top articles. ## Import diff --git a/docs/resources/source_woocommerce.md b/docs/resources/source_woocommerce.md index 7995105de..49b3f6cf1 100644 --- a/docs/resources/source_woocommerce.md +++ b/docs/resources/source_woocommerce.md @@ -20,10 +20,10 @@ resource "airbyte_source_woocommerce" "my_source_woocommerce" { shop = "...my_shop..." start_date = "2021-01-01" } - definition_id = "8ad45dc0-7887-4545-a3f3-6dab5122890f" - name = "Cecelia McClure" + definition_id = "512957c2-9869-4675-afe0-5881022b8ad4" + name = "Ms. Marcella Schiller" secret_id = "...my_secret_id..." - workspace_id = "c2a3f4c8-fc02-46c7-8c4e-afdab4c1bcaf" + workspace_id = "8754523f-36da-4b51-a289-0f3e992c2a3f" } ``` diff --git a/docs/resources/source_xkcd.md b/docs/resources/source_xkcd.md index c236d6642..be34bb357 100644 --- a/docs/resources/source_xkcd.md +++ b/docs/resources/source_xkcd.md @@ -15,10 +15,10 @@ SourceXkcd Resource ```terraform resource "airbyte_source_xkcd" "my_source_xkcd" { configuration = {} - definition_id = "66c12869-f984-4d61-b828-542bb37a458f" - name = "Ms. Lowell Stiedemann" + definition_id = "4c8fc026-c7cc-44ea-bdab-4c1bcaf66c12" + name = "Rafael Mante" secret_id = "...my_secret_id..." - workspace_id = "1a16fff1-f04a-4eeb-8306-c4f3397c2047" + workspace_id = "84d61382-8542-4bb3-ba45-8facd1771a16" } ``` diff --git a/docs/resources/source_yandex_metrica.md b/docs/resources/source_yandex_metrica.md index 023db3140..ba8cb5444 100644 --- a/docs/resources/source_yandex_metrica.md +++ b/docs/resources/source_yandex_metrica.md @@ -20,10 +20,10 @@ resource "airbyte_source_yandex_metrica" "my_source_yandexmetrica" { end_date = "2022-01-01" start_date = "2022-01-01" } - definition_id = "deba481e-413d-4d76-8cc3-ae1d775ee978" - name = "Dr. Lawrence Howe" + definition_id = "f04aeebc-306c-44f3-b97c-20475faadeba" + name = "Terry Bergnaum" secret_id = "...my_secret_id..." - workspace_id = "5746ac11-eb02-4437-a4c2-fa90b3fc58ae" + workspace_id = "13dd760c-c3ae-41d7-b5ee-978f160f4574" } ``` diff --git a/docs/resources/source_yotpo.md b/docs/resources/source_yotpo.md index 1ddf653c9..2725b9d0d 100644 --- a/docs/resources/source_yotpo.md +++ b/docs/resources/source_yotpo.md @@ -17,13 +17,13 @@ resource "airbyte_source_yotpo" "my_source_yotpo" { configuration = { access_token = "...my_access_token..." app_key = "...my_app_key..." - email = "Leta.Jakubowski@hotmail.com" + email = "Louvenia9@yahoo.com" start_date = "2022-03-01T00:00:00.000Z" } - definition_id = "7de96097-25c6-4d5a-9da3-5039f4e4098b" - name = "Morris Schimmel" + definition_id = "0243724c-2fa9-40b3-bc58-aed9663e07de" + name = "Chester Armstrong" secret_id = "...my_secret_id..." - workspace_id = "23b3c013-4621-4866-8f51-8dbd5ebee014" + workspace_id = "25c6d5a5-da35-4039-b4e4-098bb8c2a23b" } ``` diff --git a/docs/resources/source_youtube_analytics.md b/docs/resources/source_youtube_analytics.md index 02643defd..fefea0286 100644 --- a/docs/resources/source_youtube_analytics.md +++ b/docs/resources/source_youtube_analytics.md @@ -22,10 +22,10 @@ resource "airbyte_source_youtube_analytics" "my_source_youtubeanalytics" { refresh_token = "...my_refresh_token..." } } - definition_id = "e07eadc6-f53d-4253-9b8b-1e39d437be8f" - name = "Vicky Welch" + definition_id = "3c013462-1866-4cf5-98db-d5ebee014e07" + name = "Oliver Smith" secret_id = "...my_secret_id..." - workspace_id = "7fa8ae01-2beb-4a22-8996-41ef630f5d87" + workspace_id = "f53d253d-b8b1-4e39-9437-be8f4cf797fa" } ``` diff --git a/docs/resources/source_zendesk_chat.md b/docs/resources/source_zendesk_chat.md index 782decb5a..014f7ac49 100644 --- a/docs/resources/source_zendesk_chat.md +++ b/docs/resources/source_zendesk_chat.md @@ -23,10 +23,10 @@ resource "airbyte_source_zendesk_chat" "my_source_zendeskchat" { start_date = "2021-02-01T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "c0e34b35-2ddb-404c-9bce-387d66444a18" - name = "Claudia Mills" + definition_id = "e012beba-22c9-4964-9ef6-30f5d8739c0e" + name = "Hazel Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "763e10f9-9e00-4879-a494-84a748552064" + workspace_id = "2ddb04c9-bce3-487d-a644-4a186797a763" } ``` diff --git a/docs/resources/source_zendesk_sell.md b/docs/resources/source_zendesk_sell.md index 7f9357310..20c67d9b5 100644 --- a/docs/resources/source_zendesk_sell.md +++ b/docs/resources/source_zendesk_sell.md @@ -17,10 +17,10 @@ resource "airbyte_source_zendesk_sell" "my_source_zendesksell" { configuration = { api_token = "f23yhd630otl94y85a8bf384958473pto95847fd006da49382716or937ruw059" } - definition_id = "4aee427f-93df-49bf-84b7-84edaaf2f424" - name = "Ms. Marcos Ebert" + definition_id = "e10f99e0-0879-4e49-884a-7485520644ae" + name = "Francis Daniel" secret_id = "...my_secret_id..." - workspace_id = "06f09926-22de-47b1-a93e-5915fe5844c8" + workspace_id = "93df9bf8-4b78-44ed-aaf2-f424ed308606" } ``` diff --git a/docs/resources/source_zendesk_sunshine.md b/docs/resources/source_zendesk_sunshine.md index 62df51e38..c5d81b817 100644 --- a/docs/resources/source_zendesk_sunshine.md +++ b/docs/resources/source_zendesk_sunshine.md @@ -18,16 +18,16 @@ resource "airbyte_source_zendesk_sunshine" "my_source_zendesksunshine" { credentials = { api_token = { api_token = "...my_api_token..." - email = "Jannie_Zulauf@hotmail.com" + email = "Amos.McKenzie@hotmail.com" } } start_date = "2021-01-01T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "badf74d2-3a87-4a42-abf6-ae57802daa82" - name = "Ramona Marvin" + definition_id = "2de7b1a9-3e59-415f-a584-4c8d7f9e67ba" + name = "Randal Kuphal" secret_id = "...my_secret_id..." - workspace_id = "ac7526c0-e68d-441f-a947-8bd831a4caf6" + workspace_id = "23a87a42-abf6-4ae5-b802-daa821998eac" } ``` diff --git a/docs/resources/source_zendesk_support.md b/docs/resources/source_zendesk_support.md index 153a94efa..07631c8b7 100644 --- a/docs/resources/source_zendesk_support.md +++ b/docs/resources/source_zendesk_support.md @@ -19,17 +19,17 @@ resource "airbyte_source_zendesk_support" "my_source_zendesksupport" { api_token = { additional_properties = "{ \"see\": \"documentation\" }" api_token = "...my_api_token..." - email = "Anastacio94@yahoo.com" + email = "Ericka_Dach@yahoo.com" } } - ignore_pagination = true + ignore_pagination = false start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "0a84c82f-eed3-45fd-8712-605259781224" - name = "Kathleen Greenfelder" + definition_id = "8d41f294-78bd-4831-a4ca-f6a030f2320a" + name = "Tom Schamberger" secret_id = "...my_secret_id..." - workspace_id = "79a97873-ec6e-4c23-b893-6834bb7f256a" + workspace_id = "feed35fd-4712-4605-a597-81224214e979" } ``` diff --git a/docs/resources/source_zendesk_talk.md b/docs/resources/source_zendesk_talk.md index ade9cfe54..558db613f 100644 --- a/docs/resources/source_zendesk_talk.md +++ b/docs/resources/source_zendesk_talk.md @@ -19,16 +19,16 @@ resource "airbyte_source_zendesk_talk" "my_source_zendesktalk" { api_token = { additional_properties = "{ \"see\": \"documentation\" }" api_token = "...my_api_token..." - email = "Carolyne_Turcotte57@hotmail.com" + email = "Lavada.Kshlerin@yahoo.com" } } start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "7ac93ce2-101f-4692-aff8-de5650472830" - name = "Grant Schmitt V" + definition_id = "c6ec23f8-9368-434b-b7f2-56aa2eed97a7" + name = "Jermaine Miller" secret_id = "...my_secret_id..." - workspace_id = "0d7b3b35-8aff-4520-ae7c-66512764ede9" + workspace_id = "e2101f69-2eff-48de-9650-472830aace29" } ``` diff --git a/docs/resources/source_zenloop.md b/docs/resources/source_zenloop.md index ac337992f..15af31bf1 100644 --- a/docs/resources/source_zenloop.md +++ b/docs/resources/source_zenloop.md @@ -20,10 +20,10 @@ resource "airbyte_source_zenloop" "my_source_zenloop" { survey_group_id = "...my_survey_group_id..." survey_id = "...my_survey_id..." } - definition_id = "cd819ecc-37ba-4170-8ba6-4daf2cd7c8fe" - name = "Delores Hamill" + definition_id = "0d7b3b35-8aff-4520-ae7c-66512764ede9" + name = "Miss Jake Lueilwitz" secret_id = "...my_secret_id..." - workspace_id = "306443a7-5bcf-44e2-a137-8db01d76f7dd" + workspace_id = "cc37ba17-00ba-464d-af2c-d7c8fe5757a3" } ``` diff --git a/docs/resources/source_zoho_crm.md b/docs/resources/source_zoho_crm.md index bd5aad920..cf59deb1b 100644 --- a/docs/resources/source_zoho_crm.md +++ b/docs/resources/source_zoho_crm.md @@ -19,14 +19,14 @@ resource "airbyte_source_zoho_crm" "my_source_zohocrm" { client_secret = "...my_client_secret..." dc_region = "US" edition = "Professional" - environment = "Developer" + environment = "Production" refresh_token = "...my_refresh_token..." - start_datetime = "2000-01-01T13:00+00:00" + start_datetime = "2000-01-01 13:00" } - definition_id = "51f0c20e-4312-4d0c-bfe3-9df03e297d6f" - name = "Roxanne Yundt" + definition_id = "75bcf4e2-e137-48db-81d7-6f7dd27aa6e5" + name = "Melba Beer" secret_id = "...my_secret_id..." - workspace_id = "b34f9589-f421-498f-b282-2b82a159ebc2" + workspace_id = "0e4312d0-cbfe-439d-b03e-297d6f5cf39b" } ``` diff --git a/docs/resources/source_zoom.md b/docs/resources/source_zoom.md index c6a9fd3d2..aaa52ac69 100644 --- a/docs/resources/source_zoom.md +++ b/docs/resources/source_zoom.md @@ -20,10 +20,10 @@ resource "airbyte_source_zoom" "my_source_zoom" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." } - definition_id = "b7c1d354-0fbb-4e2d-8a9d-0010028d11c1" - name = "Leona Bechtelar" + definition_id = "34f9589f-4219-48f3-a822-b82a159ebc2b" + name = "Della Brekke" secret_id = "...my_secret_id..." - workspace_id = "07cdd8eb-8c75-4c46-9093-8eb2433624d8" + workspace_id = "540fbbe2-d8a9-4d00-9002-8d11c1280d80" } ``` diff --git a/docs/resources/workspace.md b/docs/resources/workspace.md index cd47df314..068a6771e 100644 --- a/docs/resources/workspace.md +++ b/docs/resources/workspace.md @@ -14,8 +14,8 @@ Workspace Resource ```terraform resource "airbyte_workspace" "my_workspace" { - name = "Floyd Schinner" - organization_id = "a0b5368b-26a5-468a-a6dc-340bb1546957" + name = "Johnnie Skiles" + organization_id = "eb8c75c4-6109-438e-b243-3624d8c5c5aa" } ``` diff --git a/examples/data-sources/airbyte_destination_langchain/data-source.tf b/examples/data-sources/airbyte_destination_langchain/data-source.tf deleted file mode 100644 index 25f13b411..000000000 --- a/examples/data-sources/airbyte_destination_langchain/data-source.tf +++ /dev/null @@ -1,3 +0,0 @@ -data "airbyte_destination_langchain" "my_destination_langchain" { - destination_id = "...my_destination_id..." -} \ No newline at end of file diff --git a/examples/data-sources/airbyte_source_clazar/data-source.tf b/examples/data-sources/airbyte_source_clazar/data-source.tf new file mode 100644 index 000000000..34e3942ea --- /dev/null +++ b/examples/data-sources/airbyte_source_clazar/data-source.tf @@ -0,0 +1,3 @@ +data "airbyte_source_clazar" "my_source_clazar" { + source_id = "...my_source_id..." +} \ No newline at end of file diff --git a/examples/data-sources/airbyte_source_datadog/data-source.tf b/examples/data-sources/airbyte_source_datadog/data-source.tf new file mode 100644 index 000000000..4fb25014d --- /dev/null +++ b/examples/data-sources/airbyte_source_datadog/data-source.tf @@ -0,0 +1,3 @@ +data "airbyte_source_datadog" "my_source_datadog" { + source_id = "...my_source_id..." +} \ No newline at end of file diff --git a/examples/data-sources/airbyte_source_goldcast/data-source.tf b/examples/data-sources/airbyte_source_goldcast/data-source.tf new file mode 100644 index 000000000..eb645166a --- /dev/null +++ b/examples/data-sources/airbyte_source_goldcast/data-source.tf @@ -0,0 +1,3 @@ +data "airbyte_source_goldcast" "my_source_goldcast" { + source_id = "...my_source_id..." +} \ No newline at end of file diff --git a/examples/data-sources/airbyte_source_google_analytics_v4_service_account_only/data-source.tf b/examples/data-sources/airbyte_source_google_analytics_v4_service_account_only/data-source.tf deleted file mode 100644 index 0daf09530..000000000 --- a/examples/data-sources/airbyte_source_google_analytics_v4_service_account_only/data-source.tf +++ /dev/null @@ -1,3 +0,0 @@ -data "airbyte_source_google_analytics_v4_service_account_only" "my_source_googleanalyticsv4serviceaccountonly" { - source_id = "...my_source_id..." -} \ No newline at end of file diff --git a/examples/data-sources/airbyte_source_punk_api/data-source.tf b/examples/data-sources/airbyte_source_punk_api/data-source.tf deleted file mode 100644 index 098a08a1a..000000000 --- a/examples/data-sources/airbyte_source_punk_api/data-source.tf +++ /dev/null @@ -1,3 +0,0 @@ -data "airbyte_source_punk_api" "my_source_punkapi" { - source_id = "...my_source_id..." -} \ No newline at end of file diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index a470f8c0b..68c575cef 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -2,7 +2,7 @@ terraform { required_providers { airbyte = { source = "airbytehq/airbyte" - version = "0.7.0" + version = "0.7.1" } } } diff --git a/examples/resources/airbyte_destination_langchain/import.sh b/examples/resources/airbyte_destination_langchain/import.sh deleted file mode 100644 index 1d914714b..000000000 --- a/examples/resources/airbyte_destination_langchain/import.sh +++ /dev/null @@ -1 +0,0 @@ -terraform import airbyte_destination_langchain.my_airbyte_destination_langchain "" diff --git a/examples/resources/airbyte_destination_langchain/resource.tf b/examples/resources/airbyte_destination_langchain/resource.tf deleted file mode 100644 index 0b29648b2..000000000 --- a/examples/resources/airbyte_destination_langchain/resource.tf +++ /dev/null @@ -1,23 +0,0 @@ -resource "airbyte_destination_langchain" "my_destination_langchain" { - configuration = { - embedding = { - fake = {} - } - indexing = { - chroma_local_persistance = { - collection_name = "...my_collection_name..." - destination_path = "/local/my_chroma_db" - } - } - processing = { - chunk_overlap = 7 - chunk_size = 3 - text_fields = [ - "...", - ] - } - } - definition_id = "a735a4e1-8012-43f0-976f-b78bf74fa22d" - name = "Jack Christiansen" - workspace_id = "1b5f134d-0007-4497-b4ae-87c30892ffb0" -} \ No newline at end of file diff --git a/examples/resources/airbyte_destination_milvus/resource.tf b/examples/resources/airbyte_destination_milvus/resource.tf index 057bfc4e3..d0f21b896 100644 --- a/examples/resources/airbyte_destination_milvus/resource.tf +++ b/examples/resources/airbyte_destination_milvus/resource.tf @@ -15,14 +15,14 @@ resource "airbyte_destination_milvus" "my_destination_milvus" { } collection = "...my_collection..." db = "...my_db..." - host = "tcp://my-local-milvus:19530" + host = "tcp://host.docker.internal:19530" text_field = "...my_text_field..." vector_field = "...my_vector_field..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 1 - chunk_size = 10 + chunk_overlap = 6 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -37,12 +37,12 @@ resource "airbyte_destination_milvus" "my_destination_milvus" { ] text_splitter = { by_markdown_header = { - split_level = 6 + split_level = 2 } } } } - definition_id = "2248d601-2833-484b-987b-5cce36148543" - name = "Sylvia Smitham" - workspace_id = "3c5e509f-4525-421a-8478-78c254cd184f" + definition_id = "5a4e1801-23f0-4d76-bb78-bf74fa22de12" + name = "Jenny Braun" + workspace_id = "f134d000-7497-474a-a87c-30892ffb0f41" } \ 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 964c8daf6..0e99749fb 100644 --- a/examples/resources/airbyte_destination_mongodb/resource.tf +++ b/examples/resources/airbyte_destination_mongodb/resource.tf @@ -3,7 +3,7 @@ resource "airbyte_destination_mongodb" "my_destination_mongodb" { auth_type = { login_password = { password = "...my_password..." - username = "Ryleigh43" + username = "Ubaldo12" } } database = "...my_database..." @@ -17,7 +17,7 @@ resource "airbyte_destination_mongodb" "my_destination_mongodb" { no_tunnel = {} } } - definition_id = "e75f1c50-c9ec-4767-87b0-6cf86fe4a6f8" - name = "Mr. Malcolm Lubowitz" - workspace_id = "d646f802-e7b2-4183-b2bc-4f6db7afdaca" + definition_id = "48d60128-3384-4bd8-bb5c-ce3614854333" + name = "Courtney Considine" + workspace_id = "5e509f45-2521-4a04-b878-c254cd184fd1" } \ 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 216cd4f71..a8d18de0f 100644 --- a/examples/resources/airbyte_destination_mssql/resource.tf +++ b/examples/resources/airbyte_destination_mssql/resource.tf @@ -13,9 +13,9 @@ resource "airbyte_destination_mssql" "my_destination_mssql" { tunnel_method = { no_tunnel = {} } - username = "Brian25" + username = "Hope.Toy" } - definition_id = "cf17a668-3bb7-46cb-9d42-c04b7b603cc8" - name = "Bryant Lynch" - workspace_id = "e7603813-ef7f-4c0d-976e-5f414549f124" + definition_id = "f1c50c9e-c767-447b-86cf-86fe4a6f8bb8" + name = "Lisa Von" + workspace_id = "46f802e7-b218-43b2-bc4f-6db7afdacad2" } \ 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 6d25fea96..ac85f61c3 100644 --- a/examples/resources/airbyte_destination_mysql/resource.tf +++ b/examples/resources/airbyte_destination_mysql/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_destination_mysql" "my_destination_mysql" { configuration = { database = "...my_database..." - disable_type_dedupe = true + disable_type_dedupe = false host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." @@ -10,9 +10,9 @@ resource "airbyte_destination_mysql" "my_destination_mysql" { tunnel_method = { no_tunnel = {} } - username = "Jimmy.Cummings31" + username = "Deon.Russel49" } - definition_id = "ef4e895c-9212-4618-852d-1432f33897fe" - name = "Francis Rutherford" - workspace_id = "c8c4bf88-2725-4c3c-abc3-9a6d3f396b39" + definition_id = "a6683bb7-6cbd-4d42-804b-7b603cc8cd88" + name = "Tricia Klocko I" + workspace_id = "813ef7fc-0d17-46e5-b414-549f1242182d" } \ 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 3e5c9201e..1ab3c8868 100644 --- a/examples/resources/airbyte_destination_oracle/resource.tf +++ b/examples/resources/airbyte_destination_oracle/resource.tf @@ -10,9 +10,9 @@ resource "airbyte_destination_oracle" "my_destination_oracle" { tunnel_method = { no_tunnel = {} } - username = "Louvenia.Bartell4" + username = "Emmalee.Towne89" } - definition_id = "16590e1a-2bc7-4de0-bf63-7374915d3efc" - name = "Kara Stroman" - workspace_id = "0e36acc1-e6f1-4291-9604-b55b326e06d2" + definition_id = "895c9212-6184-452d-9432-f33897fec4ca" + name = "Adrienne Lockman" + workspace_id = "bf882725-c3c6-4bc3-9a6d-3f396b39ea0e" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_pinecone/resource.tf b/examples/resources/airbyte_destination_pinecone/resource.tf index 3e1e672b8..4d03ebcc1 100644 --- a/examples/resources/airbyte_destination_pinecone/resource.tf +++ b/examples/resources/airbyte_destination_pinecone/resource.tf @@ -12,10 +12,10 @@ resource "airbyte_destination_pinecone" "my_destination_pinecone" { pinecone_environment = "us-west1-gcp" pinecone_key = "...my_pinecone_key..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 5 - chunk_size = 9 + chunk_overlap = 0 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -35,7 +35,7 @@ resource "airbyte_destination_pinecone" "my_destination_pinecone" { } } } - definition_id = "e42a5305-0a9a-4fbc-a6c9-13a5b78062a6" - name = "Gregory Flatley" - workspace_id = "b7f63598-ffb0-4429-a4fa-eae5018c3193" + definition_id = "90e1a2bc-7de0-4ff6-b737-4915d3efc2cd" + name = "Jorge Beahan" + workspace_id = "6acc1e6f-1291-4560-8b55-b326e06d2448" } \ 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 811419d1f..46d2472ef 100644 --- a/examples/resources/airbyte_destination_postgres/resource.tf +++ b/examples/resources/airbyte_destination_postgres/resource.tf @@ -1,8 +1,8 @@ resource "airbyte_destination_postgres" "my_destination_postgres" { configuration = { database = "...my_database..." - disable_type_dedupe = false - drop_cascade = true + disable_type_dedupe = true + drop_cascade = false host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." @@ -15,9 +15,9 @@ resource "airbyte_destination_postgres" "my_destination_postgres" { tunnel_method = { no_tunnel = {} } - username = "Ladarius_Abernathy72" + username = "Ed.Crooks" } - definition_id = "22db6fe0-864a-4856-a041-70ff8566dc32" - name = "Gladys Hintz" - workspace_id = "7b07bf07-28b7-4077-958c-67348eaa4356" + definition_id = "3050a9af-bc66-4c91-ba5b-78062a6a13d9" + name = "Cody Williamson" + workspace_id = "598ffb04-2924-4fae-ae50-18c319374090" } \ 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 60eba7882..b8419cad9 100644 --- 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 = 10 - batching_element_count_threshold = 2 - batching_enabled = true - batching_request_bytes_threshold = 6 + batching_element_count_threshold = 10 + batching_enabled = false + batching_request_bytes_threshold = 1 credentials_json = "...my_credentials_json..." - ordering_enabled = true + ordering_enabled = false project_id = "...my_project_id..." topic_id = "...my_topic_id..." } - definition_id = "d49dbc4f-abbf-4199-8382-023b4de2c1a7" - name = "Bobby Lemke" - workspace_id = "d3cde3c9-d6fa-494b-b4b9-38f85ce1dfc1" + definition_id = "db6fe086-4a85-46a0-8170-ff8566dc3233" + name = "Belinda Kuhn" + workspace_id = "07bf0728-b707-4755-8c67-348eaa4356f3" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_qdrant/resource.tf b/examples/resources/airbyte_destination_qdrant/resource.tf index 754c13a5f..ffb43bb7d 100644 --- a/examples/resources/airbyte_destination_qdrant/resource.tf +++ b/examples/resources/airbyte_destination_qdrant/resource.tf @@ -14,15 +14,15 @@ resource "airbyte_destination_qdrant" "my_destination_qdrant" { } } collection = "...my_collection..." - distance_metric = "euc" + distance_metric = "cos" prefer_grpc = true text_field = "...my_text_field..." url = "...my_url..." } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 6 - chunk_size = 5 + chunk_overlap = 9 + chunk_size = 2 field_name_mappings = [ { from_field = "...my_from_field..." @@ -37,12 +37,12 @@ resource "airbyte_destination_qdrant" "my_destination_qdrant" { ] text_splitter = { by_markdown_header = { - split_level = 9 + split_level = 6 } } } } - definition_id = "b19e64b8-3f63-4d34-8370-e173ec9d4f32" - name = "Ms. Antonio Thiel" - workspace_id = "a8a43c0f-29f7-4cbd-92b3-20943801c367" + definition_id = "dbc4fabb-f199-4438-a023-b4de2c1a7f28" + name = "Gerard Simonis" + workspace_id = "de3c9d6f-a94b-474b-938f-85ce1dfc1b27" } \ 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 98db444d4..1ca624220 100644 --- a/examples/resources/airbyte_destination_redis/resource.tf +++ b/examples/resources/airbyte_destination_redis/resource.tf @@ -3,7 +3,7 @@ resource "airbyte_destination_redis" "my_destination_redis" { cache_type = "hash" host = "localhost,127.0.0.1" password = "...my_password..." - port = 5 + port = 6 ssl = true ssl_mode = { disable = {} @@ -11,9 +11,9 @@ resource "airbyte_destination_redis" "my_destination_redis" { tunnel_method = { no_tunnel = {} } - username = "Ellen.Champlin16" + username = "Salma59" } - definition_id = "94a31a29-aaf3-4c68-870e-ca1537042295" - name = "Hector Turner" - workspace_id = "dc306165-86b7-4399-8fea-69beba7dc7cd" + definition_id = "e64b83f6-3d34-4837-8e17-3ec9d4f32d3e" + name = "Shelly Connelly" + workspace_id = "a43c0f29-f7cb-4d12-b320-943801c3678d" } \ 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 323fc1012..0b8a2eb01 100644 --- a/examples/resources/airbyte_destination_redshift/resource.tf +++ b/examples/resources/airbyte_destination_redshift/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_destination_redshift" "my_destination_redshift" { configuration = { database = "...my_database..." - disable_type_dedupe = false + disable_type_dedupe = true drop_cascade = true host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." @@ -14,23 +14,18 @@ resource "airbyte_destination_redshift" "my_destination_redshift" { } uploading_method = { awss3_staging = { - access_key_id = "...my_access_key_id..." - encryption = { - aescbc_envelope_encryption = { - key_encrypting_key = "...my_key_encrypting_key..." - } - } + access_key_id = "...my_access_key_id..." file_name_pattern = "{timestamp}" purge_staging_data = false s3_bucket_name = "airbyte.staging" s3_bucket_path = "data_sync/test" - s3_bucket_region = "eu-central-2" + s3_bucket_region = "eu-south-2" secret_access_key = "...my_secret_access_key..." } } - username = "Clark65" + username = "Devante10" } - definition_id = "ab15fb45-8bad-49ea-b671-d5852a459de5" - name = "Jessica Runolfsdottir" - workspace_id = "420a295e-5c09-4962-877b-187a09875344" + definition_id = "a29aaf3c-6807-40ec-a153-7042295e6e54" + name = "Ms. Edmund Douglas III" + workspace_id = "586b7399-0fea-469b-aba7-dc7cde8f8d83" } \ 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 127aeb8d5..e0b503a64 100644 --- a/examples/resources/airbyte_destination_s3/resource.tf +++ b/examples/resources/airbyte_destination_s3/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_destination_s3" "my_destination_s3" { configuration = { access_key_id = "A012345678910EXAMPLE" - file_name_pattern = "{date}" + file_name_pattern = "{timestamp}" format = { avro_apache_avro = { compression_codec = { @@ -20,7 +20,7 @@ resource "airbyte_destination_s3" "my_destination_s3" { s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - definition_id = "bc3217ac-be2a-4d9f-b186-486fc7b23d6b" - name = "Kyle Luettgen" - workspace_id = "0346c04b-193f-4b28-918e-382726ed560c" + definition_id = "aab15fb4-58ba-4d9e-a767-1d5852a459de" + name = "Bonnie Beatty" + workspace_id = "3420a295-e5c0-4996-a877-b187a0987534" } \ 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 1d43fe22f..0ce1e1c17 100644 --- a/examples/resources/airbyte_destination_s3_glue/resource.tf +++ b/examples/resources/airbyte_destination_s3_glue/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_destination_s3_glue" "my_destination_s3glue" { configuration = { access_key_id = "A012345678910EXAMPLE" - file_name_pattern = "{sync_id}" + file_name_pattern = "{date:yyyy_MM}" format = { json_lines_newline_delimited_json = { compression = { @@ -14,15 +14,15 @@ resource "airbyte_destination_s3_glue" "my_destination_s3glue" { } } glue_database = "airbyte_database" - glue_serialization_library = "org.apache.hive.hcatalog.data.JsonSerDe" + glue_serialization_library = "org.openx.data.jsonserde.JsonSerDe" s3_bucket_name = "airbyte_sync" s3_bucket_path = "data_sync/test" - s3_bucket_region = "eu-south-1" + s3_bucket_region = "me-central-1" s3_endpoint = "http://localhost:9000" s3_path_format = "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" secret_access_key = "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" } - definition_id = "e1f9eaf9-a8e2-4157-a856-0c89e77fd0c2" - name = "Marilyn Abshire" - workspace_id = "d396de60-f942-4f93-ba3c-59508dd11c7e" + definition_id = "c3217acb-e2ad-49f3-9864-86fc7b23d6b8" + name = "Billie Wisoky I" + workspace_id = "46c04b19-3fb2-4891-8e38-2726ed560cd3" } \ 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 a17b282b3..c2068361b 100644 --- a/examples/resources/airbyte_destination_sftp_json/resource.tf +++ b/examples/resources/airbyte_destination_sftp_json/resource.tf @@ -4,9 +4,9 @@ resource "airbyte_destination_sftp_json" "my_destination_sftpjson" { host = "...my_host..." password = "...my_password..." port = 22 - username = "Araceli.Kiehn85" + username = "Kristin95" } - definition_id = "5b00289a-0dc0-4232-9a5c-ae9f3888495e" - name = "Dr. Bennie Cassin" - workspace_id = "b305f362-4c43-4900-b25f-a3e33722ced9" + definition_id = "9eaf9a8e-2157-4a85-a0c8-9e77fd0c2020" + name = "Rick Sporer" + workspace_id = "6de60f94-2f93-47a3-8595-08dd11c7ed17" } \ 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 0cd1e5a59..38d973048 100644 --- a/examples/resources/airbyte_destination_snowflake/resource.tf +++ b/examples/resources/airbyte_destination_snowflake/resource.tf @@ -8,16 +8,16 @@ resource "airbyte_destination_snowflake" "my_destination_snowflake" { } database = "AIRBYTE_DATABASE" disable_type_dedupe = false - host = "accountname.snowflakecomputing.com" + host = "accountname.us-east-2.aws.snowflakecomputing.com" jdbc_url_params = "...my_jdbc_url_params..." raw_data_schema = "...my_raw_data_schema..." - retention_period_days = 5 + retention_period_days = 9 role = "AIRBYTE_ROLE" schema = "AIRBYTE_SCHEMA" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - definition_id = "f6fed365-1e7d-4549-a735-da213c86a8b9" - name = "Santiago Will" - workspace_id = "53876e3d-e30a-486e-8df1-9faac84c3184" + definition_id = "289a0dc0-2329-4a5c-ae9f-3888495eab20" + name = "Ira Ratke II" + workspace_id = "f3624c43-9007-425f-a3e3-3722ced92f8e" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_snowflake_cortex/resource.tf b/examples/resources/airbyte_destination_snowflake_cortex/resource.tf index 0de2a8986..501c72446 100644 --- a/examples/resources/airbyte_destination_snowflake_cortex/resource.tf +++ b/examples/resources/airbyte_destination_snowflake_cortex/resource.tf @@ -18,10 +18,10 @@ resource "airbyte_destination_snowflake_cortex" "my_destination_snowflakecortex" username = "AIRBYTE_USER" warehouse = "AIRBYTE_WAREHOUSE" } - omit_raw_text = false + omit_raw_text = true processing = { - chunk_overlap = 2 - chunk_size = 0 + chunk_overlap = 9 + chunk_size = 2 field_name_mappings = [ { from_field = "...my_from_field..." @@ -36,12 +36,12 @@ resource "airbyte_destination_snowflake_cortex" "my_destination_snowflakecortex" ] text_splitter = { by_markdown_header = { - split_level = 6 + split_level = 4 } } } } - definition_id = "6a04bb96-66e7-4d15-a7ee-dd4643586b68" - name = "Tommie Sporer I" - workspace_id = "c292fcfa-b73b-49ba-9d30-45674ad28dce" + definition_id = "51e7d549-6735-4da2-93c8-6a8b9fef8f53" + name = "Jessie Jones" + workspace_id = "de30a86e-4df1-49fa-ac84-c31846ef3644" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_teradata/resource.tf b/examples/resources/airbyte_destination_teradata/resource.tf index 6462e02c6..e17fb737d 100644 --- a/examples/resources/airbyte_destination_teradata/resource.tf +++ b/examples/resources/airbyte_destination_teradata/resource.tf @@ -8,9 +8,9 @@ resource "airbyte_destination_teradata" "my_destination_teradata" { ssl_mode = { allow = {} } - username = "Arch_Stehr" + username = "Lillian.Keebler" } - definition_id = "d713664c-8ab0-488c-a48e-91396f340754" - name = "Mr. Eula Heidenreich" - workspace_id = "86d04e60-8039-4bc7-ab07-32a47524bb49" + definition_id = "4bb9666e-7d15-4e7e-add4-643586b689fd" + name = "Eric Fadel" + workspace_id = "92fcfab7-3b9b-4a5d-b045-674ad28dce71" } \ 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 6151c2792..d8bb55378 100644 --- a/examples/resources/airbyte_destination_typesense/resource.tf +++ b/examples/resources/airbyte_destination_typesense/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_destination_typesense" "my_destination_typesense" { configuration = { api_key = "...my_api_key..." - batch_size = 0 + batch_size = 9 host = "...my_host..." path = "...my_path..." port = "...my_port..." protocol = "...my_protocol..." } - definition_id = "aa753ad1-1902-4ba1-8886-0231ad193af4" - name = "Raymond McDermott" - workspace_id = "c92d33ca-e7ed-4b40-9c23-9e69c6f21d65" + definition_id = "7fd71366-4c8a-4b08-8c24-8e91396f3407" + name = "Pauline Hayes" + workspace_id = "00686d04-e608-4039-bc7e-b0732a47524b" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_vectara/resource.tf b/examples/resources/airbyte_destination_vectara/resource.tf index 4bc1f2c19..1e276207e 100644 --- a/examples/resources/airbyte_destination_vectara/resource.tf +++ b/examples/resources/airbyte_destination_vectara/resource.tf @@ -15,7 +15,7 @@ resource "airbyte_destination_vectara" "my_destination_vectara" { ] title_field = "document_key" } - definition_id = "173cccbb-c51a-43ca-a62e-557cba0d3380" - name = "Beverly Murray" - workspace_id = "67fcf379-fa40-411e-ae8d-b1144f7f4dcb" + definition_id = "490aa753-ad11-4902-ba18-8860231ad193" + name = "Emilio Gerhold V" + workspace_id = "85c92d33-cae7-4edb-801c-239e69c6f21d" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_weaviate/resource.tf b/examples/resources/airbyte_destination_weaviate/resource.tf index 2514d9359..207e99799 100644 --- a/examples/resources/airbyte_destination_weaviate/resource.tf +++ b/examples/resources/airbyte_destination_weaviate/resource.tf @@ -19,16 +19,16 @@ resource "airbyte_destination_weaviate" "my_destination_weaviate" { token = "...my_token..." } } - batch_size = 1 - default_vectorizer = "text2vec-palm" + batch_size = 4 + default_vectorizer = "text2vec-huggingface" host = "https://my-cluster.weaviate.network" tenant_id = "...my_tenant_id..." text_field = "...my_text_field..." } omit_raw_text = false processing = { - chunk_overlap = 0 - chunk_size = 5 + chunk_overlap = 1 + chunk_size = 4 field_name_mappings = [ { from_field = "...my_from_field..." @@ -43,12 +43,12 @@ resource "airbyte_destination_weaviate" "my_destination_weaviate" { ] text_splitter = { by_markdown_header = { - split_level = 4 + split_level = 2 } } } } - definition_id = "8467e5cd-3332-485c-bcc3-fde334f786aa" - name = "Dale Padberg" - workspace_id = "527fe19e-b1bf-48ee-a339-467597e801e6" + definition_id = "cccbbc51-a3ca-4a62-a557-cba0d338002a" + name = "Delores Jakubowski" + workspace_id = "cf379fa4-011e-4ae8-9b11-44f7f4dcb281" } \ No newline at end of file diff --git a/examples/resources/airbyte_destination_yellowbrick/resource.tf b/examples/resources/airbyte_destination_yellowbrick/resource.tf index 59806f513..45165b29f 100644 --- a/examples/resources/airbyte_destination_yellowbrick/resource.tf +++ b/examples/resources/airbyte_destination_yellowbrick/resource.tf @@ -13,9 +13,9 @@ resource "airbyte_destination_yellowbrick" "my_destination_yellowbrick" { tunnel_method = { no_tunnel = {} } - username = "Jonathan.Mante" + username = "Freida38" } - definition_id = "6f396c7c-6bf7-4372-8213-ca1059f1e303" - name = "Nancy Weimann PhD" - workspace_id = "aa50681b-c3ad-4b09-8c01-3842c101e265" + definition_id = "7e5cd333-285c-47cc-bfde-334f786aae3a" + name = "Boyd Hamill" + workspace_id = "fe19eb1b-f8ee-4233-9467-597e801e6768" } \ No newline at end of file diff --git a/examples/resources/airbyte_permission/resource.tf b/examples/resources/airbyte_permission/resource.tf index c074b4b46..13e2c78f5 100644 --- a/examples/resources/airbyte_permission/resource.tf +++ b/examples/resources/airbyte_permission/resource.tf @@ -1,6 +1,6 @@ resource "airbyte_permission" "my_permission" { - organization_id = "eebc230b-1509-44cc-a185-4edb75e7d1c9" - permission_type = "workspace_reader" - user_id = "dc2da362-faf1-4b28-be26-cb1bb0550b4e" - workspace_id = "344126e7-f293-436e-a378-18d15373da8d" + organization_id = "9a46f396-c7c6-4bf7-b724-213ca1059f1e" + permission_type = "organization_editor" + user_id = "0360fc0e-aa50-4681-bc3a-db090c013842" + workspace_id = "c101e265-eebc-4230-b150-94cc21854edb" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_aha/resource.tf b/examples/resources/airbyte_source_aha/resource.tf index b89daf43f..ed3385dd3 100644 --- a/examples/resources/airbyte_source_aha/resource.tf +++ b/examples/resources/airbyte_source_aha/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_aha" "my_source_aha" { api_key = "...my_api_key..." url = "...my_url..." } - definition_id = "6eef0475-7630-4ddb-82db-f188dfabd571" - name = "Joyce Pagac" + definition_id = "75e7d1c9-ddc2-4da3-a2fa-f1b28fe26cb1" + name = "Jonathon Bahringer" secret_id = "...my_secret_id..." - workspace_id = "1dffa69f-e714-43a3-a9a2-44d7bc1a5a6e" + workspace_id = "0b4e3441-26e7-4f29-b36e-237818d15373" } \ 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 f38abf691..d61ef8f76 100644 --- a/examples/resources/airbyte_source_aircall/resource.tf +++ b/examples/resources/airbyte_source_aircall/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_aircall" "my_source_aircall" { api_token = "...my_api_token..." start_date = "2022-03-01T00:00:00.000Z" } - definition_id = "c1931372-2140-427e-a71b-638bd648d548" - name = "Lucille O'Conner" + definition_id = "8d6eef04-7576-430d-9bc2-dbf188dfabd5" + name = "Miss Ann Bode" secret_id = "...my_secret_id..." - workspace_id = "b93d4bbd-e9f2-4bb8-8cd3-fe4ad282938c" + workspace_id = "61dffa69-fe71-443a-be9a-244d7bc1a5a6" } \ 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 2b722b7bf..98106ece3 100644 --- a/examples/resources/airbyte_source_airtable/resource.tf +++ b/examples/resources/airbyte_source_airtable/resource.tf @@ -6,12 +6,12 @@ resource "airbyte_source_airtable" "my_source_airtable" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-08-20T20:34:02.471Z" + token_expiry_date = "2022-09-01T07:21:46.506Z" } } } - definition_id = "27564451-7930-4ed8-943c-0dabba6ef9fc" - name = "Krista Franecki" + definition_id = "cc193137-2214-4027-ae71-b638bd648d54" + name = "Ryan Green" secret_id = "...my_secret_id..." - workspace_id = "4fd252e5-7aa6-473d-a825-9f0c220e39e1" + workspace_id = "eb93d4bb-de9f-42bb-80cd-3fe4ad282938" } \ 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 b6a19e264..068fef7d5 100644 --- a/examples/resources/airbyte_source_amazon_ads/resource.tf +++ b/examples/resources/airbyte_source_amazon_ads/resource.tf @@ -2,7 +2,7 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { configuration = { client_id = "...my_client_id..." client_secret = "...my_client_secret..." - look_back_window = 3 + look_back_window = 10 marketplace_ids = [ "...", ] @@ -10,17 +10,17 @@ resource "airbyte_source_amazon_ads" "my_source_amazonads" { 4, ] refresh_token = "...my_refresh_token..." - region = "FE" + region = "NA" report_record_types = [ - "targets", + "asins_targets", ] start_date = "2022-10-10" state_filter = [ - "archived", + "enabled", ] } - definition_id = "849b0bdf-3d5c-4a96-8633-54ae1d23c3d1" - name = "Jaime Weimann" + definition_id = "517930ed-8d43-4c0d-abba-6ef9fc3c3744" + name = "Bryant Christiansen" secret_id = "...my_secret_id..." - workspace_id = "4df0d756-d8b0-4d90-9af9-186ab63a7b2e" + workspace_id = "e57aa673-d282-459f-8c22-0e39e10d6ef0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_amazon_seller_partner/resource.tf b/examples/resources/airbyte_source_amazon_seller_partner/resource.tf index 37d870f68..c6fa09a1c 100644 --- a/examples/resources/airbyte_source_amazon_seller_partner/resource.tf +++ b/examples/resources/airbyte_source_amazon_seller_partner/resource.tf @@ -1,12 +1,12 @@ resource "airbyte_source_amazon_seller_partner" "my_source_amazonsellerpartner" { configuration = { - account_type = "Seller" + account_type = "Vendor" aws_environment = "SANDBOX" lwa_app_id = "...my_lwa_app_id..." lwa_client_secret = "...my_lwa_client_secret..." - period_in_days = 5 + period_in_days = 7 refresh_token = "...my_refresh_token..." - region = "MX" + region = "IT" replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" report_options_list = [ @@ -17,13 +17,13 @@ resource "airbyte_source_amazon_seller_partner" "my_source_amazonsellerpartner" option_value = "...my_option_value..." }, ] - report_name = "GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING" + report_name = "GET_MERCHANT_LISTINGS_DATA" stream_name = "...my_stream_name..." }, ] } - definition_id = "b1d1d8bb-57bf-4001-9db3-cf074d627d20" - name = "Karla Adams III" + definition_id = "df3d5ca9-6c63-4354-ae1d-23c3d11ff934" + name = "Irvin Berge" secret_id = "...my_secret_id..." - workspace_id = "9bb26e6b-9f25-4aa9-b8c7-d4107048d9ff" + workspace_id = "56d8b0d9-0daf-4918-aab6-3a7b2e3879ec" } \ 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 5dbac793c..37a6096c2 100644 --- a/examples/resources/airbyte_source_amazon_sqs/resource.tf +++ b/examples/resources/airbyte_source_amazon_sqs/resource.tf @@ -6,12 +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 = "ap-southeast-4" + region = "eu-west-3" secret_key = "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" visibility_timeout = 15 } - definition_id = "afeef69e-ad1e-45d3-a90e-fc6e828b1d2d" - name = "Wm Herman" + definition_id = "d1d8bb57-bf00-41dd-b3cf-074d627d201b" + name = "Betsy Baumbach" secret_id = "...my_secret_id..." - workspace_id = "a9ea927c-ae7b-429c-85e6-b85628652e0f" + workspace_id = "bb26e6b9-f25a-4a9f-8c7d-4107048d9ffe" } \ 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 258606a20..098192f66 100644 --- a/examples/resources/airbyte_source_amplitude/resource.tf +++ b/examples/resources/airbyte_source_amplitude/resource.tf @@ -2,12 +2,12 @@ resource "airbyte_source_amplitude" "my_source_amplitude" { configuration = { api_key = "...my_api_key..." data_region = "EU Residency Server" - request_time_range = 5 + request_time_range = 6 secret_key = "...my_secret_key..." start_date = "2021-01-25T00:00:00Z" } - definition_id = "21b517b1-6f1f-4884-abcd-5137451945c4" - name = "Mrs. Sylvia Howe" + definition_id = "afeef69e-ad1e-45d3-a90e-fc6e828b1d2d" + name = "Wm Herman" secret_id = "...my_secret_id..." - workspace_id = "6ae8aa3c-4f28-4791-bb86-68105e1180fb" + workspace_id = "a9ea927c-ae7b-429c-85e6-b85628652e0f" } \ 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 836f3c03a..6a6eac218 100644 --- a/examples/resources/airbyte_source_apify_dataset/resource.tf +++ b/examples/resources/airbyte_source_apify_dataset/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_apify_dataset" "my_source_apifydataset" { dataset_id = "rHuMdwm6xCFt6WiGU" token = "apify_api_PbVwb1cBbuvbfg2jRmAIHZKgx3NQyfEMG7uk" } - definition_id = "2a875a1c-a190-4e95-bd11-82a17eb0af63" - name = "Darin Windler" + definition_id = "f83c21b5-17b1-46f1-b884-6bcd51374519" + name = "Renee Schamberger" secret_id = "...my_secret_id..." - workspace_id = "3356f39b-ea5e-4208-9f0e-8905c8543b91" + workspace_id = "360526ae-8aa3-4c4f-a879-13b8668105e1" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_appfollow/resource.tf b/examples/resources/airbyte_source_appfollow/resource.tf index 875c99c4b..c3774fd8d 100644 --- a/examples/resources/airbyte_source_appfollow/resource.tf +++ b/examples/resources/airbyte_source_appfollow/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_appfollow" "my_source_appfollow" { configuration = { api_secret = "...my_api_secret..." } - definition_id = "84cac7dc-adad-4293-8da5-765e7880f00a" - name = "Brenda Stanton" + definition_id = "180fb2a8-75a1-4ca1-90e9-5bd1182a17eb" + name = "Kayla Weimann" secret_id = "...my_secret_id..." - workspace_id = "f9a90fa7-f8f4-441b-98df-c559a0bee1c5" + workspace_id = "defa7335-6f39-4bea-9e20-89f0e8905c85" } \ 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 08b38dd65..cae88bbc9 100644 --- a/examples/resources/airbyte_source_asana/resource.tf +++ b/examples/resources/airbyte_source_asana/resource.tf @@ -10,10 +10,10 @@ resource "airbyte_source_asana" "my_source_asana" { organization_export_ids = [ "{ \"see\": \"documentation\" }", ] - test_mode = true + test_mode = false } - definition_id = "f2233892-0422-4616-84e7-3ef602c915f5" - name = "Ron Schimmel" + definition_id = "3b9184ca-c7dc-4ada-9293-8da5765e7880" + name = "Matthew Bednar" secret_id = "...my_secret_id..." - workspace_id = "896557ce-17cc-4d6b-90d6-388d4fdfb9af" + workspace_id = "0ddef9a9-0fa7-4f8f-841b-58dfc559a0be" } \ 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 e1f308e30..c816ba995 100644 --- a/examples/resources/airbyte_source_auth0/resource.tf +++ b/examples/resources/airbyte_source_auth0/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_auth0" "my_source_auth0" { } start_date = "2023-08-05T00:43:59.244Z" } - definition_id = "007bc041-91be-4b05-bf07-c546621bdba9" - name = "Victoria Haley" + definition_id = "e1c5ff22-3389-4204-a261-684e73ef602c" + name = "Raymond Halvorson" secret_id = "...my_secret_id..." - workspace_id = "51ed0a81-81e6-4e55-bd9e-be7b2f5ca6ec" + workspace_id = "97cf5896-557c-4e17-8cd6-b10d6388d4fd" } \ 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 bc82603df..1b13af999 100644 --- a/examples/resources/airbyte_source_aws_cloudtrail/resource.tf +++ b/examples/resources/airbyte_source_aws_cloudtrail/resource.tf @@ -3,10 +3,14 @@ resource "airbyte_source_aws_cloudtrail" "my_source_awscloudtrail" { aws_key_id = "...my_aws_key_id..." aws_region_name = "...my_aws_region_name..." aws_secret_key = "...my_aws_secret_key..." - start_date = "2021-01-01" + lookup_attributes_filter = { + attribute_key = "EventName" + attribute_value = "ConsoleLogin" + } + start_date = "2021-01-01" } - definition_id = "af2b0521-0208-4e03-ab26-8d758466c963" - name = "Justin Bauch MD" + definition_id = "af007bc0-4191-4beb-857f-07c546621bdb" + name = "Ross Abshire" secret_id = "...my_secret_id..." - workspace_id = "394b84ac-df8d-4b6a-8f7e-23711b260f5d" + workspace_id = "4f51ed0a-8181-4e6e-95fd-9ebe7b2f5ca6" } \ 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 aa465b413..a9b5b6d42 100644 --- a/examples/resources/airbyte_source_azure_blob_storage/resource.tf +++ b/examples/resources/airbyte_source_azure_blob_storage/resource.tf @@ -14,10 +14,10 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 7 + days_to_sync_if_history_is_full = 9 format = { avro_format = { - double_as_string = true + double_as_string = false } } globs = [ @@ -25,15 +25,15 @@ resource "airbyte_source_azure_blob_storage" "my_source_azureblobstorage" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Al Sanford" + name = "Brendan Crist II" primary_key = "...my_primary_key..." schemaless = true - validation_policy = "Wait for Discover" + validation_policy = "Emit Record" }, ] } - definition_id = "da3d51cb-c156-423e-8645-3ce6c3cf0d0e" - name = "Sandra Stroman III" + definition_id = "0208e036-b268-4d75-8466-c963e10b1b39" + name = "Karla Luettgen" secret_id = "...my_secret_id..." - workspace_id = "b8da7b81-43f8-451c-b99c-7fd70e50457d" + workspace_id = "cdf8db6a-4f7e-4237-91b2-60f5d38a1edc" } \ 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 a83515de6..e6c335141 100644 --- a/examples/resources/airbyte_source_azure_table/resource.tf +++ b/examples/resources/airbyte_source_azure_table/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_azure_table" "my_source_azuretable" { storage_account_name = "...my_storage_account_name..." storage_endpoint_suffix = "core.chinacloudapi.cn" } - definition_id = "f4f64874-e62c-458d-8792-fd48887cb19c" - name = "Vickie Ullrich" + definition_id = "36cda3d5-1cbc-4156-a3ec-6453ce6c3cf0" + name = "Joseph VonRueden PhD" secret_id = "...my_secret_id..." - workspace_id = "b4573d66-d007-4e52-a2e4-396e7403ea2d" + workspace_id = "e16b8da7-b814-43f8-91cf-99c7fd70e504" } \ 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 61bd773c6..72e41d0a8 100644 --- a/examples/resources/airbyte_source_bamboo_hr/resource.tf +++ b/examples/resources/airbyte_source_bamboo_hr/resource.tf @@ -2,11 +2,11 @@ resource "airbyte_source_bamboo_hr" "my_source_bamboohr" { configuration = { api_key = "...my_api_key..." custom_reports_fields = "...my_custom_reports_fields..." - custom_reports_include_default_fields = false + custom_reports_include_default_fields = true subdomain = "...my_subdomain..." } - definition_id = "0959a4fa-50e8-407c-86bd-0cbf5314eea0" - name = "Miss Oliver Crooks" + definition_id = "7dcf4f64-874e-462c-98d8-792fd48887cb" + name = "Toni Schaefer" secret_id = "...my_secret_id..." - workspace_id = "37367271-c78a-49aa-9603-df323c7d7845" + workspace_id = "ec8b4573-d66d-4007-a52a-2e4396e7403e" } \ 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 36bb2e4db..98504f93e 100644 --- a/examples/resources/airbyte_source_bigquery/resource.tf +++ b/examples/resources/airbyte_source_bigquery/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_bigquery" "my_source_bigquery" { dataset_id = "...my_dataset_id..." project_id = "...my_project_id..." } - definition_id = "b7f8882a-1973-48b2-98b7-0494da21b79c" - name = "Lionel McKenzie" + definition_id = "a2d50959-a4fa-450e-807c-86bd0cbf5314" + name = "Dr. Tomas Nolan" secret_id = "...my_secret_id..." - workspace_id = "f3821deb-7264-4dad-9e5f-b53126691bfb" + workspace_id = "21aa3736-7271-4c78-a9aa-9603df323c7d" } \ 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 6e96a442d..b1e14adb6 100644 --- a/examples/resources/airbyte_source_bing_ads/resource.tf +++ b/examples/resources/airbyte_source_bing_ads/resource.tf @@ -2,30 +2,30 @@ resource "airbyte_source_bing_ads" "my_source_bingads" { configuration = { account_names = [ { - name = "Eula Ritchie" - operator = "Equals" + name = "Jennie Gleason" + operator = "Contains" }, ] client_id = "...my_client_id..." client_secret = "...my_client_secret..." custom_reports = [ { - name = "Account Performance" + name = "custom report" report_aggregation = "...my_report_aggregation..." report_columns = [ "...", ] - reporting_object = "ProductNegativeKeywordConflictReportRequest" + reporting_object = "AdExtensionByKeywordReportRequest" }, ] developer_token = "...my_developer_token..." - lookback_window = 5 + lookback_window = 6 refresh_token = "...my_refresh_token..." - reports_start_date = "2022-01-16" + reports_start_date = "2022-10-18" tenant_id = "...my_tenant_id..." } - definition_id = "472f2e8b-bfe1-4822-ba33-308df445f49b" - name = "Chester Dach" + definition_id = "8b218b70-494d-4a21-b79c-fd9baf3821de" + name = "Kurt D'Amore" secret_id = "...my_secret_id..." - workspace_id = "9f17b5c6-1c8d-42f7-9d6e-e9c7e7401902" + workspace_id = "dad9e5fb-5312-4669-9bfb-5db9ea24da51" } \ 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 4323292f8..6ef576e67 100644 --- a/examples/resources/airbyte_source_braintree/resource.tf +++ b/examples/resources/airbyte_source_braintree/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_source_braintree" "my_source_braintree" { configuration = { - environment = "Development" + environment = "Qa" merchant_id = "...my_merchant_id..." private_key = "...my_private_key..." public_key = "...my_public_key..." - start_date = "2020" + start_date = "2020-12-30" } - definition_id = "430f8964-a321-4f43-9fb3-aad078a3612f" - name = "Abraham Herzog" + definition_id = "472f2e8b-bfe1-4822-ba33-308df445f49b" + name = "Chester Dach" secret_id = "...my_secret_id..." - workspace_id = "fdd854e0-c39c-422f-a17d-f57adf10725f" + workspace_id = "9f17b5c6-1c8d-42f7-9d6e-e9c7e7401902" } \ 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 71884f9ab..331c7b845 100644 --- a/examples/resources/airbyte_source_braze/resource.tf +++ b/examples/resources/airbyte_source_braze/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_braze" "my_source_braze" { configuration = { api_key = "...my_api_key..." - start_date = "2021-08-21" + start_date = "2022-08-21" url = "...my_url..." } - definition_id = "f1a27e8f-d2f1-493d-8f9a-b29a2f8317de" - name = "Herbert Torphy" + definition_id = "195430f8-964a-4321-b431-fb3aad078a36" + name = "Wanda Wisoky" secret_id = "...my_secret_id..." - workspace_id = "ab02ccb9-0852-43df-96a0-cc4991982a68" + workspace_id = "5a7fdd85-4e0c-439c-a2fe-17df57adf107" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_cart/resource.tf b/examples/resources/airbyte_source_cart/resource.tf index b25f6ddc4..7c78b15b1 100644 --- a/examples/resources/airbyte_source_cart/resource.tf +++ b/examples/resources/airbyte_source_cart/resource.tf @@ -3,14 +3,14 @@ resource "airbyte_source_cart" "my_source_cart" { credentials = { central_api_router = { site_id = "...my_site_id..." - user_name = "Ceasar63" + user_name = "Briana_Hettinger45" user_secret = "...my_user_secret..." } } start_date = "2021-01-01T00:00:00Z" } - definition_id = "7074f016-f721-427f-b3f8-652b2551b023" - name = "Mr. Spencer Casper" + definition_id = "f1a27e8f-d2f1-493d-8f9a-b29a2f8317de" + name = "Herbert Torphy" secret_id = "...my_secret_id..." - workspace_id = "a7ffb268-dc18-4708-bd37-ac99fd785161" + workspace_id = "ab02ccb9-0852-43df-96a0-cc4991982a68" } \ 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 909547d23..7598ce67d 100644 --- a/examples/resources/airbyte_source_chargebee/resource.tf +++ b/examples/resources/airbyte_source_chargebee/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_chargebee" "my_source_chargebee" { site_api_key = "...my_site_api_key..." start_date = "2021-01-25T00:00:00Z" } - definition_id = "5e0c1f4b-65d9-4ebd-b57e-5946981cb460" - name = "Ms. Franklin Mraz" + definition_id = "a7074f01-6f72-4127-b33f-8652b2551b02" + name = "Mr. Jana Runolfsson" secret_id = "...my_secret_id..." - workspace_id = "6308eadb-73c3-469b-a0c1-2ece59b9fbae" + workspace_id = "4a7ffb26-8dc1-4870-87d3-7ac99fd78516" } \ 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 b9eb66f19..2bf221e88 100644 --- a/examples/resources/airbyte_source_chartmogul/resource.tf +++ b/examples/resources/airbyte_source_chartmogul/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_chartmogul" "my_source_chartmogul" { api_key = "...my_api_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "e4749058-8d0e-4293-9574-a681eea74b87" - name = "Harold Willms IV" + definition_id = "305e0c1f-4b65-4d9e-bd75-7e5946981cb4" + name = "Maria Lubowitz" secret_id = "...my_secret_id..." - workspace_id = "7d33223d-80bb-4993-a2d2-f45974a2ebc3" + workspace_id = "1686308e-adb7-43c3-a9be-0c12ece59b9f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_clazar/import.sh b/examples/resources/airbyte_source_clazar/import.sh new file mode 100644 index 000000000..3f6d9cf82 --- /dev/null +++ b/examples/resources/airbyte_source_clazar/import.sh @@ -0,0 +1 @@ +terraform import airbyte_source_clazar.my_airbyte_source_clazar "" diff --git a/examples/resources/airbyte_source_clazar/resource.tf b/examples/resources/airbyte_source_clazar/resource.tf new file mode 100644 index 000000000..f2a3ab5da --- /dev/null +++ b/examples/resources/airbyte_source_clazar/resource.tf @@ -0,0 +1,10 @@ +resource "airbyte_source_clazar" "my_source_clazar" { + configuration = { + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + } + definition_id = "baef8e47-4905-488d-8e29-39574a681eea" + name = "Danielle Rice" + secret_id = "...my_secret_id..." + workspace_id = "a1fb187d-3322-43d8-8bb9-9362d2f45974" +} \ 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 873b8e3a0..ec0013203 100644 --- a/examples/resources/airbyte_source_clickhouse/resource.tf +++ b/examples/resources/airbyte_source_clickhouse/resource.tf @@ -8,10 +8,10 @@ resource "airbyte_source_clickhouse" "my_source_clickhouse" { tunnel_method = { no_tunnel = {} } - username = "Johnpaul_Barton69" + username = "Camille_Walsh19" } - definition_id = "376bce66-a7c0-4ce2-8da3-e9aab71454cb" - name = "Charlotte Blick" + definition_id = "680abb37-6bce-466a-bc0c-e20da3e9aab7" + name = "Debbie Haley" secret_id = "...my_secret_id..." - workspace_id = "3e1da46c-4f68-45d2-8501-1b8862473b75" + workspace_id = "b241893e-1da4-46c4-b685-d205011b8862" } \ 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 5a2927679..a1dbf8fea 100644 --- a/examples/resources/airbyte_source_clickup_api/resource.tf +++ b/examples/resources/airbyte_source_clickup_api/resource.tf @@ -2,13 +2,13 @@ resource "airbyte_source_clickup_api" "my_source_clickupapi" { configuration = { api_token = "...my_api_token..." folder_id = "...my_folder_id..." - include_closed_tasks = false + include_closed_tasks = true list_id = "...my_list_id..." space_id = "...my_space_id..." team_id = "...my_team_id..." } - definition_id = "39108618-e914-445d-83c4-94a849cd517f" - name = "Sonja Douglas" + definition_id = "73b75739-1086-418e-9144-5d83c494a849" + name = "Ms. Kristopher Hammes" secret_id = "...my_secret_id..." - workspace_id = "2e302e6d-e92b-43e4-b098-446f9835e642" + workspace_id = "0e32c2e3-02e6-4de9-ab3e-43098446f983" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_clockify/resource.tf b/examples/resources/airbyte_source_clockify/resource.tf index a0df7f62b..f43f3aa0b 100644 --- a/examples/resources/airbyte_source_clockify/resource.tf +++ b/examples/resources/airbyte_source_clockify/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_clockify" "my_source_clockify" { api_url = "...my_api_url..." workspace_id = "...my_workspace_id..." } - definition_id = "2d15b828-621a-4877-92e6-25cdd80ba5ff" - name = "Tiffany Runolfsdottir" + definition_id = "5e6422d1-5b82-4862-9a87-7d2e625cdd80" + name = "Matt Hermiston" secret_id = "...my_secret_id..." - workspace_id = "c10ca67a-827c-43d3-89f4-44d8a8589d84" + workspace_id = "53c6fc10-ca67-4a82-bc3d-349f444d8a85" } \ 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 a2fa1e600..ddc513a2c 100644 --- a/examples/resources/airbyte_source_close_com/resource.tf +++ b/examples/resources/airbyte_source_close_com/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_close_com" "my_source_closecom" { api_key = "...my_api_key..." start_date = "2021-01-01" } - definition_id = "dcfaea55-0038-401e-9f44-6900c8feba7b" - name = "Annette Schiller" + definition_id = "d8494dcf-aea5-4500-b801-e9f446900c8f" + name = "Geoffrey Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "a08abdda-328f-46c3-b3e0-6663420a6a3a" + workspace_id = "45cfea08-abdd-4a32-8f6c-373e06663420" } \ 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 2fff02eac..15a14fe59 100644 --- a/examples/resources/airbyte_source_coda/resource.tf +++ b/examples/resources/airbyte_source_coda/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_coda" "my_source_coda" { configuration = { auth_token = "...my_auth_token..." } - definition_id = "b4d44755-b910-4e5c-999e-89cbd0e8f2a3" - name = "Dr. Alexandra Runolfsson" + definition_id = "a6a3ab4d-4475-45b9-90e5-c999e89cbd0e" + name = "Emmett Christiansen" secret_id = "...my_secret_id..." - workspace_id = "ec883da2-fecd-42ca-b29e-0bc6002c3cc1" + workspace_id = "7cc1fbec-883d-4a2f-acd2-cab29e0bc600" } \ 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 22059af01..df8f43530 100644 --- a/examples/resources/airbyte_source_coin_api/resource.tf +++ b/examples/resources/airbyte_source_coin_api/resource.tf @@ -3,13 +3,13 @@ resource "airbyte_source_coin_api" "my_source_coinapi" { api_key = "...my_api_key..." end_date = "2019-01-01T00:00:00" environment = "sandbox" - limit = 2 - period = "2MTH" + limit = 8 + period = "5SEC" start_date = "2019-01-01T00:00:00" symbol_id = "...my_symbol_id..." } - definition_id = "8783d50d-4d2b-480c-90dc-344f66cbf0e9" - name = "Larry Hayes" + definition_id = "cc123e87-83d5-40d4-92b8-0c50dc344f66" + name = "Dr. Randolph Wilderman" secret_id = "...my_secret_id..." - workspace_id = "94ace41d-c5b4-42f2-a228-e88647f2d427" + workspace_id = "a05e994a-ce41-4dc5-b42f-2a228e88647f" } \ 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 8dc0d30dd..822d2fdd7 100644 --- a/examples/resources/airbyte_source_coinmarketcap/resource.tf +++ b/examples/resources/airbyte_source_coinmarketcap/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_coinmarketcap" "my_source_coinmarketcap" { "...", ] } - definition_id = "06042c1c-6566-41b2-885a-060238eba136" - name = "Angelina Feeney Jr." + definition_id = "d4275060-42c1-4c65-a61b-2485a060238e" + name = "Shaun Brakus" secret_id = "...my_secret_id..." - workspace_id = "cfe1ba68-d340-4502-b960-29febd39e6ab" + workspace_id = "1d3c00cf-e1ba-468d-b405-02b96029febd" } \ 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 e879e0864..361e7df12 100644 --- a/examples/resources/airbyte_source_configcat/resource.tf +++ b/examples/resources/airbyte_source_configcat/resource.tf @@ -1,10 +1,10 @@ resource "airbyte_source_configcat" "my_source_configcat" { configuration = { password = "...my_password..." - username = "Wilmer_Bernier" + username = "Clara.McDermott63" } - definition_id = "2d50cb6e-6ff3-432b-9f14-5775fcbb81a7" - name = "Tonya Kautzer" + definition_id = "bf17c2d5-0cb6-4e6f-b332-bdf145775fcb" + name = "Casey Boyer" secret_id = "...my_secret_id..." - workspace_id = "78b3b7de-de54-47fc-bc1c-b53c351689dd" + workspace_id = "466bf78b-3b7d-4ede-947f-c7c1cb53c351" } \ 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 3287549fd..2eeac3195 100644 --- a/examples/resources/airbyte_source_confluence/resource.tf +++ b/examples/resources/airbyte_source_confluence/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_confluence" "my_source_confluence" { domain_name = "...my_domain_name..." email = "abc@example.com" } - definition_id = "740139dc-2cf2-4cb4-9644-2d85f5b6382e" - name = "Ms. Laura Upton" + definition_id = "3b3d7401-39dc-42cf-acb4-16442d85f5b6" + name = "Olga Collins" secret_id = "...my_secret_id..." - workspace_id = "8172f932-271c-49f9-8baa-542e6e080961" + workspace_id = "0e18a817-2f93-4227-9c9f-9cbaa542e6e0" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_convex/resource.tf b/examples/resources/airbyte_source_convex/resource.tf index c33357395..bf8ea09ec 100644 --- a/examples/resources/airbyte_source_convex/resource.tf +++ b/examples/resources/airbyte_source_convex/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_convex" "my_source_convex" { access_key = "...my_access_key..." deployment_url = "https://cluttered-owl-337.convex.cloud" } - definition_id = "84c3fbc2-4f86-40fc-a851-98c116e72658" - name = "Kellie Torphy" + definition_id = "0961d84c-3fbc-424f-860f-ce85198c116e" + name = "Nicole Howe" secret_id = "...my_secret_id..." - workspace_id = "70fa8ec1-ba80-44bd-a457-a40e8851a354" + workspace_id = "1ee6770f-a8ec-41ba-804b-d6457a40e885" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_custom/resource.tf b/examples/resources/airbyte_source_custom/resource.tf index 1b393e5df..7dc1a955c 100644 --- a/examples/resources/airbyte_source_custom/resource.tf +++ b/examples/resources/airbyte_source_custom/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_source_custom" "my_source_custom" { configuration = { "user" : "charles" } - definition_id = "1ba6f5d9-0d5a-48a3-89e2-072bdff3818d" - name = "Dr. Rogelio Harris" + definition_id = "1a3541ba-6f5d-490d-9a8a-349e2072bdff" + name = "Carole Buckridge" secret_id = "...my_secret_id..." - workspace_id = "b32a7817-3abb-482e-aa71-89e9256d7463" + workspace_id = "be50fcb3-2a78-4173-abb8-2e6a7189e925" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_datadog/import.sh b/examples/resources/airbyte_source_datadog/import.sh new file mode 100644 index 000000000..b7fba3c46 --- /dev/null +++ b/examples/resources/airbyte_source_datadog/import.sh @@ -0,0 +1 @@ +terraform import airbyte_source_datadog.my_airbyte_source_datadog "" diff --git a/examples/resources/airbyte_source_datadog/resource.tf b/examples/resources/airbyte_source_datadog/resource.tf new file mode 100644 index 000000000..052f39e2f --- /dev/null +++ b/examples/resources/airbyte_source_datadog/resource.tf @@ -0,0 +1,22 @@ +resource "airbyte_source_datadog" "my_source_datadog" { + configuration = { + api_key = "...my_api_key..." + application_key = "...my_application_key..." + end_date = "2022-10-01T00:00:00Z" + max_records_per_request = 4 + queries = [ + { + data_source = "rum" + name = "Alicia Jakubowski" + query = "...my_query..." + }, + ] + query = "...my_query..." + site = "ddog-gov.com" + start_date = "2022-10-01T00:00:00Z" + } + definition_id = "14094639-cf5d-4d4a-8c05-f536f6b9b8b8" + name = "Sidney Ziemann" + secret_id = "...my_secret_id..." + workspace_id = "fbf365d6-87e0-487e-b905-b6a417faeb4f" +} \ 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 a657b7296..80cacf60e 100644 --- a/examples/resources/airbyte_source_datascope/resource.tf +++ b/examples/resources/airbyte_source_datascope/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_datascope" "my_source_datascope" { api_key = "...my_api_key..." start_date = "dd/mm/YYYY HH:MM" } - definition_id = "8d140946-39cf-45dd-8a0c-05f536f6b9b8" - name = "Dave Willms" + definition_id = "73b7e8dc-371e-4cbe-a105-11b439ed171c" + name = "Carroll Mayer" secret_id = "...my_secret_id..." - workspace_id = "6afbf365-d687-4e08-be39-05b6a417faeb" + workspace_id = "b4783ac2-32bf-4a41-880b-23345c949a95" } \ 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 79cc1f88f..bafcd0663 100644 --- a/examples/resources/airbyte_source_delighted/resource.tf +++ b/examples/resources/airbyte_source_delighted/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_delighted" "my_source_delighted" { api_key = "...my_api_key..." since = "2022-05-30T04:50:23Z" } - definition_id = "3b7e8dc3-71ec-4bee-9051-1b439ed171c9" - name = "Kirk Windler" + definition_id = "f5a34ff6-80c8-48d8-a9f7-431721e4227f" + name = "Clyde Boehm" secret_id = "...my_secret_id..." - workspace_id = "4783ac23-2bfa-441c-80b2-3345c949a955" + workspace_id = "6ec345b5-c1ba-4e74-b26a-8cd9c5aad47a" } \ 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 c5d90898e..420c89e79 100644 --- a/examples/resources/airbyte_source_dixa/resource.tf +++ b/examples/resources/airbyte_source_dixa/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_dixa" "my_source_dixa" { configuration = { api_token = "...my_api_token..." - batch_size = 1 + batch_size = 31 start_date = "YYYY-MM-DD" } - definition_id = "a34ff680-c88d-48e9-b743-1721e4227fd5" - name = "Patty Huel" + definition_id = "1e10d002-e1c7-43f9-ba1e-39a63be209ca" + name = "Vernon Mosciski" secret_id = "...my_secret_id..." - workspace_id = "c345b5c1-bae7-4472-aa8c-d9c5aad47afd" + workspace_id = "b808ec8c-0a1f-4116-b1a5-6d068f4b5e4c" } \ 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 2c0c889df..645a8b680 100644 --- a/examples/resources/airbyte_source_dockerhub/resource.tf +++ b/examples/resources/airbyte_source_dockerhub/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_dockerhub" "my_source_dockerhub" { configuration = { docker_username = "airbyte" } - definition_id = "a11e10d0-02e1-4c73-b9ba-1e39a63be209" - name = "Ernesto Murazik" + definition_id = "19596433-e1d5-4148-8aac-586d055244c5" + name = "Stacey Herzog" secret_id = "...my_secret_id..." - workspace_id = "3eb808ec-8c0a-41f1-9671-a56d068f4b5e" + workspace_id = "57a2c261-8fe1-4b91-9cce-8e649d7675fb" } \ 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 97063d51b..ea328d07b 100644 --- a/examples/resources/airbyte_source_dremio/resource.tf +++ b/examples/resources/airbyte_source_dremio/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_dremio" "my_source_dremio" { api_key = "...my_api_key..." base_url = "...my_base_url..." } - definition_id = "4c195964-33e1-4d51-884a-ac586d055244" - name = "Floyd Hackett" + definition_id = "58122af6-a8ac-4655-b6a2-05f1e4d309ea" + name = "Mrs. Carole Beer" secret_id = "...my_secret_id..." - workspace_id = "b457a2c2-618f-4e1b-91dc-ce8e649d7675" + workspace_id = "4fbd8663-14ca-4ce0-af96-b833556f7e41" } \ 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 937bba1d8..379030d84 100644 --- a/examples/resources/airbyte_source_dynamodb/resource.tf +++ b/examples/resources/airbyte_source_dynamodb/resource.tf @@ -9,11 +9,11 @@ resource "airbyte_source_dynamodb" "my_source_dynamodb" { } endpoint = "https://{aws_dynamo_db_url}.com" ignore_missing_read_permissions_tables = false - region = "me-central-1" + region = "ap-northeast-1" reserved_attribute_names = "name, field_name, field-name" } - definition_id = "58122af6-a8ac-4655-b6a2-05f1e4d309ea" - name = "Mrs. Carole Beer" + definition_id = "b36cf1af-cf94-4e3c-b9cb-eca1c7573a5b" + name = "Randolph Olson" secret_id = "...my_secret_id..." - workspace_id = "4fbd8663-14ca-4ce0-af96-b833556f7e41" + workspace_id = "d4c0a2ce-f781-4247-9bca-9a4804a9e0dd" } \ 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 b66e49596..d15405840 100644 --- a/examples/resources/airbyte_source_emailoctopus/resource.tf +++ b/examples/resources/airbyte_source_emailoctopus/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_emailoctopus" "my_source_emailoctopus" { configuration = { api_key = "...my_api_key..." } - definition_id = "81b36cf1-afcf-494e-bc79-cbeca1c7573a" - name = "Candice Rath" + definition_id = "c3156b2f-fd5d-46c6-9da5-497add71ffde" + name = "Herman Lesch" secret_id = "...my_secret_id..." - workspace_id = "82d4c0a2-cef7-4812-875b-ca9a4804a9e0" + workspace_id = "09709edc-ef2c-4435-be7e-b149e6fe9a76" } \ 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 e7f64e5d0..63651d4c1 100644 --- a/examples/resources/airbyte_source_exchange_rates/resource.tf +++ b/examples/resources/airbyte_source_exchange_rates/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_exchange_rates" "my_source_exchangerates" { ignore_weekends = false start_date = "YYYY-MM-DD" } - definition_id = "156b2ffd-5d6c-469d-a549-7add71ffdea5" - name = "Ms. Reginald Nienow" + definition_id = "1d6f7a77-e51b-404b-8d52-e6bc1e22381c" + name = "Salvatore Conroy" secret_id = "...my_secret_id..." - workspace_id = "09edcef2-c435-47e7-ab14-9e6fe9a76bd2" + workspace_id = "642f3c2f-e19c-432e-9fee-92bc3373ad2c" } \ 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 e6b2a8605..025b37725 100644 --- a/examples/resources/airbyte_source_facebook_marketing/resource.tf +++ b/examples/resources/airbyte_source_facebook_marketing/resource.tf @@ -4,48 +4,55 @@ resource "airbyte_source_facebook_marketing" "my_source_facebookmarketing" { account_ids = [ "...", ] - action_breakdowns_allow_empty = true + action_breakdowns_allow_empty = false ad_statuses = [ - "ADSET_PAUSED", + "IN_PROCESS", ] adset_statuses = [ - "PAUSED", + "DELETED", ] campaign_statuses = [ - "DELETED", + "WITH_ISSUES", ] client_id = "...my_client_id..." client_secret = "...my_client_secret..." + credentials = { + authenticate_via_facebook_marketing_oauth = { + access_token = "...my_access_token..." + client_id = "...my_client_id..." + client_secret = "...my_client_secret..." + } + } custom_insights = [ { action_breakdowns = [ - "standard_event_content_type", + "action_carousel_card_id", ] action_report_time = "impression" breakdowns = [ - "media_text_content", + "skan_conversion_id", ] end_date = "2017-01-26T00:00:00Z" fields = [ - "video_play_curve_actions", + "dda_results", ] - insights_job_timeout = 3 - insights_lookback_window = 1 - level = "campaign" - name = "Eleanor Prosacco" + insights_job_timeout = 4 + insights_lookback_window = 7 + level = "adset" + name = "Scott Baumbach" start_date = "2017-01-25T00:00:00Z" - time_increment = 10 + time_increment = 5 }, ] end_date = "2017-01-26T00:00:00Z" - fetch_thumbnail_images = false - insights_job_timeout = 1 - insights_lookback_window = 9 - page_size = 2 + fetch_thumbnail_images = true + insights_job_timeout = 3 + insights_lookback_window = 7 + page_size = 1 start_date = "2017-01-25T00:00:00Z" } - definition_id = "81cdc2e9-642f-43c2-be19-c32edfee92bc" - name = "Wendy Kunze" + definition_id = "49e5b0b6-8d5f-4b4b-99e2-f7dc2833c76b" + name = "Sammy Hauck" secret_id = "...my_secret_id..." - workspace_id = "d2c887f2-8ef9-475a-bb10-2e5487915a2f" + workspace_id = "566b4ade-0498-4ec4-8fd8-ad9161a05c5e" } \ 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 cc98bc688..0db6005f5 100644 --- a/examples/resources/airbyte_source_faker/resource.tf +++ b/examples/resources/airbyte_source_faker/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_source_faker" "my_source_faker" { configuration = { - always_updated = false - count = 2 + always_updated = true + count = 5 parallelism = 6 - records_per_slice = 9 - seed = 3 + records_per_slice = 6 + seed = 5 } - definition_id = "b0b68d5f-b4b9-49e2-b7dc-2833c76bbd55" - name = "Jon Howell" + definition_id = "7eae086e-3c2d-4330-82ab-840e56112c1f" + name = "Homer Bartoletti Jr." secret_id = "...my_secret_id..." - workspace_id = "4ade0498-ec40-4fd8-ad91-61a05c5e8899" + workspace_id = "a5cfbec2-8765-44f1-abc8-4028fbb0cddc" } \ 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 f500a88db..dcef20b88 100644 --- a/examples/resources/airbyte_source_fauna/resource.tf +++ b/examples/resources/airbyte_source_fauna/resource.tf @@ -4,15 +4,15 @@ resource "airbyte_source_fauna" "my_source_fauna" { deletions = { disabled = {} } - page_size = 5 + page_size = 10 } domain = "...my_domain..." port = 5 scheme = "...my_scheme..." secret = "...my_secret..." } - definition_id = "eae086e3-c2d3-4308-aab8-40e56112c1fd" - name = "Mr. Kenneth Corkery" + definition_id = "02e3e601-6546-4635-ada9-b04e26c5d5cf" + name = "Elizabeth Ziemann" secret_id = "...my_secret_id..." - workspace_id = "5cfbec28-7654-4f12-bc84-028fbb0cddcf" + workspace_id = "713464ed-5bf6-4d67-b06c-c548e68cfaef" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_file/resource.tf b/examples/resources/airbyte_source_file/resource.tf index 1f8fbde28..195d959dc 100644 --- a/examples/resources/airbyte_source_file/resource.tf +++ b/examples/resources/airbyte_source_file/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_source_file" "my_source_file" { configuration = { dataset_name = "...my_dataset_name..." - format = "excel_binary" + format = "yaml" provider = { az_blob_azure_blob_storage = { sas_token = "...my_sas_token..." @@ -10,10 +10,10 @@ resource "airbyte_source_file" "my_source_file" { } } reader_options = "{}" - url = "https://storage.googleapis.com/covid19-open-data/v2/latest/epidemiology.csv" + url = "gs://my-google-bucket/data.csv" } - definition_id = "e3e60165-4663-452d-a9b0-4e26c5d5cf50" - name = "Robin Wolf I" + definition_id = "0df143ee-10f8-4279-a427-b2c340e1d4b4" + name = "Mr. Carole Predovic" secret_id = "...my_secret_id..." - workspace_id = "464ed5bf-6d67-4306-8c54-8e68cfaeff48" + workspace_id = "62aeeab6-a16b-4c0f-9be5-567777324c6c" } \ 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 c704130e3..e51647a85 100644 --- a/examples/resources/airbyte_source_firebolt/resource.tf +++ b/examples/resources/airbyte_source_firebolt/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_firebolt" "my_source_firebolt" { engine = "...my_engine..." host = "api.app.firebolt.io" } - definition_id = "0df143ee-10f8-4279-a427-b2c340e1d4b4" - name = "Mr. Carole Predovic" + definition_id = "a7fcdac6-3878-454b-a9c4-2e8b9a534c06" + name = "Merle Hills" secret_id = "...my_secret_id..." - workspace_id = "62aeeab6-a16b-4c0f-9be5-567777324c6c" + workspace_id = "e94eff21-1adf-4c72-9dd1-f80239a92966" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_fleetio/resource.tf b/examples/resources/airbyte_source_fleetio/resource.tf index 2c7ace2e7..9c30a0f94 100644 --- a/examples/resources/airbyte_source_fleetio/resource.tf +++ b/examples/resources/airbyte_source_fleetio/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_fleetio" "my_source_fleetio" { account_token = "...my_account_token..." api_key = "...my_api_key..." } - definition_id = "a7fcdac6-3878-454b-a9c4-2e8b9a534c06" - name = "Merle Hills" + definition_id = "0c93eb11-448c-41cd-bafe-5ef85381e22d" + name = "Miss Emilio Watsica" secret_id = "...my_secret_id..." - workspace_id = "e94eff21-1adf-4c72-9dd1-f80239a92966" + workspace_id = "2224121e-6315-4be3-86a4-e83994413a7c" } \ 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 d157af961..1b51c5d34 100644 --- a/examples/resources/airbyte_source_freshcaller/resource.tf +++ b/examples/resources/airbyte_source_freshcaller/resource.tf @@ -2,12 +2,12 @@ resource "airbyte_source_freshcaller" "my_source_freshcaller" { configuration = { api_key = "...my_api_key..." domain = "snaptravel" - requests_per_minute = 0 + requests_per_minute = 5 start_date = "2022-01-01T12:00:00Z" - sync_lag_minutes = 2 + sync_lag_minutes = 3 } - definition_id = "eb11448c-1cd3-4afe-9ef8-5381e22d9fe1" - name = "Kristopher Champlin" + definition_id = "c70b5882-c881-4a08-b8bf-df7e2fa4a636" + name = "Kim Tremblay" secret_id = "...my_secret_id..." - workspace_id = "4121e631-5be3-406a-8e83-994413a7c75d" + workspace_id = "bba48ed6-d0ea-4f7f-94c7-c369f9cb0a3d" } \ 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 b3f09db5f..0bc1edf7d 100644 --- a/examples/resources/airbyte_source_freshdesk/resource.tf +++ b/examples/resources/airbyte_source_freshdesk/resource.tf @@ -2,12 +2,12 @@ resource "airbyte_source_freshdesk" "my_source_freshdesk" { configuration = { api_key = "...my_api_key..." domain = "myaccount.freshdesk.com" - lookback_window_in_days = 3 - requests_per_minute = 8 + lookback_window_in_days = 9 + requests_per_minute = 0 start_date = "2020-12-01T00:00:00Z" } - definition_id = "b5882c88-1a08-478b-bdf7-e2fa4a63623e" - name = "Lucille Purdy" + definition_id = "7daef770-c81f-495c-9b8d-d2d32b37f6fe" + name = "Corey Schmitt MD" secret_id = "...my_secret_id..." - workspace_id = "48ed6d0e-af7f-454c-bc36-9f9cb0a3dd00" + workspace_id = "4fda52f6-9543-4b86-a0d9-bb50480aaaf7" } \ 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 9eb1c346b..76bfcf673 100644 --- a/examples/resources/airbyte_source_freshsales/resource.tf +++ b/examples/resources/airbyte_source_freshsales/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_freshsales" "my_source_freshsales" { api_key = "...my_api_key..." domain_name = "mydomain.myfreshworks.com" } - definition_id = "07daef77-0c81-4f95-85b8-dd2d32b37f6f" - name = "Wilbert Hettinger" + definition_id = "7ae08fd2-caf8-43f0-8591-0a7c570570b8" + name = "Wendell Cartwright" secret_id = "...my_secret_id..." - workspace_id = "0a4fda52-f695-443b-8620-d9bb50480aaa" + workspace_id = "da4e6d7c-2fca-4a38-ada1-d2ddf0351c49" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_gainsight_px/resource.tf b/examples/resources/airbyte_source_gainsight_px/resource.tf index 074816e53..949b1044c 100644 --- a/examples/resources/airbyte_source_gainsight_px/resource.tf +++ b/examples/resources/airbyte_source_gainsight_px/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_gainsight_px" "my_source_gainsightpx" { configuration = { api_key = "...my_api_key..." } - definition_id = "f77ae08f-d2ca-4f83-b045-910a7c570570" - name = "Guy Langosh III" + definition_id = "c6869005-1741-4425-a4d3-8a30ea56cdfa" + name = "Courtney Witting" secret_id = "...my_secret_id..." - workspace_id = "9da4e6d7-c2fc-4aa3-86da-1d2ddf0351c4" + workspace_id = "6225b4ba-e611-4122-913e-87b490ecc6bf" } \ 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 4b001a5d9..f2f5f3715 100644 --- a/examples/resources/airbyte_source_gcs/resource.tf +++ b/examples/resources/airbyte_source_gcs/resource.tf @@ -5,7 +5,7 @@ resource "airbyte_source_gcs" "my_source_gcs" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 4 + days_to_sync_if_history_is_full = 1 format = { csv_format = { delimiter = "...my_delimiter..." @@ -19,13 +19,13 @@ resource "airbyte_source_gcs" "my_source_gcs" { autogenerated = {} } ignore_errors_on_fields_mismatch = true - inference_type = "Primitive Types Only" + inference_type = "None" null_values = [ "...", ] quote_char = "...my_quote_char..." - skip_rows_after_header = 0 - skip_rows_before_header = 0 + skip_rows_after_header = 4 + skip_rows_before_header = 10 strings_can_be_null = true true_values = [ "...", @@ -37,15 +37,15 @@ resource "airbyte_source_gcs" "my_source_gcs" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Mrs. Colleen Gusikowski" + name = "Robert Franey" primary_key = "...my_primary_key..." - schemaless = false - validation_policy = "Wait for Discover" + schemaless = true + validation_policy = "Emit Record" }, ] } - definition_id = "4d38a30e-a56c-4dfa-a7fb-f6225b4bae61" - name = "Anna Collier Sr." + definition_id = "1a97a1ae-8949-4629-832a-02ceacfe7e01" + name = "Mrs. Tabitha Moen" secret_id = "...my_secret_id..." - workspace_id = "3e87b490-ecc6-4bf7-9161-16fc803c8311" + workspace_id = "f2040e06-9282-4dd6-a12c-b01cbd9faeed" } \ 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 6b96fad26..54adfc200 100644 --- a/examples/resources/airbyte_source_getlago/resource.tf +++ b/examples/resources/airbyte_source_getlago/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_getlago" "my_source_getlago" { api_key = "...my_api_key..." api_url = "...my_api_url..." } - definition_id = "a97a1ae8-9496-4294-b2a0-2ceacfe7e017" - name = "Fredrick Ankunding" + definition_id = "a0582852-7913-4edf-8f9c-9058e69d20ee" + name = "Raquel Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "f2040e06-9282-4dd6-a12c-b01cbd9faeed" + workspace_id = "55c695e2-f08e-4b76-a351-cef20de4cfc3" } \ 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 dc23c8c6c..793e1e05f 100644 --- a/examples/resources/airbyte_source_github/resource.tf +++ b/examples/resources/airbyte_source_github/resource.tf @@ -1,6 +1,6 @@ resource "airbyte_source_github" "my_source_github" { configuration = { - api_url = "https://github.company.org" + api_url = "https://github.com" branch = "airbytehq/airbyte/master airbytehq/airbyte/my-branch" branches = [ "...", @@ -16,11 +16,11 @@ resource "airbyte_source_github" "my_source_github" { repositories = [ "...", ] - repository = "airbytehq/*" + repository = "airbytehq/airbyte airbytehq/another-repo" start_date = "2021-03-01T00:00:00Z" } - definition_id = "527913ed-fcf9-4c90-98e6-9d20ee3e4cb5" - name = "Rosalie Hoppe" + definition_id = "84cd8bc6-076e-4714-bbf0-cfd3aed54ef2" + name = "Lynette Bartoletti" secret_id = "...my_secret_id..." - workspace_id = "e2f08eb7-6e35-41ce-b20d-e4cfc332b42c" + workspace_id = "80e3db90-5020-415d-ade4-b8db33d2b3a2" } \ 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 ec3f7bd0e..eb2121451 100644 --- a/examples/resources/airbyte_source_gitlab/resource.tf +++ b/examples/resources/airbyte_source_gitlab/resource.tf @@ -7,7 +7,7 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-03-12T08:01:10.085Z" + token_expiry_date = "2022-12-09T20:11:03.938Z" } } groups = "airbyte.io" @@ -20,8 +20,8 @@ resource "airbyte_source_gitlab" "my_source_gitlab" { ] start_date = "2021-03-01T00:00:00Z" } - definition_id = "bc6076e7-14fb-4f0c-bd3a-ed54ef24d0de" - name = "Jeffrey Terry" + definition_id = "42a10fbc-47ca-4706-9390-37c7eef972df" + name = "Rachael Boyer" secret_id = "...my_secret_id..." - workspace_id = "b9050201-5d2d-4e4b-8db3-3d2b3a27b0b3" + workspace_id = "349fde89-ab27-46cb-ad00-caee12c4e65b" } \ 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 b3d9d1596..1b263e855 100644 --- a/examples/resources/airbyte_source_glassfrog/resource.tf +++ b/examples/resources/airbyte_source_glassfrog/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_glassfrog" "my_source_glassfrog" { configuration = { api_key = "...my_api_key..." } - definition_id = "42a10fbc-47ca-4706-9390-37c7eef972df" - name = "Rachael Boyer" + definition_id = "57e54a27-b617-4a01-ae6b-f68e1922df28" + name = "Mrs. Iris Jast" secret_id = "...my_secret_id..." - workspace_id = "349fde89-ab27-46cb-ad00-caee12c4e65b" + workspace_id = "13a52314-031f-4d7b-82b3-c164c1950da3" } \ 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 ee1296930..849b073c4 100644 --- a/examples/resources/airbyte_source_gnews/resource.tf +++ b/examples/resources/airbyte_source_gnews/resource.tf @@ -1,23 +1,23 @@ resource "airbyte_source_gnews" "my_source_gnews" { configuration = { api_key = "...my_api_key..." - country = "in" + country = "cn" end_date = "2022-08-21 16:27:09" in = [ - "description", + "content", ] - language = "te" + language = "ru" nullable = [ - "description", + "content", ] - query = "Apple OR Microsoft" + query = "(Windows 7) AND (Windows 10)" sortby = "relevance" start_date = "2022-08-21 16:27:09" - top_headlines_query = "Microsoft Windows 10" - top_headlines_topic = "technology" + top_headlines_query = "Apple AND NOT iPhone" + top_headlines_topic = "sports" } - definition_id = "b617a012-e6bf-468e-9922-df283a614313" - name = "Darrell Cummerata II" + definition_id = "5a75a7c5-fc21-4d72-ab31-0b676fb731c6" + name = "Pedro Champlin PhD" secret_id = "...my_secret_id..." - workspace_id = "031fd7b8-2b3c-4164-8195-0da31ebecd9b" + workspace_id = "9821d4fc-0324-42cc-9276-3a0d30eb91c3" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_goldcast/import.sh b/examples/resources/airbyte_source_goldcast/import.sh new file mode 100644 index 000000000..cc9ca168b --- /dev/null +++ b/examples/resources/airbyte_source_goldcast/import.sh @@ -0,0 +1 @@ +terraform import airbyte_source_goldcast.my_airbyte_source_goldcast "" diff --git a/examples/resources/airbyte_source_goldcast/resource.tf b/examples/resources/airbyte_source_goldcast/resource.tf new file mode 100644 index 000000000..8a68bfa67 --- /dev/null +++ b/examples/resources/airbyte_source_goldcast/resource.tf @@ -0,0 +1,9 @@ +resource "airbyte_source_goldcast" "my_source_goldcast" { + configuration = { + access_key = "...my_access_key..." + } + definition_id = "df259349-552d-4c82-98f3-0a27183b00ec" + name = "Melissa Gutmann" + secret_id = "...my_secret_id..." + workspace_id = "56c03ec7-b8b6-48fd-bc06-92b4fd673f59" +} \ 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 0bbaafbbb..c11f47a06 100644 --- a/examples/resources/airbyte_source_google_ads/resource.tf +++ b/examples/resources/airbyte_source_google_ads/resource.tf @@ -16,13 +16,13 @@ resource "airbyte_source_google_ads" "my_source_googleads" { ] customer_id = "6783948572,5839201945" customer_status_filter = [ - "SUSPENDED", + "CANCELED", ] end_date = "2017-01-30" start_date = "2017-01-25" } - definition_id = "c5fc21d7-22b3-410b-a76f-b731c6d5241e" - name = "Dr. Armando Dibbert" + definition_id = "c9948b00-6105-49fa-81d6-c9b0f0f35d94" + name = "Pearl Batz" secret_id = "...my_secret_id..." - workspace_id = "fc03242c-cd27-463a-8d30-eb91c3df2593" + workspace_id = "93ebb36d-8aae-4a00-b0c4-c84b89e625ba" } \ 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 0bfdc6e86..0e6971f26 100644 --- a/examples/resources/airbyte_source_google_analytics_data_api/resource.tf +++ b/examples/resources/airbyte_source_google_analytics_data_api/resource.tf @@ -23,12 +23,12 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda between_filter = { from_value = { double_value = { - value = 57.56 + value = 54.51 } } to_value = { double_value = { - value = 31.93 + value = 44.08 } } } @@ -49,12 +49,12 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda between_filter = { from_value = { double_value = { - value = 35.8 + value = 41.77 } } to_value = { double_value = { - value = 18.49 + value = 64.64 } } } @@ -66,19 +66,19 @@ resource "airbyte_source_google_analytics_data_api" "my_source_googleanalyticsda metrics = [ "...", ] - name = "Edmund Legros" + name = "Julia Stracke" }, ] date_ranges_start_date = "2021-01-01" - keep_empty_rows = false - lookback_window = 2 + keep_empty_rows = true + lookback_window = 14 property_ids = [ "...", ] - window_in_days = 30 + window_in_days = 200 } - definition_id = "183b00ec-7045-4956-803e-c7b8b68fdfc0" - name = "Miriam Deckow" + definition_id = "7e953bf2-defe-4a2f-9145-f48d36313985" + name = "Kim Marvin" secret_id = "...my_secret_id..." - workspace_id = "fd673f59-a8d0-4acc-9948-b0061059fac1" + workspace_id = "52d3206a-fb3a-4724-a60d-40134e58876c" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_analytics_v4_service_account_only/import.sh b/examples/resources/airbyte_source_google_analytics_v4_service_account_only/import.sh deleted file mode 100644 index 514230082..000000000 --- a/examples/resources/airbyte_source_google_analytics_v4_service_account_only/import.sh +++ /dev/null @@ -1 +0,0 @@ -terraform import airbyte_source_google_analytics_v4_service_account_only.my_airbyte_source_google_analytics_v4_service_account_only "" diff --git a/examples/resources/airbyte_source_google_analytics_v4_service_account_only/resource.tf b/examples/resources/airbyte_source_google_analytics_v4_service_account_only/resource.tf deleted file mode 100644 index 46e409df2..000000000 --- a/examples/resources/airbyte_source_google_analytics_v4_service_account_only/resource.tf +++ /dev/null @@ -1,18 +0,0 @@ -resource "airbyte_source_google_analytics_v4_service_account_only" "my_source_googleanalyticsv4serviceaccountonly" { - configuration = { - credentials = { - service_account_key_authentication = { - credentials_json = "{ \"type\": \"service_account\", \"project_id\": YOUR_PROJECT_ID, \"private_key_id\": YOUR_PRIVATE_KEY, ... }" - } - } - custom_reports = "...my_custom_reports..." - end_date = "2020-06-01" - start_date = "2020-06-01" - view_id = "...my_view_id..." - window_in_days = 200 - } - definition_id = "f0f35d94-2704-4e93-abb3-6d8aaea00f0c" - name = "Kara Macejkovic" - secret_id = "...my_secret_id..." - workspace_id = "89e625ba-e876-4a32-9c31-e1b4b67e953b" -} \ 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 79c9de0dc..7cf889f65 100644 --- a/examples/resources/airbyte_source_google_directory/resource.tf +++ b/examples/resources/airbyte_source_google_directory/resource.tf @@ -3,12 +3,12 @@ resource "airbyte_source_google_directory" "my_source_googledirectory" { credentials = { service_account_key = { credentials_json = "...my_credentials_json..." - email = "Brittany_Steuber89@hotmail.com" + email = "Allan67@hotmail.com" } } } - definition_id = "a2fd145f-48d3-4631-b985-539f352d3206" - name = "Amos Rath" + definition_id = "128ae06a-57c7-4c57-baf1-e5baddd2747b" + name = "Sylvester Konopelski" secret_id = "...my_secret_id..." - workspace_id = "724a60d4-0134-4e58-876c-b030a128ae06" + workspace_id = "41709ce4-fe16-45bc-8840-e7fb5df25477" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_google_drive/resource.tf b/examples/resources/airbyte_source_google_drive/resource.tf index 51f326604..a65fbadb7 100644 --- a/examples/resources/airbyte_source_google_drive/resource.tf +++ b/examples/resources/airbyte_source_google_drive/resource.tf @@ -21,15 +21,15 @@ resource "airbyte_source_google_drive" "my_source_googledrive" { "...", ] input_schema = "...my_input_schema..." - name = "Marianne Hartmann" + name = "Jose Walter" primary_key = "...my_primary_key..." schemaless = true - validation_policy = "Wait for Discover" + validation_policy = "Skip Record" }, ] } - definition_id = "1e5baddd-2747-4bbc-bf24-1709ce4fe165" - name = "Edmund Gleichner" + definition_id = "9bfb0cb9-d8df-4c27-a8c7-2c3eb5dc5571" + name = "Ms. Angelina Reilly" secret_id = "...my_secret_id..." - workspace_id = "0e7fb5df-2547-47f3-b0b0-ec7c89bfb0cb" + workspace_id = "76987333-86b5-43a4-b9a0-805ff1793bf9" } \ 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 1f425534b..9b033a187 100644 --- a/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf +++ b/examples/resources/airbyte_source_google_pagespeed_insights/resource.tf @@ -2,17 +2,17 @@ resource "airbyte_source_google_pagespeed_insights" "my_source_googlepagespeedin configuration = { api_key = "...my_api_key..." categories = [ - "performance", + "pwa", ] strategies = [ - "mobile", + "desktop", ] urls = [ "...", ] } - definition_id = "8dfc27a8-c72c-43eb-9dc5-5714db07d769" - name = "Lance Dicki" + definition_id = "99d63199-bd6b-4468-885e-c21a9ab567f1" + name = "Leticia Kling" secret_id = "...my_secret_id..." - workspace_id = "86b53a47-9a08-405f-b179-3bf9b799d631" + workspace_id = "51fa773f-cf1a-4430-ae08-2909d97bfabb" } \ 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 b845071de..247b1f33f 100644 --- a/examples/resources/airbyte_source_google_search_console/resource.tf +++ b/examples/resources/airbyte_source_google_search_console/resource.tf @@ -14,18 +14,18 @@ resource "airbyte_source_google_search_console" "my_source_googlesearchconsole" dimensions = [ "page", ] - name = "Randolph Stanton" + name = "Allen Jenkins MD" }, ] - data_state = "final" + data_state = "all" end_date = "2021-12-12" site_urls = [ "...", ] - start_date = "2021-06-12" + start_date = "2022-03-09" } - definition_id = "5ec21a9a-b567-4f13-877e-51fa773fcf1a" - name = "Connie Baumbach" + definition_id = "9c174fee-4145-4562-9275-76235e52bb8a" + name = "Roosevelt Lebsack" secret_id = "...my_secret_id..." - workspace_id = "082909d9-7bfa-4bba-9367-1a9ca1d9c174" + workspace_id = "2a7f940d-ec44-4e21-adff-8929e4d23a00" } \ 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 3cbb37713..2f90cb36e 100644 --- a/examples/resources/airbyte_source_google_sheets/resource.tf +++ b/examples/resources/airbyte_source_google_sheets/resource.tf @@ -1,6 +1,6 @@ resource "airbyte_source_google_sheets" "my_source_googlesheets" { configuration = { - batch_size = 10 + batch_size = 7 credentials = { authenticate_via_google_o_auth = { client_id = "...my_client_id..." @@ -11,8 +11,8 @@ resource "airbyte_source_google_sheets" "my_source_googlesheets" { names_conversion = false spreadsheet_id = "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG-arw2xy4HR3D-dwUb/edit" } - definition_id = "e4145562-d275-4762-b5e5-2bb8adc8fd2a" - name = "Ebony McDermott PhD" + definition_id = "94f7d68d-64a8-410b-a959-587ed0c47c0f" + name = "Roosevelt Waters" secret_id = "...my_secret_id..." - workspace_id = "ec44e216-dff8-4929-a4d2-3a00b494f7d6" + workspace_id = "c0f294c1-1e4e-4993-9294-74281bb54dff" } \ 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 1527c34af..edb72d054 100644 --- a/examples/resources/airbyte_source_google_webfonts/resource.tf +++ b/examples/resources/airbyte_source_google_webfonts/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_google_webfonts" "my_source_googlewebfonts" { pretty_print = "...my_pretty_print..." sort = "...my_sort..." } - definition_id = "8d64a810-b295-4958-bed0-c47c0f9ce33c" - name = "Kristie Davis" + definition_id = "6cf9b79e-2328-488b-abde-25154a52da80" + name = "Todd Rodriguez" secret_id = "...my_secret_id..." - workspace_id = "c11e4e99-3d29-4474-a81b-b54dff6cf9b7" + workspace_id = "49853a69-5093-45ad-936c-5004734e30b4" } \ 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 bde76d285..be5652305 100644 --- a/examples/resources/airbyte_source_greenhouse/resource.tf +++ b/examples/resources/airbyte_source_greenhouse/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_greenhouse" "my_source_greenhouse" { configuration = { api_key = "...my_api_key..." } - definition_id = "9e232888-b6bd-4e25-954a-52da80f2bfa4" - name = "Isaac Hessel" + definition_id = "6b959e4e-758a-4c09-a271-19b95b60c98b" + name = "Mitchell Altenwerth" secret_id = "...my_secret_id..." - workspace_id = "6950935a-d536-4c50-8473-4e30b46b959e" + workspace_id = "ab5561ce-1bb1-4cad-aa0e-328a3bd5563e" } \ 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 15535fb1d..2ebef6341 100644 --- a/examples/resources/airbyte_source_gridly/resource.tf +++ b/examples/resources/airbyte_source_gridly/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_gridly" "my_source_gridly" { api_key = "...my_api_key..." grid_id = "...my_grid_id..." } - definition_id = "4e758ac0-9227-4119-b95b-60c98bb7037a" - name = "Floyd Hermann DDS" + definition_id = "04de287b-7526-45fd-bf2d-eb8cbf2674a9" + name = "Mary Fay" secret_id = "...my_secret_id..." - workspace_id = "e1bb1cad-aa0e-4328-a3bd-5563e04de287" + workspace_id = "17bfcc52-6af1-40da-801f-b0fc52730b39" } \ 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 ffe8c27e6..32d72dfed 100644 --- a/examples/resources/airbyte_source_harvest/resource.tf +++ b/examples/resources/airbyte_source_harvest/resource.tf @@ -12,8 +12,8 @@ resource "airbyte_source_harvest" "my_source_harvest" { replication_end_date = "2017-01-25T00:00:00Z" replication_start_date = "2017-01-25T00:00:00Z" } - definition_id = "65fdff2d-eb8c-4bf2-a74a-92033b17bfcc" - name = "Theresa Kertzmann" + definition_id = "41e4a898-5c78-4fa7-986b-df5bf91acb12" + name = "Helen Legros" secret_id = "...my_secret_id..." - workspace_id = "10da401f-b0fc-4527-b0b3-9994a41e4a89" + workspace_id = "28d89e35-1e86-48df-9f2c-5ad84a46153e" } \ 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 581810858..8f4777a23 100644 --- a/examples/resources/airbyte_source_hubplanner/resource.tf +++ b/examples/resources/airbyte_source_hubplanner/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_hubplanner" "my_source_hubplanner" { configuration = { api_key = "...my_api_key..." } - definition_id = "85c78fa7-d86b-4df5-bf91-acb121083728" - name = "Johnnie Maggio" + definition_id = "b240d626-d488-47cc-aaf5-8e0f5c1159d6" + name = "Frances Gutmann" secret_id = "...my_secret_id..." - workspace_id = "51e868df-1f2c-45ad-84a4-6153eb240d62" + workspace_id = "10eecfc7-f384-4ec6-8405-7d0451918db5" } \ 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 81a2a1e28..9a484c003 100644 --- a/examples/resources/airbyte_source_hubspot/resource.tf +++ b/examples/resources/airbyte_source_hubspot/resource.tf @@ -10,8 +10,8 @@ resource "airbyte_source_hubspot" "my_source_hubspot" { enable_experimental_streams = false start_date = "2017-01-25T00:00:00Z" } - definition_id = "887ccaaf-58e0-4f5c-9159-d60149910eec" - name = "Leland Kshlerin" + definition_id = "bbbdb311-964f-499d-a774-5afb65f1720b" + name = "Javier Murray" secret_id = "...my_secret_id..." - workspace_id = "84ec6040-57d0-4451-918d-b5cccbbbdb31" + workspace_id = "c1916264-7e68-40e4-817c-6f4b509c8206" } \ 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 20c33dac7..f160e75b5 100644 --- a/examples/resources/airbyte_source_insightly/resource.tf +++ b/examples/resources/airbyte_source_insightly/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_insightly" "my_source_insightly" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - definition_id = "64f99d67-745a-4fb6-9f17-20bd7a7ec191" - name = "Irene Huels" + definition_id = "b043ef09-e61b-475b-b267-65eab1ad8429" + name = "Eva Reinger" secret_id = "...my_secret_id..." - workspace_id = "e680e441-7c6f-44b5-89c8-206a4b043ef0" + workspace_id = "59bdc8b9-3f80-4b7f-9570-94a97b6356d5" } \ 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 f48515dac..3ad5dd103 100644 --- a/examples/resources/airbyte_source_instagram/resource.tf +++ b/examples/resources/airbyte_source_instagram/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_instagram" "my_source_instagram" { client_secret = "...my_client_secret..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "61b75b72-6765-4eab-9ad8-42954bd759bd" - name = "Clayton Prosacco" + definition_id = "91630fd2-f131-4d4f-bef2-53f33ac135dc" + name = "Kevin Weissnat" secret_id = "...my_secret_id..." - workspace_id = "f80b7f55-7094-4a97-b635-6d53391630fd" + workspace_id = "794a97d5-acf5-4625-ba66-e5ad39192931" } \ 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 b1fd766d7..0fc469dff 100644 --- a/examples/resources/airbyte_source_instatus/resource.tf +++ b/examples/resources/airbyte_source_instatus/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_instatus" "my_source_instatus" { configuration = { api_key = "...my_api_key..." } - definition_id = "2f131d4f-bef2-453f-b3ac-135dc90f6379" - name = "Eunice Mayert" + definition_id = "4c65ed70-eb17-4cb4-bc24-002ca0d01711" + name = "Bobby Heidenreich" secret_id = "...my_secret_id..." - workspace_id = "5acf5625-3a66-4e5a-9391-929314c65ed7" + workspace_id = "8dde04a9-ce3b-4e57-bfa4-6127442775ed" } \ 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 93f8d3d9a..94021db4a 100644 --- a/examples/resources/airbyte_source_intercom/resource.tf +++ b/examples/resources/airbyte_source_intercom/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_intercom" "my_source_intercom" { client_secret = "...my_client_secret..." start_date = "2020-11-16T00:00:00Z" } - definition_id = "7cb4fc24-002c-4a0d-8171-1f25a28dde04" - name = "Marshall Schinner" + definition_id = "4e17a648-8571-41ab-94fe-75a513e00977" + name = "Geneva Fisher" secret_id = "...my_secret_id..." - workspace_id = "be57bfa4-6127-4442-b75e-d08074e17a64" + workspace_id = "7c06dd86-b4fb-4de6-ae53-955108cd8df8" } \ 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 d3b0a25ea..2164293d4 100644 --- a/examples/resources/airbyte_source_ip2whois/resource.tf +++ b/examples/resources/airbyte_source_ip2whois/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_ip2whois" "my_source_ip2whois" { api_key = "...my_api_key..." domain = "www.facebook.com" } - definition_id = "85711ab9-4fe7-45a5-93e0-0977793827c0" - name = "Mable Stroman" + definition_id = "ddacae82-61af-48b9-bb48-50d654be1e78" + name = "Mercedes Turcotte" secret_id = "...my_secret_id..." - workspace_id = "b4fbde6a-e539-4551-88cd-8df8fddacae8" + workspace_id = "327e7787-5126-4eb5-a944-312d5d5e6a2d" } \ 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 ef9b5dd99..e8a10e738 100644 --- a/examples/resources/airbyte_source_iterable/resource.tf +++ b/examples/resources/airbyte_source_iterable/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_iterable" "my_source_iterable" { api_key = "...my_api_key..." start_date = "2021-04-01T00:00:00Z" } - definition_id = "1af8b9bb-4850-4d65-8be1-e785de7e327e" - name = "Georgia Ledner" + definition_id = "c0cc98dd-5412-4256-9139-361b0488926a" + name = "Marion Schimmel" secret_id = "...my_secret_id..." - workspace_id = "126eb569-4431-42d5-95e6-a2d83c0cc98d" + workspace_id = "2e85afcc-9acc-46e7-a95c-9a7c9f197511" } \ 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 1a9c75c8d..a1e8bb82e 100644 --- a/examples/resources/airbyte_source_jira/resource.tf +++ b/examples/resources/airbyte_source_jira/resource.tf @@ -2,9 +2,9 @@ resource "airbyte_source_jira" "my_source_jira" { configuration = { api_token = "...my_api_token..." domain = "jira..com" - email = "Efren18@yahoo.com" + email = "Celestino_Grimes@yahoo.com" enable_experimental_streams = false - expand_issue_changelog = false + expand_issue_changelog = true expand_issue_transition = false issues_stream_expand_with = [ "renderedFields", @@ -13,11 +13,11 @@ resource "airbyte_source_jira" "my_source_jira" { projects = [ "...", ] - render_fields = false + render_fields = true start_date = "2021-03-01T00:00:00Z" } - definition_id = "1b048892-6ab9-4cfe-ae85-afcc9acc6e7e" - name = "Herman Schowalter" + definition_id = "01aad5e5-f9cf-4b0d-9e8d-3acce90aeed1" + name = "Penny Koepp" secret_id = "...my_secret_id..." - workspace_id = "7c9f1975-11d6-4247-9658-5095001aad5e" + workspace_id = "882d54ce-598c-4c59-ab95-2f06231c57fd" } \ 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 ce89a34d8..17a2b54de 100644 --- a/examples/resources/airbyte_source_k6_cloud/resource.tf +++ b/examples/resources/airbyte_source_k6_cloud/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_k6_cloud" "my_source_k6cloud" { configuration = { api_token = "...my_api_token..." } - definition_id = "5f9cfb0d-1e8d-43ac-8e90-aeed1087b988" - name = "Eula Hane" + definition_id = "8f9d1baa-c6e0-45b1-a50c-14468d231cdd" + name = "Jordan Wunsch PhD" secret_id = "...my_secret_id..." - workspace_id = "e598cc59-eb95-42f0-a231-c57fd8f9d1ba" + workspace_id = "deee1be4-e723-4eea-b419-bc59e04a869e" } \ 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 05fd1f91d..fb1c6abd9 100644 --- a/examples/resources/airbyte_source_klarna/resource.tf +++ b/examples/resources/airbyte_source_klarna/resource.tf @@ -3,10 +3,10 @@ resource "airbyte_source_klarna" "my_source_klarna" { password = "...my_password..." playground = true region = "oc" - username = "Gretchen35" + username = "Ben_Greenholt" } - definition_id = "b1e50c14-468d-4231-8dd9-8f81edeee1be" - name = "Sophia Kunze" + definition_id = "3b04e32d-c649-4b6b-88e2-c7d0de0f8a2b" + name = "Tanya Padberg" secret_id = "...my_secret_id..." - workspace_id = "eeaf419b-c59e-404a-869e-9d149f3b04e3" + workspace_id = "e20e7511-1fd0-4612-bfd3-df11978b3859" } \ 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 ef26c51b9..9ab55f131 100644 --- a/examples/resources/airbyte_source_klaviyo/resource.tf +++ b/examples/resources/airbyte_source_klaviyo/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_klaviyo" "my_source_klaviyo" { api_key = "...my_api_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "c649b6bc-8e2c-47d0-9e0f-8a2b57adde20" - name = "Mr. Erik Heathcote DVM" + definition_id = "e3c921cc-9284-4a21-955c-54910609be9a" + name = "Ivan Grimes" secret_id = "...my_secret_id..." - workspace_id = "d0612ffd-3df1-4197-8b38-5957e3c921cc" + workspace_id = "b07bcaf1-3ed5-4606-ac59-e7c8aeeeb09f" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_kyve/resource.tf b/examples/resources/airbyte_source_kyve/resource.tf index 2ce3ed528..eb76f3a5a 100644 --- a/examples/resources/airbyte_source_kyve/resource.tf +++ b/examples/resources/airbyte_source_kyve/resource.tf @@ -1,13 +1,13 @@ resource "airbyte_source_kyve" "my_source_kyve" { configuration = { - max_pages = 6 - page_size = 1 - pool_ids = "0,1" + max_pages = 10 + page_size = 9 + pool_ids = "0" start_ids = "0" - url_base = "https://api.korellia.kyve.network/" + url_base = "https://api.kaon.kyve.network/" } - definition_id = "21155c54-9106-409b-a9a9-84e4b07bcaf1" - name = "Gwen Stark" + definition_id = "3fe46a14-03ba-41bd-8103-cfb422849b58" + name = "Constance Harris" secret_id = "...my_secret_id..." - workspace_id = "06ac59e7-c8ae-4eeb-89ff-d3753fe46a14" + workspace_id = "d79d74aa-20ea-469f-9b1a-975dd1b5a029" } \ 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 fbcea9451..e30546bdb 100644 --- a/examples/resources/airbyte_source_launchdarkly/resource.tf +++ b/examples/resources/airbyte_source_launchdarkly/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_launchdarkly" "my_source_launchdarkly" { configuration = { access_token = "...my_access_token..." } - definition_id = "03ba1bd8-103c-4fb4-a284-9b585759fd79" - name = "Neil Gleichner" + definition_id = "5b197bbb-0227-4d62-9c31-55f731c6e6bc" + name = "Kara O'Keefe III" secret_id = "...my_secret_id..." - workspace_id = "20ea69f1-b1a9-475d-91b5-a0295b197bbb" + workspace_id = "6aee7892-5477-4f38-bc53-022ba4aed299" } \ 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 07cc6932b..260c04527 100644 --- a/examples/resources/airbyte_source_lemlist/resource.tf +++ b/examples/resources/airbyte_source_lemlist/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_lemlist" "my_source_lemlist" { configuration = { api_key = "...my_api_key..." } - definition_id = "0227d625-c315-45f7-b1c6-e6bc1caf166a" - name = "Bert Kohler" + definition_id = "5c663b6d-13c6-4e3b-bb93-bd413d75c669" + name = "Molly Huels" secret_id = "...my_secret_id..." - workspace_id = "25477f38-7c53-4022-ba4a-ed2995c663b6" + workspace_id = "2ef16650-e4c3-4120-977a-566ac796fdac" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_lever_hiring/resource.tf b/examples/resources/airbyte_source_lever_hiring/resource.tf index 8cde45f23..9fcd13af8 100644 --- a/examples/resources/airbyte_source_lever_hiring/resource.tf +++ b/examples/resources/airbyte_source_lever_hiring/resource.tf @@ -5,11 +5,11 @@ resource "airbyte_source_lever_hiring" "my_source_leverhiring" { api_key = "...my_api_key..." } } - environment = "Sandbox" + environment = "Production" start_date = "2021-03-01T00:00:00Z" } - definition_id = "13c6e3bb-b93b-4d41-bd75-c6693a6b92ef" - name = "Rosemary Hyatt PhD" + definition_id = "f48b8f86-7010-454c-9db1-ce49a8fc7f8e" + name = "Anita Jacobson" secret_id = "...my_secret_id..." - workspace_id = "4c3120d7-7a56-46ac-b96f-dac1f48b8f86" + workspace_id = "645cfb24-49ee-4f87-a4eb-4b875ea1fa63" } \ 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 d3022deff..6a1e96926 100644 --- a/examples/resources/airbyte_source_linkedin_ads/resource.tf +++ b/examples/resources/airbyte_source_linkedin_ads/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { configuration = { account_ids = [ - 4, + 10, ] ad_analytics_reports = [ { - name = "Carolyn Bednar" + name = "Lynne Baumbach" pivot_by = "MEMBER_COUNTRY_V2" time_granularity = "ALL" }, @@ -17,8 +17,8 @@ resource "airbyte_source_linkedin_ads" "my_source_linkedinads" { } start_date = "2021-05-17" } - definition_id = "1ce49a8f-c7f8-4e24-a726-45cfb2449eef" - name = "Cory Johnson" + definition_id = "3cfd915c-c53a-4e1f-9c37-b350ebb3981c" + name = "Marshall Yundt" secret_id = "...my_secret_id..." - workspace_id = "b4b875ea-1fa6-43f6-80fa-c1403cfd915c" + workspace_id = "3f1e6164-cc87-488f-b77a-58933f7738d6" } \ 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 a4da0860f..52f5e23c9 100644 --- a/examples/resources/airbyte_source_linkedin_pages/resource.tf +++ b/examples/resources/airbyte_source_linkedin_pages/resource.tf @@ -6,11 +6,11 @@ resource "airbyte_source_linkedin_pages" "my_source_linkedinpages" { } } org_id = "123456789" - start_date = "2022-01-06T04:41:29.233Z" - time_granularity_type = "DAY" + start_date = "2022-02-20T02:33:55.102Z" + time_granularity_type = "MONTH" } - definition_id = "ae1f1c37-b350-4ebb-b981-c89f963f1e61" - name = "Anita Ryan" + definition_id = "7b7f8b16-c616-47f1-a8f0-042f92210b5c" + name = "Mrs. Edmond Cronin" secret_id = "...my_secret_id..." - workspace_id = "788ff77a-5893-43f7-b38d-63dc7b7f8b16" + workspace_id = "6a775647-eb6b-4abc-8f9b-18b2eafdc453" } \ 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 2be182820..e749685d2 100644 --- a/examples/resources/airbyte_source_linnworks/resource.tf +++ b/examples/resources/airbyte_source_linnworks/resource.tf @@ -2,11 +2,11 @@ resource "airbyte_source_linnworks" "my_source_linnworks" { configuration = { application_id = "...my_application_id..." application_secret = "...my_application_secret..." - start_date = "2021-09-13T06:35:49.884Z" + start_date = "2020-11-23T19:16:47.007Z" token = "...my_token..." } - definition_id = "167f1e8f-0042-4f92-a10b-5c8f204e6a77" - name = "Gertrude Gutkowski" + definition_id = "6a0192c4-4771-42b4-a020-8830aabeffb8" + name = "Luther Kunde" secret_id = "...my_secret_id..." - workspace_id = "b6babc0f-9b18-4b2e-afdc-453fb6a0192c" + workspace_id = "1059b440-a5f2-4f61-a4e4-66849f7bbeaa" } \ 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 1863e07d3..235fe096f 100644 --- a/examples/resources/airbyte_source_lokalise/resource.tf +++ b/examples/resources/airbyte_source_lokalise/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_lokalise" "my_source_lokalise" { api_key = "...my_api_key..." project_id = "...my_project_id..." } - definition_id = "447712b4-a020-4883-8aab-effb8d976510" - name = "Lindsey Pouros" + definition_id = "ef524043-cb4c-4473-a8c7-bd5915174a55" + name = "Melba Shields" secret_id = "...my_secret_id..." - workspace_id = "0a5f2f61-a4e4-4668-89f7-bbeaaef52404" + workspace_id = "1daf7626-ef51-4c5f-a52e-0c6c0cc93e76" } \ 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 2493fe62c..93709e030 100644 --- a/examples/resources/airbyte_source_mailchimp/resource.tf +++ b/examples/resources/airbyte_source_mailchimp/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_mailchimp" "my_source_mailchimp" { data_center = "...my_data_center..." start_date = "2020-01-01T00:00:00.000Z" } - definition_id = "b4c473e8-c7bd-4591-9174-a553fda41daf" - name = "Agnes Cronin" + definition_id = "fdef541f-06ca-413b-9e89-c1488faa411d" + name = "Mack Maggio" secret_id = "...my_secret_id..." - workspace_id = "f51c5fa5-2e0c-46c0-8c93-e76e9fdef541" + workspace_id = "269c9d64-8f0b-4ccd-92e9-5af6ed3c47c1" } \ 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 b80304e62..bbe00ddd4 100644 --- a/examples/resources/airbyte_source_mailgun/resource.tf +++ b/examples/resources/airbyte_source_mailgun/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_mailgun" "my_source_mailgun" { configuration = { - domain_region = "EU" + domain_region = "US" private_key = "...my_private_key..." start_date = "2023-08-01T00:00:00Z" } - definition_id = "ca13b1e8-9c14-488f-aa41-1d9d922269c9" - name = "Ricardo Gutmann" + definition_id = "0113c2d3-cb5e-4aa6-8b86-a42dbbb853ec" + name = "Jeannette Hayes" secret_id = "...my_secret_id..." - workspace_id = "0bccdd2e-95af-46ed-bc47-c14160113c2d" + workspace_id = "a18b0d79-003d-4e8d-a443-bfaadd29a6df" } \ 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 a56f26343..caf374fd6 100644 --- a/examples/resources/airbyte_source_mailjet_sms/resource.tf +++ b/examples/resources/airbyte_source_mailjet_sms/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_mailjet_sms" "my_source_mailjetsms" { start_date = 1666261656 token = "...my_token..." } - definition_id = "b5eaa64b-86a4-42db-bb85-3ec4b5e6a18b" - name = "Christie Kshlerin Jr." + definition_id = "cb6bf32f-af82-45be-a4ec-87aaffeb9ea2" + name = "Robert Windler" secret_id = "...my_secret_id..." - workspace_id = "3de8da44-3bfa-4add-a9a6-dff6cb6bf32f" + workspace_id = "9f4166b4-2b69-4c61-927b-bad3f0bf8ca7" } \ 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 6d1ed302c..f760aeef5 100644 --- a/examples/resources/airbyte_source_marketo/resource.tf +++ b/examples/resources/airbyte_source_marketo/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_marketo" "my_source_marketo" { domain_url = "https://000-AAA-000.mktorest.com" start_date = "2020-09-25T00:00:00Z" } - definition_id = "825bea4e-c87a-4aff-ab9e-a290f7e9f416" - name = "Bridget Gutmann" + definition_id = "bfb1506e-5d6d-4eb8-b49c-82f283fdf1b3" + name = "Judith Pfannerstill" secret_id = "...my_secret_id..." - workspace_id = "69c61d27-bbad-43f0-bf8c-a743bfb1506e" + workspace_id = "f9cacc87-9ba7-4ac0-9647-dc7c271c5044" } \ 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 64be5e355..b0b9678dd 100644 --- a/examples/resources/airbyte_source_metabase/resource.tf +++ b/examples/resources/airbyte_source_metabase/resource.tf @@ -3,10 +3,10 @@ resource "airbyte_source_metabase" "my_source_metabase" { instance_api_url = "https://localhost:3000/api/" password = "...my_password..." session_token = "...my_session_token..." - username = "Fatima_Simonis" + username = "Lisandro_Champlin" } - definition_id = "eb8b49c8-2f28-43fd-b1b3-62a3ef9cacc8" - name = "Misty Price" + definition_id = "4f7e4eab-e3a9-4776-8e79-345d14463033" + name = "Priscilla Zulauf" secret_id = "...my_secret_id..." - workspace_id = "ac01647d-c7c2-471c-9044-a25a4f7e4eab" + workspace_id = "cf10b074-2b93-4b49-9111-a320ccad5adc" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_microsoft_onedrive/resource.tf b/examples/resources/airbyte_source_microsoft_onedrive/resource.tf index e02466bc2..64e5e3041 100644 --- a/examples/resources/airbyte_source_microsoft_onedrive/resource.tf +++ b/examples/resources/airbyte_source_microsoft_onedrive/resource.tf @@ -10,11 +10,11 @@ resource "airbyte_source_microsoft_onedrive" "my_source_microsoftonedrive" { } drive_name = "...my_drive_name..." folder_path = "...my_folder_path..." - search_scope = "ALL" + search_scope = "ACCESSIBLE_DRIVES" start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 6 + days_to_sync_if_history_is_full = 0 format = { avro_format = { double_as_string = true @@ -24,15 +24,15 @@ resource "airbyte_source_microsoft_onedrive" "my_source_microsoftonedrive" { "...", ] input_schema = "...my_input_schema..." - name = "Jeanette Larson" + name = "Derek Kuhlman" primary_key = "...my_primary_key..." schemaless = true validation_policy = "Emit Record" }, ] } - definition_id = "45d14463-0331-48f2-9cf1-0b0742b93b49" - name = "Miss Joshua Brekke" + definition_id = "95b5ae04-23a6-4249-a514-955fa2ea25a5" + name = "Rosemarie Kulas Sr." secret_id = "...my_secret_id..." - workspace_id = "20ccad5a-dc13-430e-b574-88395b5ae042" + workspace_id = "e389cc42-00a4-4abb-b299-a611cc7be3e8" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_microsoft_sharepoint/resource.tf b/examples/resources/airbyte_source_microsoft_sharepoint/resource.tf index 3695b0926..33fa7d5cb 100644 --- a/examples/resources/airbyte_source_microsoft_sharepoint/resource.tf +++ b/examples/resources/airbyte_source_microsoft_sharepoint/resource.tf @@ -9,29 +9,29 @@ resource "airbyte_source_microsoft_sharepoint" "my_source_microsoftsharepoint" { } } folder_path = "...my_folder_path..." - search_scope = "ACCESSIBLE_DRIVES" + search_scope = "ALL" start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 1 + days_to_sync_if_history_is_full = 0 format = { avro_format = { - double_as_string = false + double_as_string = true } } globs = [ "...", ] input_schema = "...my_input_schema..." - name = "Mrs. Alfonso Hayes" + name = "Mrs. Al Schamberger" primary_key = "...my_primary_key..." - schemaless = false - validation_policy = "Skip Record" + schemaless = true + validation_policy = "Emit Record" }, ] } - definition_id = "fa2ea25a-51d7-4622-a389-cc4200a4abb3" - name = "Bobbie McCullough" + definition_id = "c2050fdf-2ba7-4d43-920d-3384e15ed535" + name = "Marilyn Kunde" secret_id = "...my_secret_id..." - workspace_id = "11cc7be3-e8ba-4718-8dc0-5c92c2050fdf" + workspace_id = "faeabade-b93c-4772-879b-6069b6a28df3" } \ 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 7afd53ddd..3ab6f7ad1 100644 --- a/examples/resources/airbyte_source_microsoft_teams/resource.tf +++ b/examples/resources/airbyte_source_microsoft_teams/resource.tf @@ -9,8 +9,8 @@ resource "airbyte_source_microsoft_teams" "my_source_microsoftteams" { } period = "D7" } - definition_id = "2ba7d43d-20d3-4384-a15e-d53522788fae" - name = "Ed Ondricka" + definition_id = "196ea920-3cb7-4876-a75a-531f3b4802a3" + name = "Terrence Smith" secret_id = "...my_secret_id..." - workspace_id = "b93c7728-79b6-4069-b6a2-8df3196ea920" + workspace_id = "4976dbe1-16c7-4811-ac70-bfb32667c47d" } \ 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 df940dee3..4e7f61c94 100644 --- a/examples/resources/airbyte_source_mixpanel/resource.tf +++ b/examples/resources/airbyte_source_mixpanel/resource.tf @@ -1,20 +1,20 @@ resource "airbyte_source_mixpanel" "my_source_mixpanel" { configuration = { - attribution_window = 2 + attribution_window = 3 credentials = { project_secret = { api_secret = "...my_api_secret..." } } - date_window_size = 8 + date_window_size = 0 end_date = "2021-11-16" - project_timezone = "UTC" + project_timezone = "US/Pacific" region = "US" select_properties_by_default = false start_date = "2021-11-16" } - definition_id = "5a531f3b-4802-4a3b-9d67-4976dbe116c7" - name = "Raymond Boyer" + definition_id = "c03f8392-0634-4c9d-b1c4-26709282f0b3" + name = "Nora Waelchi" secret_id = "...my_secret_id..." - workspace_id = "70bfb326-67c4-47d5-8361-6107c03f8392" + workspace_id = "729ff502-4b69-40b2-b36f-2f7a3b95d4ab" } \ 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 8d0b26950..2276ad4bc 100644 --- a/examples/resources/airbyte_source_monday/resource.tf +++ b/examples/resources/airbyte_source_monday/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_monday" "my_source_monday" { } } } - definition_id = "0634c9db-1c42-4670-9282-f0b308e78729" - name = "Mr. Emmett Hermiston" + definition_id = "cb3edfbb-ab6a-4d0e-84a4-dc970c078573" + name = "Benjamin Bartell" secret_id = "...my_secret_id..." - workspace_id = "b690b273-6f2f-47a3-b95d-4abcb3edfbba" + workspace_id = "990f9b2c-e7a6-47a8-9150-ea86120cd618" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mongodb_internal_poc/resource.tf b/examples/resources/airbyte_source_mongodb_internal_poc/resource.tf index ae3520b7d..e548f5bd8 100644 --- a/examples/resources/airbyte_source_mongodb_internal_poc/resource.tf +++ b/examples/resources/airbyte_source_mongodb_internal_poc/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_mongodb_internal_poc" "my_source_mongodbinternalpoc" { replica_set = "...my_replica_set..." user = "...my_user..." } - definition_id = "6ad0e44a-4dc9-470c-8785-73a20ac990f9" - name = "Steve Sauer" + definition_id = "74280681-2ca7-4b26-9526-15553a713498" + name = "Luis Wilderman" secret_id = "...my_secret_id..." - workspace_id = "a67a8515-0ea8-4612-8cd6-18d742806812" + workspace_id = "99a12d6e-33e6-46d7-80d4-772456d0d26d" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_mongodb_v2/resource.tf b/examples/resources/airbyte_source_mongodb_v2/resource.tf index 8c6adfc01..aa0a4608e 100644 --- a/examples/resources/airbyte_source_mongodb_v2/resource.tf +++ b/examples/resources/airbyte_source_mongodb_v2/resource.tf @@ -7,18 +7,18 @@ resource "airbyte_source_mongodb_v2" "my_source_mongodbv2" { connection_string = "mongodb+srv://cluster0.abcd1.mongodb.net/" database = "...my_database..." password = "...my_password..." - schema_enforced = false - username = "Luciano.King42" + schema_enforced = true + username = "Ashley_Gerhold" } } - discover_sample_size = 6 - initial_waiting_seconds = 4 + discover_sample_size = 8 + initial_waiting_seconds = 2 invalid_cdc_cursor_position_behavior = "Fail sync" queue_size = 4 update_capture_mode = "Lookup" } - definition_id = "5553a713-498a-43f9-b99a-12d6e33e66d7" - name = "Melissa Stoltenberg" + definition_id = "ca647ba4-f7aa-4ba2-9784-141a21c8938a" + name = "Marc Willms" secret_id = "...my_secret_id..." - workspace_id = "72456d0d-26d9-4147-bb35-66ca647ba4f7" + workspace_id = "b78bed98-212c-4704-ae19-387527d5e3ef" } \ 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 147c425fd..bdd72611b 100644 --- a/examples/resources/airbyte_source_mssql/resource.tf +++ b/examples/resources/airbyte_source_mssql/resource.tf @@ -7,9 +7,9 @@ resource "airbyte_source_mssql" "my_source_mssql" { port = 1433 replication_method = { read_changes_using_change_data_capture_cdc = { - initial_waiting_seconds = 7 - invalid_cdc_cursor_position_behavior = "Re-sync data" - queue_size = 7 + initial_waiting_seconds = 1 + invalid_cdc_cursor_position_behavior = "Fail sync" + queue_size = 4 } } schemas = [ @@ -21,10 +21,10 @@ resource "airbyte_source_mssql" "my_source_mssql" { tunnel_method = { no_tunnel = {} } - username = "Caroline_Harvey" + username = "Raymond.Armstrong73" } - definition_id = "4141a21c-8938-4ad6-bcbb-78bed98212c7" - name = "Eleanor O'Hara V" + definition_id = "7968b724-2137-4fe2-a9e2-6c4c104f1dbe" + name = "Luz Brown" secret_id = "...my_secret_id..." - workspace_id = "387527d5-e3ef-4724-ad0c-0b7968b72421" + workspace_id = "90447757-3847-465c-b741-8014d1f26365" } \ 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 87a964570..06fe9be22 100644 --- a/examples/resources/airbyte_source_my_hours/resource.tf +++ b/examples/resources/airbyte_source_my_hours/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_my_hours" "my_source_myhours" { password = "...my_password..." start_date = "2016-01-01" } - definition_id = "26c4c104-f1db-4e3b-9f29-044775738476" - name = "Brooke Kihn" + definition_id = "e0e5e5f3-86d0-4ac5-af3c-6558d9b03d25" + name = "Percy Walker" secret_id = "...my_secret_id..." - workspace_id = "18014d1f-2636-451b-b7f9-fe0e5e5f386d" + workspace_id = "badc477c-b62b-459b-9f1e-e4249578a5bc" } \ 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 0b2c017b4..c905c61f0 100644 --- a/examples/resources/airbyte_source_mysql/resource.tf +++ b/examples/resources/airbyte_source_mysql/resource.tf @@ -7,8 +7,9 @@ resource "airbyte_source_mysql" "my_source_mysql" { port = 3306 replication_method = { read_changes_using_binary_log_cdc = { - initial_waiting_seconds = 7 - invalid_cdc_cursor_position_behavior = "Re-sync data" + initial_load_timeout_hours = 7 + initial_waiting_seconds = 8 + invalid_cdc_cursor_position_behavior = "Fail sync" server_time_zone = "...my_server_time_zone..." } } @@ -18,10 +19,10 @@ resource "airbyte_source_mysql" "my_source_mysql" { tunnel_method = { no_tunnel = {} } - username = "Flossie.Padberg78" + username = "Rachelle.Rippin" } - definition_id = "6558d9b0-3d25-4bee-bdba-dc477cb62b59" - name = "Dr. Kirk Welch" + definition_id = "b2c4dd4d-4290-4774-9ee0-bbab0457d926" + name = "Miriam Lynch" secret_id = "...my_secret_id..." - workspace_id = "4249578a-5bcb-4bc2-8b83-b2c4dd4d4290" + workspace_id = "ecd841e7-2a76-46a6-86fa-a512d8044b05" } \ 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 ab74903dd..c261b6202 100644 --- a/examples/resources/airbyte_source_netsuite/resource.tf +++ b/examples/resources/airbyte_source_netsuite/resource.tf @@ -9,10 +9,10 @@ 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 = 8 } - definition_id = "741ee0bb-ab04-457d-9263-98e6ecd841e7" - name = "Jan Kub" + definition_id = "5b711236-1f26-4d47-b86c-dec1a2bc2b81" + name = "Francisco Hegmann" secret_id = "...my_secret_id..." - workspace_id = "a686faa5-12d8-4044-b05c-5b7112361f26" + workspace_id = "ceb6c910-dc95-4a96-8b5f-3bc4b3253e6b" } \ 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 6e79a5013..6c8ae455d 100644 --- a/examples/resources/airbyte_source_notion/resource.tf +++ b/examples/resources/airbyte_source_notion/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_notion" "my_source_notion" { } start_date = "2020-11-16T00:00:00.000Z" } - definition_id = "7b86cdec-1a2b-4c2b-81e4-5e3ceb6c910d" - name = "Terrence Haley" + definition_id = "91e25444-d223-44fd-9d8e-a1c7d43320fa" + name = "Miss Marshall Sauer" secret_id = "...my_secret_id..." - workspace_id = "6cb5f3bc-4b32-453e-abd5-91e25444d223" + workspace_id = "dab7e73a-5971-4814-a4dc-1f633abc58a5" } \ 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 a3e9fa7a0..e00219aac 100644 --- a/examples/resources/airbyte_source_nytimes/resource.tf +++ b/examples/resources/airbyte_source_nytimes/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_nytimes" "my_source_nytimes" { share_type = "facebook" start_date = "1851-01" } - definition_id = "a1c7d433-20fa-4c9c-9a8d-ab7e73a59718" - name = "Suzanne Terry" + definition_id = "517fc88b-c499-48d7-9efe-dea337d55b15" + name = "Sabrina Kuvalis" secret_id = "...my_secret_id..." - workspace_id = "c1f633ab-c58a-4542-9517-fc88bc4998d7" + workspace_id = "92c72d54-1f53-4892-8a50-561c1cc6291a" } \ 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 eb52154e4..39e1cbfc0 100644 --- a/examples/resources/airbyte_source_okta/resource.tf +++ b/examples/resources/airbyte_source_okta/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_okta" "my_source_okta" { domain = "...my_domain..." start_date = "2022-07-22T00:00:00Z" } - definition_id = "fedea337-d55b-4155-98db-92c72d541f53" - name = "Marion Champlin" + definition_id = "d7b3d761-e29e-4f26-ae07-d2b59ab56edb" + name = "Mr. Pearl Ruecker DDS" secret_id = "...my_secret_id..." - workspace_id = "50561c1c-c629-41a1-ad7b-3d761e29ef26" + workspace_id = "cdeed12b-d5eb-473d-822a-608737f9f9cf" } \ 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 369e57845..a5d9b45d4 100644 --- a/examples/resources/airbyte_source_omnisend/resource.tf +++ b/examples/resources/airbyte_source_omnisend/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_omnisend" "my_source_omnisend" { configuration = { api_key = "...my_api_key..." } - definition_id = "ae07d2b5-9ab5-46ed-b57c-000ccdeed12b" - name = "Corey Walker" + definition_id = "17c9c1c9-1886-4190-8dfc-35041fcdcac2" + name = "Andrea Howe" secret_id = "...my_secret_id..." - workspace_id = "3d022a60-8737-4f9f-9cf1-7c9c1c918861" + workspace_id = "f24d9236-9b1f-4f5a-bba2-88f10a0635ff" } \ 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 a530d9f03..7ea2d62cf 100644 --- a/examples/resources/airbyte_source_onesignal/resource.tf +++ b/examples/resources/airbyte_source_onesignal/resource.tf @@ -11,8 +11,8 @@ resource "airbyte_source_onesignal" "my_source_onesignal" { start_date = "2020-11-16T00:00:00Z" user_auth_key = "...my_user_auth_key..." } - definition_id = "0dfc3504-1fcd-4cac-a226-2ef24d92369b" - name = "Shawna Wilkinson" + definition_id = "f388685d-8941-4e7d-b072-3f94739cc80e" + name = "Pedro Prohaska Sr." secret_id = "...my_secret_id..." - workspace_id = "7ba288f1-0a06-435f-b19f-388685d8941e" + workspace_id = "25778f7a-023c-41e0-8d80-f694c48e9d0f" } \ 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 cfbab523c..88e879beb 100644 --- a/examples/resources/airbyte_source_oracle/resource.tf +++ b/examples/resources/airbyte_source_oracle/resource.tf @@ -13,17 +13,17 @@ resource "airbyte_source_oracle" "my_source_oracle" { host = "...my_host..." jdbc_url_params = "...my_jdbc_url_params..." password = "...my_password..." - port = 9 + port = 2 schemas = [ "...", ] tunnel_method = { no_tunnel = {} } - username = "Neha.Abbott" + username = "Orin_Romaguera85" } - definition_id = "3f94739c-c80e-4e5b-b122-5778f7a023c1" - name = "Charles Littel" + definition_id = "71dab038-014a-4124-b6e7-b2083a37b0c9" + name = "Harry Kuhic" secret_id = "...my_secret_id..." - workspace_id = "0f694c48-e9d0-4f84-8cba-d71dab038014" + workspace_id = "a38aa73d-79a8-45cb-b246-518021619872" } \ 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 5f145d81e..e769abaca 100644 --- a/examples/resources/airbyte_source_orb/resource.tf +++ b/examples/resources/airbyte_source_orb/resource.tf @@ -2,7 +2,7 @@ resource "airbyte_source_orb" "my_source_orb" { configuration = { api_key = "...my_api_key..." end_date = "2024-03-01T00:00:00Z" - lookback_window_days = 7 + lookback_window_days = 2 numeric_event_properties_keys = [ "...", ] @@ -13,8 +13,8 @@ resource "airbyte_source_orb" "my_source_orb" { ] subscription_usage_grouping_key = "...my_subscription_usage_grouping_key..." } - definition_id = "124b6e7b-2083-4a37-b0c9-92762a38aa73" - name = "Julio Mayer" + definition_id = "e09a2aae-62d9-4d77-8257-55e6995c5765" + name = "Miss Nadine Wunsch" secret_id = "...my_secret_id..." - workspace_id = "5cb72465-1802-4161-9872-363e09a2aae6" + workspace_id = "422b3629-976b-4741-9bfa-fbdd349afd0c" } \ 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 95bc54c6e..f874e7e51 100644 --- a/examples/resources/airbyte_source_orbit/resource.tf +++ b/examples/resources/airbyte_source_orbit/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_orbit" "my_source_orbit" { start_date = "...my_start_date..." workspace = "...my_workspace..." } - definition_id = "2d9d7702-5755-4e69-95c5-7652df199422" - name = "Danny Jakubowski" + definition_id = "d95bcfe3-342d-4c40-aaef-61635af9f94f" + name = "Ivan Hansen" secret_id = "...my_secret_id..." - workspace_id = "976b741d-bfaf-4bdd-b49a-fd0cd95bcfe3" + workspace_id = "22e677c7-7be4-4e42-84a4-1ce525b48930" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_outbrain_amplify/resource.tf b/examples/resources/airbyte_source_outbrain_amplify/resource.tf index 26c6e0f81..24fbe89f5 100644 --- a/examples/resources/airbyte_source_outbrain_amplify/resource.tf +++ b/examples/resources/airbyte_source_outbrain_amplify/resource.tf @@ -7,11 +7,11 @@ resource "airbyte_source_outbrain_amplify" "my_source_outbrainamplify" { } end_date = "...my_end_date..." geo_location_breakdown = "country" - report_granularity = "daily" + report_granularity = "weekly" start_date = "...my_start_date..." } - definition_id = "2dc402ae-f616-435a-b9f9-4f985aa22e67" - name = "Della Koepp" + definition_id = "e9c1af99-61b1-4c88-ba57-2712d8f3b643" + name = "Marianne Reilly" secret_id = "...my_secret_id..." - workspace_id = "e4e4244a-41ce-4525-b489-3048e9c1af99" + workspace_id = "b32ad03f-d9a9-4d8b-a9b0-df86503c4743" } \ 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 213cd94bd..2bcd74102 100644 --- a/examples/resources/airbyte_source_outreach/resource.tf +++ b/examples/resources/airbyte_source_outreach/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_outreach" "my_source_outreach" { refresh_token = "...my_refresh_token..." start_date = "2020-11-16T00:00:00Z" } - definition_id = "61b1c883-a572-4712-98f3-b6433cb82b32" - name = "Sammy Aufderhar" + definition_id = "ee79bd13-e204-4659-bbdc-56c2f2e20259" + name = "Mrs. Ramon Quitzon" secret_id = "...my_secret_id..." - workspace_id = "d9a9d8ba-9b0d-4f86-903c-4743ee79bd13" + workspace_id = "98d3fc54-30ae-4066-94a9-1bbbc35ba892" } \ 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 94a1f7389..35a93b11c 100644 --- a/examples/resources/airbyte_source_paypal_transaction/resource.tf +++ b/examples/resources/airbyte_source_paypal_transaction/resource.tf @@ -3,14 +3,14 @@ resource "airbyte_source_paypal_transaction" "my_source_paypaltransaction" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." dispute_start_date = "2021-06-11T23:59:59.000Z" - end_date = "2021-06-11T23:59:59Z" - is_sandbox = false + end_date = "2021-06-11T23:59:59+00:00" + is_sandbox = true refresh_token = "...my_refresh_token..." - start_date = "2021-06-11T23:59:59+00:00" - time_window = 9 + start_date = "2021-06-11T23:59:59Z" + time_window = 5 } - definition_id = "c56c2f2e-2025-49c6-b139-98d3fc5430ae" - name = "Jeanette Howe" + definition_id = "b9331a5d-dafa-4d6a-b5ec-8caacd8d2abf" + name = "Leland Altenwerth" secret_id = "...my_secret_id..." - workspace_id = "a91bbbc3-5ba8-492b-ad58-05ab7b9331a5" + workspace_id = "3811ddad-7d79-4aa2-af68-e00dcdadd479" } \ 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 875377dc1..3d028db79 100644 --- a/examples/resources/airbyte_source_paystack/resource.tf +++ b/examples/resources/airbyte_source_paystack/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_paystack" "my_source_paystack" { configuration = { - lookback_window_days = 9 + lookback_window_days = 4 secret_key = "...my_secret_key..." start_date = "2017-01-25T00:00:00Z" } - definition_id = "fad6ab5e-c8ca-4acd-8d2a-bfdc0f33811d" - name = "Omar Sporer" + definition_id = "68b4fa72-62d2-4a48-b976-dd11df098493" + name = "Sally West" secret_id = "...my_secret_id..." - workspace_id = "79aa2af6-8e00-4dcd-add4-7961168b4fa7" + workspace_id = "27890d41-f139-419c-925e-386517a80112" } \ 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 886cd2c11..50e08d6e8 100644 --- a/examples/resources/airbyte_source_pendo/resource.tf +++ b/examples/resources/airbyte_source_pendo/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_pendo" "my_source_pendo" { configuration = { api_key = "...my_api_key..." } - definition_id = "262d2a48-f976-4dd1-9df0-9849375f6227" - name = "Terrence Anderson" + definition_id = "166a5ec4-6f2b-4ce2-a77b-bccef588ac54" + name = "Randolph Walker" secret_id = "...my_secret_id..." - workspace_id = "1f13919c-925e-4386-917a-80112166a5ec" + workspace_id = "7a9dbf52-c792-493e-a8aa-81903348b38f" } \ 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 22d4f233a..0c3eb0397 100644 --- a/examples/resources/airbyte_source_persistiq/resource.tf +++ b/examples/resources/airbyte_source_persistiq/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_persistiq" "my_source_persistiq" { configuration = { api_key = "...my_api_key..." } - definition_id = "46f2bce2-e77b-4bcc-af58-8ac548be8a7a" - name = "Wilfred Quitzon" + definition_id = "e3b52011-25b2-4925-aa78-4d2d0f170747" + name = "Sonja Dibbert" secret_id = "...my_secret_id..." - workspace_id = "2c79293e-28aa-4819-8334-8b38fe3b5201" + workspace_id = "a49780ba-1d6a-428c-aeef-e59b72db2240" } \ 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 89be8e0ba..b7425a0db 100644 --- a/examples/resources/airbyte_source_pexels_api/resource.tf +++ b/examples/resources/airbyte_source_pexels_api/resource.tf @@ -2,13 +2,13 @@ resource "airbyte_source_pexels_api" "my_source_pexelsapi" { configuration = { api_key = "...my_api_key..." color = "red" - locale = "en-US" - orientation = "square" - query = "oceans" + locale = "pt-BR" + orientation = "landscape" + query = "people" size = "large" } - definition_id = "9252a784-d2d0-4f17-8747-5e2d6a49780b" - name = "Jack Swaniawski" + definition_id = "0da76331-50ac-4fec-a41f-73646e1c8795" + name = "Lee Nikolaus" secret_id = "...my_secret_id..." - workspace_id = "28c6eefe-59b7-42db-a240-7ce310da7633" + workspace_id = "a8255310-1401-4784-96a4-c1173de2c277" } \ 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 fc450e669..772e4aaf6 100644 --- a/examples/resources/airbyte_source_pinterest/resource.tf +++ b/examples/resources/airbyte_source_pinterest/resource.tf @@ -8,28 +8,28 @@ resource "airbyte_source_pinterest" "my_source_pinterest" { custom_reports = [ { attribution_types = [ - "INDIVIDUAL", + "HOUSEHOLD", ] - click_window_days = "7" + click_window_days = "14" columns = [ - "CAMPAIGN_DAILY_SPEND_CAP", + "VIDEO_LENGTH", ] - conversion_report_time = "TIME_OF_CONVERSION" - engagement_window_days = "30" - granularity = "MONTH" - level = "PRODUCT_GROUP_TARGETING" - name = "Dr. Fred Grady" + conversion_report_time = "TIME_OF_AD_ACTION" + engagement_window_days = "1" + granularity = "HOUR" + level = "PIN_PROMOTION" + name = "Mr. Marcos Baumbach DVM" start_date = "2022-07-28" - view_window_days = "1" + view_window_days = "30" }, ] start_date = "2022-07-28" status = [ - "ACTIVE", + "ARCHIVED", ] } - definition_id = "c879583a-59a8-4255-b101-40178456a4c1" - name = "Bessie Emard" + definition_id = "2676b4d9-282a-4d19-925d-5253fa02ef00" + name = "Ms. Moses Boehm" secret_id = "...my_secret_id..." - workspace_id = "2c277a8e-2388-4fd0-920f-62c51a2676b4" + workspace_id = "81572f72-4d1e-40e7-a708-b9f815bf9f13" } \ 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 9b96c9107..f755a1747 100644 --- a/examples/resources/airbyte_source_pipedrive/resource.tf +++ b/examples/resources/airbyte_source_pipedrive/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_pipedrive" "my_source_pipedrive" { api_token = "...my_api_token..." replication_start_date = "2017-01-25 00:00:00Z" } - definition_id = "d9282ad1-9d25-4d52-93fa-02ef008f118d" - name = "Peter Hilll" + definition_id = "70c28b27-8d25-4e4e-a4a5-1abe7bbe4e8d" + name = "Derrick Wehner" secret_id = "...my_secret_id..." - workspace_id = "f724d1e0-e7e7-408b-9f81-5bf9f1370c28" + workspace_id = "7ba5cf8d-b48a-42cc-8047-b120c3ecc155" } \ 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 7a7ad33b9..2261796aa 100644 --- a/examples/resources/airbyte_source_pocket/resource.tf +++ b/examples/resources/airbyte_source_pocket/resource.tf @@ -2,18 +2,18 @@ resource "airbyte_source_pocket" "my_source_pocket" { configuration = { access_token = "...my_access_token..." consumer_key = "...my_consumer_key..." - content_type = "image" - detail_type = "simple" + content_type = "video" + detail_type = "complete" domain = "...my_domain..." - favorite = false + favorite = true search = "...my_search..." since = "2022-10-20 14:14:14" sort = "title" - state = "all" + state = "unread" tag = "...my_tag..." } - definition_id = "25e4ee4a-51ab-4e7b-be4e-8da5f867ba5c" - name = "Felix Swaniawski" + definition_id = "f33bbc2f-8e75-4b95-ae5d-d11c77a4e3aa" + name = "Nadine Breitenberg" secret_id = "...my_secret_id..." - workspace_id = "8a2cc404-7b12-40c3-acc1-558e983f33bb" + workspace_id = "4fcd7d93-9b8b-46b2-8092-0aa8be086075" } \ 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 ce4ce8d66..5c7f20185 100644 --- a/examples/resources/airbyte_source_pokeapi/resource.tf +++ b/examples/resources/airbyte_source_pokeapi/resource.tf @@ -1,9 +1,9 @@ resource "airbyte_source_pokeapi" "my_source_pokeapi" { configuration = { - pokemon_name = "snorlax" + pokemon_name = "ditto" } - definition_id = "2f8e75b9-5ee5-4dd1-9c77-a4e3aa4d1c74" - name = "Gregg Smitham" + definition_id = "1b21ea9b-c9d1-4c88-b1ee-12f8a7db098a" + name = "Lucille Blanda" secret_id = "...my_secret_id..." - workspace_id = "939b8b6b-2c09-420a-a8be-08607521b21e" + workspace_id = "6a87d389-094e-4fa6-bbbe-a9f5a35d1bd0" } \ 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 015acdb1d..0f575a871 100644 --- a/examples/resources/airbyte_source_polygon_stock_api/resource.tf +++ b/examples/resources/airbyte_source_polygon_stock_api/resource.tf @@ -3,15 +3,15 @@ resource "airbyte_source_polygon_stock_api" "my_source_polygonstockapi" { adjusted = "false" api_key = "...my_api_key..." end_date = "2020-10-14" - limit = 120 - multiplier = 2 - sort = "desc" + limit = 100 + multiplier = 1 + sort = "asc" start_date = "2020-10-14" stocks_ticker = "MSFT" timespan = "day" } - definition_id = "1ee12f8a-7db0-498a-b412-66a87d389094" - name = "Emanuel Paucek" + definition_id = "a6472a5f-8aec-48fe-9b8f-c35367bfee52" + name = "Olive Durgan" secret_id = "...my_secret_id..." - workspace_id = "bbea9f5a-35d1-4bd0-bb63-21f6b4ca6472" + workspace_id = "74e8f7b8-37d7-46b0-aa3d-797c2fd02395" } \ 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 f2ac50d3b..b27291fa0 100644 --- a/examples/resources/airbyte_source_postgres/resource.tf +++ b/examples/resources/airbyte_source_postgres/resource.tf @@ -19,10 +19,10 @@ resource "airbyte_source_postgres" "my_source_postgres" { tunnel_method = { no_tunnel = {} } - username = "Era_Wisoky" + username = "Jayme_Boyer" } - definition_id = "ec8fedb8-fc35-4367-bfee-523e36b74e8f" - name = "Lula Lemke" + definition_id = "206b8fda-8b48-4bf3-b0e9-631ebcafaa2e" + name = "Dr. Clinton Osinski DDS" secret_id = "...my_secret_id..." - workspace_id = "d76b02a3-d797-4c2f-9023-950717b206b8" + workspace_id = "b6197095-b91e-4126-900f-09eb706bb016" } \ 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 e00b67b0b..4a9113098 100644 --- a/examples/resources/airbyte_source_posthog/resource.tf +++ b/examples/resources/airbyte_source_posthog/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_posthog" "my_source_posthog" { events_time_step = 5 start_date = "2021-01-01T00:00:00Z" } - definition_id = "b48bf3f0-e963-41eb-8afa-a2ee7a1e0cb6" - name = "Ms. Jenny Konopelski" + definition_id = "c6bfae2b-40c1-473d-8d61-133ddb2a9593" + name = "Rosalie Walter Jr." secret_id = "...my_secret_id..." - workspace_id = "b91e1261-00f0-49eb-b06b-b016ea0ac6bf" + workspace_id = "62e7b59a-4e78-4152-8bd2-66e4c12d05e7" } \ 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 0de034252..040c9e803 100644 --- a/examples/resources/airbyte_source_postmarkapp/resource.tf +++ b/examples/resources/airbyte_source_postmarkapp/resource.tf @@ -3,8 +3,8 @@ 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..." } - definition_id = "ae2b40c1-73d4-4d61-933d-db2a95937ced" - name = "Sandra Hodkiewicz" + definition_id = "f58d4a06-25cb-4ff5-b31f-2b9304d3ebf3" + name = "Cora Barton" secret_id = "...my_secret_id..." - workspace_id = "7b59a4e7-8152-4cbd-a66e-4c12d05e7f58" + workspace_id = "e61711be-8829-424e-a80a-a2980d84713e" } \ 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 ae196b8c7..415b851ec 100644 --- a/examples/resources/airbyte_source_prestashop/resource.tf +++ b/examples/resources/airbyte_source_prestashop/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_prestashop" "my_source_prestashop" { start_date = "2022-01-01" url = "...my_url..." } - definition_id = "a0625cbf-f5b3-41f2-b930-4d3ebf32902d" - name = "Hector Breitenberg Jr." + definition_id = "f014dd9a-f7c7-4e9c-8620-9ea52c707cb0" + name = "Rosalie Hagenes" secret_id = "...my_secret_id..." - workspace_id = "be882924-ee80-4aa2-980d-84713ebef014" + workspace_id = "d21cf346-58e5-420f-854a-567309cc0ee4" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_punk_api/import.sh b/examples/resources/airbyte_source_punk_api/import.sh deleted file mode 100644 index 384b1d6ca..000000000 --- a/examples/resources/airbyte_source_punk_api/import.sh +++ /dev/null @@ -1 +0,0 @@ -terraform import airbyte_source_punk_api.my_airbyte_source_punk_api "" diff --git a/examples/resources/airbyte_source_punk_api/resource.tf b/examples/resources/airbyte_source_punk_api/resource.tf deleted file mode 100644 index fb7288cb0..000000000 --- a/examples/resources/airbyte_source_punk_api/resource.tf +++ /dev/null @@ -1,11 +0,0 @@ -resource "airbyte_source_punk_api" "my_source_punkapi" { - configuration = { - brewed_after = "MM-YYYY" - brewed_before = "MM-YYYY" - id = 22 - } - definition_id = "d21cf346-58e5-420f-854a-567309cc0ee4" - name = "Randolph Murphy" - secret_id = "...my_secret_id..." - workspace_id = "aed57205-4daa-484a-8e28-fea10a8a64b7" -} \ 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 0d2c4f56b..b40d56e98 100644 --- a/examples/resources/airbyte_source_pypi/resource.tf +++ b/examples/resources/airbyte_source_pypi/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_pypi" "my_source_pypi" { project_name = "sampleproject" version = "1.2.0" } - definition_id = "7a4fe630-3928-48c9-9001-e515b2e74052" - name = "Sandy Homenick" + definition_id = "bba7faed-5720-454d-aa84-a4e28fea10a8" + name = "Elmer Grady" secret_id = "...my_secret_id..." - workspace_id = "ad65e8ae-1d21-47c0-bcbe-7d2d3433ea86" + workspace_id = "7a4fe630-3928-48c9-9001-e515b2e74052" } \ 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 3a27872a9..da0331126 100644 --- a/examples/resources/airbyte_source_qualaroo/resource.tf +++ b/examples/resources/airbyte_source_qualaroo/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_qualaroo" "my_source_qualaroo" { ] token = "...my_token..." } - definition_id = "2799cad5-c4b8-4334-a9d3-410e395a0aac" - name = "Beatrice Stamm" + definition_id = "2a67dad6-5e8a-4e1d-a17c-0fcbe7d2d343" + name = "Jana O'Hara" secret_id = "...my_secret_id..." - workspace_id = "d0978821-4279-492f-a5a7-105f2e570ad3" + workspace_id = "2799cad5-c4b8-4334-a9d3-410e395a0aac" } \ 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 accdc9719..0bec136c6 100644 --- a/examples/resources/airbyte_source_railz/resource.tf +++ b/examples/resources/airbyte_source_railz/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_railz" "my_source_railz" { secret_key = "...my_secret_key..." start_date = "...my_start_date..." } - definition_id = "72ede129-9d48-4414-90fd-6e7ec48816b0" - name = "Reginald Dibbert" + definition_id = "55dc9d09-7882-4142-b992-f65a7105f2e5" + name = "Deborah Nader" secret_id = "...my_secret_id..." - workspace_id = "975147c3-e6c8-4bd1-8cca-d3b1c4065293" + workspace_id = "72ede129-9d48-4414-90fd-6e7ec48816b0" } \ 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 71955ca75..4f44ef428 100644 --- a/examples/resources/airbyte_source_recharge/resource.tf +++ b/examples/resources/airbyte_source_recharge/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_recharge" "my_source_recharge" { start_date = "2021-05-14T00:00:00Z" use_orders_deprecated_api = false } - definition_id = "648ca783-b586-4523-84bd-b821f9c8efa4" - name = "Christie Schiller IV" + definition_id = "b8975147-c3e6-4c8b-91cc-cad3b1c40652" + name = "Earl Bins" secret_id = "...my_secret_id..." - workspace_id = "c50e6f12-11e1-4fcb-a6b9-0cc0df941919" + workspace_id = "648ca783-b586-4523-84bd-b821f9c8efa4" } \ 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 1b06c05c4..25a976184 100644 --- a/examples/resources/airbyte_source_recreation/resource.tf +++ b/examples/resources/airbyte_source_recreation/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_recreation" "my_source_recreation" { apikey = "...my_apikey..." query_campsites = "...my_query_campsites..." } - definition_id = "892a209c-167a-4f7b-834c-463b838dc5f9" - name = "Vanessa Hammes" + definition_id = "0dc207c5-0e6f-4121-9e1f-cb26b90cc0df" + name = "Randall Carroll V" secret_id = "...my_secret_id..." - workspace_id = "f73a4553-5fff-45d1-934f-0cce5486a3a1" + workspace_id = "892a209c-167a-4f7b-834c-463b838dc5f9" } \ 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 5d3bff288..63fcec679 100644 --- a/examples/resources/airbyte_source_recruitee/resource.tf +++ b/examples/resources/airbyte_source_recruitee/resource.tf @@ -1,10 +1,10 @@ resource "airbyte_source_recruitee" "my_source_recruitee" { configuration = { api_key = "...my_api_key..." - company_id = 4 + company_id = 5 } - definition_id = "1dc53f64-148a-4cb8-b41d-5bf94a01397d" - name = "Muriel Wunsch" + definition_id = "6535f73a-4553-45ff-b5d1-d34f0cce5486" + name = "Ms. Nathan O'Reilly PhD" secret_id = "...my_secret_id..." - workspace_id = "0aff6604-97cb-4974-a7d8-001cbe4b7daa" + workspace_id = "c53f6414-8acb-48b4-9d5b-f94a01397d3d" } \ 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 2a56e3ffb..7e0d8a987 100644 --- a/examples/resources/airbyte_source_recurly/resource.tf +++ b/examples/resources/airbyte_source_recurly/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_recurly" "my_source_recurly" { begin_time = "2021-12-01T00:00:00" end_time = "2021-12-01T00:00:00" } - definition_id = "2d7b0215-50aa-4da4-9f01-cf56ee294adb" - name = "Pedro Rodriguez" + definition_id = "fd90aff6-6049-47cb-974a-7d8001cbe4b7" + name = "Carlton Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "40789cf0-b8d2-4c04-9244-36569fd64cd2" + workspace_id = "7b021550-aada-44df-81cf-56ee294adbc5" } \ 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 0c4099977..14e3924e1 100644 --- a/examples/resources/airbyte_source_redshift/resource.tf +++ b/examples/resources/airbyte_source_redshift/resource.tf @@ -8,10 +8,10 @@ resource "airbyte_source_redshift" "my_source_redshift" { schemas = [ "...", ] - username = "Ralph52" + username = "Riley3" } - definition_id = "a635d7a8-c386-4cec-8fae-93f7f0f8c4b4" - name = "Ivan Stanton" + definition_id = "789cf0b8-d2c0-4412-8436-569fd64cd2bc" + name = "Jeffrey Lebsack" secret_id = "...my_secret_id..." - workspace_id = "6833e1f3-303a-4b04-9c89-1fe9c8dcb6cc" + workspace_id = "35d7a8c3-86ce-4ccf-ae93-f7f0f8c4b4f8" } \ 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 891f12097..9990d6815 100644 --- a/examples/resources/airbyte_source_retently/resource.tf +++ b/examples/resources/airbyte_source_retently/resource.tf @@ -9,8 +9,8 @@ resource "airbyte_source_retently" "my_source_retently" { } } } - definition_id = "1cd73d2c-f401-436d-9989-e7dbace4005a" - name = "Sheila Bahringer" + definition_id = "d4f6833e-1f33-403a-b045-c891fe9c8dcb" + name = "Miss Kendra Sauer" secret_id = "...my_secret_id..." - workspace_id = "76c58b5d-a21f-4739-86a7-1e992c2b8105" + workspace_id = "73d2cf40-136d-4598-9e7d-bace4005a630" } \ 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 2e7dc6bde..b94f9993a 100644 --- a/examples/resources/airbyte_source_rki_covid/resource.tf +++ b/examples/resources/airbyte_source_rki_covid/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_rki_covid" "my_source_rkicovid" { configuration = { start_date = "...my_start_date..." } - definition_id = "6bc977a3-bf4d-4ff8-9d83-5d80427d23a4" - name = "Gerald Stoltenberg" + definition_id = "7276c58b-5da2-41f7-b986-a71e992c2b81" + name = "Erin Hyatt" secret_id = "...my_secret_id..." - workspace_id = "723c8e5e-259f-4e4e-b649-3875b5a324c6" + workspace_id = "977a3bf4-dff8-4dd8-b5d8-0427d23a4e1d" } \ 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 86d6c0523..2b50ebbcb 100644 --- a/examples/resources/airbyte_source_rss/resource.tf +++ b/examples/resources/airbyte_source_rss/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_rss" "my_source_rss" { configuration = { url = "...my_url..." } - definition_id = "128aabba-d073-4078-ac3e-822825101e3e" - name = "Joann Runolfsson" + definition_id = "8c723c8e-5e25-49fe-8ef6-493875b5a324" + name = "Raul Blick" secret_id = "...my_secret_id..." - workspace_id = "948d0388-851e-4c06-bd3b-8cc64e95a7a3" + workspace_id = "aabbad07-3078-42c3-a822-825101e3e25c" } \ 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 ec678fb57..18639172c 100644 --- a/examples/resources/airbyte_source_s3/resource.tf +++ b/examples/resources/airbyte_source_s3/resource.tf @@ -25,10 +25,10 @@ resource "airbyte_source_s3" "my_source_s3" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 4 + days_to_sync_if_history_is_full = 0 format = { avro_format = { - double_as_string = true + double_as_string = false } } globs = [ @@ -36,15 +36,15 @@ resource "airbyte_source_s3" "my_source_s3" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Pam Goldner" + name = "Alfredo Lowe DVM" primary_key = "...my_primary_key..." schemaless = false - validation_policy = "Wait for Discover" + validation_policy = "Emit Record" }, ] } - definition_id = "bdae34af-cb06-4318-8072-9444d2b8965c" - name = "Julius Rau" + definition_id = "6fd3b8cc-64e9-45a7-a369-2db06d3b499d" + name = "Gerardo Stroman" secret_id = "...my_secret_id..." - workspace_id = "ee9d6378-e724-43c0-a1bc-073abf4dfebd" + workspace_id = "34afcb06-3184-4072-9444-d2b8965caaba" } \ 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 0bd94a561..b79c3e0b8 100644 --- a/examples/resources/airbyte_source_salesforce/resource.tf +++ b/examples/resources/airbyte_source_salesforce/resource.tf @@ -5,17 +5,17 @@ resource "airbyte_source_salesforce" "my_source_salesforce" { force_use_bulk_api = true is_sandbox = false refresh_token = "...my_refresh_token..." - start_date = "2021-07-25" - stream_slice_step = "P1M" + start_date = "2021-07-25T00:00:00Z" + stream_slice_step = "P30D" streams_criteria = [ { - criteria = "exacts" + criteria = "ends with" value = "...my_value..." }, ] } - definition_id = "03e6b3fc-a03d-492c-b145-10264179a403" - name = "Jean Prosacco" + definition_id = "78e7243c-021b-4c07-babf-4dfebd414e5a" + name = "Barbara Franecki" secret_id = "...my_secret_id..." - workspace_id = "7b13a43b-1ead-4703-a4ee-b23fe553942b" + workspace_id = "b3fca03d-92cb-4145-9026-4179a40301bb" } \ 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 9540624fb..8a046fac7 100644 --- a/examples/resources/airbyte_source_salesloft/resource.tf +++ b/examples/resources/airbyte_source_salesloft/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_salesloft" "my_source_salesloft" { } start_date = "2020-11-16T00:00:00Z" } - definition_id = "b6d0d209-32d7-4e88-9861-9ec39811786e" - name = "Darlene Vandervort" + definition_id = "b13a43b1-ead7-403a-8eeb-23fe553942b5" + name = "Jonathon Jerde PhD" secret_id = "...my_secret_id..." - workspace_id = "72c20971-d544-4a65-a7d2-b4609d4ec646" + workspace_id = "20932d7e-88d8-4619-ac39-811786e44e52" } \ 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 76318fe2b..2c347b947 100644 --- a/examples/resources/airbyte_source_sap_fieldglass/resource.tf +++ b/examples/resources/airbyte_source_sap_fieldglass/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_sap_fieldglass" "my_source_sapfieldglass" { configuration = { api_key = "...my_api_key..." } - definition_id = "7c968cce-9339-44d8-a35d-b32f900f8cfe" - name = "Ethel Kulas" + definition_id = "72c20971-d544-4a65-a7d2-b4609d4ec646" + name = "Vicky Maggio" secret_id = "...my_secret_id..." - workspace_id = "58770229-72e2-437e-83d2-ab4198d2efe5" + workspace_id = "cce93394-d8a3-45db-b2f9-00f8cfe7378a" } \ 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 cefbc72e9..2217f6655 100644 --- a/examples/resources/airbyte_source_secoda/resource.tf +++ b/examples/resources/airbyte_source_secoda/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_secoda" "my_source_secoda" { configuration = { api_key = "...my_api_key..." } - definition_id = "e34c931e-7a72-4ef9-ae22-c4d080cde039" - name = "Marcos Hilll" + definition_id = "58770229-72e2-437e-83d2-ab4198d2efe5" + name = "Allen Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "c5778ddd-1091-40de-87df-e701edbd0d10" + workspace_id = "31e7a72e-f9ee-422c-8d08-0cde039dd5e8" } \ 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 0054d05e5..ae505cfa3 100644 --- a/examples/resources/airbyte_source_sendgrid/resource.tf +++ b/examples/resources/airbyte_source_sendgrid/resource.tf @@ -1,10 +1,10 @@ resource "airbyte_source_sendgrid" "my_source_sendgrid" { configuration = { api_key = "...my_api_key..." - start_date = "2020-02-29T00:35:24.807Z" + start_date = "2021-12-06T09:47:32.658Z" } - definition_id = "57eb672b-8aa5-45d6-bfb2-a63da0917a61" - name = "Christine Weimann" + definition_id = "778ddd10-910d-4e87-9fe7-01edbd0d10cf" + name = "Stella Torphy" secret_id = "...my_secret_id..." - workspace_id = "3e8ec69b-abb3-4389-b4cd-0d539af2319a" + workspace_id = "72b8aa55-d63f-4b2a-a3da-0917a6151fac" } \ 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 b6fd42107..06cc58a08 100644 --- a/examples/resources/airbyte_source_sendinblue/resource.tf +++ b/examples/resources/airbyte_source_sendinblue/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_sendinblue" "my_source_sendinblue" { configuration = { api_key = "...my_api_key..." } - definition_id = "6f8898d7-4d7c-4d06-b0b6-3c633751f6c5" - name = "Debbie Sanford PhD" + definition_id = "3e8ec69b-abb3-4389-b4cd-0d539af2319a" + name = "Darla Lockman" secret_id = "...my_secret_id..." - workspace_id = "73f23dc4-6e62-4d66-a727-78d5db92d16e" + workspace_id = "8d74d7cd-0670-4b63-8633-751f6c544c20" } \ 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 a2a592af9..e6a91c631 100644 --- a/examples/resources/airbyte_source_senseforce/resource.tf +++ b/examples/resources/airbyte_source_senseforce/resource.tf @@ -3,11 +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 = 1 + slice_range = 360 start_date = "2017-01-25" } - definition_id = "06fc1f7a-171f-47c1-98bf-ddb09b9a903f" - name = "Brenda Toy" + definition_id = "23dc46e6-2d66-4e72-b78d-5db92d16e1dc" + name = "Paul Hyatt" secret_id = "...my_secret_id..." - workspace_id = "a54b7cf5-33c5-45d6-8a56-e1f7b10c6dd1" + workspace_id = "1f7a171f-7c1d-48bf-9db0-9b9a903f60eb" } \ 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 065d7c9d9..450ddbfae 100644 --- a/examples/resources/airbyte_source_sentry/resource.tf +++ b/examples/resources/airbyte_source_sentry/resource.tf @@ -4,12 +4,12 @@ resource "airbyte_source_sentry" "my_source_sentry" { discover_fields = [ "{ \"see\": \"documentation\" }", ] - hostname = "unimportant-glacier.biz" + hostname = "expert-potato.info" organization = "...my_organization..." project = "...my_project..." } - definition_id = "eb5fcf36-5dcc-4aec-ace4-1cbe1d2ecd01" - name = "Angela Boehm" + definition_id = "4b7cf533-c55d-468a-96e1-f7b10c6dd1e6" + name = "Eloise Robel" secret_id = "...my_secret_id..." - workspace_id = "2f6c56d3-cf89-4e69-a1ce-0c7a6ecf0509" + workspace_id = "cf365dcc-aec2-4ce4-9cbe-1d2ecd01501d" } \ 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 a2b813165..d0b6f1e56 100644 --- a/examples/resources/airbyte_source_sftp/resource.tf +++ b/examples/resources/airbyte_source_sftp/resource.tf @@ -8,12 +8,12 @@ resource "airbyte_source_sftp" "my_source_sftp" { file_pattern = "log-([0-9]{4})([0-9]{2})([0-9]{2}) - This will filter files which `log-yearmmdd`" file_types = "csv,json" folder_path = "/logs/2022" - host = "192.0.2.1" + host = "www.host.com" port = 22 user = "...my_user..." } - definition_id = "08d9d001-7533-4842-9733-72c40ec92913" - name = "Gladys Zemlak" + definition_id = "6c56d3cf-89e6-4921-8e0c-7a6ecf05091d" + name = "Jason Lebsack" secret_id = "...my_secret_id..." - workspace_id = "49bcc34d-389b-4bf5-924f-5b1164e1dc4a" + workspace_id = "d0017533-8429-4733-b2c4-0ec9291353f9" } \ 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 4e39dfe23..91326df9f 100644 --- a/examples/resources/airbyte_source_sftp_bulk/resource.tf +++ b/examples/resources/airbyte_source_sftp_bulk/resource.tf @@ -11,10 +11,10 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { start_date = "2021-01-01T00:00:00.000000Z" streams = [ { - days_to_sync_if_history_is_full = 2 + days_to_sync_if_history_is_full = 8 format = { avro_format = { - double_as_string = false + double_as_string = true } } globs = [ @@ -22,16 +22,16 @@ resource "airbyte_source_sftp_bulk" "my_source_sftpbulk" { ] input_schema = "...my_input_schema..." legacy_prefix = "...my_legacy_prefix..." - name = "Rene Kunze Jr." + name = "Jamie Swaniawski" primary_key = "...my_primary_key..." schemaless = false - validation_policy = "Emit Record" + validation_policy = "Wait for Discover" }, ] - username = "Rose_Abshire56" + username = "Milford_Weissnat" } - definition_id = "1eaa4a70-c9cb-4870-ab98-050c39e74506" - name = "Marlene Reichel" + definition_id = "24f5b116-4e1d-4c4a-81d4-4fb97610a4d0" + name = "Dr. Caleb Mann" secret_id = "...my_secret_id..." - workspace_id = "1cb4db2a-ae6c-420a-89c1-9db3e1c883c5" + workspace_id = "a4a70c9c-b870-4eb9-8050-c39e7450657b" } \ 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 491d991cf..6d059f65b 100644 --- a/examples/resources/airbyte_source_shopify/resource.tf +++ b/examples/resources/airbyte_source_shopify/resource.tf @@ -1,17 +1,18 @@ resource "airbyte_source_shopify" "my_source_shopify" { configuration = { - bulk_window_in_days = 3 + bulk_window_in_days = 10 credentials = { api_password = { api_password = "...my_api_password..." } } fetch_transactions_user_id = false + job_termination_threshold = 0 shop = "my-store.myshopify.com" - start_date = "2020-04-28" + start_date = "2022-06-27" } - definition_id = "5c37529a-15c3-4606-aa63-f5716d2b265f" - name = "Marguerite Will" + definition_id = "db2aae6c-20ac-49c1-9db3-e1c883c55acc" + name = "Glen Schinner" secret_id = "...my_secret_id..." - workspace_id = "fce7bdd5-81ac-4648-b876-fcad615bcace" + workspace_id = "529a15c3-6062-4a63-b571-6d2b265f2af5" } \ 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 6922a6f18..48f05e099 100644 --- a/examples/resources/airbyte_source_shortio/resource.tf +++ b/examples/resources/airbyte_source_shortio/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_shortio" "my_source_shortio" { secret_key = "...my_secret_key..." start_date = "2023-07-30T03:43:59.244Z" } - definition_id = "687b3371-0669-486a-bb02-fd25c7727b36" - name = "Yvonne Glover" + definition_id = "6fce7bdd-581a-4c64-8787-6fcad615bcac" + name = "Shane Lebsack" secret_id = "...my_secret_id..." - workspace_id = "1d3e7f0b-c649-4fe5-b08c-82dc40ca1ab7" + workspace_id = "33710669-86a7-4b02-bd25-c7727b363542" } \ 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 0d8a41458..07a35842c 100644 --- a/examples/resources/airbyte_source_slack/resource.tf +++ b/examples/resources/airbyte_source_slack/resource.tf @@ -8,13 +8,13 @@ resource "airbyte_source_slack" "my_source_slack" { api_token = "...my_api_token..." } } - include_private_channels = false + include_private_channels = true join_channels = true - lookback_window = 7 + lookback_window = 14 start_date = "2017-01-25T00:00:00Z" } - definition_id = "6f1b8331-df02-45a1-9458-6c7cdfb558f8" - name = "Kay Bauch" + definition_id = "f0bc649f-e5b0-48c8-adc4-0ca1ab766397" + name = "Miss Beth Wunsch" secret_id = "...my_secret_id..." - workspace_id = "3d1fcf2b-6755-4110-90ec-6c18f2017e88" + workspace_id = "331df025-a154-4586-87cd-fb558f87809d" } \ 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 5aeb28f39..07226bce3 100644 --- a/examples/resources/airbyte_source_smaily/resource.tf +++ b/examples/resources/airbyte_source_smaily/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_smaily" "my_source_smaily" { api_subdomain = "...my_api_subdomain..." api_username = "...my_api_username..." } - definition_id = "b7a8364f-95e8-44ef-b6a9-353261882dc6" - name = "Hubert Dickens" + definition_id = "3d1fcf2b-6755-4110-90ec-6c18f2017e88" + name = "Neil Pagac" secret_id = "...my_secret_id..." - workspace_id = "e2f3a674-4848-4ac2-b04b-eae9e1753040" + workspace_id = "64f95e84-efb6-4a93-9326-1882dc6ea377" } \ 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 313dcb670..67877c9bc 100644 --- a/examples/resources/airbyte_source_smartengage/resource.tf +++ b/examples/resources/airbyte_source_smartengage/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_smartengage" "my_source_smartengage" { configuration = { api_key = "...my_api_key..." } - definition_id = "65f64672-3901-4f87-89df-1af8f5013d5d" - name = "Robyn Weimann I" + definition_id = "e2f3a674-4848-4ac2-b04b-eae9e1753040" + name = "Lorraine Zieme" secret_id = "...my_secret_id..." - workspace_id = "b2856e98-a695-40f0-807e-33047d95358a" + workspace_id = "6723901f-87c9-4df1-af8f-5013d5d0cf40" } \ 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 efca0d9fa..2f9cd65c9 100644 --- a/examples/resources/airbyte_source_smartsheets/resource.tf +++ b/examples/resources/airbyte_source_smartsheets/resource.tf @@ -6,13 +6,13 @@ resource "airbyte_source_smartsheets" "my_source_smartsheets" { } } metadata_fields = [ - "sheetversion", + "sheetname", ] spreadsheet_id = "...my_spreadsheet_id..." - start_datetime = "2000-01-01T13:00:00" + start_datetime = "2000-01-01T13:00:00-07:00" } - definition_id = "9d2abec2-1d7e-43d2-8dfd-3d512342f997" - name = "Jose Hilpert" + definition_id = "56e98a69-50f0-4007-a330-47d95358a568" + name = "Margarita Sipes" secret_id = "...my_secret_id..." - workspace_id = "38a2e5fc-f99c-4418-b6fa-0cbc1b99ee1e" + workspace_id = "bec21d7e-3d24-4dfd-bd51-2342f997d059" } \ 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 5d5b3d6d3..17a7f25d5 100644 --- a/examples/resources/airbyte_source_snapchat_marketing/resource.tf +++ b/examples/resources/airbyte_source_snapchat_marketing/resource.tf @@ -6,11 +6,11 @@ resource "airbyte_source_snapchat_marketing" "my_source_snapchatmarketing" { end_date = "2022-01-30" refresh_token = "...my_refresh_token..." start_date = "2022-01-01" - swipe_up_attribution_window = "7_DAY" - view_attribution_window = "1_HOUR" + swipe_up_attribution_window = "28_DAY" + view_attribution_window = "3_HOUR" } - definition_id = "5b0d51b3-114e-49ed-9754-1c3612b0e8c8" - name = "Miss Emilio Botsford PhD" + definition_id = "fcf99c41-876f-4a0c-bc1b-99ee1e960566" + name = "Dr. Beatrice Reilly" secret_id = "...my_secret_id..." - workspace_id = "259943df-a52a-49e4-b5ab-ffba2c1e7b69" + workspace_id = "1b3114e9-ed57-4541-8361-2b0e8c8cf11a" } \ 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 b06d73b64..43e489b9d 100644 --- a/examples/resources/airbyte_source_snowflake/resource.tf +++ b/examples/resources/airbyte_source_snowflake/resource.tf @@ -1,11 +1,10 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { configuration = { credentials = { - o_auth20 = { - access_token = "...my_access_token..." - client_id = "...my_client_id..." - client_secret = "...my_client_secret..." - refresh_token = "...my_refresh_token..." + key_pair_authentication = { + private_key = "...my_private_key..." + private_key_password = "...my_private_key_password..." + username = "AIRBYTE_USER" } } database = "AIRBYTE_DATABASE" @@ -15,8 +14,8 @@ resource "airbyte_source_snowflake" "my_source_snowflake" { schema = "AIRBYTE_SCHEMA" warehouse = "AIRBYTE_WAREHOUSE" } - definition_id = "08ecd761-f19b-460a-a080-4c971e60235d" - name = "Frank Marquardt" + definition_id = "9943dfa5-2a9e-4475-abff-ba2c1e7b6908" + name = "Sherman Stokes" secret_id = "...my_secret_id..." - workspace_id = "dad73b79-d20b-448a-8fdc-6fb504a12b77" + workspace_id = "1f19b60a-a080-44c9-b1e6-0235dc09fada" } \ 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 b3c2de577..312499a9b 100644 --- a/examples/resources/airbyte_source_sonar_cloud/resource.tf +++ b/examples/resources/airbyte_source_sonar_cloud/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_sonar_cloud" "my_source_sonarcloud" { start_date = "YYYY-MM-DD" user_token = "...my_user_token..." } - definition_id = "f0223ae8-22e5-4327-98cb-c0547dc93d7d" - name = "Katie Deckow" + definition_id = "79d20b48-acfd-4c6f-b504-a12b7723cbf0" + name = "Andrea Friesen" secret_id = "...my_secret_id..." - workspace_id = "47813582-a6f5-437d-9dfc-7f458565e715" + workspace_id = "822e5327-d8cb-4c05-87dc-93d7d7628c47" } \ 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 0f1723f1c..44606e23b 100644 --- a/examples/resources/airbyte_source_spacex_api/resource.tf +++ b/examples/resources/airbyte_source_spacex_api/resource.tf @@ -1,10 +1,10 @@ resource "airbyte_source_spacex_api" "my_source_spacexapi" { configuration = { - id = "5c9f06b5-482c-49eb-b700-3d0337f10a64" + id = "813582a6-f537-4d9d-bc7f-458565e7155c" options = "...my_options..." } - definition_id = "369e4ee3-2ccb-44d5-ada6-128f2436a122" - name = "Travis McCullough" + definition_id = "9f06b548-2c9e-4b77-803d-0337f10a6436" + name = "Conrad Glover" secret_id = "...my_secret_id..." - workspace_id = "c8198a6b-f6f1-4cbd-b35a-96cd0e48f1e4" + workspace_id = "32ccb4d5-2da6-4128-b243-6a122e3949c8" } \ 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 cfc014e6c..60a98de0b 100644 --- a/examples/resources/airbyte_source_square/resource.tf +++ b/examples/resources/airbyte_source_square/resource.tf @@ -5,12 +5,12 @@ resource "airbyte_source_square" "my_source_square" { api_key = "...my_api_key..." } } - include_deleted_objects = true - is_sandbox = true - start_date = "2022-09-30" + include_deleted_objects = false + is_sandbox = false + start_date = "2021-09-28" } - definition_id = "69b6ca0b-303c-4f01-bcd9-78363f1be7e9" - name = "Tom O'Keefe" + definition_id = "6bf6f1cb-db35-4a96-8d0e-48f1e4b30469" + name = "Angel Sawayn DDS" secret_id = "...my_secret_id..." - workspace_id = "fc5ff714-6c36-4bb7-b37b-f0beca93a8ae" + workspace_id = "303cf017-cd97-4836-bf1b-e7e9b4aabfc5" } \ 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 03c3fe867..eae9b94fc 100644 --- a/examples/resources/airbyte_source_strava/resource.tf +++ b/examples/resources/airbyte_source_strava/resource.tf @@ -6,8 +6,8 @@ resource "airbyte_source_strava" "my_source_strava" { refresh_token = "fc6243f283e51f6ca989aab298b17da125496f50" start_date = "2021-03-01T00:00:00Z" } - definition_id = "1e537d96-eb6d-45dc-9e25-0f80fbc595c3" - name = "Jackie Krajcik" + definition_id = "146c36bb-7337-4bf0-beca-93a8ae78e1e5" + name = "Jackie Schuster" secret_id = "...my_secret_id..." - workspace_id = "cfe70cf1-47e2-493c-ba4b-2d7bbc290ef0" + workspace_id = "eb6d5dc1-e250-4f80-bbc5-95c3777bccfe" } \ 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 d953bc922..48ed2fdda 100644 --- a/examples/resources/airbyte_source_stripe/resource.tf +++ b/examples/resources/airbyte_source_stripe/resource.tf @@ -3,13 +3,13 @@ resource "airbyte_source_stripe" "my_source_stripe" { account_id = "...my_account_id..." call_rate_limit = 25 client_secret = "...my_client_secret..." - lookback_window_days = 9 - num_workers = 1 - slice_range = 10 + lookback_window_days = 8 + num_workers = 3 + slice_range = 3 start_date = "2017-01-25T00:00:00Z" } - definition_id = "6fe50a2e-7cfe-46f3-8acc-65c56f5fa677" - name = "Sheldon Gerlach" + definition_id = "93c7a4b2-d7bb-4c29-8ef0-0ad5372256fe" + name = "Cynthia O'Reilly" secret_id = "...my_secret_id..." - workspace_id = "91c615d1-2804-40ba-83eb-3c0afcc3c8fa" + workspace_id = "7cfe6f34-acc6-45c5-af5f-a6778e44b91c" } \ 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 896f45031..7d38ab8a6 100644 --- a/examples/resources/airbyte_source_survey_sparrow/resource.tf +++ b/examples/resources/airbyte_source_survey_sparrow/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_survey_sparrow" "my_source_surveysparrow" { "{ \"see\": \"documentation\" }", ] } - definition_id = "6dac9959-2aae-4b21-989b-3db558d4aa17" - name = "Margaret Wiza" + definition_id = "84461977-a1b2-471a-9b00-9f29606a36da" + name = "Alejandro Muller" secret_id = "...my_secret_id..." - workspace_id = "1a7b03b3-15af-419b-84a1-418c27e2e49f" + workspace_id = "2aaeb21d-89b3-4db5-98d4-aa1770fe21a7" } \ 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 45d51dd7f..4739a6335 100644 --- a/examples/resources/airbyte_source_surveymonkey/resource.tf +++ b/examples/resources/airbyte_source_surveymonkey/resource.tf @@ -11,8 +11,8 @@ resource "airbyte_source_surveymonkey" "my_source_surveymonkey" { "...", ] } - definition_id = "fbbc8e3e-7db5-4a3e-846f-c1e0fa91f7ef" - name = "Winifred Graham" + definition_id = "d128040b-a03e-4b3c-8afc-c3c8fa6eafbb" + name = "Alberto Tillman" secret_id = "...my_secret_id..." - workspace_id = "d7c84461-977a-41b2-b1a5-b009f29606a3" + workspace_id = "7db5a3e4-46fc-41e0-ba91-f7ef5f462d7c" } \ 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 bdd88108c..d86881f6e 100644 --- a/examples/resources/airbyte_source_tempo/resource.tf +++ b/examples/resources/airbyte_source_tempo/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_tempo" "my_source_tempo" { configuration = { api_token = "...my_api_token..." } - definition_id = "be84753d-48e3-40cc-8b1d-39ddfc649b7a" - name = "Cassandra O'Reilly" + definition_id = "b03b315a-f19b-4c4a-9418-c27e2e49fbe8" + name = "Stella Hammes" secret_id = "...my_secret_id..." - workspace_id = "3641fd33-8f32-4285-acd8-8e7e494b9e58" + workspace_id = "48e30ccc-b1d3-49dd-bc64-9b7a58a56364" } \ 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 181d73eb6..e54b1ec7c 100644 --- a/examples/resources/airbyte_source_the_guardian_api/resource.tf +++ b/examples/resources/airbyte_source_the_guardian_api/resource.tf @@ -3,12 +3,12 @@ resource "airbyte_source_the_guardian_api" "my_source_theguardianapi" { api_key = "...my_api_key..." end_date = "YYYY-MM-DD" query = "environment AND NOT water" - section = "media" + section = "housing-network" start_date = "YYYY-MM-DD" tag = "environment/energyefficiency" } - definition_id = "9efbf412-cdca-4e9f-85c7-017380526f88" - name = "Laurie Schiller" + definition_id = "338f3228-56cd-488e-be49-4b9e5830e9ef" + name = "Mr. Timmy Gutkowski" secret_id = "...my_secret_id..." - workspace_id = "3fdefbe1-9992-414f-bffa-48acadc06400" + workspace_id = "dcae9f85-c701-4738-8526-f8856cdf3fde" } \ 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 8045d89f7..f0e25386b 100644 --- a/examples/resources/airbyte_source_tiktok_marketing/resource.tf +++ b/examples/resources/airbyte_source_tiktok_marketing/resource.tf @@ -1,6 +1,6 @@ resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { configuration = { - attribution_window = 8 + attribution_window = 10 credentials = { o_auth20 = { access_token = "...my_access_token..." @@ -9,12 +9,12 @@ resource "airbyte_source_tiktok_marketing" "my_source_tiktokmarketing" { secret = "...my_secret..." } } - end_date = "2022-04-17" + end_date = "2021-02-26" include_deleted = true - start_date = "2021-05-10" + start_date = "2021-10-12" } - definition_id = "13a2ccf2-b1ad-4e2f-8984-bfb0e1b3d2b8" - name = "Jean Dare" + definition_id = "9214f3ff-a48a-4cad-8064-00b7b58d13a2" + name = "Spencer Witting" secret_id = "...my_secret_id..." - workspace_id = "8838cf8d-227f-4318-9424-0654f4782740" + workspace_id = "1ade2f49-84bf-4b0e-9b3d-2b89b26a8838" } \ 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 52829eb3c..e99461b5e 100644 --- a/examples/resources/airbyte_source_trello/resource.tf +++ b/examples/resources/airbyte_source_trello/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_trello" "my_source_trello" { start_date = "2021-03-01T00:00:00Z" token = "...my_token..." } - definition_id = "b5a46242-8ebc-45c7-bead-f0c9ce16ebe8" - name = "Josefina Pacocha" + definition_id = "8d227f31-8d42-4406-94f4-782740a2b5a4" + name = "Beverly Grimes" secret_id = "...my_secret_id..." - workspace_id = "aee8d2bd-e48e-4efc-ab9e-0d54b0894bdd" + workspace_id = "ebc5c77e-adf0-4c9c-a16e-be85fa64aee8" } \ 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 b375fb523..dedae3ad7 100644 --- a/examples/resources/airbyte_source_trustpilot/resource.tf +++ b/examples/resources/airbyte_source_trustpilot/resource.tf @@ -10,8 +10,8 @@ resource "airbyte_source_trustpilot" "my_source_trustpilot" { } start_date = "%Y-%m-%dT%H:%M:%S" } - definition_id = "98fe3f92-c06a-49aa-b270-2875abb88c39" - name = "Marcos Kuhic" + definition_id = "d2bde48e-efce-4b9e-8d54-b0894bdd98fe" + name = "Lucia McClure" secret_id = "...my_secret_id..." - workspace_id = "66080f3e-cae3-4cb4-91ea-7992cd63d338" + workspace_id = "06a9aa72-7028-475a-bb88-c398d7966608" } \ 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 9f8bc3aed..8cbb36a7a 100644 --- a/examples/resources/airbyte_source_tvmaze_schedule/resource.tf +++ b/examples/resources/airbyte_source_tvmaze_schedule/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_tvmaze_schedule" "my_source_tvmazeschedule" { start_date = "...my_start_date..." web_schedule_country_code = "global" } - definition_id = "fe3f7d5a-433d-430c-a4aa-9f684d9ab345" - name = "Ms. Moses Dibbert" + definition_id = "3ecae3cb-491e-4a79-92cd-63d3381efe3f" + name = "Mercedes Heathcote" secret_id = "...my_secret_id..." - workspace_id = "cb2e52a8-6adb-4b57-85cb-e7ccff9d0724" + workspace_id = "33d30ca4-aa9f-4684-99ab-345ef3183cb2" } \ 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 c2f55370e..27880f03b 100644 --- a/examples/resources/airbyte_source_twilio/resource.tf +++ b/examples/resources/airbyte_source_twilio/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_twilio" "my_source_twilio" { lookback_window = 60 start_date = "2020-10-01T00:00:00Z" } - definition_id = "a4b37eb2-05dd-4b7f-9b71-195e07e10364" - name = "Angie Jenkins" + definition_id = "a86adbb5-7c5c-4be7-8cff-9d0724747a4b" + name = "Marian Torphy" secret_id = "...my_secret_id..." - workspace_id = "d2a60225-b2ac-462e-b10f-1a0d51fb8be0" + workspace_id = "05ddb7f1-b711-495e-87e1-03643a6dfd2a" } \ 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 7567a159f..50ffdb590 100644 --- a/examples/resources/airbyte_source_twilio_taskrouter/resource.tf +++ b/examples/resources/airbyte_source_twilio_taskrouter/resource.tf @@ -3,8 +3,8 @@ resource "airbyte_source_twilio_taskrouter" "my_source_twiliotaskrouter" { account_sid = "...my_account_sid..." auth_token = "...my_auth_token..." } - definition_id = "416cb49d-a06c-4239-a7af-3ca2cc2a5392" - name = "Julio Gutmann" + definition_id = "60225b2a-c62e-4b10-b1a0-d51fb8be0416" + name = "Rudolph Gerhold" secret_id = "...my_secret_id..." - workspace_id = "89040904-7267-4ce8-aa32-2e02b7e6dd49" + workspace_id = "a06c239e-7af3-4ca2-8c2a-5392d7458890" } \ 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 6f94c6735..195da80ab 100644 --- a/examples/resources/airbyte_source_twitter/resource.tf +++ b/examples/resources/airbyte_source_twitter/resource.tf @@ -1,12 +1,12 @@ resource "airbyte_source_twitter" "my_source_twitter" { configuration = { api_key = "...my_api_key..." - end_date = "2020-01-18T12:46:16.717Z" + end_date = "2022-12-29T05:52:40.964Z" query = "...my_query..." - start_date = "2022-03-25T00:43:50.915Z" + start_date = "2022-12-24T13:40:20.697Z" } - definition_id = "3592a5dd-7ddb-4d79-bd2e-b894fd682a67" - name = "Whitney Casper" + definition_id = "47267ce8-6a32-42e0-ab7e-6dd49df5c359" + name = "Blanche Hartmann" secret_id = "...my_secret_id..." - workspace_id = "dbbaeb9b-5c2e-42ee-8b85-f41cf2efd5ed" + workspace_id = "7ddbd797-d2eb-4894-bd68-2a677b1b8dbb" } \ 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 63c1a3c00..90dd3243a 100644 --- a/examples/resources/airbyte_source_typeform/resource.tf +++ b/examples/resources/airbyte_source_typeform/resource.tf @@ -6,7 +6,7 @@ resource "airbyte_source_typeform" "my_source_typeform" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." refresh_token = "...my_refresh_token..." - token_expiry_date = "2022-12-23T20:48:01.588Z" + token_expiry_date = "2021-02-27T17:24:02.669Z" } } form_ids = [ @@ -14,8 +14,8 @@ resource "airbyte_source_typeform" "my_source_typeform" { ] start_date = "2021-03-01T00:00:00Z" } - definition_id = "9e4deda3-0dd3-4cfb-8aa2-fad058413083" - name = "Krystal Dietrich" + definition_id = "b5c2e2ee-8b85-4f41-8f2e-fd5ed605e9e4" + name = "Darin Spinka" secret_id = "...my_secret_id..." - workspace_id = "de43c907-f63c-4c02-bc2f-7f5dfb2c26b4" + workspace_id = "0dd3cfb0-aa2f-4ad0-9841-30837d3e5de4" } \ 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 84b1bea1f..9f6328c7f 100644 --- a/examples/resources/airbyte_source_us_census/resource.tf +++ b/examples/resources/airbyte_source_us_census/resource.tf @@ -1,11 +1,11 @@ resource "airbyte_source_us_census" "my_source_uscensus" { configuration = { api_key = "...my_api_key..." - query_params = "get=MOVEDIN,GEOID1,GEOID2,MOVEDOUT,FULL1_NAME,FULL2_NAME,MOVEDNET&for=county:*" - query_path = "data/2018/acs" + query_params = "get=NAME,NAICS2017_LABEL,LFO_LABEL,EMPSZES_LABEL,ESTAB,PAYANN,PAYQTR1,EMP&for=us:*&NAICS2017=72&LFO=001&EMPSZES=001" + query_path = "data/timeseries/healthins/sahie" } - definition_id = "6915d332-4b48-419f-b393-429d3165dd85" - name = "Vernon Tillman" + definition_id = "907f63cc-02bc-42f7-b5df-b2c26b498691" + name = "Christie Emard" secret_id = "...my_secret_id..." - workspace_id = "61e20db5-f4bb-411c-a0c3-a7ba336248be" + workspace_id = "4b4819ff-3934-429d-b165-dd8595e9c61e" } \ 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 a5f13d359..bc55ddd02 100644 --- a/examples/resources/airbyte_source_vantage/resource.tf +++ b/examples/resources/airbyte_source_vantage/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_vantage" "my_source_vantage" { configuration = { access_token = "...my_access_token..." } - definition_id = "45dfad93-24f6-4ab9-b833-4526eae71eb7" - name = "Sheryl Stroman" + definition_id = "20db5f4b-b11c-460c-ba7b-a336248be45d" + name = "Shaun Schultz" secret_id = "...my_secret_id..." - workspace_id = "d0bf2f57-2195-478f-bbe9-226a954fff93" + workspace_id = "24f6ab9f-8334-4526-aae7-1eb759d7dd0b" } \ 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 05a1a9bdb..d0c78da90 100644 --- a/examples/resources/airbyte_source_webflow/resource.tf +++ b/examples/resources/airbyte_source_webflow/resource.tf @@ -4,8 +4,8 @@ resource "airbyte_source_webflow" "my_source_webflow" { api_key = "a very long hex sequence" site_id = "a relatively long hex sequence" } - definition_id = "d12e392c-e90b-4916-9fb3-0db2efb21ef2" - name = "Israel Gleason" + definition_id = "f2f57219-578f-4bbe-9226-a954fff93d12" + name = "Bryan McKenzie" secret_id = "...my_secret_id..." - workspace_id = "f07f2e77-2136-4664-afa9-b2db7532b28c" + workspace_id = "e90b9169-fb30-4db2-afb2-1ef2bc48bf07" } \ 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 bcd001fef..1f95783f3 100644 --- a/examples/resources/airbyte_source_whisky_hunter/resource.tf +++ b/examples/resources/airbyte_source_whisky_hunter/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_source_whisky_hunter" "my_source_whiskyhunter" { configuration = {} - definition_id = "b785b8d4-ad9b-4b4c-ad04-c6ceb0e44096" - name = "Jenny Strosin" + definition_id = "f2e77213-6664-46fa-9b2d-b7532b28cb78" + name = "Olivia Lesch" secret_id = "...my_secret_id..." - workspace_id = "6ecaf35c-15b3-4779-97e3-dccb9fd6e1ad" + workspace_id = "ad9bb4c2-d04c-46ce-b0e4-409659dbf6ec" } \ 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 a169b4439..431fc0d61 100644 --- a/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf +++ b/examples/resources/airbyte_source_wikipedia_pageviews/resource.tf @@ -1,15 +1,15 @@ resource "airbyte_source_wikipedia_pageviews" "my_source_wikipediapageviews" { configuration = { - access = "desktop" - agent = "user" + access = "mobile-app" + agent = "automated" article = "Are_You_the_One%3F" country = "FR" end = "...my_end..." project = "commons.wikimedia.org" start = "...my_start..." } - definition_id = "8320ef50-a8ca-476b-883e-a280df1804a6" - name = "Hannah Moore" + definition_id = "15b3779d-7e3d-4ccb-9fd6-e1ad7470b832" + name = "Delia Zulauf MD" secret_id = "...my_secret_id..." - workspace_id = "e5814951-2957-4c29-8696-756fe0588102" + workspace_id = "8ca76b08-3ea2-480d-b180-4a67b9f3e581" } \ 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 18f637e79..a21569a27 100644 --- a/examples/resources/airbyte_source_woocommerce/resource.tf +++ b/examples/resources/airbyte_source_woocommerce/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_woocommerce" "my_source_woocommerce" { shop = "...my_shop..." start_date = "2021-01-01" } - definition_id = "8ad45dc0-7887-4545-a3f3-6dab5122890f" - name = "Cecelia McClure" + definition_id = "512957c2-9869-4675-afe0-5881022b8ad4" + name = "Ms. Marcella Schiller" secret_id = "...my_secret_id..." - workspace_id = "c2a3f4c8-fc02-46c7-8c4e-afdab4c1bcaf" + workspace_id = "8754523f-36da-4b51-a289-0f3e992c2a3f" } \ 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 efb69375a..e7c586c61 100644 --- a/examples/resources/airbyte_source_xkcd/resource.tf +++ b/examples/resources/airbyte_source_xkcd/resource.tf @@ -1,7 +1,7 @@ resource "airbyte_source_xkcd" "my_source_xkcd" { configuration = {} - definition_id = "66c12869-f984-4d61-b828-542bb37a458f" - name = "Ms. Lowell Stiedemann" + definition_id = "4c8fc026-c7cc-44ea-bdab-4c1bcaf66c12" + name = "Rafael Mante" secret_id = "...my_secret_id..." - workspace_id = "1a16fff1-f04a-4eeb-8306-c4f3397c2047" + workspace_id = "84d61382-8542-4bb3-ba45-8facd1771a16" } \ 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 b9781e76c..3792f7de7 100644 --- a/examples/resources/airbyte_source_yandex_metrica/resource.tf +++ b/examples/resources/airbyte_source_yandex_metrica/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_yandex_metrica" "my_source_yandexmetrica" { end_date = "2022-01-01" start_date = "2022-01-01" } - definition_id = "deba481e-413d-4d76-8cc3-ae1d775ee978" - name = "Dr. Lawrence Howe" + definition_id = "f04aeebc-306c-44f3-b97c-20475faadeba" + name = "Terry Bergnaum" secret_id = "...my_secret_id..." - workspace_id = "5746ac11-eb02-4437-a4c2-fa90b3fc58ae" + workspace_id = "13dd760c-c3ae-41d7-b5ee-978f160f4574" } \ 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 c229f8152..87823e7f6 100644 --- a/examples/resources/airbyte_source_yotpo/resource.tf +++ b/examples/resources/airbyte_source_yotpo/resource.tf @@ -2,11 +2,11 @@ resource "airbyte_source_yotpo" "my_source_yotpo" { configuration = { access_token = "...my_access_token..." app_key = "...my_app_key..." - email = "Leta.Jakubowski@hotmail.com" + email = "Louvenia9@yahoo.com" start_date = "2022-03-01T00:00:00.000Z" } - definition_id = "7de96097-25c6-4d5a-9da3-5039f4e4098b" - name = "Morris Schimmel" + definition_id = "0243724c-2fa9-40b3-bc58-aed9663e07de" + name = "Chester Armstrong" secret_id = "...my_secret_id..." - workspace_id = "23b3c013-4621-4866-8f51-8dbd5ebee014" + workspace_id = "25c6d5a5-da35-4039-b4e4-098bb8c2a23b" } \ 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 99a9589f8..9da0f9c5b 100644 --- a/examples/resources/airbyte_source_youtube_analytics/resource.tf +++ b/examples/resources/airbyte_source_youtube_analytics/resource.tf @@ -7,8 +7,8 @@ resource "airbyte_source_youtube_analytics" "my_source_youtubeanalytics" { refresh_token = "...my_refresh_token..." } } - definition_id = "e07eadc6-f53d-4253-9b8b-1e39d437be8f" - name = "Vicky Welch" + definition_id = "3c013462-1866-4cf5-98db-d5ebee014e07" + name = "Oliver Smith" secret_id = "...my_secret_id..." - workspace_id = "7fa8ae01-2beb-4a22-8996-41ef630f5d87" + workspace_id = "f53d253d-b8b1-4e39-9437-be8f4cf797fa" } \ 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 47551dbd4..b63d943f5 100644 --- a/examples/resources/airbyte_source_zendesk_chat/resource.tf +++ b/examples/resources/airbyte_source_zendesk_chat/resource.tf @@ -8,8 +8,8 @@ resource "airbyte_source_zendesk_chat" "my_source_zendeskchat" { start_date = "2021-02-01T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "c0e34b35-2ddb-404c-9bce-387d66444a18" - name = "Claudia Mills" + definition_id = "e012beba-22c9-4964-9ef6-30f5d8739c0e" + name = "Hazel Pfeffer" secret_id = "...my_secret_id..." - workspace_id = "763e10f9-9e00-4879-a494-84a748552064" + workspace_id = "2ddb04c9-bce3-487d-a644-4a186797a763" } \ No newline at end of file diff --git a/examples/resources/airbyte_source_zendesk_sell/resource.tf b/examples/resources/airbyte_source_zendesk_sell/resource.tf index eb2fd8777..4424d5d2a 100644 --- a/examples/resources/airbyte_source_zendesk_sell/resource.tf +++ b/examples/resources/airbyte_source_zendesk_sell/resource.tf @@ -2,8 +2,8 @@ resource "airbyte_source_zendesk_sell" "my_source_zendesksell" { configuration = { api_token = "f23yhd630otl94y85a8bf384958473pto95847fd006da49382716or937ruw059" } - definition_id = "4aee427f-93df-49bf-84b7-84edaaf2f424" - name = "Ms. Marcos Ebert" + definition_id = "e10f99e0-0879-4e49-884a-7485520644ae" + name = "Francis Daniel" secret_id = "...my_secret_id..." - workspace_id = "06f09926-22de-47b1-a93e-5915fe5844c8" + workspace_id = "93df9bf8-4b78-44ed-aaf2-f424ed308606" } \ 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 c65f22ac1..7a2270926 100644 --- a/examples/resources/airbyte_source_zendesk_sunshine/resource.tf +++ b/examples/resources/airbyte_source_zendesk_sunshine/resource.tf @@ -3,14 +3,14 @@ resource "airbyte_source_zendesk_sunshine" "my_source_zendesksunshine" { credentials = { api_token = { api_token = "...my_api_token..." - email = "Jannie_Zulauf@hotmail.com" + email = "Amos.McKenzie@hotmail.com" } } start_date = "2021-01-01T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "badf74d2-3a87-4a42-abf6-ae57802daa82" - name = "Ramona Marvin" + definition_id = "2de7b1a9-3e59-415f-a584-4c8d7f9e67ba" + name = "Randal Kuphal" secret_id = "...my_secret_id..." - workspace_id = "ac7526c0-e68d-441f-a947-8bd831a4caf6" + workspace_id = "23a87a42-abf6-4ae5-b802-daa821998eac" } \ 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 f1c14eaba..76e801ad6 100644 --- a/examples/resources/airbyte_source_zendesk_support/resource.tf +++ b/examples/resources/airbyte_source_zendesk_support/resource.tf @@ -4,15 +4,15 @@ resource "airbyte_source_zendesk_support" "my_source_zendesksupport" { api_token = { additional_properties = "{ \"see\": \"documentation\" }" api_token = "...my_api_token..." - email = "Anastacio94@yahoo.com" + email = "Ericka_Dach@yahoo.com" } } - ignore_pagination = true + ignore_pagination = false start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "0a84c82f-eed3-45fd-8712-605259781224" - name = "Kathleen Greenfelder" + definition_id = "8d41f294-78bd-4831-a4ca-f6a030f2320a" + name = "Tom Schamberger" secret_id = "...my_secret_id..." - workspace_id = "79a97873-ec6e-4c23-b893-6834bb7f256a" + workspace_id = "feed35fd-4712-4605-a597-81224214e979" } \ 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 7cd8470cb..e6d8579ff 100644 --- a/examples/resources/airbyte_source_zendesk_talk/resource.tf +++ b/examples/resources/airbyte_source_zendesk_talk/resource.tf @@ -4,14 +4,14 @@ resource "airbyte_source_zendesk_talk" "my_source_zendesktalk" { api_token = { additional_properties = "{ \"see\": \"documentation\" }" api_token = "...my_api_token..." - email = "Carolyne_Turcotte57@hotmail.com" + email = "Lavada.Kshlerin@yahoo.com" } } start_date = "2020-10-15T00:00:00Z" subdomain = "...my_subdomain..." } - definition_id = "7ac93ce2-101f-4692-aff8-de5650472830" - name = "Grant Schmitt V" + definition_id = "c6ec23f8-9368-434b-b7f2-56aa2eed97a7" + name = "Jermaine Miller" secret_id = "...my_secret_id..." - workspace_id = "0d7b3b35-8aff-4520-ae7c-66512764ede9" + workspace_id = "e2101f69-2eff-48de-9650-472830aace29" } \ 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 91500588b..3896b0476 100644 --- a/examples/resources/airbyte_source_zenloop/resource.tf +++ b/examples/resources/airbyte_source_zenloop/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_zenloop" "my_source_zenloop" { survey_group_id = "...my_survey_group_id..." survey_id = "...my_survey_id..." } - definition_id = "cd819ecc-37ba-4170-8ba6-4daf2cd7c8fe" - name = "Delores Hamill" + definition_id = "0d7b3b35-8aff-4520-ae7c-66512764ede9" + name = "Miss Jake Lueilwitz" secret_id = "...my_secret_id..." - workspace_id = "306443a7-5bcf-44e2-a137-8db01d76f7dd" + workspace_id = "cc37ba17-00ba-464d-af2c-d7c8fe5757a3" } \ 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 0c06fa5e3..9f36e32f1 100644 --- a/examples/resources/airbyte_source_zoho_crm/resource.tf +++ b/examples/resources/airbyte_source_zoho_crm/resource.tf @@ -4,12 +4,12 @@ resource "airbyte_source_zoho_crm" "my_source_zohocrm" { client_secret = "...my_client_secret..." dc_region = "US" edition = "Professional" - environment = "Developer" + environment = "Production" refresh_token = "...my_refresh_token..." - start_datetime = "2000-01-01T13:00+00:00" + start_datetime = "2000-01-01 13:00" } - definition_id = "51f0c20e-4312-4d0c-bfe3-9df03e297d6f" - name = "Roxanne Yundt" + definition_id = "75bcf4e2-e137-48db-81d7-6f7dd27aa6e5" + name = "Melba Beer" secret_id = "...my_secret_id..." - workspace_id = "b34f9589-f421-498f-b282-2b82a159ebc2" + workspace_id = "0e4312d0-cbfe-439d-b03e-297d6f5cf39b" } \ 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 fea40f666..53ec70687 100644 --- a/examples/resources/airbyte_source_zoom/resource.tf +++ b/examples/resources/airbyte_source_zoom/resource.tf @@ -5,8 +5,8 @@ resource "airbyte_source_zoom" "my_source_zoom" { client_id = "...my_client_id..." client_secret = "...my_client_secret..." } - definition_id = "b7c1d354-0fbb-4e2d-8a9d-0010028d11c1" - name = "Leona Bechtelar" + definition_id = "34f9589f-4219-48f3-a822-b82a159ebc2b" + name = "Della Brekke" secret_id = "...my_secret_id..." - workspace_id = "07cdd8eb-8c75-4c46-9093-8eb2433624d8" + workspace_id = "540fbbe2-d8a9-4d00-9002-8d11c1280d80" } \ No newline at end of file diff --git a/examples/resources/airbyte_workspace/resource.tf b/examples/resources/airbyte_workspace/resource.tf index 08ee8f291..c70404c7f 100644 --- a/examples/resources/airbyte_workspace/resource.tf +++ b/examples/resources/airbyte_workspace/resource.tf @@ -1,4 +1,4 @@ resource "airbyte_workspace" "my_workspace" { - name = "Floyd Schinner" - organization_id = "a0b5368b-26a5-468a-a6dc-340bb1546957" + name = "Johnnie Skiles" + organization_id = "eb8c75c4-6109-438e-b243-3624d8c5c5aa" } \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index 911bc9d34..0a0bb0ca9 100755 --- a/gen.yaml +++ b/gen.yaml @@ -11,7 +11,7 @@ generation: oAuth2ClientCredentialsEnabled: true telemetryEnabled: true terraform: - version: 0.7.0 + version: 0.7.1 additionalDataSources: [] additionalDependencies: {} additionalResources: [] diff --git a/go.mod b/go.mod index ab6fc319a..e14952b91 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/airbytehq/terraform-provider-airbyte go 1.21 -toolchain go1.21.10 +toolchain go1.22.5 require ( github.com/cenkalti/backoff/v4 v4.2.0 diff --git a/internal/provider/destination_langchain_resource.go b/internal/provider/destination_langchain_resource.go deleted file mode 100644 index e29a2d9c7..000000000 --- a/internal/provider/destination_langchain_resource.go +++ /dev/null @@ -1,482 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package provider - -import ( - "context" - "fmt" - speakeasy_objectplanmodifier "github.com/airbytehq/terraform-provider-airbyte/internal/planmodifiers/objectplanmodifier" - speakeasy_stringplanmodifier "github.com/airbytehq/terraform-provider-airbyte/internal/planmodifiers/stringplanmodifier" - tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" - "github.com/airbytehq/terraform-provider-airbyte/internal/validators" - "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" - "github.com/hashicorp/terraform-plugin-framework/path" - "github.com/hashicorp/terraform-plugin-framework/resource" - "github.com/hashicorp/terraform-plugin-framework/resource/schema" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" - "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" - "github.com/hashicorp/terraform-plugin-framework/schema/validator" - "github.com/hashicorp/terraform-plugin-framework/types" - "github.com/hashicorp/terraform-plugin-framework/types/basetypes" -) - -// Ensure provider defined types fully satisfy framework interfaces. -var _ resource.Resource = &DestinationLangchainResource{} -var _ resource.ResourceWithImportState = &DestinationLangchainResource{} - -func NewDestinationLangchainResource() resource.Resource { - return &DestinationLangchainResource{} -} - -// DestinationLangchainResource defines the resource implementation. -type DestinationLangchainResource struct { - client *sdk.SDK -} - -// DestinationLangchainResourceModel describes the resource data model. -type DestinationLangchainResourceModel struct { - Configuration tfTypes.DestinationLangchain `tfsdk:"configuration"` - DefinitionID types.String `tfsdk:"definition_id"` - DestinationID types.String `tfsdk:"destination_id"` - DestinationType types.String `tfsdk:"destination_type"` - Name types.String `tfsdk:"name"` - WorkspaceID types.String `tfsdk:"workspace_id"` -} - -func (r *DestinationLangchainResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_destination_langchain" -} - -func (r *DestinationLangchainResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - resp.Schema = schema.Schema{ - MarkdownDescription: "DestinationLangchain Resource", - Attributes: map[string]schema.Attribute{ - "configuration": schema.SingleNestedAttribute{ - PlanModifiers: []planmodifier.Object{ - speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), - }, - Required: true, - Attributes: map[string]schema.Attribute{ - "embedding": schema.SingleNestedAttribute{ - Required: true, - Attributes: map[string]schema.Attribute{ - "fake": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{}, - Description: `Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("open_ai"), - }...), - }, - }, - "open_ai": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "openai_key": schema.StringAttribute{ - Required: true, - Sensitive: true, - }, - }, - Description: `Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("fake"), - }...), - }, - }, - }, - Description: `Embedding configuration`, - Validators: []validator.Object{ - validators.ExactlyOneChild(), - }, - }, - "indexing": schema.SingleNestedAttribute{ - Required: true, - Attributes: map[string]schema.Attribute{ - "chroma_local_persistance": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "collection_name": schema.StringAttribute{ - Computed: true, - Optional: true, - Default: stringdefault.StaticString("langchain"), - Description: `Name of the collection to use. Default: "langchain"`, - }, - "destination_path": schema.StringAttribute{ - Required: true, - Description: `Path to the directory where chroma files will be written. The files will be placed inside that local mount.`, - }, - }, - Description: `Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("doc_array_hnsw_search"), - path.MatchRelative().AtParent().AtName("pinecone"), - }...), - }, - }, - "doc_array_hnsw_search": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "destination_path": schema.StringAttribute{ - Required: true, - Description: `Path to the directory where hnswlib and meta data files will be written. The files will be placed inside that local mount. All files in the specified destination directory will be deleted on each run.`, - }, - }, - Description: `DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("chroma_local_persistance"), - path.MatchRelative().AtParent().AtName("pinecone"), - }...), - }, - }, - "pinecone": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "index": schema.StringAttribute{ - Required: true, - Description: `Pinecone index to use`, - }, - "pinecone_environment": schema.StringAttribute{ - Required: true, - Description: `Pinecone environment to use`, - }, - "pinecone_key": schema.StringAttribute{ - Required: true, - Sensitive: true, - }, - }, - Description: `Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("chroma_local_persistance"), - path.MatchRelative().AtParent().AtName("doc_array_hnsw_search"), - }...), - }, - }, - }, - Description: `Indexing configuration`, - Validators: []validator.Object{ - validators.ExactlyOneChild(), - }, - }, - "processing": schema.SingleNestedAttribute{ - Required: true, - Attributes: map[string]schema.Attribute{ - "chunk_overlap": schema.Int64Attribute{ - Computed: true, - Optional: true, - Default: int64default.StaticInt64(0), - Description: `Size of overlap between chunks in tokens to store in vector store to better capture relevant context. Default: 0`, - }, - "chunk_size": schema.Int64Attribute{ - Required: true, - Description: `Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)`, - }, - "text_fields": schema.ListAttribute{ - Required: true, - ElementType: types.StringType, - Description: `List of fields in the record that should be used to calculate the embedding. All other fields are passed along as meta fields. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. ` + "`" + `user.name` + "`" + ` will access the ` + "`" + `name` + "`" + ` field in the ` + "`" + `user` + "`" + ` object. It's also possible to use wildcards to access all fields in an object, e.g. ` + "`" + `users.*.name` + "`" + ` will access all ` + "`" + `names` + "`" + ` fields in all entries of the ` + "`" + `users` + "`" + ` array.`, - }, - }, - }, - }, - }, - "definition_id": schema.StringAttribute{ - PlanModifiers: []planmodifier.String{ - stringplanmodifier.RequiresReplaceIfConfigured(), - }, - Optional: true, - Description: `The UUID of the connector definition. One of configuration.destinationType or definitionId must be provided. Requires replacement if changed. `, - }, - "destination_id": schema.StringAttribute{ - Computed: true, - PlanModifiers: []planmodifier.String{ - speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), - }, - }, - "destination_type": schema.StringAttribute{ - Computed: true, - PlanModifiers: []planmodifier.String{ - speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), - }, - }, - "name": schema.StringAttribute{ - PlanModifiers: []planmodifier.String{ - speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), - }, - Required: true, - Description: `Name of the destination e.g. dev-mysql-instance.`, - }, - "workspace_id": schema.StringAttribute{ - PlanModifiers: []planmodifier.String{ - speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), - }, - Required: true, - }, - }, - } -} - -func (r *DestinationLangchainResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { - // Prevent panic if the provider has not been configured. - if req.ProviderData == nil { - return - } - - client, ok := req.ProviderData.(*sdk.SDK) - - if !ok { - resp.Diagnostics.AddError( - "Unexpected Resource Configure Type", - fmt.Sprintf("Expected *sdk.SDK, got: %T. Please report this issue to the provider developers.", req.ProviderData), - ) - - return - } - - r.client = client -} - -func (r *DestinationLangchainResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - var data *DestinationLangchainResourceModel - var plan types.Object - - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(plan.As(ctx, &data, basetypes.ObjectAsOptions{ - UnhandledNullAsEmpty: true, - UnhandledUnknownAsEmpty: true, - })...) - - if resp.Diagnostics.HasError() { - return - } - - request := data.ToSharedDestinationLangchainCreateRequest() - res, err := r.client.Destinations.CreateDestinationLangchain(ctx, request) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res != nil && res.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) - } - return - } - if res == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) - return - } - if res.StatusCode != 200 { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) - return - } - if !(res.DestinationResponse != nil) { - resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) - return - } - data.RefreshFromSharedDestinationResponse(res.DestinationResponse) - refreshPlan(ctx, plan, &data, resp.Diagnostics) - destinationID := data.DestinationID.ValueString() - request1 := operations.GetDestinationLangchainRequest{ - DestinationID: destinationID, - } - res1, err := r.client.Destinations.GetDestinationLangchain(ctx, request1) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res1 != nil && res1.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res1.RawResponse)) - } - return - } - if res1 == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res1)) - return - } - if res1.StatusCode != 200 { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res1.StatusCode), debugResponse(res1.RawResponse)) - return - } - if !(res1.DestinationResponse != nil) { - resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res1.RawResponse)) - return - } - data.RefreshFromSharedDestinationResponse(res1.DestinationResponse) - refreshPlan(ctx, plan, &data, resp.Diagnostics) - - // Save updated data into Terraform state - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -func (r *DestinationLangchainResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - var data *DestinationLangchainResourceModel - var item types.Object - - resp.Diagnostics.Append(req.State.Get(ctx, &item)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ - UnhandledNullAsEmpty: true, - UnhandledUnknownAsEmpty: true, - })...) - - if resp.Diagnostics.HasError() { - return - } - - destinationID := data.DestinationID.ValueString() - request := operations.GetDestinationLangchainRequest{ - DestinationID: destinationID, - } - res, err := r.client.Destinations.GetDestinationLangchain(ctx, request) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res != nil && res.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) - } - return - } - if res == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) - return - } - if res.StatusCode == 404 { - resp.State.RemoveResource(ctx) - return - } - if res.StatusCode != 200 { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) - return - } - if !(res.DestinationResponse != nil) { - resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) - return - } - data.RefreshFromSharedDestinationResponse(res.DestinationResponse) - - // Save updated data into Terraform state - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -func (r *DestinationLangchainResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - var data *DestinationLangchainResourceModel - var plan types.Object - - resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) - if resp.Diagnostics.HasError() { - return - } - - merge(ctx, req, resp, &data) - if resp.Diagnostics.HasError() { - return - } - - destinationLangchainPutRequest := data.ToSharedDestinationLangchainPutRequest() - destinationID := data.DestinationID.ValueString() - request := operations.PutDestinationLangchainRequest{ - DestinationLangchainPutRequest: destinationLangchainPutRequest, - DestinationID: destinationID, - } - res, err := r.client.Destinations.PutDestinationLangchain(ctx, request) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res != nil && res.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) - } - return - } - if res == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) - return - } - if fmt.Sprintf("%v", res.StatusCode)[0] != '2' { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) - return - } - refreshPlan(ctx, plan, &data, resp.Diagnostics) - destinationId1 := data.DestinationID.ValueString() - request1 := operations.GetDestinationLangchainRequest{ - DestinationID: destinationId1, - } - res1, err := r.client.Destinations.GetDestinationLangchain(ctx, request1) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res1 != nil && res1.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res1.RawResponse)) - } - return - } - if res1 == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res1)) - return - } - if res1.StatusCode != 200 { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res1.StatusCode), debugResponse(res1.RawResponse)) - return - } - if !(res1.DestinationResponse != nil) { - resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res1.RawResponse)) - return - } - data.RefreshFromSharedDestinationResponse(res1.DestinationResponse) - refreshPlan(ctx, plan, &data, resp.Diagnostics) - - // Save updated data into Terraform state - resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) -} - -func (r *DestinationLangchainResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - var data *DestinationLangchainResourceModel - var item types.Object - - resp.Diagnostics.Append(req.State.Get(ctx, &item)...) - if resp.Diagnostics.HasError() { - return - } - - resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ - UnhandledNullAsEmpty: true, - UnhandledUnknownAsEmpty: true, - })...) - - if resp.Diagnostics.HasError() { - return - } - - destinationID := data.DestinationID.ValueString() - request := operations.DeleteDestinationLangchainRequest{ - DestinationID: destinationID, - } - res, err := r.client.Destinations.DeleteDestinationLangchain(ctx, request) - if err != nil { - resp.Diagnostics.AddError("failure to invoke API", err.Error()) - if res != nil && res.RawResponse != nil { - resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) - } - return - } - if res == nil { - resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) - return - } - if fmt.Sprintf("%v", res.StatusCode)[0] != '2' { - resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) - return - } - -} - -func (r *DestinationLangchainResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { - resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("destination_id"), req.ID)...) -} diff --git a/internal/provider/destination_langchain_resource_sdk.go b/internal/provider/destination_langchain_resource_sdk.go deleted file mode 100644 index 767048f52..000000000 --- a/internal/provider/destination_langchain_resource_sdk.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package provider - -import ( - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - "github.com/hashicorp/terraform-plugin-framework/types" -) - -func (r *DestinationLangchainResourceModel) ToSharedDestinationLangchainCreateRequest() *shared.DestinationLangchainCreateRequest { - var embedding shared.DestinationLangchainEmbedding - var destinationLangchainOpenAI *shared.DestinationLangchainOpenAI - if r.Configuration.Embedding.OpenAI != nil { - openaiKey := r.Configuration.Embedding.OpenAI.OpenaiKey.ValueString() - destinationLangchainOpenAI = &shared.DestinationLangchainOpenAI{ - OpenaiKey: openaiKey, - } - } - if destinationLangchainOpenAI != nil { - embedding = shared.DestinationLangchainEmbedding{ - DestinationLangchainOpenAI: destinationLangchainOpenAI, - } - } - var destinationLangchainFake *shared.DestinationLangchainFake - if r.Configuration.Embedding.Fake != nil { - destinationLangchainFake = &shared.DestinationLangchainFake{} - } - if destinationLangchainFake != nil { - embedding = shared.DestinationLangchainEmbedding{ - DestinationLangchainFake: destinationLangchainFake, - } - } - var indexing shared.DestinationLangchainIndexing - var destinationLangchainPinecone *shared.DestinationLangchainPinecone - if r.Configuration.Indexing.Pinecone != nil { - index := r.Configuration.Indexing.Pinecone.Index.ValueString() - pineconeEnvironment := r.Configuration.Indexing.Pinecone.PineconeEnvironment.ValueString() - pineconeKey := r.Configuration.Indexing.Pinecone.PineconeKey.ValueString() - destinationLangchainPinecone = &shared.DestinationLangchainPinecone{ - Index: index, - PineconeEnvironment: pineconeEnvironment, - PineconeKey: pineconeKey, - } - } - if destinationLangchainPinecone != nil { - indexing = shared.DestinationLangchainIndexing{ - DestinationLangchainPinecone: destinationLangchainPinecone, - } - } - var destinationLangchainDocArrayHnswSearch *shared.DestinationLangchainDocArrayHnswSearch - if r.Configuration.Indexing.DocArrayHnswSearch != nil { - destinationPath := r.Configuration.Indexing.DocArrayHnswSearch.DestinationPath.ValueString() - destinationLangchainDocArrayHnswSearch = &shared.DestinationLangchainDocArrayHnswSearch{ - DestinationPath: destinationPath, - } - } - if destinationLangchainDocArrayHnswSearch != nil { - indexing = shared.DestinationLangchainIndexing{ - DestinationLangchainDocArrayHnswSearch: destinationLangchainDocArrayHnswSearch, - } - } - var destinationLangchainChromaLocalPersistance *shared.DestinationLangchainChromaLocalPersistance - if r.Configuration.Indexing.ChromaLocalPersistance != nil { - collectionName := new(string) - if !r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.IsUnknown() && !r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.IsNull() { - *collectionName = r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.ValueString() - } else { - collectionName = nil - } - destinationPath1 := r.Configuration.Indexing.ChromaLocalPersistance.DestinationPath.ValueString() - destinationLangchainChromaLocalPersistance = &shared.DestinationLangchainChromaLocalPersistance{ - CollectionName: collectionName, - DestinationPath: destinationPath1, - } - } - if destinationLangchainChromaLocalPersistance != nil { - indexing = shared.DestinationLangchainIndexing{ - DestinationLangchainChromaLocalPersistance: destinationLangchainChromaLocalPersistance, - } - } - chunkOverlap := new(int64) - if !r.Configuration.Processing.ChunkOverlap.IsUnknown() && !r.Configuration.Processing.ChunkOverlap.IsNull() { - *chunkOverlap = r.Configuration.Processing.ChunkOverlap.ValueInt64() - } else { - chunkOverlap = nil - } - chunkSize := r.Configuration.Processing.ChunkSize.ValueInt64() - var textFields []string = []string{} - for _, textFieldsItem := range r.Configuration.Processing.TextFields { - textFields = append(textFields, textFieldsItem.ValueString()) - } - processing := shared.DestinationLangchainProcessingConfigModel{ - ChunkOverlap: chunkOverlap, - ChunkSize: chunkSize, - TextFields: textFields, - } - configuration := shared.DestinationLangchain{ - Embedding: embedding, - Indexing: indexing, - Processing: processing, - } - definitionID := new(string) - if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { - *definitionID = r.DefinitionID.ValueString() - } else { - definitionID = nil - } - name := r.Name.ValueString() - workspaceID := r.WorkspaceID.ValueString() - out := shared.DestinationLangchainCreateRequest{ - Configuration: configuration, - DefinitionID: definitionID, - Name: name, - WorkspaceID: workspaceID, - } - return &out -} - -func (r *DestinationLangchainResourceModel) RefreshFromSharedDestinationResponse(resp *shared.DestinationResponse) { - if resp != nil { - r.DestinationID = types.StringValue(resp.DestinationID) - r.DestinationType = types.StringValue(resp.DestinationType) - r.Name = types.StringValue(resp.Name) - r.WorkspaceID = types.StringValue(resp.WorkspaceID) - } -} - -func (r *DestinationLangchainResourceModel) ToSharedDestinationLangchainPutRequest() *shared.DestinationLangchainPutRequest { - var embedding shared.DestinationLangchainUpdateEmbedding - var destinationLangchainUpdateOpenAI *shared.DestinationLangchainUpdateOpenAI - if r.Configuration.Embedding.OpenAI != nil { - openaiKey := r.Configuration.Embedding.OpenAI.OpenaiKey.ValueString() - destinationLangchainUpdateOpenAI = &shared.DestinationLangchainUpdateOpenAI{ - OpenaiKey: openaiKey, - } - } - if destinationLangchainUpdateOpenAI != nil { - embedding = shared.DestinationLangchainUpdateEmbedding{ - DestinationLangchainUpdateOpenAI: destinationLangchainUpdateOpenAI, - } - } - var destinationLangchainUpdateFake *shared.DestinationLangchainUpdateFake - if r.Configuration.Embedding.Fake != nil { - destinationLangchainUpdateFake = &shared.DestinationLangchainUpdateFake{} - } - if destinationLangchainUpdateFake != nil { - embedding = shared.DestinationLangchainUpdateEmbedding{ - DestinationLangchainUpdateFake: destinationLangchainUpdateFake, - } - } - var indexing shared.DestinationLangchainUpdateIndexing - var destinationLangchainUpdatePinecone *shared.DestinationLangchainUpdatePinecone - if r.Configuration.Indexing.Pinecone != nil { - index := r.Configuration.Indexing.Pinecone.Index.ValueString() - pineconeEnvironment := r.Configuration.Indexing.Pinecone.PineconeEnvironment.ValueString() - pineconeKey := r.Configuration.Indexing.Pinecone.PineconeKey.ValueString() - destinationLangchainUpdatePinecone = &shared.DestinationLangchainUpdatePinecone{ - Index: index, - PineconeEnvironment: pineconeEnvironment, - PineconeKey: pineconeKey, - } - } - if destinationLangchainUpdatePinecone != nil { - indexing = shared.DestinationLangchainUpdateIndexing{ - DestinationLangchainUpdatePinecone: destinationLangchainUpdatePinecone, - } - } - var docArrayHnswSearch *shared.DocArrayHnswSearch - if r.Configuration.Indexing.DocArrayHnswSearch != nil { - destinationPath := r.Configuration.Indexing.DocArrayHnswSearch.DestinationPath.ValueString() - docArrayHnswSearch = &shared.DocArrayHnswSearch{ - DestinationPath: destinationPath, - } - } - if docArrayHnswSearch != nil { - indexing = shared.DestinationLangchainUpdateIndexing{ - DocArrayHnswSearch: docArrayHnswSearch, - } - } - var chromaLocalPersistance *shared.ChromaLocalPersistance - if r.Configuration.Indexing.ChromaLocalPersistance != nil { - collectionName := new(string) - if !r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.IsUnknown() && !r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.IsNull() { - *collectionName = r.Configuration.Indexing.ChromaLocalPersistance.CollectionName.ValueString() - } else { - collectionName = nil - } - destinationPath1 := r.Configuration.Indexing.ChromaLocalPersistance.DestinationPath.ValueString() - chromaLocalPersistance = &shared.ChromaLocalPersistance{ - CollectionName: collectionName, - DestinationPath: destinationPath1, - } - } - if chromaLocalPersistance != nil { - indexing = shared.DestinationLangchainUpdateIndexing{ - ChromaLocalPersistance: chromaLocalPersistance, - } - } - chunkOverlap := new(int64) - if !r.Configuration.Processing.ChunkOverlap.IsUnknown() && !r.Configuration.Processing.ChunkOverlap.IsNull() { - *chunkOverlap = r.Configuration.Processing.ChunkOverlap.ValueInt64() - } else { - chunkOverlap = nil - } - chunkSize := r.Configuration.Processing.ChunkSize.ValueInt64() - var textFields []string = []string{} - for _, textFieldsItem := range r.Configuration.Processing.TextFields { - textFields = append(textFields, textFieldsItem.ValueString()) - } - processing := shared.DestinationLangchainUpdateProcessingConfigModel{ - ChunkOverlap: chunkOverlap, - ChunkSize: chunkSize, - TextFields: textFields, - } - configuration := shared.DestinationLangchainUpdate{ - Embedding: embedding, - Indexing: indexing, - Processing: processing, - } - name := r.Name.ValueString() - workspaceID := r.WorkspaceID.ValueString() - out := shared.DestinationLangchainPutRequest{ - Configuration: configuration, - Name: name, - WorkspaceID: workspaceID, - } - return &out -} diff --git a/internal/provider/destination_redshift_resource.go b/internal/provider/destination_redshift_resource.go index 00b7b240c..88bf8d4e8 100644 --- a/internal/provider/destination_redshift_resource.go +++ b/internal/provider/destination_redshift_resource.go @@ -198,41 +198,6 @@ func (r *DestinationRedshiftResource) Schema(ctx context.Context, req resource.S Sensitive: true, Description: `This ID grants access to the above S3 staging bucket. Airbyte requires Read and Write permissions to the given bucket. See AWS docs on how to generate an access key ID and secret access key.`, }, - "encryption": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "aescbc_envelope_encryption": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "key_encrypting_key": schema.StringAttribute{ - Optional: true, - Sensitive: true, - Description: `The key, base64-encoded. Must be either 128, 192, or 256 bits. Leave blank to have Airbyte generate an ephemeral key for each sync.`, - }, - }, - Description: `Staging data will be encrypted using AES-CBC envelope encryption.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("no_encryption"), - }...), - }, - }, - "no_encryption": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{}, - Description: `Staging data will be stored in plaintext.`, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("aescbc_envelope_encryption"), - }...), - }, - }, - }, - Description: `How to encrypt the staging data`, - Validators: []validator.Object{ - validators.ExactlyOneChild(), - }, - }, "file_name_pattern": schema.StringAttribute{ Optional: true, Description: `The pattern allows you to set the file-name format for the S3 staging file(s)`, diff --git a/internal/provider/destination_redshift_resource_sdk.go b/internal/provider/destination_redshift_resource_sdk.go index 1c96310a4..8ed029320 100644 --- a/internal/provider/destination_redshift_resource_sdk.go +++ b/internal/provider/destination_redshift_resource_sdk.go @@ -110,35 +110,6 @@ func (r *DestinationRedshiftResourceModel) ToSharedDestinationRedshiftCreateRequ var destinationRedshiftAWSS3Staging *shared.DestinationRedshiftAWSS3Staging if r.Configuration.UploadingMethod.AWSS3Staging != nil { accessKeyID := r.Configuration.UploadingMethod.AWSS3Staging.AccessKeyID.ValueString() - var encryption *shared.DestinationRedshiftEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption != nil { - var destinationRedshiftNoEncryption *shared.DestinationRedshiftNoEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption.NoEncryption != nil { - destinationRedshiftNoEncryption = &shared.DestinationRedshiftNoEncryption{} - } - if destinationRedshiftNoEncryption != nil { - encryption = &shared.DestinationRedshiftEncryption{ - DestinationRedshiftNoEncryption: destinationRedshiftNoEncryption, - } - } - var destinationRedshiftAESCBCEnvelopeEncryption *shared.DestinationRedshiftAESCBCEnvelopeEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption != nil { - keyEncryptingKey := new(string) - if !r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.IsUnknown() && !r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.IsNull() { - *keyEncryptingKey = r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.ValueString() - } else { - keyEncryptingKey = nil - } - destinationRedshiftAESCBCEnvelopeEncryption = &shared.DestinationRedshiftAESCBCEnvelopeEncryption{ - KeyEncryptingKey: keyEncryptingKey, - } - } - if destinationRedshiftAESCBCEnvelopeEncryption != nil { - encryption = &shared.DestinationRedshiftEncryption{ - DestinationRedshiftAESCBCEnvelopeEncryption: destinationRedshiftAESCBCEnvelopeEncryption, - } - } - } fileNamePattern := new(string) if !r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.IsUnknown() && !r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.IsNull() { *fileNamePattern = r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.ValueString() @@ -167,7 +138,6 @@ func (r *DestinationRedshiftResourceModel) ToSharedDestinationRedshiftCreateRequ secretAccessKey := r.Configuration.UploadingMethod.AWSS3Staging.SecretAccessKey.ValueString() destinationRedshiftAWSS3Staging = &shared.DestinationRedshiftAWSS3Staging{ AccessKeyID: accessKeyID, - Encryption: encryption, FileNamePattern: fileNamePattern, PurgeStagingData: purgeStagingData, S3BucketName: s3BucketName, @@ -326,35 +296,6 @@ func (r *DestinationRedshiftResourceModel) ToSharedDestinationRedshiftPutRequest var awsS3Staging *shared.AWSS3Staging if r.Configuration.UploadingMethod.AWSS3Staging != nil { accessKeyID := r.Configuration.UploadingMethod.AWSS3Staging.AccessKeyID.ValueString() - var encryption *shared.DestinationRedshiftUpdateEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption != nil { - var noEncryption *shared.NoEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption.NoEncryption != nil { - noEncryption = &shared.NoEncryption{} - } - if noEncryption != nil { - encryption = &shared.DestinationRedshiftUpdateEncryption{ - NoEncryption: noEncryption, - } - } - var aesCBCEnvelopeEncryption *shared.AESCBCEnvelopeEncryption - if r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption != nil { - keyEncryptingKey := new(string) - if !r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.IsUnknown() && !r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.IsNull() { - *keyEncryptingKey = r.Configuration.UploadingMethod.AWSS3Staging.Encryption.AESCBCEnvelopeEncryption.KeyEncryptingKey.ValueString() - } else { - keyEncryptingKey = nil - } - aesCBCEnvelopeEncryption = &shared.AESCBCEnvelopeEncryption{ - KeyEncryptingKey: keyEncryptingKey, - } - } - if aesCBCEnvelopeEncryption != nil { - encryption = &shared.DestinationRedshiftUpdateEncryption{ - AESCBCEnvelopeEncryption: aesCBCEnvelopeEncryption, - } - } - } fileNamePattern := new(string) if !r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.IsUnknown() && !r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.IsNull() { *fileNamePattern = r.Configuration.UploadingMethod.AWSS3Staging.FileNamePattern.ValueString() @@ -383,7 +324,6 @@ func (r *DestinationRedshiftResourceModel) ToSharedDestinationRedshiftPutRequest secretAccessKey := r.Configuration.UploadingMethod.AWSS3Staging.SecretAccessKey.ValueString() awsS3Staging = &shared.AWSS3Staging{ AccessKeyID: accessKeyID, - Encryption: encryption, FileNamePattern: fileNamePattern, PurgeStagingData: purgeStagingData, S3BucketName: s3BucketName, diff --git a/internal/provider/destination_snowflake_resource.go b/internal/provider/destination_snowflake_resource.go index 5c1916f21..20738ae4b 100644 --- a/internal/provider/destination_snowflake_resource.go +++ b/internal/provider/destination_snowflake_resource.go @@ -177,7 +177,7 @@ func (r *DestinationSnowflakeResource) Schema(ctx context.Context, req resource. }, "warehouse": schema.StringAttribute{ Required: true, - Description: `Enter the name of the warehouse that you want to sync data into`, + Description: `Enter the name of the warehouse that you want to use as a compute cluster`, }, }, }, diff --git a/internal/provider/destination_snowflakecortex_resource.go b/internal/provider/destination_snowflakecortex_resource.go index 8b6900bb5..7812b7ea0 100644 --- a/internal/provider/destination_snowflakecortex_resource.go +++ b/internal/provider/destination_snowflakecortex_resource.go @@ -218,7 +218,7 @@ func (r *DestinationSnowflakeCortexResource) Schema(ctx context.Context, req res }, "warehouse": schema.StringAttribute{ Required: true, - Description: `Enter the name of the warehouse that you want to sync data into`, + Description: `Enter the name of the warehouse that you want to use as a compute cluster`, }, }, Description: `Snowflake can be used to store vector data and retrieve embeddings.`, diff --git a/internal/provider/provider.go b/internal/provider/provider.go index e0fe2251b..8e445bb7a 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -144,7 +144,6 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou NewDestinationFirestoreResource, NewDestinationGcsResource, NewDestinationGoogleSheetsResource, - NewDestinationLangchainResource, NewDestinationMilvusResource, NewDestinationMongodbResource, NewDestinationMssqlResource, @@ -189,6 +188,7 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou NewSourceCartResource, NewSourceChargebeeResource, NewSourceChartmogulResource, + NewSourceClazarResource, NewSourceClickhouseResource, NewSourceClickupAPIResource, NewSourceClockifyResource, @@ -200,6 +200,7 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou NewSourceConfluenceResource, NewSourceConvexResource, NewSourceCustomResource, + NewSourceDatadogResource, NewSourceDatascopeResource, NewSourceDelightedResource, NewSourceDixaResource, @@ -224,9 +225,9 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou NewSourceGitlabResource, NewSourceGlassfrogResource, NewSourceGnewsResource, + NewSourceGoldcastResource, NewSourceGoogleAdsResource, NewSourceGoogleAnalyticsDataAPIResource, - NewSourceGoogleAnalyticsV4ServiceAccountOnlyResource, NewSourceGoogleDirectoryResource, NewSourceGoogleDriveResource, NewSourceGooglePagespeedInsightsResource, @@ -296,7 +297,6 @@ func (p *AirbyteProvider) Resources(ctx context.Context) []func() resource.Resou NewSourcePosthogResource, NewSourcePostmarkappResource, NewSourcePrestashopResource, - NewSourcePunkAPIResource, NewSourcePypiResource, NewSourceQualarooResource, NewSourceRailzResource, @@ -385,7 +385,6 @@ func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.D NewDestinationFirestoreDataSource, NewDestinationGcsDataSource, NewDestinationGoogleSheetsDataSource, - NewDestinationLangchainDataSource, NewDestinationMilvusDataSource, NewDestinationMongodbDataSource, NewDestinationMssqlDataSource, @@ -430,6 +429,7 @@ func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.D NewSourceCartDataSource, NewSourceChargebeeDataSource, NewSourceChartmogulDataSource, + NewSourceClazarDataSource, NewSourceClickhouseDataSource, NewSourceClickupAPIDataSource, NewSourceClockifyDataSource, @@ -441,6 +441,7 @@ func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.D NewSourceConfluenceDataSource, NewSourceConvexDataSource, NewSourceCustomDataSource, + NewSourceDatadogDataSource, NewSourceDatascopeDataSource, NewSourceDelightedDataSource, NewSourceDixaDataSource, @@ -465,9 +466,9 @@ func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.D NewSourceGitlabDataSource, NewSourceGlassfrogDataSource, NewSourceGnewsDataSource, + NewSourceGoldcastDataSource, NewSourceGoogleAdsDataSource, NewSourceGoogleAnalyticsDataAPIDataSource, - NewSourceGoogleAnalyticsV4ServiceAccountOnlyDataSource, NewSourceGoogleDirectoryDataSource, NewSourceGoogleDriveDataSource, NewSourceGooglePagespeedInsightsDataSource, @@ -537,7 +538,6 @@ func (p *AirbyteProvider) DataSources(ctx context.Context) []func() datasource.D NewSourcePosthogDataSource, NewSourcePostmarkappDataSource, NewSourcePrestashopDataSource, - NewSourcePunkAPIDataSource, NewSourcePypiDataSource, NewSourceQualarooDataSource, NewSourceRailzDataSource, diff --git a/internal/provider/source_amazonsellerpartner_resource.go b/internal/provider/source_amazonsellerpartner_resource.go index 7216b0b01..854f95efc 100644 --- a/internal/provider/source_amazonsellerpartner_resource.go +++ b/internal/provider/source_amazonsellerpartner_resource.go @@ -146,7 +146,7 @@ func (r *SourceAmazonSellerPartnerResource) Schema(ctx context.Context, req reso }, "replication_start_date": schema.StringAttribute{ Optional: true, - Description: `UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided, the date 2 years ago from today will be used.`, + Description: `UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided or older than 2 years ago from today, the date 2 years ago from today will be used.`, Validators: []validator.String{ validators.IsRFC3339(), }, diff --git a/internal/provider/source_awscloudtrail_resource.go b/internal/provider/source_awscloudtrail_resource.go index c1813bd22..d62230d27 100644 --- a/internal/provider/source_awscloudtrail_resource.go +++ b/internal/provider/source_awscloudtrail_resource.go @@ -66,19 +66,37 @@ func (r *SourceAwsCloudtrailResource) Schema(ctx context.Context, req resource.S Description: `AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key.`, }, "aws_region_name": schema.StringAttribute{ - Required: true, - Description: `The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name.`, + Computed: true, + Optional: true, + Default: stringdefault.StaticString("us-east-1"), + Description: `The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name. Default: "us-east-1"`, }, "aws_secret_key": schema.StringAttribute{ Required: true, Sensitive: true, Description: `AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key.`, }, + "lookup_attributes_filter": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "attribute_key": schema.StringAttribute{ + Computed: true, + Optional: true, + Sensitive: true, + Default: stringdefault.StaticString("EventName"), + Description: `Default: "EventName"`, + }, + "attribute_value": schema.StringAttribute{ + Computed: true, + Optional: true, + Default: stringdefault.StaticString("ListInstanceAssociations"), + Description: `Default: "ListInstanceAssociations"`, + }, + }, + }, "start_date": schema.StringAttribute{ - Computed: true, Optional: true, - Default: stringdefault.StaticString("1970-01-01"), - Description: `The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD. Default: "1970-01-01"`, + Description: `The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD.`, Validators: []validator.String{ validators.IsValidDate(), }, diff --git a/internal/provider/source_awscloudtrail_resource_sdk.go b/internal/provider/source_awscloudtrail_resource_sdk.go index f75196b8e..ffca64da5 100644 --- a/internal/provider/source_awscloudtrail_resource_sdk.go +++ b/internal/provider/source_awscloudtrail_resource_sdk.go @@ -10,8 +10,32 @@ import ( func (r *SourceAwsCloudtrailResourceModel) ToSharedSourceAwsCloudtrailCreateRequest() *shared.SourceAwsCloudtrailCreateRequest { awsKeyID := r.Configuration.AwsKeyID.ValueString() - awsRegionName := r.Configuration.AwsRegionName.ValueString() + awsRegionName := new(string) + if !r.Configuration.AwsRegionName.IsUnknown() && !r.Configuration.AwsRegionName.IsNull() { + *awsRegionName = r.Configuration.AwsRegionName.ValueString() + } else { + awsRegionName = nil + } awsSecretKey := r.Configuration.AwsSecretKey.ValueString() + var lookupAttributesFilter *shared.SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody + if r.Configuration.LookupAttributesFilter != nil { + attributeKey := new(string) + if !r.Configuration.LookupAttributesFilter.AttributeKey.IsUnknown() && !r.Configuration.LookupAttributesFilter.AttributeKey.IsNull() { + *attributeKey = r.Configuration.LookupAttributesFilter.AttributeKey.ValueString() + } else { + attributeKey = nil + } + attributeValue := new(string) + if !r.Configuration.LookupAttributesFilter.AttributeValue.IsUnknown() && !r.Configuration.LookupAttributesFilter.AttributeValue.IsNull() { + *attributeValue = r.Configuration.LookupAttributesFilter.AttributeValue.ValueString() + } else { + attributeValue = nil + } + lookupAttributesFilter = &shared.SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody{ + AttributeKey: attributeKey, + AttributeValue: attributeValue, + } + } startDate := new(customTypes.Date) if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { startDate = customTypes.MustNewDateFromString(r.Configuration.StartDate.ValueString()) @@ -19,10 +43,11 @@ func (r *SourceAwsCloudtrailResourceModel) ToSharedSourceAwsCloudtrailCreateRequ startDate = nil } configuration := shared.SourceAwsCloudtrail{ - AwsKeyID: awsKeyID, - AwsRegionName: awsRegionName, - AwsSecretKey: awsSecretKey, - StartDate: startDate, + AwsKeyID: awsKeyID, + AwsRegionName: awsRegionName, + AwsSecretKey: awsSecretKey, + LookupAttributesFilter: lookupAttributesFilter, + StartDate: startDate, } definitionID := new(string) if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { @@ -59,8 +84,32 @@ func (r *SourceAwsCloudtrailResourceModel) RefreshFromSharedSourceResponse(resp func (r *SourceAwsCloudtrailResourceModel) ToSharedSourceAwsCloudtrailPutRequest() *shared.SourceAwsCloudtrailPutRequest { awsKeyID := r.Configuration.AwsKeyID.ValueString() - awsRegionName := r.Configuration.AwsRegionName.ValueString() + awsRegionName := new(string) + if !r.Configuration.AwsRegionName.IsUnknown() && !r.Configuration.AwsRegionName.IsNull() { + *awsRegionName = r.Configuration.AwsRegionName.ValueString() + } else { + awsRegionName = nil + } awsSecretKey := r.Configuration.AwsSecretKey.ValueString() + var lookupAttributesFilter *shared.FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody + if r.Configuration.LookupAttributesFilter != nil { + attributeKey := new(string) + if !r.Configuration.LookupAttributesFilter.AttributeKey.IsUnknown() && !r.Configuration.LookupAttributesFilter.AttributeKey.IsNull() { + *attributeKey = r.Configuration.LookupAttributesFilter.AttributeKey.ValueString() + } else { + attributeKey = nil + } + attributeValue := new(string) + if !r.Configuration.LookupAttributesFilter.AttributeValue.IsUnknown() && !r.Configuration.LookupAttributesFilter.AttributeValue.IsNull() { + *attributeValue = r.Configuration.LookupAttributesFilter.AttributeValue.ValueString() + } else { + attributeValue = nil + } + lookupAttributesFilter = &shared.FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody{ + AttributeKey: attributeKey, + AttributeValue: attributeValue, + } + } startDate := new(customTypes.Date) if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { startDate = customTypes.MustNewDateFromString(r.Configuration.StartDate.ValueString()) @@ -68,10 +117,11 @@ func (r *SourceAwsCloudtrailResourceModel) ToSharedSourceAwsCloudtrailPutRequest startDate = nil } configuration := shared.SourceAwsCloudtrailUpdate{ - AwsKeyID: awsKeyID, - AwsRegionName: awsRegionName, - AwsSecretKey: awsSecretKey, - StartDate: startDate, + AwsKeyID: awsKeyID, + AwsRegionName: awsRegionName, + AwsSecretKey: awsSecretKey, + LookupAttributesFilter: lookupAttributesFilter, + StartDate: startDate, } name := r.Name.ValueString() workspaceID := r.WorkspaceID.ValueString() diff --git a/internal/provider/source_googleanalyticsv4serviceaccountonly_data_source.go b/internal/provider/source_clazar_data_source.go similarity index 65% rename from internal/provider/source_googleanalyticsv4serviceaccountonly_data_source.go rename to internal/provider/source_clazar_data_source.go index a40ed54d1..c905a10fd 100644 --- a/internal/provider/source_googleanalyticsv4serviceaccountonly_data_source.go +++ b/internal/provider/source_clazar_data_source.go @@ -14,20 +14,20 @@ import ( ) // Ensure provider defined types fully satisfy framework interfaces. -var _ datasource.DataSource = &SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource{} -var _ datasource.DataSourceWithConfigure = &SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource{} +var _ datasource.DataSource = &SourceClazarDataSource{} +var _ datasource.DataSourceWithConfigure = &SourceClazarDataSource{} -func NewSourceGoogleAnalyticsV4ServiceAccountOnlyDataSource() datasource.DataSource { - return &SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource{} +func NewSourceClazarDataSource() datasource.DataSource { + return &SourceClazarDataSource{} } -// SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource is the data source implementation. -type SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource struct { +// SourceClazarDataSource is the data source implementation. +type SourceClazarDataSource struct { client *sdk.SDK } -// SourceGoogleAnalyticsV4ServiceAccountOnlyDataSourceModel describes the data model. -type SourceGoogleAnalyticsV4ServiceAccountOnlyDataSourceModel struct { +// SourceClazarDataSourceModel describes the data model. +type SourceClazarDataSourceModel struct { Configuration types.String `tfsdk:"configuration"` Name types.String `tfsdk:"name"` SourceID types.String `tfsdk:"source_id"` @@ -36,14 +36,14 @@ type SourceGoogleAnalyticsV4ServiceAccountOnlyDataSourceModel struct { } // Metadata returns the data source type name. -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_source_google_analytics_v4_service_account_only" +func (r *SourceClazarDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_clazar" } // Schema defines the schema for the data source. -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *SourceClazarDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "SourceGoogleAnalyticsV4ServiceAccountOnly DataSource", + MarkdownDescription: "SourceClazar DataSource", Attributes: map[string]schema.Attribute{ "configuration": schema.StringAttribute{ @@ -66,7 +66,7 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Schema(ctx context } } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *SourceClazarDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { return @@ -86,8 +86,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Configure(ctx cont r.client = client } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - var data *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSourceModel +func (r *SourceClazarDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data *SourceClazarDataSourceModel var item types.Object resp.Diagnostics.Append(req.Config.Get(ctx, &item)...) @@ -105,10 +105,10 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSource) Read(ctx context.C } sourceID := data.SourceID.ValueString() - request := operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ + request := operations.GetSourceClazarRequest{ SourceID: sourceID, } - res, err := r.client.Sources.GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request) + res, err := r.client.Sources.GetSourceClazar(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { diff --git a/internal/provider/source_googleanalyticsv4serviceaccountonly_data_source_sdk.go b/internal/provider/source_clazar_data_source_sdk.go similarity index 82% rename from internal/provider/source_googleanalyticsv4serviceaccountonly_data_source_sdk.go rename to internal/provider/source_clazar_data_source_sdk.go index 3b1d21247..1a271d52b 100644 --- a/internal/provider/source_googleanalyticsv4serviceaccountonly_data_source_sdk.go +++ b/internal/provider/source_clazar_data_source_sdk.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyDataSourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { +func (r *SourceClazarDataSourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { if resp != nil { configurationResult, _ := json.Marshal(resp.Configuration) r.Configuration = types.StringValue(string(configurationResult)) diff --git a/internal/provider/source_clazar_resource.go b/internal/provider/source_clazar_resource.go new file mode 100644 index 000000000..6269888bd --- /dev/null +++ b/internal/provider/source_clazar_resource.go @@ -0,0 +1,366 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package provider + +import ( + "context" + "fmt" + speakeasy_objectplanmodifier "github.com/airbytehq/terraform-provider-airbyte/internal/planmodifiers/objectplanmodifier" + speakeasy_stringplanmodifier "github.com/airbytehq/terraform-provider-airbyte/internal/planmodifiers/stringplanmodifier" + tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" +) + +// Ensure provider defined types fully satisfy framework interfaces. +var _ resource.Resource = &SourceClazarResource{} +var _ resource.ResourceWithImportState = &SourceClazarResource{} + +func NewSourceClazarResource() resource.Resource { + return &SourceClazarResource{} +} + +// SourceClazarResource defines the resource implementation. +type SourceClazarResource struct { + client *sdk.SDK +} + +// SourceClazarResourceModel describes the resource data model. +type SourceClazarResourceModel struct { + Configuration tfTypes.DestinationVectaraOAuth20Credentials `tfsdk:"configuration"` + DefinitionID types.String `tfsdk:"definition_id"` + Name types.String `tfsdk:"name"` + SecretID types.String `tfsdk:"secret_id"` + SourceID types.String `tfsdk:"source_id"` + SourceType types.String `tfsdk:"source_type"` + WorkspaceID types.String `tfsdk:"workspace_id"` +} + +func (r *SourceClazarResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_clazar" +} + +func (r *SourceClazarResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = schema.Schema{ + MarkdownDescription: "SourceClazar Resource", + Attributes: map[string]schema.Attribute{ + "configuration": schema.SingleNestedAttribute{ + PlanModifiers: []planmodifier.Object{ + speakeasy_objectplanmodifier.SuppressDiff(speakeasy_objectplanmodifier.ExplicitSuppress), + }, + Required: true, + Attributes: map[string]schema.Attribute{ + "client_id": schema.StringAttribute{ + Required: true, + }, + "client_secret": schema.StringAttribute{ + Required: true, + }, + }, + }, + "definition_id": schema.StringAttribute{ + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Optional: true, + Description: `The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. Requires replacement if changed. `, + }, + "name": schema.StringAttribute{ + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + Required: true, + Description: `Name of the source e.g. dev-mysql-instance.`, + }, + "secret_id": schema.StringAttribute{ + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplaceIfConfigured(), + }, + Optional: true, + Description: `Optional secretID obtained through the public API OAuth redirect flow. Requires replacement if changed. `, + }, + "source_id": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + }, + "source_type": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + }, + "workspace_id": schema.StringAttribute{ + PlanModifiers: []planmodifier.String{ + speakeasy_stringplanmodifier.SuppressDiff(speakeasy_stringplanmodifier.ExplicitSuppress), + }, + Required: true, + }, + }, + } +} + +func (r *SourceClazarResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + // Prevent panic if the provider has not been configured. + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*sdk.SDK) + + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected *sdk.SDK, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + + return + } + + r.client = client +} + +func (r *SourceClazarResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *SourceClazarResourceModel + var plan types.Object + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(plan.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + request := data.ToSharedSourceClazarCreateRequest() + res, err := r.client.Sources.CreateSourceClazar(ctx, request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if res.StatusCode != 200 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + if !(res.SourceResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) + return + } + data.RefreshFromSharedSourceResponse(res.SourceResponse) + refreshPlan(ctx, plan, &data, resp.Diagnostics) + sourceID := data.SourceID.ValueString() + request1 := operations.GetSourceClazarRequest{ + SourceID: sourceID, + } + res1, err := r.client.Sources.GetSourceClazar(ctx, request1) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res1 != nil && res1.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res1.RawResponse)) + } + return + } + if res1 == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res1)) + return + } + if res1.StatusCode != 200 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res1.StatusCode), debugResponse(res1.RawResponse)) + return + } + if !(res1.SourceResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res1.RawResponse)) + return + } + data.RefreshFromSharedSourceResponse(res1.SourceResponse) + refreshPlan(ctx, plan, &data, resp.Diagnostics) + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *SourceClazarResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *SourceClazarResourceModel + var item types.Object + + resp.Diagnostics.Append(req.State.Get(ctx, &item)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + sourceID := data.SourceID.ValueString() + request := operations.GetSourceClazarRequest{ + SourceID: sourceID, + } + res, err := r.client.Sources.GetSourceClazar(ctx, request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if res.StatusCode == 404 { + resp.State.RemoveResource(ctx) + return + } + if res.StatusCode != 200 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + if !(res.SourceResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) + return + } + data.RefreshFromSharedSourceResponse(res.SourceResponse) + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *SourceClazarResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *SourceClazarResourceModel + var plan types.Object + + resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) + if resp.Diagnostics.HasError() { + return + } + + merge(ctx, req, resp, &data) + if resp.Diagnostics.HasError() { + return + } + + sourceClazarPutRequest := data.ToSharedSourceClazarPutRequest() + sourceID := data.SourceID.ValueString() + request := operations.PutSourceClazarRequest{ + SourceClazarPutRequest: sourceClazarPutRequest, + SourceID: sourceID, + } + res, err := r.client.Sources.PutSourceClazar(ctx, request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if fmt.Sprintf("%v", res.StatusCode)[0] != '2' { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + refreshPlan(ctx, plan, &data, resp.Diagnostics) + sourceId1 := data.SourceID.ValueString() + request1 := operations.GetSourceClazarRequest{ + SourceID: sourceId1, + } + res1, err := r.client.Sources.GetSourceClazar(ctx, request1) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res1 != nil && res1.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res1.RawResponse)) + } + return + } + if res1 == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res1)) + return + } + if res1.StatusCode != 200 { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res1.StatusCode), debugResponse(res1.RawResponse)) + return + } + if !(res1.SourceResponse != nil) { + resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res1.RawResponse)) + return + } + data.RefreshFromSharedSourceResponse(res1.SourceResponse) + refreshPlan(ctx, plan, &data, resp.Diagnostics) + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *SourceClazarResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *SourceClazarResourceModel + var item types.Object + + resp.Diagnostics.Append(req.State.Get(ctx, &item)...) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(item.As(ctx, &data, basetypes.ObjectAsOptions{ + UnhandledNullAsEmpty: true, + UnhandledUnknownAsEmpty: true, + })...) + + if resp.Diagnostics.HasError() { + return + } + + sourceID := data.SourceID.ValueString() + request := operations.DeleteSourceClazarRequest{ + SourceID: sourceID, + } + res, err := r.client.Sources.DeleteSourceClazar(ctx, request) + if err != nil { + resp.Diagnostics.AddError("failure to invoke API", err.Error()) + if res != nil && res.RawResponse != nil { + resp.Diagnostics.AddError("unexpected http request/response", debugResponse(res.RawResponse)) + } + return + } + if res == nil { + resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res)) + return + } + if fmt.Sprintf("%v", res.StatusCode)[0] != '2' { + resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) + return + } + +} + +func (r *SourceClazarResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("source_id"), req.ID)...) +} diff --git a/internal/provider/source_punkapi_resource_sdk.go b/internal/provider/source_clazar_resource_sdk.go similarity index 50% rename from internal/provider/source_punkapi_resource_sdk.go rename to internal/provider/source_clazar_resource_sdk.go index 8948185fd..04fafc5b2 100644 --- a/internal/provider/source_punkapi_resource_sdk.go +++ b/internal/provider/source_clazar_resource_sdk.go @@ -7,19 +7,12 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -func (r *SourcePunkAPIResourceModel) ToSharedSourcePunkAPICreateRequest() *shared.SourcePunkAPICreateRequest { - brewedAfter := r.Configuration.BrewedAfter.ValueString() - brewedBefore := r.Configuration.BrewedBefore.ValueString() - id := new(string) - if !r.Configuration.ID.IsUnknown() && !r.Configuration.ID.IsNull() { - *id = r.Configuration.ID.ValueString() - } else { - id = nil - } - configuration := shared.SourcePunkAPI{ - BrewedAfter: brewedAfter, - BrewedBefore: brewedBefore, - ID: id, +func (r *SourceClazarResourceModel) ToSharedSourceClazarCreateRequest() *shared.SourceClazarCreateRequest { + clientID := r.Configuration.ClientID.ValueString() + clientSecret := r.Configuration.ClientSecret.ValueString() + configuration := shared.SourceClazar{ + ClientID: clientID, + ClientSecret: clientSecret, } definitionID := new(string) if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { @@ -35,7 +28,7 @@ func (r *SourcePunkAPIResourceModel) ToSharedSourcePunkAPICreateRequest() *share secretID = nil } workspaceID := r.WorkspaceID.ValueString() - out := shared.SourcePunkAPICreateRequest{ + out := shared.SourceClazarCreateRequest{ Configuration: configuration, DefinitionID: definitionID, Name: name, @@ -45,7 +38,7 @@ func (r *SourcePunkAPIResourceModel) ToSharedSourcePunkAPICreateRequest() *share return &out } -func (r *SourcePunkAPIResourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { +func (r *SourceClazarResourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { if resp != nil { r.Name = types.StringValue(resp.Name) r.SourceID = types.StringValue(resp.SourceID) @@ -54,23 +47,16 @@ func (r *SourcePunkAPIResourceModel) RefreshFromSharedSourceResponse(resp *share } } -func (r *SourcePunkAPIResourceModel) ToSharedSourcePunkAPIPutRequest() *shared.SourcePunkAPIPutRequest { - brewedAfter := r.Configuration.BrewedAfter.ValueString() - brewedBefore := r.Configuration.BrewedBefore.ValueString() - id := new(string) - if !r.Configuration.ID.IsUnknown() && !r.Configuration.ID.IsNull() { - *id = r.Configuration.ID.ValueString() - } else { - id = nil - } - configuration := shared.SourcePunkAPIUpdate{ - BrewedAfter: brewedAfter, - BrewedBefore: brewedBefore, - ID: id, +func (r *SourceClazarResourceModel) ToSharedSourceClazarPutRequest() *shared.SourceClazarPutRequest { + clientID := r.Configuration.ClientID.ValueString() + clientSecret := r.Configuration.ClientSecret.ValueString() + configuration := shared.SourceClazarUpdate{ + ClientID: clientID, + ClientSecret: clientSecret, } name := r.Name.ValueString() workspaceID := r.WorkspaceID.ValueString() - out := shared.SourcePunkAPIPutRequest{ + out := shared.SourceClazarPutRequest{ Configuration: configuration, Name: name, WorkspaceID: workspaceID, diff --git a/internal/provider/source_punkapi_data_source.go b/internal/provider/source_datadog_data_source.go similarity index 78% rename from internal/provider/source_punkapi_data_source.go rename to internal/provider/source_datadog_data_source.go index 017c25811..1ef35c65f 100644 --- a/internal/provider/source_punkapi_data_source.go +++ b/internal/provider/source_datadog_data_source.go @@ -14,20 +14,20 @@ import ( ) // Ensure provider defined types fully satisfy framework interfaces. -var _ datasource.DataSource = &SourcePunkAPIDataSource{} -var _ datasource.DataSourceWithConfigure = &SourcePunkAPIDataSource{} +var _ datasource.DataSource = &SourceDatadogDataSource{} +var _ datasource.DataSourceWithConfigure = &SourceDatadogDataSource{} -func NewSourcePunkAPIDataSource() datasource.DataSource { - return &SourcePunkAPIDataSource{} +func NewSourceDatadogDataSource() datasource.DataSource { + return &SourceDatadogDataSource{} } -// SourcePunkAPIDataSource is the data source implementation. -type SourcePunkAPIDataSource struct { +// SourceDatadogDataSource is the data source implementation. +type SourceDatadogDataSource struct { client *sdk.SDK } -// SourcePunkAPIDataSourceModel describes the data model. -type SourcePunkAPIDataSourceModel struct { +// SourceDatadogDataSourceModel describes the data model. +type SourceDatadogDataSourceModel struct { Configuration types.String `tfsdk:"configuration"` Name types.String `tfsdk:"name"` SourceID types.String `tfsdk:"source_id"` @@ -36,14 +36,14 @@ type SourcePunkAPIDataSourceModel struct { } // Metadata returns the data source type name. -func (r *SourcePunkAPIDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_source_punk_api" +func (r *SourceDatadogDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_datadog" } // Schema defines the schema for the data source. -func (r *SourcePunkAPIDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *SourceDatadogDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "SourcePunkAPI DataSource", + MarkdownDescription: "SourceDatadog DataSource", Attributes: map[string]schema.Attribute{ "configuration": schema.StringAttribute{ @@ -66,7 +66,7 @@ func (r *SourcePunkAPIDataSource) Schema(ctx context.Context, req datasource.Sch } } -func (r *SourcePunkAPIDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *SourceDatadogDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { return @@ -86,8 +86,8 @@ func (r *SourcePunkAPIDataSource) Configure(ctx context.Context, req datasource. r.client = client } -func (r *SourcePunkAPIDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - var data *SourcePunkAPIDataSourceModel +func (r *SourceDatadogDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data *SourceDatadogDataSourceModel var item types.Object resp.Diagnostics.Append(req.Config.Get(ctx, &item)...) @@ -105,10 +105,10 @@ func (r *SourcePunkAPIDataSource) Read(ctx context.Context, req datasource.ReadR } sourceID := data.SourceID.ValueString() - request := operations.GetSourcePunkAPIRequest{ + request := operations.GetSourceDatadogRequest{ SourceID: sourceID, } - res, err := r.client.Sources.GetSourcePunkAPI(ctx, request) + res, err := r.client.Sources.GetSourceDatadog(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { diff --git a/internal/provider/source_punkapi_data_source_sdk.go b/internal/provider/source_datadog_data_source_sdk.go similarity index 90% rename from internal/provider/source_punkapi_data_source_sdk.go rename to internal/provider/source_datadog_data_source_sdk.go index 0ff63c7d4..8384a4fbd 100644 --- a/internal/provider/source_punkapi_data_source_sdk.go +++ b/internal/provider/source_datadog_data_source_sdk.go @@ -8,7 +8,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -func (r *SourcePunkAPIDataSourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { +func (r *SourceDatadogDataSourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { if resp != nil { configurationResult, _ := json.Marshal(resp.Configuration) r.Configuration = types.StringValue(string(configurationResult)) diff --git a/internal/provider/source_googleanalyticsv4serviceaccountonly_resource.go b/internal/provider/source_datadog_resource.go similarity index 61% rename from internal/provider/source_googleanalyticsv4serviceaccountonly_resource.go rename to internal/provider/source_datadog_resource.go index d4c464b2a..43737d3b7 100644 --- a/internal/provider/source_googleanalyticsv4serviceaccountonly_resource.go +++ b/internal/provider/source_datadog_resource.go @@ -10,12 +10,13 @@ import ( tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" - "github.com/airbytehq/terraform-provider-airbyte/internal/validators" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" @@ -23,36 +24,36 @@ import ( ) // Ensure provider defined types fully satisfy framework interfaces. -var _ resource.Resource = &SourceGoogleAnalyticsV4ServiceAccountOnlyResource{} -var _ resource.ResourceWithImportState = &SourceGoogleAnalyticsV4ServiceAccountOnlyResource{} +var _ resource.Resource = &SourceDatadogResource{} +var _ resource.ResourceWithImportState = &SourceDatadogResource{} -func NewSourceGoogleAnalyticsV4ServiceAccountOnlyResource() resource.Resource { - return &SourceGoogleAnalyticsV4ServiceAccountOnlyResource{} +func NewSourceDatadogResource() resource.Resource { + return &SourceDatadogResource{} } -// SourceGoogleAnalyticsV4ServiceAccountOnlyResource defines the resource implementation. -type SourceGoogleAnalyticsV4ServiceAccountOnlyResource struct { +// SourceDatadogResource defines the resource implementation. +type SourceDatadogResource struct { client *sdk.SDK } -// SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel describes the resource data model. -type SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel struct { - Configuration tfTypes.SourceGoogleAnalyticsV4ServiceAccountOnly `tfsdk:"configuration"` - DefinitionID types.String `tfsdk:"definition_id"` - Name types.String `tfsdk:"name"` - SecretID types.String `tfsdk:"secret_id"` - SourceID types.String `tfsdk:"source_id"` - SourceType types.String `tfsdk:"source_type"` - WorkspaceID types.String `tfsdk:"workspace_id"` +// SourceDatadogResourceModel describes the resource data model. +type SourceDatadogResourceModel struct { + Configuration tfTypes.SourceDatadog `tfsdk:"configuration"` + DefinitionID types.String `tfsdk:"definition_id"` + Name types.String `tfsdk:"name"` + SecretID types.String `tfsdk:"secret_id"` + SourceID types.String `tfsdk:"source_id"` + SourceType types.String `tfsdk:"source_type"` + WorkspaceID types.String `tfsdk:"workspace_id"` } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_source_google_analytics_v4_service_account_only" +func (r *SourceDatadogResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_datadog" } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { +func (r *SourceDatadogResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "SourceGoogleAnalyticsV4ServiceAccountOnly Resource", + MarkdownDescription: "SourceDatadog Resource", Attributes: map[string]schema.Attribute{ "configuration": schema.SingleNestedAttribute{ PlanModifiers: []planmodifier.Object{ @@ -60,51 +61,76 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Schema(ctx context.C }, Required: true, Attributes: map[string]schema.Attribute{ - "credentials": schema.SingleNestedAttribute{ + "api_key": schema.StringAttribute{ + Required: true, + Sensitive: true, + Description: `Datadog API key`, + }, + "application_key": schema.StringAttribute{ + Required: true, + Sensitive: true, + Description: `Datadog application key`, + }, + "end_date": schema.StringAttribute{ + Optional: true, + Description: `UTC date and time in the format 2017-01-25T00:00:00Z. Data after this date will not be replicated. An empty value will represent the current datetime for each execution. This just applies to Incremental syncs.`, + }, + "max_records_per_request": schema.Int64Attribute{ + Computed: true, + Optional: true, + Default: int64default.StaticInt64(5000), + Description: `Maximum number of records to collect per request. Default: 5000`, + }, + "queries": schema.ListNestedAttribute{ Optional: true, - Attributes: map[string]schema.Attribute{ - "service_account_key_authentication": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "credentials_json": schema.StringAttribute{ - Required: true, - Description: `The JSON key of the service account to use for authorization`, + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "data_source": schema.StringAttribute{ + Required: true, + Description: `A data source that is powered by the platform. must be one of ["metrics", "cloud_cost", "logs", "rum"]`, + Validators: []validator.String{ + stringvalidator.OneOf( + "metrics", + "cloud_cost", + "logs", + "rum", + ), }, }, + "name": schema.StringAttribute{ + Required: true, + Description: `The variable name for use in queries.`, + }, + "query": schema.StringAttribute{ + Required: true, + Description: `A classic query string.`, + }, }, }, - Description: `Credentials for the service`, - Validators: []validator.Object{ - validators.ExactlyOneChild(), - }, + Description: `List of queries to be run and used as inputs.`, }, - "custom_reports": schema.StringAttribute{ + "query": schema.StringAttribute{ Optional: true, - Description: `A JSON array describing the custom reports you want to sync from Google Analytics. See the docs for more information about the exact format you can use to fill out this field.`, + Description: `The search query. This just applies to Incremental syncs. If empty, it'll collect all logs.`, }, - "end_date": schema.StringAttribute{ + "site": schema.StringAttribute{ + Computed: true, Optional: true, - Description: `The date in the format YYYY-MM-DD. Any data after this date will not be replicated.`, + Default: stringdefault.StaticString("datadoghq.com"), + Description: `The site where Datadog data resides in. must be one of ["datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ddog-gov.com"]; Default: "datadoghq.com"`, Validators: []validator.String{ - validators.IsValidDate(), + stringvalidator.OneOf( + "datadoghq.com", + "us3.datadoghq.com", + "us5.datadoghq.com", + "datadoghq.eu", + "ddog-gov.com", + ), }, }, "start_date": schema.StringAttribute{ - Required: true, - Description: `The date in the format YYYY-MM-DD. Any data before this date will not be replicated.`, - Validators: []validator.String{ - validators.IsValidDate(), - }, - }, - "view_id": schema.StringAttribute{ - Required: true, - Description: `The ID for the Google Analytics View you want to fetch data from. This can be found from the Google Analytics Account Explorer.`, - }, - "window_in_days": schema.Int64Attribute{ - Computed: true, Optional: true, - Default: int64default.StaticInt64(1), - Description: `The time increment used by the connector when requesting data from the Google Analytics API. More information is available in the the docs. The bigger this value is, the faster the sync will be, but the more likely that sampling will be applied to your data, potentially causing inaccuracies in the returned results. We recommend setting this to 1 unless you have a hard requirement to make the sync faster at the expense of accuracy. The minimum allowed value for this field is 1, and the maximum is 364. . Default: 1`, + Description: `UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. This just applies to Incremental syncs.`, }, }, }, @@ -151,7 +177,7 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Schema(ctx context.C } } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { +func (r *SourceDatadogResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { return @@ -171,8 +197,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Configure(ctx contex r.client = client } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - var data *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel +func (r *SourceDatadogResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *SourceDatadogResourceModel var plan types.Object resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) @@ -189,8 +215,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Create(ctx context.C return } - request := data.ToSharedSourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest() - res, err := r.client.Sources.CreateSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request) + request := data.ToSharedSourceDatadogCreateRequest() + res, err := r.client.Sources.CreateSourceDatadog(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -213,10 +239,10 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Create(ctx context.C data.RefreshFromSharedSourceResponse(res.SourceResponse) refreshPlan(ctx, plan, &data, resp.Diagnostics) sourceID := data.SourceID.ValueString() - request1 := operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ + request1 := operations.GetSourceDatadogRequest{ SourceID: sourceID, } - res1, err := r.client.Sources.GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request1) + res1, err := r.client.Sources.GetSourceDatadog(ctx, request1) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res1 != nil && res1.RawResponse != nil { @@ -243,8 +269,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Create(ctx context.C resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - var data *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel +func (r *SourceDatadogResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *SourceDatadogResourceModel var item types.Object resp.Diagnostics.Append(req.State.Get(ctx, &item)...) @@ -262,10 +288,10 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Read(ctx context.Con } sourceID := data.SourceID.ValueString() - request := operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ + request := operations.GetSourceDatadogRequest{ SourceID: sourceID, } - res, err := r.client.Sources.GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request) + res, err := r.client.Sources.GetSourceDatadog(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -295,8 +321,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Read(ctx context.Con resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - var data *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel +func (r *SourceDatadogResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *SourceDatadogResourceModel var plan types.Object resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) @@ -309,13 +335,13 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Update(ctx context.C return } - sourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest := data.ToSharedSourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest() + sourceDatadogPutRequest := data.ToSharedSourceDatadogPutRequest() sourceID := data.SourceID.ValueString() - request := operations.PutSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ - SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest: sourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest, - SourceID: sourceID, + request := operations.PutSourceDatadogRequest{ + SourceDatadogPutRequest: sourceDatadogPutRequest, + SourceID: sourceID, } - res, err := r.client.Sources.PutSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request) + res, err := r.client.Sources.PutSourceDatadog(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -333,10 +359,10 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Update(ctx context.C } refreshPlan(ctx, plan, &data, resp.Diagnostics) sourceId1 := data.SourceID.ValueString() - request1 := operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ + request1 := operations.GetSourceDatadogRequest{ SourceID: sourceId1, } - res1, err := r.client.Sources.GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request1) + res1, err := r.client.Sources.GetSourceDatadog(ctx, request1) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res1 != nil && res1.RawResponse != nil { @@ -363,8 +389,8 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Update(ctx context.C resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - var data *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel +func (r *SourceDatadogResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *SourceDatadogResourceModel var item types.Object resp.Diagnostics.Append(req.State.Get(ctx, &item)...) @@ -382,10 +408,10 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Delete(ctx context.C } sourceID := data.SourceID.ValueString() - request := operations.DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyRequest{ + request := operations.DeleteSourceDatadogRequest{ SourceID: sourceID, } - res, err := r.client.Sources.DeleteSourceGoogleAnalyticsV4ServiceAccountOnly(ctx, request) + res, err := r.client.Sources.DeleteSourceDatadog(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -404,6 +430,6 @@ func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) Delete(ctx context.C } -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { +func (r *SourceDatadogResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("source_id"), req.ID)...) } diff --git a/internal/provider/source_datadog_resource_sdk.go b/internal/provider/source_datadog_resource_sdk.go new file mode 100644 index 000000000..599946d74 --- /dev/null +++ b/internal/provider/source_datadog_resource_sdk.go @@ -0,0 +1,159 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package provider + +import ( + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +func (r *SourceDatadogResourceModel) ToSharedSourceDatadogCreateRequest() *shared.SourceDatadogCreateRequest { + apiKey := r.Configuration.APIKey.ValueString() + applicationKey := r.Configuration.ApplicationKey.ValueString() + endDate := new(string) + if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { + *endDate = r.Configuration.EndDate.ValueString() + } else { + endDate = nil + } + maxRecordsPerRequest := new(int64) + if !r.Configuration.MaxRecordsPerRequest.IsUnknown() && !r.Configuration.MaxRecordsPerRequest.IsNull() { + *maxRecordsPerRequest = r.Configuration.MaxRecordsPerRequest.ValueInt64() + } else { + maxRecordsPerRequest = nil + } + var queries []shared.SourceDatadogQueries = []shared.SourceDatadogQueries{} + for _, queriesItem := range r.Configuration.Queries { + dataSource := shared.SourceDatadogDataSource(queriesItem.DataSource.ValueString()) + name := queriesItem.Name.ValueString() + query := queriesItem.Query.ValueString() + queries = append(queries, shared.SourceDatadogQueries{ + DataSource: dataSource, + Name: name, + Query: query, + }) + } + query1 := new(string) + if !r.Configuration.Query.IsUnknown() && !r.Configuration.Query.IsNull() { + *query1 = r.Configuration.Query.ValueString() + } else { + query1 = nil + } + site := new(shared.SourceDatadogSite) + if !r.Configuration.Site.IsUnknown() && !r.Configuration.Site.IsNull() { + *site = shared.SourceDatadogSite(r.Configuration.Site.ValueString()) + } else { + site = nil + } + startDate := new(string) + if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { + *startDate = r.Configuration.StartDate.ValueString() + } else { + startDate = nil + } + configuration := shared.SourceDatadog{ + APIKey: apiKey, + ApplicationKey: applicationKey, + EndDate: endDate, + MaxRecordsPerRequest: maxRecordsPerRequest, + Queries: queries, + Query: query1, + Site: site, + StartDate: startDate, + } + definitionID := new(string) + if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { + *definitionID = r.DefinitionID.ValueString() + } else { + definitionID = nil + } + name1 := r.Name.ValueString() + secretID := new(string) + if !r.SecretID.IsUnknown() && !r.SecretID.IsNull() { + *secretID = r.SecretID.ValueString() + } else { + secretID = nil + } + workspaceID := r.WorkspaceID.ValueString() + out := shared.SourceDatadogCreateRequest{ + Configuration: configuration, + DefinitionID: definitionID, + Name: name1, + SecretID: secretID, + WorkspaceID: workspaceID, + } + return &out +} + +func (r *SourceDatadogResourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { + if resp != nil { + r.Name = types.StringValue(resp.Name) + r.SourceID = types.StringValue(resp.SourceID) + r.SourceType = types.StringValue(resp.SourceType) + r.WorkspaceID = types.StringValue(resp.WorkspaceID) + } +} + +func (r *SourceDatadogResourceModel) ToSharedSourceDatadogPutRequest() *shared.SourceDatadogPutRequest { + apiKey := r.Configuration.APIKey.ValueString() + applicationKey := r.Configuration.ApplicationKey.ValueString() + endDate := new(string) + if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { + *endDate = r.Configuration.EndDate.ValueString() + } else { + endDate = nil + } + maxRecordsPerRequest := new(int64) + if !r.Configuration.MaxRecordsPerRequest.IsUnknown() && !r.Configuration.MaxRecordsPerRequest.IsNull() { + *maxRecordsPerRequest = r.Configuration.MaxRecordsPerRequest.ValueInt64() + } else { + maxRecordsPerRequest = nil + } + var queries []shared.Queries = []shared.Queries{} + for _, queriesItem := range r.Configuration.Queries { + dataSource := shared.SourceDatadogUpdateDataSource(queriesItem.DataSource.ValueString()) + name := queriesItem.Name.ValueString() + query := queriesItem.Query.ValueString() + queries = append(queries, shared.Queries{ + DataSource: dataSource, + Name: name, + Query: query, + }) + } + query1 := new(string) + if !r.Configuration.Query.IsUnknown() && !r.Configuration.Query.IsNull() { + *query1 = r.Configuration.Query.ValueString() + } else { + query1 = nil + } + site := new(shared.Site) + if !r.Configuration.Site.IsUnknown() && !r.Configuration.Site.IsNull() { + *site = shared.Site(r.Configuration.Site.ValueString()) + } else { + site = nil + } + startDate := new(string) + if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { + *startDate = r.Configuration.StartDate.ValueString() + } else { + startDate = nil + } + configuration := shared.SourceDatadogUpdate{ + APIKey: apiKey, + ApplicationKey: applicationKey, + EndDate: endDate, + MaxRecordsPerRequest: maxRecordsPerRequest, + Queries: queries, + Query: query1, + Site: site, + StartDate: startDate, + } + name1 := r.Name.ValueString() + workspaceID := r.WorkspaceID.ValueString() + out := shared.SourceDatadogPutRequest{ + Configuration: configuration, + Name: name1, + WorkspaceID: workspaceID, + } + return &out +} diff --git a/internal/provider/source_facebookmarketing_resource.go b/internal/provider/source_facebookmarketing_resource.go index cc4f3c674..9b1a7f05c 100644 --- a/internal/provider/source_facebookmarketing_resource.go +++ b/internal/provider/source_facebookmarketing_resource.go @@ -12,6 +12,7 @@ import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" "github.com/airbytehq/terraform-provider-airbyte/internal/validators" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/objectvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" @@ -107,6 +108,53 @@ func (r *SourceFacebookMarketingResource) Schema(ctx context.Context, req resour Optional: true, Description: `The Client Secret for your OAuth app`, }, + "credentials": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "authenticate_via_facebook_marketing_oauth": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "access_token": schema.StringAttribute{ + Optional: true, + Sensitive: true, + Description: `The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information.`, + }, + "client_id": schema.StringAttribute{ + Required: true, + Description: `Client ID for the Facebook Marketing API`, + }, + "client_secret": schema.StringAttribute{ + Required: true, + Description: `Client Secret for the Facebook Marketing API`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("service_account_key_authentication"), + }...), + }, + }, + "service_account_key_authentication": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "access_token": schema.StringAttribute{ + Required: true, + Sensitive: true, + Description: `The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information.`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("authenticate_via_facebook_marketing_oauth"), + }...), + }, + }, + }, + Description: `Credentials for connecting to the Facebook Marketing API`, + Validators: []validator.Object{ + validators.ExactlyOneChild(), + }, + }, "custom_insights": schema.ListNestedAttribute{ Optional: true, NestedObject: schema.NestedAttributeObject{ diff --git a/internal/provider/source_facebookmarketing_resource_sdk.go b/internal/provider/source_facebookmarketing_resource_sdk.go index 8f8c7302f..829d6e26c 100644 --- a/internal/provider/source_facebookmarketing_resource_sdk.go +++ b/internal/provider/source_facebookmarketing_resource_sdk.go @@ -49,6 +49,42 @@ func (r *SourceFacebookMarketingResourceModel) ToSharedSourceFacebookMarketingCr } else { clientSecret = nil } + var credentials *shared.SourceFacebookMarketingAuthentication + if r.Configuration.Credentials != nil { + var sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth *shared.SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth + if r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth != nil { + accessToken1 := new(string) + if !r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.IsNull() { + *accessToken1 = r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.ValueString() + } else { + accessToken1 = nil + } + clientId1 := r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.ClientID.ValueString() + clientSecret1 := r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.ClientSecret.ValueString() + sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth = &shared.SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth{ + AccessToken: accessToken1, + ClientID: clientId1, + ClientSecret: clientSecret1, + } + } + if sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth != nil { + credentials = &shared.SourceFacebookMarketingAuthentication{ + SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth: sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth, + } + } + var sourceFacebookMarketingServiceAccountKeyAuthentication *shared.SourceFacebookMarketingServiceAccountKeyAuthentication + if r.Configuration.Credentials.ServiceAccountKeyAuthentication != nil { + accessToken2 := r.Configuration.Credentials.ServiceAccountKeyAuthentication.AccessToken.ValueString() + sourceFacebookMarketingServiceAccountKeyAuthentication = &shared.SourceFacebookMarketingServiceAccountKeyAuthentication{ + AccessToken: accessToken2, + } + } + if sourceFacebookMarketingServiceAccountKeyAuthentication != nil { + credentials = &shared.SourceFacebookMarketingAuthentication{ + SourceFacebookMarketingServiceAccountKeyAuthentication: sourceFacebookMarketingServiceAccountKeyAuthentication, + } + } + } var customInsights []shared.SourceFacebookMarketingInsightConfig = []shared.SourceFacebookMarketingInsightConfig{} for _, customInsightsItem := range r.Configuration.CustomInsights { var actionBreakdowns []shared.SourceFacebookMarketingValidActionBreakdowns = []shared.SourceFacebookMarketingValidActionBreakdowns{} @@ -165,6 +201,7 @@ func (r *SourceFacebookMarketingResourceModel) ToSharedSourceFacebookMarketingCr CampaignStatuses: campaignStatuses, ClientID: clientID, ClientSecret: clientSecret, + Credentials: credentials, CustomInsights: customInsights, EndDate: endDate1, FetchThumbnailImages: fetchThumbnailImages, @@ -247,6 +284,42 @@ func (r *SourceFacebookMarketingResourceModel) ToSharedSourceFacebookMarketingPu } else { clientSecret = nil } + var credentials *shared.SourceFacebookMarketingUpdateAuthentication + if r.Configuration.Credentials != nil { + var authenticateViaFacebookMarketingOauth *shared.AuthenticateViaFacebookMarketingOauth + if r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth != nil { + accessToken1 := new(string) + if !r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.IsUnknown() && !r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.IsNull() { + *accessToken1 = r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.AccessToken.ValueString() + } else { + accessToken1 = nil + } + clientId1 := r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.ClientID.ValueString() + clientSecret1 := r.Configuration.Credentials.AuthenticateViaFacebookMarketingOauth.ClientSecret.ValueString() + authenticateViaFacebookMarketingOauth = &shared.AuthenticateViaFacebookMarketingOauth{ + AccessToken: accessToken1, + ClientID: clientId1, + ClientSecret: clientSecret1, + } + } + if authenticateViaFacebookMarketingOauth != nil { + credentials = &shared.SourceFacebookMarketingUpdateAuthentication{ + AuthenticateViaFacebookMarketingOauth: authenticateViaFacebookMarketingOauth, + } + } + var serviceAccountKeyAuthentication *shared.ServiceAccountKeyAuthentication + if r.Configuration.Credentials.ServiceAccountKeyAuthentication != nil { + accessToken2 := r.Configuration.Credentials.ServiceAccountKeyAuthentication.AccessToken.ValueString() + serviceAccountKeyAuthentication = &shared.ServiceAccountKeyAuthentication{ + AccessToken: accessToken2, + } + } + if serviceAccountKeyAuthentication != nil { + credentials = &shared.SourceFacebookMarketingUpdateAuthentication{ + ServiceAccountKeyAuthentication: serviceAccountKeyAuthentication, + } + } + } var customInsights []shared.InsightConfig = []shared.InsightConfig{} for _, customInsightsItem := range r.Configuration.CustomInsights { var actionBreakdowns []shared.ValidActionBreakdowns = []shared.ValidActionBreakdowns{} @@ -363,6 +436,7 @@ func (r *SourceFacebookMarketingResourceModel) ToSharedSourceFacebookMarketingPu CampaignStatuses: campaignStatuses, ClientID: clientID, ClientSecret: clientSecret, + Credentials: credentials, CustomInsights: customInsights, EndDate: endDate1, FetchThumbnailImages: fetchThumbnailImages, diff --git a/internal/provider/destination_langchain_data_source.go b/internal/provider/source_goldcast_data_source.go similarity index 57% rename from internal/provider/destination_langchain_data_source.go rename to internal/provider/source_goldcast_data_source.go index 0e2659833..2a1408b07 100644 --- a/internal/provider/destination_langchain_data_source.go +++ b/internal/provider/source_goldcast_data_source.go @@ -14,49 +14,49 @@ import ( ) // Ensure provider defined types fully satisfy framework interfaces. -var _ datasource.DataSource = &DestinationLangchainDataSource{} -var _ datasource.DataSourceWithConfigure = &DestinationLangchainDataSource{} +var _ datasource.DataSource = &SourceGoldcastDataSource{} +var _ datasource.DataSourceWithConfigure = &SourceGoldcastDataSource{} -func NewDestinationLangchainDataSource() datasource.DataSource { - return &DestinationLangchainDataSource{} +func NewSourceGoldcastDataSource() datasource.DataSource { + return &SourceGoldcastDataSource{} } -// DestinationLangchainDataSource is the data source implementation. -type DestinationLangchainDataSource struct { +// SourceGoldcastDataSource is the data source implementation. +type SourceGoldcastDataSource struct { client *sdk.SDK } -// DestinationLangchainDataSourceModel describes the data model. -type DestinationLangchainDataSourceModel struct { - Configuration types.String `tfsdk:"configuration"` - DestinationID types.String `tfsdk:"destination_id"` - DestinationType types.String `tfsdk:"destination_type"` - Name types.String `tfsdk:"name"` - WorkspaceID types.String `tfsdk:"workspace_id"` +// SourceGoldcastDataSourceModel describes the data model. +type SourceGoldcastDataSourceModel struct { + Configuration types.String `tfsdk:"configuration"` + Name types.String `tfsdk:"name"` + SourceID types.String `tfsdk:"source_id"` + SourceType types.String `tfsdk:"source_type"` + WorkspaceID types.String `tfsdk:"workspace_id"` } // Metadata returns the data source type name. -func (r *DestinationLangchainDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_destination_langchain" +func (r *SourceGoldcastDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_goldcast" } // Schema defines the schema for the data source. -func (r *DestinationLangchainDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { +func (r *SourceGoldcastDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "DestinationLangchain DataSource", + MarkdownDescription: "SourceGoldcast DataSource", Attributes: map[string]schema.Attribute{ "configuration": schema.StringAttribute{ Computed: true, - Description: `The values required to configure the destination. Parsed as JSON.`, + Description: `The values required to configure the source. Parsed as JSON.`, }, - "destination_id": schema.StringAttribute{ - Required: true, - }, - "destination_type": schema.StringAttribute{ + "name": schema.StringAttribute{ Computed: true, }, - "name": schema.StringAttribute{ + "source_id": schema.StringAttribute{ + Required: true, + }, + "source_type": schema.StringAttribute{ Computed: true, }, "workspace_id": schema.StringAttribute{ @@ -66,7 +66,7 @@ func (r *DestinationLangchainDataSource) Schema(ctx context.Context, req datasou } } -func (r *DestinationLangchainDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { +func (r *SourceGoldcastDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { return @@ -86,8 +86,8 @@ func (r *DestinationLangchainDataSource) Configure(ctx context.Context, req data r.client = client } -func (r *DestinationLangchainDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { - var data *DestinationLangchainDataSourceModel +func (r *SourceGoldcastDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data *SourceGoldcastDataSourceModel var item types.Object resp.Diagnostics.Append(req.Config.Get(ctx, &item)...) @@ -104,11 +104,11 @@ func (r *DestinationLangchainDataSource) Read(ctx context.Context, req datasourc return } - destinationID := data.DestinationID.ValueString() - request := operations.GetDestinationLangchainRequest{ - DestinationID: destinationID, + sourceID := data.SourceID.ValueString() + request := operations.GetSourceGoldcastRequest{ + SourceID: sourceID, } - res, err := r.client.Destinations.GetDestinationLangchain(ctx, request) + res, err := r.client.Sources.GetSourceGoldcast(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -128,11 +128,11 @@ func (r *DestinationLangchainDataSource) Read(ctx context.Context, req datasourc resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse)) return } - if !(res.DestinationResponse != nil) { + if !(res.SourceResponse != nil) { resp.Diagnostics.AddError("unexpected response from API. Got an unexpected response body", debugResponse(res.RawResponse)) return } - data.RefreshFromSharedDestinationResponse(res.DestinationResponse) + data.RefreshFromSharedSourceResponse(res.SourceResponse) // Save updated data into Terraform state resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) diff --git a/internal/provider/destination_langchain_data_source_sdk.go b/internal/provider/source_goldcast_data_source_sdk.go similarity index 67% rename from internal/provider/destination_langchain_data_source_sdk.go rename to internal/provider/source_goldcast_data_source_sdk.go index 8d280d71f..9e5671d82 100644 --- a/internal/provider/destination_langchain_data_source_sdk.go +++ b/internal/provider/source_goldcast_data_source_sdk.go @@ -8,13 +8,13 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" ) -func (r *DestinationLangchainDataSourceModel) RefreshFromSharedDestinationResponse(resp *shared.DestinationResponse) { +func (r *SourceGoldcastDataSourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { if resp != nil { configurationResult, _ := json.Marshal(resp.Configuration) r.Configuration = types.StringValue(string(configurationResult)) - r.DestinationID = types.StringValue(resp.DestinationID) - r.DestinationType = types.StringValue(resp.DestinationType) r.Name = types.StringValue(resp.Name) + r.SourceID = types.StringValue(resp.SourceID) + r.SourceType = types.StringValue(resp.SourceType) r.WorkspaceID = types.StringValue(resp.WorkspaceID) } } diff --git a/internal/provider/source_punkapi_resource.go b/internal/provider/source_goldcast_resource.go similarity index 75% rename from internal/provider/source_punkapi_resource.go rename to internal/provider/source_goldcast_resource.go index 8f10d4452..c4d3e88d4 100644 --- a/internal/provider/source_punkapi_resource.go +++ b/internal/provider/source_goldcast_resource.go @@ -20,36 +20,36 @@ import ( ) // Ensure provider defined types fully satisfy framework interfaces. -var _ resource.Resource = &SourcePunkAPIResource{} -var _ resource.ResourceWithImportState = &SourcePunkAPIResource{} +var _ resource.Resource = &SourceGoldcastResource{} +var _ resource.ResourceWithImportState = &SourceGoldcastResource{} -func NewSourcePunkAPIResource() resource.Resource { - return &SourcePunkAPIResource{} +func NewSourceGoldcastResource() resource.Resource { + return &SourceGoldcastResource{} } -// SourcePunkAPIResource defines the resource implementation. -type SourcePunkAPIResource struct { +// SourceGoldcastResource defines the resource implementation. +type SourceGoldcastResource struct { client *sdk.SDK } -// SourcePunkAPIResourceModel describes the resource data model. -type SourcePunkAPIResourceModel struct { - Configuration tfTypes.SourcePunkAPI `tfsdk:"configuration"` - DefinitionID types.String `tfsdk:"definition_id"` - Name types.String `tfsdk:"name"` - SecretID types.String `tfsdk:"secret_id"` - SourceID types.String `tfsdk:"source_id"` - SourceType types.String `tfsdk:"source_type"` - WorkspaceID types.String `tfsdk:"workspace_id"` +// SourceGoldcastResourceModel describes the resource data model. +type SourceGoldcastResourceModel struct { + Configuration tfTypes.SourceGoldcast `tfsdk:"configuration"` + DefinitionID types.String `tfsdk:"definition_id"` + Name types.String `tfsdk:"name"` + SecretID types.String `tfsdk:"secret_id"` + SourceID types.String `tfsdk:"source_id"` + SourceType types.String `tfsdk:"source_type"` + WorkspaceID types.String `tfsdk:"workspace_id"` } -func (r *SourcePunkAPIResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { - resp.TypeName = req.ProviderTypeName + "_source_punk_api" +func (r *SourceGoldcastResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_source_goldcast" } -func (r *SourcePunkAPIResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { +func (r *SourceGoldcastResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - MarkdownDescription: "SourcePunkAPI Resource", + MarkdownDescription: "SourceGoldcast Resource", Attributes: map[string]schema.Attribute{ "configuration": schema.SingleNestedAttribute{ PlanModifiers: []planmodifier.Object{ @@ -57,17 +57,10 @@ func (r *SourcePunkAPIResource) Schema(ctx context.Context, req resource.SchemaR }, Required: true, Attributes: map[string]schema.Attribute{ - "brewed_after": schema.StringAttribute{ + "access_key": schema.StringAttribute{ Required: true, - Description: `To extract specific data with Unique ID`, - }, - "brewed_before": schema.StringAttribute{ - Required: true, - Description: `To extract specific data with Unique ID`, - }, - "id": schema.StringAttribute{ - Optional: true, - Description: `To extract specific data with Unique ID`, + Sensitive: true, + Description: `Your API Access Key. See here. The key is case sensitive.`, }, }, }, @@ -114,7 +107,7 @@ func (r *SourcePunkAPIResource) Schema(ctx context.Context, req resource.SchemaR } } -func (r *SourcePunkAPIResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { +func (r *SourceGoldcastResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { // Prevent panic if the provider has not been configured. if req.ProviderData == nil { return @@ -134,8 +127,8 @@ func (r *SourcePunkAPIResource) Configure(ctx context.Context, req resource.Conf r.client = client } -func (r *SourcePunkAPIResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { - var data *SourcePunkAPIResourceModel +func (r *SourceGoldcastResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data *SourceGoldcastResourceModel var plan types.Object resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) @@ -152,8 +145,8 @@ func (r *SourcePunkAPIResource) Create(ctx context.Context, req resource.CreateR return } - request := data.ToSharedSourcePunkAPICreateRequest() - res, err := r.client.Sources.CreateSourcePunkAPI(ctx, request) + request := data.ToSharedSourceGoldcastCreateRequest() + res, err := r.client.Sources.CreateSourceGoldcast(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -176,10 +169,10 @@ func (r *SourcePunkAPIResource) Create(ctx context.Context, req resource.CreateR data.RefreshFromSharedSourceResponse(res.SourceResponse) refreshPlan(ctx, plan, &data, resp.Diagnostics) sourceID := data.SourceID.ValueString() - request1 := operations.GetSourcePunkAPIRequest{ + request1 := operations.GetSourceGoldcastRequest{ SourceID: sourceID, } - res1, err := r.client.Sources.GetSourcePunkAPI(ctx, request1) + res1, err := r.client.Sources.GetSourceGoldcast(ctx, request1) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res1 != nil && res1.RawResponse != nil { @@ -206,8 +199,8 @@ func (r *SourcePunkAPIResource) Create(ctx context.Context, req resource.CreateR resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourcePunkAPIResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { - var data *SourcePunkAPIResourceModel +func (r *SourceGoldcastResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data *SourceGoldcastResourceModel var item types.Object resp.Diagnostics.Append(req.State.Get(ctx, &item)...) @@ -225,10 +218,10 @@ func (r *SourcePunkAPIResource) Read(ctx context.Context, req resource.ReadReque } sourceID := data.SourceID.ValueString() - request := operations.GetSourcePunkAPIRequest{ + request := operations.GetSourceGoldcastRequest{ SourceID: sourceID, } - res, err := r.client.Sources.GetSourcePunkAPI(ctx, request) + res, err := r.client.Sources.GetSourceGoldcast(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -258,8 +251,8 @@ func (r *SourcePunkAPIResource) Read(ctx context.Context, req resource.ReadReque resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourcePunkAPIResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { - var data *SourcePunkAPIResourceModel +func (r *SourceGoldcastResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var data *SourceGoldcastResourceModel var plan types.Object resp.Diagnostics.Append(req.Plan.Get(ctx, &plan)...) @@ -272,13 +265,13 @@ func (r *SourcePunkAPIResource) Update(ctx context.Context, req resource.UpdateR return } - sourcePunkAPIPutRequest := data.ToSharedSourcePunkAPIPutRequest() + sourceGoldcastPutRequest := data.ToSharedSourceGoldcastPutRequest() sourceID := data.SourceID.ValueString() - request := operations.PutSourcePunkAPIRequest{ - SourcePunkAPIPutRequest: sourcePunkAPIPutRequest, - SourceID: sourceID, + request := operations.PutSourceGoldcastRequest{ + SourceGoldcastPutRequest: sourceGoldcastPutRequest, + SourceID: sourceID, } - res, err := r.client.Sources.PutSourcePunkAPI(ctx, request) + res, err := r.client.Sources.PutSourceGoldcast(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -296,10 +289,10 @@ func (r *SourcePunkAPIResource) Update(ctx context.Context, req resource.UpdateR } refreshPlan(ctx, plan, &data, resp.Diagnostics) sourceId1 := data.SourceID.ValueString() - request1 := operations.GetSourcePunkAPIRequest{ + request1 := operations.GetSourceGoldcastRequest{ SourceID: sourceId1, } - res1, err := r.client.Sources.GetSourcePunkAPI(ctx, request1) + res1, err := r.client.Sources.GetSourceGoldcast(ctx, request1) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res1 != nil && res1.RawResponse != nil { @@ -326,8 +319,8 @@ func (r *SourcePunkAPIResource) Update(ctx context.Context, req resource.UpdateR resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) } -func (r *SourcePunkAPIResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { - var data *SourcePunkAPIResourceModel +func (r *SourceGoldcastResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data *SourceGoldcastResourceModel var item types.Object resp.Diagnostics.Append(req.State.Get(ctx, &item)...) @@ -345,10 +338,10 @@ func (r *SourcePunkAPIResource) Delete(ctx context.Context, req resource.DeleteR } sourceID := data.SourceID.ValueString() - request := operations.DeleteSourcePunkAPIRequest{ + request := operations.DeleteSourceGoldcastRequest{ SourceID: sourceID, } - res, err := r.client.Sources.DeleteSourcePunkAPI(ctx, request) + res, err := r.client.Sources.DeleteSourceGoldcast(ctx, request) if err != nil { resp.Diagnostics.AddError("failure to invoke API", err.Error()) if res != nil && res.RawResponse != nil { @@ -367,6 +360,6 @@ func (r *SourcePunkAPIResource) Delete(ctx context.Context, req resource.DeleteR } -func (r *SourcePunkAPIResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { +func (r *SourceGoldcastResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("source_id"), req.ID)...) } diff --git a/internal/provider/source_goldcast_resource_sdk.go b/internal/provider/source_goldcast_resource_sdk.go new file mode 100644 index 000000000..5a8c5c86c --- /dev/null +++ b/internal/provider/source_goldcast_resource_sdk.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package provider + +import ( + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" + "github.com/hashicorp/terraform-plugin-framework/types" +) + +func (r *SourceGoldcastResourceModel) ToSharedSourceGoldcastCreateRequest() *shared.SourceGoldcastCreateRequest { + accessKey := r.Configuration.AccessKey.ValueString() + configuration := shared.SourceGoldcast{ + AccessKey: accessKey, + } + definitionID := new(string) + if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { + *definitionID = r.DefinitionID.ValueString() + } else { + definitionID = nil + } + name := r.Name.ValueString() + secretID := new(string) + if !r.SecretID.IsUnknown() && !r.SecretID.IsNull() { + *secretID = r.SecretID.ValueString() + } else { + secretID = nil + } + workspaceID := r.WorkspaceID.ValueString() + out := shared.SourceGoldcastCreateRequest{ + Configuration: configuration, + DefinitionID: definitionID, + Name: name, + SecretID: secretID, + WorkspaceID: workspaceID, + } + return &out +} + +func (r *SourceGoldcastResourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { + if resp != nil { + r.Name = types.StringValue(resp.Name) + r.SourceID = types.StringValue(resp.SourceID) + r.SourceType = types.StringValue(resp.SourceType) + r.WorkspaceID = types.StringValue(resp.WorkspaceID) + } +} + +func (r *SourceGoldcastResourceModel) ToSharedSourceGoldcastPutRequest() *shared.SourceGoldcastPutRequest { + accessKey := r.Configuration.AccessKey.ValueString() + configuration := shared.SourceGoldcastUpdate{ + AccessKey: accessKey, + } + name := r.Name.ValueString() + workspaceID := r.WorkspaceID.ValueString() + out := shared.SourceGoldcastPutRequest{ + Configuration: configuration, + Name: name, + WorkspaceID: workspaceID, + } + return &out +} diff --git a/internal/provider/source_googleanalyticsdataapi_resource_sdk.go b/internal/provider/source_googleanalyticsdataapi_resource_sdk.go index ecfd294cd..f8dd366af 100644 --- a/internal/provider/source_googleanalyticsdataapi_resource_sdk.go +++ b/internal/provider/source_googleanalyticsdataapi_resource_sdk.go @@ -1596,16 +1596,16 @@ func (r *SourceGoogleAnalyticsDataAPIResourceModel) ToSharedSourceGoogleAnalytic AuthenticateViaGoogleOauth: authenticateViaGoogleOauth, } } - var serviceAccountKeyAuthentication *shared.ServiceAccountKeyAuthentication + var sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication if r.Configuration.Credentials.ServiceAccountKeyAuthentication != nil { credentialsJSON := r.Configuration.Credentials.ServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - serviceAccountKeyAuthentication = &shared.ServiceAccountKeyAuthentication{ + sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication{ CredentialsJSON: credentialsJSON, } } - if serviceAccountKeyAuthentication != nil { + if sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication != nil { credentials = &shared.SourceGoogleAnalyticsDataAPIUpdateCredentials{ - ServiceAccountKeyAuthentication: serviceAccountKeyAuthentication, + SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication: sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, } } } diff --git a/internal/provider/source_googleanalyticsv4serviceaccountonly_resource_sdk.go b/internal/provider/source_googleanalyticsv4serviceaccountonly_resource_sdk.go deleted file mode 100644 index 33000ed6a..000000000 --- a/internal/provider/source_googleanalyticsv4serviceaccountonly_resource_sdk.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package provider - -import ( - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - customTypes "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" - "github.com/hashicorp/terraform-plugin-framework/types" -) - -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel) ToSharedSourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest() *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest { - var credentials *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials - if r.Configuration.Credentials != nil { - var sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication - if r.Configuration.Credentials.ServiceAccountKeyAuthentication != nil { - credentialsJSON := r.Configuration.Credentials.ServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication{ - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials{ - SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication, - } - } - } - customReports := new(string) - if !r.Configuration.CustomReports.IsUnknown() && !r.Configuration.CustomReports.IsNull() { - *customReports = r.Configuration.CustomReports.ValueString() - } else { - customReports = nil - } - endDate := new(customTypes.Date) - if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { - endDate = customTypes.MustNewDateFromString(r.Configuration.EndDate.ValueString()) - } else { - endDate = nil - } - startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) - viewID := r.Configuration.ViewID.ValueString() - windowInDays := new(int64) - if !r.Configuration.WindowInDays.IsUnknown() && !r.Configuration.WindowInDays.IsNull() { - *windowInDays = r.Configuration.WindowInDays.ValueInt64() - } else { - windowInDays = nil - } - configuration := shared.SourceGoogleAnalyticsV4ServiceAccountOnly{ - Credentials: credentials, - CustomReports: customReports, - EndDate: endDate, - StartDate: startDate, - ViewID: viewID, - WindowInDays: windowInDays, - } - definitionID := new(string) - if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { - *definitionID = r.DefinitionID.ValueString() - } else { - definitionID = nil - } - name := r.Name.ValueString() - secretID := new(string) - if !r.SecretID.IsUnknown() && !r.SecretID.IsNull() { - *secretID = r.SecretID.ValueString() - } else { - secretID = nil - } - workspaceID := r.WorkspaceID.ValueString() - out := shared.SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest{ - Configuration: configuration, - DefinitionID: definitionID, - Name: name, - SecretID: secretID, - WorkspaceID: workspaceID, - } - return &out -} - -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel) RefreshFromSharedSourceResponse(resp *shared.SourceResponse) { - if resp != nil { - r.Name = types.StringValue(resp.Name) - r.SourceID = types.StringValue(resp.SourceID) - r.SourceType = types.StringValue(resp.SourceType) - r.WorkspaceID = types.StringValue(resp.WorkspaceID) - } -} - -func (r *SourceGoogleAnalyticsV4ServiceAccountOnlyResourceModel) ToSharedSourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest() *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest { - var credentials *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials - if r.Configuration.Credentials != nil { - var sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication - if r.Configuration.Credentials.ServiceAccountKeyAuthentication != nil { - credentialsJSON := r.Configuration.Credentials.ServiceAccountKeyAuthentication.CredentialsJSON.ValueString() - sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication = &shared.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication{ - CredentialsJSON: credentialsJSON, - } - } - if sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication != nil { - credentials = &shared.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials{ - SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication: sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication, - } - } - } - customReports := new(string) - if !r.Configuration.CustomReports.IsUnknown() && !r.Configuration.CustomReports.IsNull() { - *customReports = r.Configuration.CustomReports.ValueString() - } else { - customReports = nil - } - endDate := new(customTypes.Date) - if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { - endDate = customTypes.MustNewDateFromString(r.Configuration.EndDate.ValueString()) - } else { - endDate = nil - } - startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) - viewID := r.Configuration.ViewID.ValueString() - windowInDays := new(int64) - if !r.Configuration.WindowInDays.IsUnknown() && !r.Configuration.WindowInDays.IsNull() { - *windowInDays = r.Configuration.WindowInDays.ValueInt64() - } else { - windowInDays = nil - } - configuration := shared.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate{ - Credentials: credentials, - CustomReports: customReports, - EndDate: endDate, - StartDate: startDate, - ViewID: viewID, - WindowInDays: windowInDays, - } - name := r.Name.ValueString() - workspaceID := r.WorkspaceID.ValueString() - out := shared.SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest{ - Configuration: configuration, - Name: name, - WorkspaceID: workspaceID, - } - return &out -} diff --git a/internal/provider/source_microsoftonedrive_resource.go b/internal/provider/source_microsoftonedrive_resource.go index 868c377b2..74025e1c7 100644 --- a/internal/provider/source_microsoftonedrive_resource.go +++ b/internal/provider/source_microsoftonedrive_resource.go @@ -189,9 +189,9 @@ func (r *SourceMicrosoftOnedriveResource) Schema(ctx context.Context, req resour Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, @@ -323,13 +323,44 @@ func (r *SourceMicrosoftOnedriveResource) Schema(ctx context.Context, req resour Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, - "document_file_type_format_experimental": schema.SingleNestedAttribute{ + "jsonl_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{}, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "parquet_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "decimal_as_float": schema.BoolAttribute{ + Computed: true, + Optional: true, + Default: booldefault.StaticBool(false), + Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("jsonl_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "unstructured_document_format": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ "processing": schema.SingleNestedAttribute{ @@ -377,37 +408,6 @@ func (r *SourceMicrosoftOnedriveResource) Schema(ctx context.Context, req resour }...), }, }, - "jsonl_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{}, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("parquet_format"), - }...), - }, - }, - "parquet_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "decimal_as_float": schema.BoolAttribute{ - Computed: true, - Optional: true, - Default: booldefault.StaticBool(false), - Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("jsonl_format"), - }...), - }, - }, }, Description: `The configuration options that are used to alter how to read incoming files that deviate from the standard formatting.`, Validators: []validator.Object{ diff --git a/internal/provider/source_microsoftonedrive_resource_sdk.go b/internal/provider/source_microsoftonedrive_resource_sdk.go index c5e51a870..db85bdbcc 100644 --- a/internal/provider/source_microsoftonedrive_resource_sdk.go +++ b/internal/provider/source_microsoftonedrive_resource_sdk.go @@ -247,12 +247,12 @@ func (r *SourceMicrosoftOnedriveResourceModel) ToSharedSourceMicrosoftOnedriveCr SourceMicrosoftOnedriveParquetFormat: sourceMicrosoftOnedriveParquetFormat, } } - var sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental *shared.SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var sourceMicrosoftOnedriveUnstructuredDocumentFormat *shared.SourceMicrosoftOnedriveUnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceMicrosoftOnedriveProcessing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceMicrosoftOnedriveLocal *shared.SourceMicrosoftOnedriveLocal - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceMicrosoftOnedriveLocal = &shared.SourceMicrosoftOnedriveLocal{} } if sourceMicrosoftOnedriveLocal != nil { @@ -262,26 +262,26 @@ func (r *SourceMicrosoftOnedriveResourceModel) ToSharedSourceMicrosoftOnedriveCr } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceMicrosoftOnedriveParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceMicrosoftOnedriveParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceMicrosoftOnedriveParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental = &shared.SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental{ + sourceMicrosoftOnedriveUnstructuredDocumentFormat = &shared.SourceMicrosoftOnedriveUnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental != nil { + if sourceMicrosoftOnedriveUnstructuredDocumentFormat != nil { format = shared.SourceMicrosoftOnedriveFormat{ - SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental: sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental, + SourceMicrosoftOnedriveUnstructuredDocumentFormat: sourceMicrosoftOnedriveUnstructuredDocumentFormat, } } var globs []string = []string{} @@ -604,12 +604,12 @@ func (r *SourceMicrosoftOnedriveResourceModel) ToSharedSourceMicrosoftOnedrivePu SourceMicrosoftOnedriveUpdateParquetFormat: sourceMicrosoftOnedriveUpdateParquetFormat, } } - var sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental *shared.SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var unstructuredDocumentFormat *shared.UnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceMicrosoftOnedriveUpdateProcessing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceMicrosoftOnedriveUpdateLocal *shared.SourceMicrosoftOnedriveUpdateLocal - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceMicrosoftOnedriveUpdateLocal = &shared.SourceMicrosoftOnedriveUpdateLocal{} } if sourceMicrosoftOnedriveUpdateLocal != nil { @@ -619,26 +619,26 @@ func (r *SourceMicrosoftOnedriveResourceModel) ToSharedSourceMicrosoftOnedrivePu } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceMicrosoftOnedriveUpdateParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceMicrosoftOnedriveUpdateParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceMicrosoftOnedriveUpdateParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental = &shared.SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental{ + unstructuredDocumentFormat = &shared.UnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental != nil { + if unstructuredDocumentFormat != nil { format = shared.SourceMicrosoftOnedriveUpdateFormat{ - SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental: sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental, + UnstructuredDocumentFormat: unstructuredDocumentFormat, } } var globs []string = []string{} diff --git a/internal/provider/source_microsoftsharepoint_resource.go b/internal/provider/source_microsoftsharepoint_resource.go index d63a7e9af..106e1706e 100644 --- a/internal/provider/source_microsoftsharepoint_resource.go +++ b/internal/provider/source_microsoftsharepoint_resource.go @@ -183,9 +183,9 @@ func (r *SourceMicrosoftSharepointResource) Schema(ctx context.Context, req reso Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, @@ -317,13 +317,44 @@ func (r *SourceMicrosoftSharepointResource) Schema(ctx context.Context, req reso Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, - "document_file_type_format_experimental": schema.SingleNestedAttribute{ + "jsonl_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{}, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "parquet_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "decimal_as_float": schema.BoolAttribute{ + Computed: true, + Optional: true, + Default: booldefault.StaticBool(false), + Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("jsonl_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "unstructured_document_format": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ "processing": schema.SingleNestedAttribute{ @@ -371,37 +402,6 @@ func (r *SourceMicrosoftSharepointResource) Schema(ctx context.Context, req reso }...), }, }, - "jsonl_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{}, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("parquet_format"), - }...), - }, - }, - "parquet_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "decimal_as_float": schema.BoolAttribute{ - Computed: true, - Optional: true, - Default: booldefault.StaticBool(false), - Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("jsonl_format"), - }...), - }, - }, }, Description: `The configuration options that are used to alter how to read incoming files that deviate from the standard formatting.`, Validators: []validator.Object{ diff --git a/internal/provider/source_microsoftsharepoint_resource_sdk.go b/internal/provider/source_microsoftsharepoint_resource_sdk.go index 8c4be197e..3636faa30 100644 --- a/internal/provider/source_microsoftsharepoint_resource_sdk.go +++ b/internal/provider/source_microsoftsharepoint_resource_sdk.go @@ -246,12 +246,12 @@ func (r *SourceMicrosoftSharepointResourceModel) ToSharedSourceMicrosoftSharepoi SourceMicrosoftSharepointParquetFormat: sourceMicrosoftSharepointParquetFormat, } } - var sourceMicrosoftSharepointDocumentFileTypeFormatExperimental *shared.SourceMicrosoftSharepointDocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var sourceMicrosoftSharepointUnstructuredDocumentFormat *shared.SourceMicrosoftSharepointUnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceMicrosoftSharepointProcessing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceMicrosoftSharepointLocal *shared.SourceMicrosoftSharepointLocal - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceMicrosoftSharepointLocal = &shared.SourceMicrosoftSharepointLocal{} } if sourceMicrosoftSharepointLocal != nil { @@ -261,26 +261,26 @@ func (r *SourceMicrosoftSharepointResourceModel) ToSharedSourceMicrosoftSharepoi } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceMicrosoftSharepointParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceMicrosoftSharepointParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceMicrosoftSharepointParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceMicrosoftSharepointDocumentFileTypeFormatExperimental = &shared.SourceMicrosoftSharepointDocumentFileTypeFormatExperimental{ + sourceMicrosoftSharepointUnstructuredDocumentFormat = &shared.SourceMicrosoftSharepointUnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceMicrosoftSharepointDocumentFileTypeFormatExperimental != nil { + if sourceMicrosoftSharepointUnstructuredDocumentFormat != nil { format = shared.SourceMicrosoftSharepointFormat{ - SourceMicrosoftSharepointDocumentFileTypeFormatExperimental: sourceMicrosoftSharepointDocumentFileTypeFormatExperimental, + SourceMicrosoftSharepointUnstructuredDocumentFormat: sourceMicrosoftSharepointUnstructuredDocumentFormat, } } var globs []string = []string{} @@ -601,12 +601,12 @@ func (r *SourceMicrosoftSharepointResourceModel) ToSharedSourceMicrosoftSharepoi SourceMicrosoftSharepointUpdateParquetFormat: sourceMicrosoftSharepointUpdateParquetFormat, } } - var sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental *shared.SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat *shared.SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceMicrosoftSharepointUpdateProcessing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceMicrosoftSharepointUpdateLocal *shared.SourceMicrosoftSharepointUpdateLocal - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceMicrosoftSharepointUpdateLocal = &shared.SourceMicrosoftSharepointUpdateLocal{} } if sourceMicrosoftSharepointUpdateLocal != nil { @@ -616,26 +616,26 @@ func (r *SourceMicrosoftSharepointResourceModel) ToSharedSourceMicrosoftSharepoi } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceMicrosoftSharepointUpdateParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceMicrosoftSharepointUpdateParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceMicrosoftSharepointUpdateParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental = &shared.SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental{ + sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat = &shared.SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental != nil { + if sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat != nil { format = shared.SourceMicrosoftSharepointUpdateFormat{ - SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental: sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental, + SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat: sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat, } } var globs []string = []string{} diff --git a/internal/provider/source_mysql_resource.go b/internal/provider/source_mysql_resource.go index 14bb6def0..130c2f4ff 100644 --- a/internal/provider/source_mysql_resource.go +++ b/internal/provider/source_mysql_resource.go @@ -92,6 +92,12 @@ func (r *SourceMysqlResource) Schema(ctx context.Context, req resource.SchemaReq "read_changes_using_binary_log_cdc": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ + "initial_load_timeout_hours": schema.Int64Attribute{ + Computed: true, + Optional: true, + Default: int64default.StaticInt64(8), + Description: `The amount of time an initial load is allowed to continue for before catching up on CDC logs. Default: 8`, + }, "initial_waiting_seconds": schema.Int64Attribute{ Computed: true, Optional: true, diff --git a/internal/provider/source_mysql_resource_sdk.go b/internal/provider/source_mysql_resource_sdk.go index d3ced347f..9137c9bd9 100644 --- a/internal/provider/source_mysql_resource_sdk.go +++ b/internal/provider/source_mysql_resource_sdk.go @@ -31,6 +31,12 @@ func (r *SourceMysqlResourceModel) ToSharedSourceMysqlCreateRequest() *shared.So var replicationMethod shared.SourceMysqlUpdateMethod var sourceMysqlReadChangesUsingBinaryLogCDC *shared.SourceMysqlReadChangesUsingBinaryLogCDC if r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC != nil { + initialLoadTimeoutHours := new(int64) + if !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.IsUnknown() && !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.IsNull() { + *initialLoadTimeoutHours = r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.ValueInt64() + } else { + initialLoadTimeoutHours = nil + } initialWaitingSeconds := new(int64) if !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.IsUnknown() && !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.IsNull() { *initialWaitingSeconds = r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.ValueInt64() @@ -50,6 +56,7 @@ func (r *SourceMysqlResourceModel) ToSharedSourceMysqlCreateRequest() *shared.So serverTimeZone = nil } sourceMysqlReadChangesUsingBinaryLogCDC = &shared.SourceMysqlReadChangesUsingBinaryLogCDC{ + InitialLoadTimeoutHours: initialLoadTimeoutHours, InitialWaitingSeconds: initialWaitingSeconds, InvalidCdcCursorPositionBehavior: invalidCdcCursorPositionBehavior, ServerTimeZone: serverTimeZone, @@ -283,6 +290,12 @@ func (r *SourceMysqlResourceModel) ToSharedSourceMysqlPutRequest() *shared.Sourc var replicationMethod shared.SourceMysqlUpdateUpdateMethod var readChangesUsingBinaryLogCDC *shared.ReadChangesUsingBinaryLogCDC if r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC != nil { + initialLoadTimeoutHours := new(int64) + if !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.IsUnknown() && !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.IsNull() { + *initialLoadTimeoutHours = r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialLoadTimeoutHours.ValueInt64() + } else { + initialLoadTimeoutHours = nil + } initialWaitingSeconds := new(int64) if !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.IsUnknown() && !r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.IsNull() { *initialWaitingSeconds = r.Configuration.ReplicationMethod.ReadChangesUsingBinaryLogCDC.InitialWaitingSeconds.ValueInt64() @@ -302,6 +315,7 @@ func (r *SourceMysqlResourceModel) ToSharedSourceMysqlPutRequest() *shared.Sourc serverTimeZone = nil } readChangesUsingBinaryLogCDC = &shared.ReadChangesUsingBinaryLogCDC{ + InitialLoadTimeoutHours: initialLoadTimeoutHours, InitialWaitingSeconds: initialWaitingSeconds, InvalidCdcCursorPositionBehavior: invalidCdcCursorPositionBehavior, ServerTimeZone: serverTimeZone, diff --git a/internal/provider/source_nytimes_resource.go b/internal/provider/source_nytimes_resource.go index 208853b9e..ff7437cfb 100644 --- a/internal/provider/source_nytimes_resource.go +++ b/internal/provider/source_nytimes_resource.go @@ -10,7 +10,6 @@ import ( tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" - "github.com/airbytehq/terraform-provider-airbyte/internal/validators" "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/path" @@ -69,9 +68,6 @@ func (r *SourceNytimesResource) Schema(ctx context.Context, req resource.SchemaR "end_date": schema.StringAttribute{ Optional: true, Description: `End date to stop the article retrieval (format YYYY-MM)`, - Validators: []validator.String{ - validators.IsValidDate(), - }, }, "period": schema.Int64Attribute{ Required: true, @@ -98,9 +94,6 @@ func (r *SourceNytimesResource) Schema(ctx context.Context, req resource.SchemaR "start_date": schema.StringAttribute{ Required: true, Description: `Start date to begin the article retrieval (format YYYY-MM)`, - Validators: []validator.String{ - validators.IsValidDate(), - }, }, }, }, diff --git a/internal/provider/source_nytimes_resource_sdk.go b/internal/provider/source_nytimes_resource_sdk.go index 66a157143..d6dd58610 100644 --- a/internal/provider/source_nytimes_resource_sdk.go +++ b/internal/provider/source_nytimes_resource_sdk.go @@ -4,15 +4,14 @@ package provider import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - customTypes "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" "github.com/hashicorp/terraform-plugin-framework/types" ) func (r *SourceNytimesResourceModel) ToSharedSourceNytimesCreateRequest() *shared.SourceNytimesCreateRequest { apiKey := r.Configuration.APIKey.ValueString() - endDate := new(customTypes.Date) + endDate := new(string) if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { - endDate = customTypes.MustNewDateFromString(r.Configuration.EndDate.ValueString()) + *endDate = r.Configuration.EndDate.ValueString() } else { endDate = nil } @@ -23,7 +22,7 @@ func (r *SourceNytimesResourceModel) ToSharedSourceNytimesCreateRequest() *share } else { shareType = nil } - startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) + startDate := r.Configuration.StartDate.ValueString() configuration := shared.SourceNytimes{ APIKey: apiKey, EndDate: endDate, @@ -66,9 +65,9 @@ func (r *SourceNytimesResourceModel) RefreshFromSharedSourceResponse(resp *share func (r *SourceNytimesResourceModel) ToSharedSourceNytimesPutRequest() *shared.SourceNytimesPutRequest { apiKey := r.Configuration.APIKey.ValueString() - endDate := new(customTypes.Date) + endDate := new(string) if !r.Configuration.EndDate.IsUnknown() && !r.Configuration.EndDate.IsNull() { - endDate = customTypes.MustNewDateFromString(r.Configuration.EndDate.ValueString()) + *endDate = r.Configuration.EndDate.ValueString() } else { endDate = nil } @@ -79,7 +78,7 @@ func (r *SourceNytimesResourceModel) ToSharedSourceNytimesPutRequest() *shared.S } else { shareType = nil } - startDate := customTypes.MustDateFromString(r.Configuration.StartDate.ValueString()) + startDate := r.Configuration.StartDate.ValueString() configuration := shared.SourceNytimesUpdate{ APIKey: apiKey, EndDate: endDate, diff --git a/internal/provider/source_orb_resource.go b/internal/provider/source_orb_resource.go index 2954a3cc3..1ae83f45a 100644 --- a/internal/provider/source_orb_resource.go +++ b/internal/provider/source_orb_resource.go @@ -10,12 +10,14 @@ import ( tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/operations" + "github.com/airbytehq/terraform-provider-airbyte/internal/validators" "github.com/hashicorp/terraform-plugin-framework/path" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64default" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" ) @@ -86,6 +88,9 @@ func (r *SourceOrbResource) Schema(ctx context.Context, req resource.SchemaReque "start_date": schema.StringAttribute{ Required: true, Description: `UTC date and time in the format 2022-03-01T00:00:00Z. Any data with created_at before this data will not be synced. For Subscription Usage, this becomes the ` + "`" + `timeframe_start` + "`" + ` API parameter.`, + Validators: []validator.String{ + validators.IsRFC3339(), + }, }, "string_event_properties_keys": schema.ListAttribute{ Optional: true, diff --git a/internal/provider/source_orb_resource_sdk.go b/internal/provider/source_orb_resource_sdk.go index 46902ed09..b6dbe5069 100644 --- a/internal/provider/source_orb_resource_sdk.go +++ b/internal/provider/source_orb_resource_sdk.go @@ -5,6 +5,7 @@ package provider import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" "github.com/hashicorp/terraform-plugin-framework/types" + "time" ) func (r *SourceOrbResourceModel) ToSharedSourceOrbCreateRequest() *shared.SourceOrbCreateRequest { @@ -31,7 +32,7 @@ func (r *SourceOrbResourceModel) ToSharedSourceOrbCreateRequest() *shared.Source } else { planID = nil } - startDate := r.Configuration.StartDate.ValueString() + startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) var stringEventPropertiesKeys []string = []string{} for _, stringEventPropertiesKeysItem := range r.Configuration.StringEventPropertiesKeys { stringEventPropertiesKeys = append(stringEventPropertiesKeys, stringEventPropertiesKeysItem.ValueString()) @@ -109,7 +110,7 @@ func (r *SourceOrbResourceModel) ToSharedSourceOrbPutRequest() *shared.SourceOrb } else { planID = nil } - startDate := r.Configuration.StartDate.ValueString() + startDate, _ := time.Parse(time.RFC3339Nano, r.Configuration.StartDate.ValueString()) var stringEventPropertiesKeys []string = []string{} for _, stringEventPropertiesKeysItem := range r.Configuration.StringEventPropertiesKeys { stringEventPropertiesKeys = append(stringEventPropertiesKeys, stringEventPropertiesKeysItem.ValueString()) diff --git a/internal/provider/source_s3_resource.go b/internal/provider/source_s3_resource.go index 3a7261415..c59740342 100644 --- a/internal/provider/source_s3_resource.go +++ b/internal/provider/source_s3_resource.go @@ -343,9 +343,9 @@ func (r *SourceS3Resource) Schema(ctx context.Context, req resource.SchemaReques Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, @@ -489,13 +489,44 @@ func (r *SourceS3Resource) Schema(ctx context.Context, req resource.SchemaReques Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), path.MatchRelative().AtParent().AtName("jsonl_format"), path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), }...), }, }, - "document_file_type_format_experimental": schema.SingleNestedAttribute{ + "jsonl_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{}, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("parquet_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "parquet_format": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "decimal_as_float": schema.BoolAttribute{ + Computed: true, + Optional: true, + Default: booldefault.StaticBool(false), + Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("avro_format"), + path.MatchRelative().AtParent().AtName("csv_format"), + path.MatchRelative().AtParent().AtName("jsonl_format"), + path.MatchRelative().AtParent().AtName("unstructured_document_format"), + }...), + }, + }, + "unstructured_document_format": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ "processing": schema.SingleNestedAttribute{ @@ -543,37 +574,6 @@ func (r *SourceS3Resource) Schema(ctx context.Context, req resource.SchemaReques }...), }, }, - "jsonl_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{}, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("parquet_format"), - }...), - }, - }, - "parquet_format": schema.SingleNestedAttribute{ - Optional: true, - Attributes: map[string]schema.Attribute{ - "decimal_as_float": schema.BoolAttribute{ - Computed: true, - Optional: true, - Default: booldefault.StaticBool(false), - Description: `Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended. Default: false`, - }, - }, - Validators: []validator.Object{ - objectvalidator.ConflictsWith(path.Expressions{ - path.MatchRelative().AtParent().AtName("avro_format"), - path.MatchRelative().AtParent().AtName("csv_format"), - path.MatchRelative().AtParent().AtName("document_file_type_format_experimental"), - path.MatchRelative().AtParent().AtName("jsonl_format"), - }...), - }, - }, }, Description: `The configuration options that are used to alter how to read incoming files that deviate from the standard formatting.`, Validators: []validator.Object{ diff --git a/internal/provider/source_s3_resource_sdk.go b/internal/provider/source_s3_resource_sdk.go index 47dfcc087..d8b088f93 100644 --- a/internal/provider/source_s3_resource_sdk.go +++ b/internal/provider/source_s3_resource_sdk.go @@ -461,12 +461,12 @@ func (r *SourceS3ResourceModel) ToSharedSourceS3CreateRequest() *shared.SourceS3 SourceS3ParquetFormat: sourceS3ParquetFormat, } } - var sourceS3DocumentFileTypeFormatExperimental *shared.SourceS3DocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var sourceS3UnstructuredDocumentFormat *shared.SourceS3UnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceS3Processing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceS3Local *shared.SourceS3Local - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceS3Local = &shared.SourceS3Local{} } if sourceS3Local != nil { @@ -476,26 +476,26 @@ func (r *SourceS3ResourceModel) ToSharedSourceS3CreateRequest() *shared.SourceS3 } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceS3ParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceS3ParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceS3ParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceS3DocumentFileTypeFormatExperimental = &shared.SourceS3DocumentFileTypeFormatExperimental{ + sourceS3UnstructuredDocumentFormat = &shared.SourceS3UnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceS3DocumentFileTypeFormatExperimental != nil { + if sourceS3UnstructuredDocumentFormat != nil { format1 = shared.SourceS3Format{ - SourceS3DocumentFileTypeFormatExperimental: sourceS3DocumentFileTypeFormatExperimental, + SourceS3UnstructuredDocumentFormat: sourceS3UnstructuredDocumentFormat, } } var globs []string = []string{} @@ -1046,12 +1046,12 @@ func (r *SourceS3ResourceModel) ToSharedSourceS3PutRequest() *shared.SourceS3Put SourceS3UpdateParquetFormat: sourceS3UpdateParquetFormat, } } - var sourceS3UpdateDocumentFileTypeFormatExperimental *shared.SourceS3UpdateDocumentFileTypeFormatExperimental - if streamsItem.Format.DocumentFileTypeFormatExperimental != nil { + var sourceS3UpdateUnstructuredDocumentFormat *shared.SourceS3UpdateUnstructuredDocumentFormat + if streamsItem.Format.UnstructuredDocumentFormat != nil { var processing *shared.SourceS3UpdateProcessing - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing != nil { var sourceS3UpdateLocal *shared.SourceS3UpdateLocal - if streamsItem.Format.DocumentFileTypeFormatExperimental.Processing.Local != nil { + if streamsItem.Format.UnstructuredDocumentFormat.Processing.Local != nil { sourceS3UpdateLocal = &shared.SourceS3UpdateLocal{} } if sourceS3UpdateLocal != nil { @@ -1061,26 +1061,26 @@ func (r *SourceS3ResourceModel) ToSharedSourceS3PutRequest() *shared.SourceS3Put } } skipUnprocessableFiles := new(bool) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.IsNull() { - *skipUnprocessableFiles = streamsItem.Format.DocumentFileTypeFormatExperimental.SkipUnprocessableFiles.ValueBool() + if !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.IsNull() { + *skipUnprocessableFiles = streamsItem.Format.UnstructuredDocumentFormat.SkipUnprocessableFiles.ValueBool() } else { skipUnprocessableFiles = nil } strategy := new(shared.SourceS3UpdateParsingStrategy) - if !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsUnknown() && !streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.IsNull() { - *strategy = shared.SourceS3UpdateParsingStrategy(streamsItem.Format.DocumentFileTypeFormatExperimental.Strategy.ValueString()) + if !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsUnknown() && !streamsItem.Format.UnstructuredDocumentFormat.Strategy.IsNull() { + *strategy = shared.SourceS3UpdateParsingStrategy(streamsItem.Format.UnstructuredDocumentFormat.Strategy.ValueString()) } else { strategy = nil } - sourceS3UpdateDocumentFileTypeFormatExperimental = &shared.SourceS3UpdateDocumentFileTypeFormatExperimental{ + sourceS3UpdateUnstructuredDocumentFormat = &shared.SourceS3UpdateUnstructuredDocumentFormat{ Processing: processing, SkipUnprocessableFiles: skipUnprocessableFiles, Strategy: strategy, } } - if sourceS3UpdateDocumentFileTypeFormatExperimental != nil { + if sourceS3UpdateUnstructuredDocumentFormat != nil { format1 = shared.SourceS3UpdateFormat{ - SourceS3UpdateDocumentFileTypeFormatExperimental: sourceS3UpdateDocumentFileTypeFormatExperimental, + SourceS3UpdateUnstructuredDocumentFormat: sourceS3UpdateUnstructuredDocumentFormat, } } var globs []string = []string{} diff --git a/internal/provider/source_shopify_resource.go b/internal/provider/source_shopify_resource.go index 750874e3d..0254c4400 100644 --- a/internal/provider/source_shopify_resource.go +++ b/internal/provider/source_shopify_resource.go @@ -124,6 +124,12 @@ func (r *SourceShopifyResource) Schema(ctx context.Context, req resource.SchemaR Default: booldefault.StaticBool(false), Description: `Defines which API type (REST/BULK) to use to fetch ` + "`" + `Transactions` + "`" + ` data. If you are a ` + "`" + `Shopify Plus` + "`" + ` user, leave the default value to speed up the fetch. Default: false`, }, + "job_termination_threshold": schema.Int64Attribute{ + Computed: true, + Optional: true, + Default: int64default.StaticInt64(3600), + Description: `The max time in seconds, after which the single BULK Job should be ` + "`" + `CANCELED` + "`" + ` and retried. The bigger the value the longer the BULK Job is allowed to run. Default: 3600`, + }, "shop": schema.StringAttribute{ Required: true, Description: `The name of your Shopify store found in the URL. For example, if your URL was https://NAME.myshopify.com, then the name would be 'NAME' or 'NAME.myshopify.com'.`, diff --git a/internal/provider/source_shopify_resource_sdk.go b/internal/provider/source_shopify_resource_sdk.go index 817b741c3..5b5553ef1 100644 --- a/internal/provider/source_shopify_resource_sdk.go +++ b/internal/provider/source_shopify_resource_sdk.go @@ -67,6 +67,12 @@ func (r *SourceShopifyResourceModel) ToSharedSourceShopifyCreateRequest() *share } else { fetchTransactionsUserID = nil } + jobTerminationThreshold := new(int64) + if !r.Configuration.JobTerminationThreshold.IsUnknown() && !r.Configuration.JobTerminationThreshold.IsNull() { + *jobTerminationThreshold = r.Configuration.JobTerminationThreshold.ValueInt64() + } else { + jobTerminationThreshold = nil + } shop := r.Configuration.Shop.ValueString() startDate := new(customTypes.Date) if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { @@ -78,6 +84,7 @@ func (r *SourceShopifyResourceModel) ToSharedSourceShopifyCreateRequest() *share BulkWindowInDays: bulkWindowInDays, Credentials: credentials, FetchTransactionsUserID: fetchTransactionsUserID, + JobTerminationThreshold: jobTerminationThreshold, Shop: shop, StartDate: startDate, } @@ -173,6 +180,12 @@ func (r *SourceShopifyResourceModel) ToSharedSourceShopifyPutRequest() *shared.S } else { fetchTransactionsUserID = nil } + jobTerminationThreshold := new(int64) + if !r.Configuration.JobTerminationThreshold.IsUnknown() && !r.Configuration.JobTerminationThreshold.IsNull() { + *jobTerminationThreshold = r.Configuration.JobTerminationThreshold.ValueInt64() + } else { + jobTerminationThreshold = nil + } shop := r.Configuration.Shop.ValueString() startDate := new(customTypes.Date) if !r.Configuration.StartDate.IsUnknown() && !r.Configuration.StartDate.IsNull() { @@ -184,6 +197,7 @@ func (r *SourceShopifyResourceModel) ToSharedSourceShopifyPutRequest() *shared.S BulkWindowInDays: bulkWindowInDays, Credentials: credentials, FetchTransactionsUserID: fetchTransactionsUserID, + JobTerminationThreshold: jobTerminationThreshold, Shop: shop, StartDate: startDate, } diff --git a/internal/provider/source_snowflake_resource.go b/internal/provider/source_snowflake_resource.go index c17f62cce..00e06a22a 100644 --- a/internal/provider/source_snowflake_resource.go +++ b/internal/provider/source_snowflake_resource.go @@ -63,6 +63,31 @@ func (r *SourceSnowflakeResource) Schema(ctx context.Context, req resource.Schem "credentials": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ + "key_pair_authentication": schema.SingleNestedAttribute{ + Optional: true, + Attributes: map[string]schema.Attribute{ + "private_key": schema.StringAttribute{ + Required: true, + Sensitive: true, + Description: `RSA Private key to use for Snowflake connection. See the docs for more information on how to obtain this key.`, + }, + "private_key_password": schema.StringAttribute{ + Optional: true, + Sensitive: true, + Description: `Passphrase for private key`, + }, + "username": schema.StringAttribute{ + Required: true, + Description: `The username you created to allow Airbyte to access the database.`, + }, + }, + Validators: []validator.Object{ + objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("o_auth20"), + path.MatchRelative().AtParent().AtName("username_and_password"), + }...), + }, + }, "o_auth20": schema.SingleNestedAttribute{ Optional: true, Attributes: map[string]schema.Attribute{ @@ -87,6 +112,7 @@ func (r *SourceSnowflakeResource) Schema(ctx context.Context, req resource.Schem }, Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("key_pair_authentication"), path.MatchRelative().AtParent().AtName("username_and_password"), }...), }, @@ -106,6 +132,7 @@ func (r *SourceSnowflakeResource) Schema(ctx context.Context, req resource.Schem }, Validators: []validator.Object{ objectvalidator.ConflictsWith(path.Expressions{ + path.MatchRelative().AtParent().AtName("key_pair_authentication"), path.MatchRelative().AtParent().AtName("o_auth20"), }...), }, diff --git a/internal/provider/source_snowflake_resource_sdk.go b/internal/provider/source_snowflake_resource_sdk.go index 24bbf9d1f..eb99d78cf 100644 --- a/internal/provider/source_snowflake_resource_sdk.go +++ b/internal/provider/source_snowflake_resource_sdk.go @@ -38,13 +38,34 @@ func (r *SourceSnowflakeResourceModel) ToSharedSourceSnowflakeCreateRequest() *s SourceSnowflakeOAuth20: sourceSnowflakeOAuth20, } } + var sourceSnowflakeKeyPairAuthentication *shared.SourceSnowflakeKeyPairAuthentication + if r.Configuration.Credentials.KeyPairAuthentication != nil { + privateKey := r.Configuration.Credentials.KeyPairAuthentication.PrivateKey.ValueString() + privateKeyPassword := new(string) + if !r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.IsUnknown() && !r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.IsNull() { + *privateKeyPassword = r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.ValueString() + } else { + privateKeyPassword = nil + } + username := r.Configuration.Credentials.KeyPairAuthentication.Username.ValueString() + sourceSnowflakeKeyPairAuthentication = &shared.SourceSnowflakeKeyPairAuthentication{ + PrivateKey: privateKey, + PrivateKeyPassword: privateKeyPassword, + Username: username, + } + } + if sourceSnowflakeKeyPairAuthentication != nil { + credentials = &shared.SourceSnowflakeAuthorizationMethod{ + SourceSnowflakeKeyPairAuthentication: sourceSnowflakeKeyPairAuthentication, + } + } var sourceSnowflakeUsernameAndPassword *shared.SourceSnowflakeUsernameAndPassword if r.Configuration.Credentials.UsernameAndPassword != nil { password := r.Configuration.Credentials.UsernameAndPassword.Password.ValueString() - username := r.Configuration.Credentials.UsernameAndPassword.Username.ValueString() + username1 := r.Configuration.Credentials.UsernameAndPassword.Username.ValueString() sourceSnowflakeUsernameAndPassword = &shared.SourceSnowflakeUsernameAndPassword{ Password: password, - Username: username, + Username: username1, } } if sourceSnowflakeUsernameAndPassword != nil { @@ -142,13 +163,34 @@ func (r *SourceSnowflakeResourceModel) ToSharedSourceSnowflakePutRequest() *shar SourceSnowflakeUpdateOAuth20: sourceSnowflakeUpdateOAuth20, } } + var sourceSnowflakeUpdateKeyPairAuthentication *shared.SourceSnowflakeUpdateKeyPairAuthentication + if r.Configuration.Credentials.KeyPairAuthentication != nil { + privateKey := r.Configuration.Credentials.KeyPairAuthentication.PrivateKey.ValueString() + privateKeyPassword := new(string) + if !r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.IsUnknown() && !r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.IsNull() { + *privateKeyPassword = r.Configuration.Credentials.KeyPairAuthentication.PrivateKeyPassword.ValueString() + } else { + privateKeyPassword = nil + } + username := r.Configuration.Credentials.KeyPairAuthentication.Username.ValueString() + sourceSnowflakeUpdateKeyPairAuthentication = &shared.SourceSnowflakeUpdateKeyPairAuthentication{ + PrivateKey: privateKey, + PrivateKeyPassword: privateKeyPassword, + Username: username, + } + } + if sourceSnowflakeUpdateKeyPairAuthentication != nil { + credentials = &shared.SourceSnowflakeUpdateAuthorizationMethod{ + SourceSnowflakeUpdateKeyPairAuthentication: sourceSnowflakeUpdateKeyPairAuthentication, + } + } var sourceSnowflakeUpdateUsernameAndPassword *shared.SourceSnowflakeUpdateUsernameAndPassword if r.Configuration.Credentials.UsernameAndPassword != nil { password := r.Configuration.Credentials.UsernameAndPassword.Password.ValueString() - username := r.Configuration.Credentials.UsernameAndPassword.Username.ValueString() + username1 := r.Configuration.Credentials.UsernameAndPassword.Username.ValueString() sourceSnowflakeUpdateUsernameAndPassword = &shared.SourceSnowflakeUpdateUsernameAndPassword{ Password: password, - Username: username, + Username: username1, } } if sourceSnowflakeUpdateUsernameAndPassword != nil { diff --git a/internal/provider/source_spacexapi_resource_sdk.go b/internal/provider/source_spacexapi_resource_sdk.go index f1b0882d8..324df5338 100644 --- a/internal/provider/source_spacexapi_resource_sdk.go +++ b/internal/provider/source_spacexapi_resource_sdk.go @@ -14,15 +14,15 @@ func (r *SourceSpacexAPIResourceModel) ToSharedSourceSpacexAPICreateRequest() *s } else { id = nil } - options := new(string) + optionsVar := new(string) if !r.Configuration.Options.IsUnknown() && !r.Configuration.Options.IsNull() { - *options = r.Configuration.Options.ValueString() + *optionsVar = r.Configuration.Options.ValueString() } else { - options = nil + optionsVar = nil } configuration := shared.SourceSpacexAPI{ ID: id, - Options: options, + Options: optionsVar, } definitionID := new(string) if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() { @@ -64,15 +64,15 @@ func (r *SourceSpacexAPIResourceModel) ToSharedSourceSpacexAPIPutRequest() *shar } else { id = nil } - options := new(string) + optionsVar := new(string) if !r.Configuration.Options.IsUnknown() && !r.Configuration.Options.IsNull() { - *options = r.Configuration.Options.ValueString() + *optionsVar = r.Configuration.Options.ValueString() } else { - options = nil + optionsVar = nil } configuration := shared.SourceSpacexAPIUpdate{ ID: id, - Options: options, + Options: optionsVar, } name := r.Name.ValueString() workspaceID := r.WorkspaceID.ValueString() diff --git a/internal/provider/source_tiktokmarketing_resource.go b/internal/provider/source_tiktokmarketing_resource.go index 99ebe5117..93c0c7553 100644 --- a/internal/provider/source_tiktokmarketing_resource.go +++ b/internal/provider/source_tiktokmarketing_resource.go @@ -135,7 +135,7 @@ func (r *SourceTiktokMarketingResource) Schema(ctx context.Context, req resource Computed: true, Optional: true, Default: booldefault.StaticBool(false), - Description: `Set to active if you want to include deleted data in reports. Default: false`, + Description: `Set to active if you want to include deleted data in report based streams and Ads, Ad Groups and Campaign streams. Default: false`, }, "start_date": schema.StringAttribute{ Computed: true, diff --git a/internal/provider/source_wikipediapageviews_resource.go b/internal/provider/source_wikipediapageviews_resource.go index 17f6da3b7..8d3a0cab5 100644 --- a/internal/provider/source_wikipediapageviews_resource.go +++ b/internal/provider/source_wikipediapageviews_resource.go @@ -83,7 +83,7 @@ func (r *SourceWikipediaPageviewsResource) Schema(ctx context.Context, req resou }, "start": schema.StringAttribute{ Required: true, - Description: `The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format.`, + Description: `The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. Also serves as the date to retrieve data for the top articles.`, }, }, }, diff --git a/internal/provider/types/authenticate_via_facebook_marketing_oauth.go b/internal/provider/types/authenticate_via_facebook_marketing_oauth.go new file mode 100644 index 000000000..0582e83c5 --- /dev/null +++ b/internal/provider/types/authenticate_via_facebook_marketing_oauth.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type AuthenticateViaFacebookMarketingOauth struct { + AccessToken types.String `tfsdk:"access_token"` + ClientID types.String `tfsdk:"client_id"` + ClientSecret types.String `tfsdk:"client_secret"` +} diff --git a/internal/provider/types/awss3_staging.go b/internal/provider/types/awss3_staging.go index acc3df2fd..b7a090990 100644 --- a/internal/provider/types/awss3_staging.go +++ b/internal/provider/types/awss3_staging.go @@ -5,12 +5,11 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type AWSS3Staging struct { - AccessKeyID types.String `tfsdk:"access_key_id"` - Encryption *DestinationRedshiftEncryption `tfsdk:"encryption"` - FileNamePattern types.String `tfsdk:"file_name_pattern"` - PurgeStagingData types.Bool `tfsdk:"purge_staging_data"` - S3BucketName types.String `tfsdk:"s3_bucket_name"` - S3BucketPath types.String `tfsdk:"s3_bucket_path"` - S3BucketRegion types.String `tfsdk:"s3_bucket_region"` - SecretAccessKey types.String `tfsdk:"secret_access_key"` + AccessKeyID types.String `tfsdk:"access_key_id"` + FileNamePattern types.String `tfsdk:"file_name_pattern"` + PurgeStagingData types.Bool `tfsdk:"purge_staging_data"` + S3BucketName types.String `tfsdk:"s3_bucket_name"` + S3BucketPath types.String `tfsdk:"s3_bucket_path"` + S3BucketRegion types.String `tfsdk:"s3_bucket_region"` + SecretAccessKey types.String `tfsdk:"secret_access_key"` } diff --git a/internal/provider/types/chroma_local_persistance.go b/internal/provider/types/chroma_local_persistance.go deleted file mode 100644 index fed2b19f7..000000000 --- a/internal/provider/types/chroma_local_persistance.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type ChromaLocalPersistance struct { - CollectionName types.String `tfsdk:"collection_name"` - DestinationPath types.String `tfsdk:"destination_path"` -} diff --git a/internal/provider/types/destination_langchain.go b/internal/provider/types/destination_langchain.go deleted file mode 100644 index e5b261aec..000000000 --- a/internal/provider/types/destination_langchain.go +++ /dev/null @@ -1,9 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -type DestinationLangchain struct { - Embedding DestinationLangchainEmbedding `tfsdk:"embedding"` - Indexing DestinationLangchainIndexing `tfsdk:"indexing"` - Processing DestinationLangchainProcessingConfigModel `tfsdk:"processing"` -} diff --git a/internal/provider/types/destination_langchain_embedding.go b/internal/provider/types/destination_langchain_embedding.go deleted file mode 100644 index eceb05d98..000000000 --- a/internal/provider/types/destination_langchain_embedding.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -type DestinationLangchainEmbedding struct { - Fake *Fake `tfsdk:"fake" tfPlanOnly:"true"` - OpenAI *OpenAI `tfsdk:"open_ai" tfPlanOnly:"true"` -} diff --git a/internal/provider/types/destination_langchain_indexing.go b/internal/provider/types/destination_langchain_indexing.go deleted file mode 100644 index 39fa10525..000000000 --- a/internal/provider/types/destination_langchain_indexing.go +++ /dev/null @@ -1,9 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -type DestinationLangchainIndexing struct { - ChromaLocalPersistance *ChromaLocalPersistance `tfsdk:"chroma_local_persistance" tfPlanOnly:"true"` - DocArrayHnswSearch *DocArrayHnswSearch `tfsdk:"doc_array_hnsw_search" tfPlanOnly:"true"` - Pinecone *DestinationLangchainPinecone `tfsdk:"pinecone" tfPlanOnly:"true"` -} diff --git a/internal/provider/types/destination_langchain_processing_config_model.go b/internal/provider/types/destination_langchain_processing_config_model.go deleted file mode 100644 index 681537b20..000000000 --- a/internal/provider/types/destination_langchain_processing_config_model.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type DestinationLangchainProcessingConfigModel struct { - ChunkOverlap types.Int64 `tfsdk:"chunk_overlap"` - ChunkSize types.Int64 `tfsdk:"chunk_size"` - TextFields []types.String `tfsdk:"text_fields"` -} diff --git a/internal/provider/types/destination_pinecone.go b/internal/provider/types/destination_pinecone.go index 22ef2e9b1..9b4af1ad2 100644 --- a/internal/provider/types/destination_pinecone.go +++ b/internal/provider/types/destination_pinecone.go @@ -6,7 +6,7 @@ import "github.com/hashicorp/terraform-plugin-framework/types" type DestinationPinecone struct { Embedding DestinationAstraEmbedding `tfsdk:"embedding"` - Indexing DestinationLangchainPinecone `tfsdk:"indexing"` + Indexing DestinationPineconeIndexing `tfsdk:"indexing"` OmitRawText types.Bool `tfsdk:"omit_raw_text"` Processing DestinationAstraProcessingConfigModel `tfsdk:"processing"` } diff --git a/internal/provider/types/destination_langchain_pinecone.go b/internal/provider/types/destination_pinecone_indexing.go similarity index 88% rename from internal/provider/types/destination_langchain_pinecone.go rename to internal/provider/types/destination_pinecone_indexing.go index e9531c11a..87ab6fe9a 100644 --- a/internal/provider/types/destination_langchain_pinecone.go +++ b/internal/provider/types/destination_pinecone_indexing.go @@ -4,7 +4,7 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type DestinationLangchainPinecone struct { +type DestinationPineconeIndexing struct { Index types.String `tfsdk:"index"` PineconeEnvironment types.String `tfsdk:"pinecone_environment"` PineconeKey types.String `tfsdk:"pinecone_key"` diff --git a/internal/provider/types/destination_redshift_encryption.go b/internal/provider/types/destination_redshift_encryption.go deleted file mode 100644 index 5d1010ef5..000000000 --- a/internal/provider/types/destination_redshift_encryption.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -type DestinationRedshiftEncryption struct { - AESCBCEnvelopeEncryption *AESCBCEnvelopeEncryption `tfsdk:"aescbc_envelope_encryption" tfPlanOnly:"true"` - NoEncryption *Fake `tfsdk:"no_encryption" tfPlanOnly:"true"` -} diff --git a/internal/provider/types/aescbc_envelope_encryption.go b/internal/provider/types/queries.go similarity index 50% rename from internal/provider/types/aescbc_envelope_encryption.go rename to internal/provider/types/queries.go index 426dae6ef..84234a7cc 100644 --- a/internal/provider/types/aescbc_envelope_encryption.go +++ b/internal/provider/types/queries.go @@ -4,6 +4,8 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type AESCBCEnvelopeEncryption struct { - KeyEncryptingKey types.String `tfsdk:"key_encrypting_key"` +type Queries struct { + DataSource types.String `tfsdk:"data_source"` + Name types.String `tfsdk:"name"` + Query types.String `tfsdk:"query"` } diff --git a/internal/provider/types/read_changes_using_binary_log_cdc.go b/internal/provider/types/read_changes_using_binary_log_cdc.go index 73721888a..55eb1604f 100644 --- a/internal/provider/types/read_changes_using_binary_log_cdc.go +++ b/internal/provider/types/read_changes_using_binary_log_cdc.go @@ -5,6 +5,7 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type ReadChangesUsingBinaryLogCDC struct { + InitialLoadTimeoutHours types.Int64 `tfsdk:"initial_load_timeout_hours"` InitialWaitingSeconds types.Int64 `tfsdk:"initial_waiting_seconds"` InvalidCdcCursorPositionBehavior types.String `tfsdk:"invalid_cdc_cursor_position_behavior"` ServerTimeZone types.String `tfsdk:"server_time_zone"` diff --git a/internal/provider/types/source_aws_cloudtrail.go b/internal/provider/types/source_aws_cloudtrail.go index 23df8b34a..e2ab5f620 100644 --- a/internal/provider/types/source_aws_cloudtrail.go +++ b/internal/provider/types/source_aws_cloudtrail.go @@ -5,8 +5,9 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type SourceAwsCloudtrail struct { - AwsKeyID types.String `tfsdk:"aws_key_id"` - AwsRegionName types.String `tfsdk:"aws_region_name"` - AwsSecretKey types.String `tfsdk:"aws_secret_key"` - StartDate types.String `tfsdk:"start_date"` + AwsKeyID types.String `tfsdk:"aws_key_id"` + AwsRegionName types.String `tfsdk:"aws_region_name"` + AwsSecretKey types.String `tfsdk:"aws_secret_key"` + LookupAttributesFilter *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody `tfsdk:"lookup_attributes_filter"` + StartDate types.String `tfsdk:"start_date"` } diff --git a/internal/provider/types/source_aws_cloudtrail_filter_applied_while_fetching_records_based_on_attribute_key_and_attribute_value_which_will_be_appended_on_the_request_body.go b/internal/provider/types/source_aws_cloudtrail_filter_applied_while_fetching_records_based_on_attribute_key_and_attribute_value_which_will_be_appended_on_the_request_body.go new file mode 100644 index 000000000..5f07c62bf --- /dev/null +++ b/internal/provider/types/source_aws_cloudtrail_filter_applied_while_fetching_records_based_on_attribute_key_and_attribute_value_which_will_be_appended_on_the_request_body.go @@ -0,0 +1,10 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody struct { + AttributeKey types.String `tfsdk:"attribute_key"` + AttributeValue types.String `tfsdk:"attribute_value"` +} diff --git a/internal/provider/types/source_datadog.go b/internal/provider/types/source_datadog.go new file mode 100644 index 000000000..f926ebc18 --- /dev/null +++ b/internal/provider/types/source_datadog.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type SourceDatadog struct { + APIKey types.String `tfsdk:"api_key"` + ApplicationKey types.String `tfsdk:"application_key"` + EndDate types.String `tfsdk:"end_date"` + MaxRecordsPerRequest types.Int64 `tfsdk:"max_records_per_request"` + Queries []Queries `tfsdk:"queries"` + Query types.String `tfsdk:"query"` + Site types.String `tfsdk:"site"` + StartDate types.String `tfsdk:"start_date"` +} diff --git a/internal/provider/types/source_facebook_marketing.go b/internal/provider/types/source_facebook_marketing.go index 901689df9..f027b28d5 100644 --- a/internal/provider/types/source_facebook_marketing.go +++ b/internal/provider/types/source_facebook_marketing.go @@ -5,19 +5,20 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type SourceFacebookMarketing struct { - AccessToken types.String `tfsdk:"access_token"` - AccountIds []types.String `tfsdk:"account_ids"` - ActionBreakdownsAllowEmpty types.Bool `tfsdk:"action_breakdowns_allow_empty"` - AdStatuses []types.String `tfsdk:"ad_statuses"` - AdsetStatuses []types.String `tfsdk:"adset_statuses"` - CampaignStatuses []types.String `tfsdk:"campaign_statuses"` - ClientID types.String `tfsdk:"client_id"` - ClientSecret types.String `tfsdk:"client_secret"` - CustomInsights []InsightConfig `tfsdk:"custom_insights"` - EndDate types.String `tfsdk:"end_date"` - FetchThumbnailImages types.Bool `tfsdk:"fetch_thumbnail_images"` - InsightsJobTimeout types.Int64 `tfsdk:"insights_job_timeout"` - InsightsLookbackWindow types.Int64 `tfsdk:"insights_lookback_window"` - PageSize types.Int64 `tfsdk:"page_size"` - StartDate types.String `tfsdk:"start_date"` + AccessToken types.String `tfsdk:"access_token"` + AccountIds []types.String `tfsdk:"account_ids"` + ActionBreakdownsAllowEmpty types.Bool `tfsdk:"action_breakdowns_allow_empty"` + AdStatuses []types.String `tfsdk:"ad_statuses"` + AdsetStatuses []types.String `tfsdk:"adset_statuses"` + CampaignStatuses []types.String `tfsdk:"campaign_statuses"` + ClientID types.String `tfsdk:"client_id"` + ClientSecret types.String `tfsdk:"client_secret"` + Credentials *SourceFacebookMarketingAuthentication `tfsdk:"credentials"` + CustomInsights []InsightConfig `tfsdk:"custom_insights"` + EndDate types.String `tfsdk:"end_date"` + FetchThumbnailImages types.Bool `tfsdk:"fetch_thumbnail_images"` + InsightsJobTimeout types.Int64 `tfsdk:"insights_job_timeout"` + InsightsLookbackWindow types.Int64 `tfsdk:"insights_lookback_window"` + PageSize types.Int64 `tfsdk:"page_size"` + StartDate types.String `tfsdk:"start_date"` } diff --git a/internal/provider/types/source_facebook_marketing_authentication.go b/internal/provider/types/source_facebook_marketing_authentication.go new file mode 100644 index 000000000..f96d6c7b8 --- /dev/null +++ b/internal/provider/types/source_facebook_marketing_authentication.go @@ -0,0 +1,8 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +type SourceFacebookMarketingAuthentication struct { + AuthenticateViaFacebookMarketingOauth *AuthenticateViaFacebookMarketingOauth `tfsdk:"authenticate_via_facebook_marketing_oauth" tfPlanOnly:"true"` + ServiceAccountKeyAuthentication *OAuth2AccessToken `tfsdk:"service_account_key_authentication" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/doc_array_hnsw_search.go b/internal/provider/types/source_goldcast.go similarity index 63% rename from internal/provider/types/doc_array_hnsw_search.go rename to internal/provider/types/source_goldcast.go index 8c45d3040..8b329520c 100644 --- a/internal/provider/types/doc_array_hnsw_search.go +++ b/internal/provider/types/source_goldcast.go @@ -4,6 +4,6 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type DocArrayHnswSearch struct { - DestinationPath types.String `tfsdk:"destination_path"` +type SourceGoldcast struct { + AccessKey types.String `tfsdk:"access_key"` } diff --git a/internal/provider/types/source_google_analytics_data_api_credentials.go b/internal/provider/types/source_google_analytics_data_api_credentials.go index cb0773a9c..7c8448ea5 100644 --- a/internal/provider/types/source_google_analytics_data_api_credentials.go +++ b/internal/provider/types/source_google_analytics_data_api_credentials.go @@ -3,6 +3,6 @@ package types type SourceGoogleAnalyticsDataAPICredentials struct { - AuthenticateViaGoogleOauth *AuthenticateViaGoogleOauth `tfsdk:"authenticate_via_google_oauth" tfPlanOnly:"true"` - ServiceAccountKeyAuthentication *ServiceAccountKeyAuthentication `tfsdk:"service_account_key_authentication" tfPlanOnly:"true"` + AuthenticateViaGoogleOauth *AuthenticateViaGoogleOauth `tfsdk:"authenticate_via_google_oauth" tfPlanOnly:"true"` + ServiceAccountKeyAuthentication *SourceGoogleAnalyticsDataAPIServiceAccountKeyAuthentication `tfsdk:"service_account_key_authentication" tfPlanOnly:"true"` } diff --git a/internal/provider/types/service_account_key_authentication.go b/internal/provider/types/source_google_analytics_data_api_service_account_key_authentication.go similarity index 74% rename from internal/provider/types/service_account_key_authentication.go rename to internal/provider/types/source_google_analytics_data_api_service_account_key_authentication.go index a7e118c3b..73a73fe1d 100644 --- a/internal/provider/types/service_account_key_authentication.go +++ b/internal/provider/types/source_google_analytics_data_api_service_account_key_authentication.go @@ -4,6 +4,6 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" -type ServiceAccountKeyAuthentication struct { +type SourceGoogleAnalyticsDataAPIServiceAccountKeyAuthentication struct { CredentialsJSON types.String `tfsdk:"credentials_json"` } diff --git a/internal/provider/types/source_google_analytics_v4_service_account_only.go b/internal/provider/types/source_google_analytics_v4_service_account_only.go deleted file mode 100644 index c615f320a..000000000 --- a/internal/provider/types/source_google_analytics_v4_service_account_only.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type SourceGoogleAnalyticsV4ServiceAccountOnly struct { - Credentials *SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials `tfsdk:"credentials"` - CustomReports types.String `tfsdk:"custom_reports"` - EndDate types.String `tfsdk:"end_date"` - StartDate types.String `tfsdk:"start_date"` - ViewID types.String `tfsdk:"view_id"` - WindowInDays types.Int64 `tfsdk:"window_in_days"` -} diff --git a/internal/provider/types/source_google_analytics_v4_service_account_only_credentials.go b/internal/provider/types/source_google_analytics_v4_service_account_only_credentials.go deleted file mode 100644 index 980ce2ac7..000000000 --- a/internal/provider/types/source_google_analytics_v4_service_account_only_credentials.go +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -type SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials struct { - ServiceAccountKeyAuthentication *ServiceAccountKeyAuthentication `tfsdk:"service_account_key_authentication" tfPlanOnly:"true"` -} diff --git a/internal/provider/types/source_microsoft_onedrive.go b/internal/provider/types/source_microsoft_onedrive.go index 238ad24ae..12d218c24 100644 --- a/internal/provider/types/source_microsoft_onedrive.go +++ b/internal/provider/types/source_microsoft_onedrive.go @@ -5,10 +5,10 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type SourceMicrosoftOnedrive struct { - Credentials SourceMicrosoftOnedriveAuthentication `tfsdk:"credentials"` - DriveName types.String `tfsdk:"drive_name"` - FolderPath types.String `tfsdk:"folder_path"` - SearchScope types.String `tfsdk:"search_scope"` - StartDate types.String `tfsdk:"start_date"` - Streams []SourceGoogleDriveFileBasedStreamConfig `tfsdk:"streams"` + Credentials SourceMicrosoftOnedriveAuthentication `tfsdk:"credentials"` + DriveName types.String `tfsdk:"drive_name"` + FolderPath types.String `tfsdk:"folder_path"` + SearchScope types.String `tfsdk:"search_scope"` + StartDate types.String `tfsdk:"start_date"` + Streams []SourceMicrosoftOnedriveFileBasedStreamConfig `tfsdk:"streams"` } diff --git a/internal/provider/types/source_microsoft_onedrive_file_based_stream_config.go b/internal/provider/types/source_microsoft_onedrive_file_based_stream_config.go new file mode 100644 index 000000000..0bda64ec1 --- /dev/null +++ b/internal/provider/types/source_microsoft_onedrive_file_based_stream_config.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type SourceMicrosoftOnedriveFileBasedStreamConfig struct { + DaysToSyncIfHistoryIsFull types.Int64 `tfsdk:"days_to_sync_if_history_is_full"` + Format SourceMicrosoftOnedriveFormat `tfsdk:"format"` + Globs []types.String `tfsdk:"globs"` + InputSchema types.String `tfsdk:"input_schema"` + Name types.String `tfsdk:"name"` + PrimaryKey types.String `tfsdk:"primary_key"` + Schemaless types.Bool `tfsdk:"schemaless"` + ValidationPolicy types.String `tfsdk:"validation_policy"` +} diff --git a/internal/provider/types/source_microsoft_onedrive_format.go b/internal/provider/types/source_microsoft_onedrive_format.go new file mode 100644 index 000000000..0e0684cb0 --- /dev/null +++ b/internal/provider/types/source_microsoft_onedrive_format.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +type SourceMicrosoftOnedriveFormat struct { + AvroFormat *AvroFormat `tfsdk:"avro_format" tfPlanOnly:"true"` + CSVFormat *SourceGoogleDriveCSVFormat `tfsdk:"csv_format" tfPlanOnly:"true"` + JsonlFormat *Fake `tfsdk:"jsonl_format" tfPlanOnly:"true"` + ParquetFormat *ParquetFormat `tfsdk:"parquet_format" tfPlanOnly:"true"` + UnstructuredDocumentFormat *DocumentFileTypeFormatExperimental `tfsdk:"unstructured_document_format" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/source_microsoft_sharepoint.go b/internal/provider/types/source_microsoft_sharepoint.go index b702d6217..967b400ab 100644 --- a/internal/provider/types/source_microsoft_sharepoint.go +++ b/internal/provider/types/source_microsoft_sharepoint.go @@ -5,9 +5,9 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type SourceMicrosoftSharepoint struct { - Credentials SourceMicrosoftSharepointAuthentication `tfsdk:"credentials"` - FolderPath types.String `tfsdk:"folder_path"` - SearchScope types.String `tfsdk:"search_scope"` - StartDate types.String `tfsdk:"start_date"` - Streams []SourceGoogleDriveFileBasedStreamConfig `tfsdk:"streams"` + Credentials SourceMicrosoftSharepointAuthentication `tfsdk:"credentials"` + FolderPath types.String `tfsdk:"folder_path"` + SearchScope types.String `tfsdk:"search_scope"` + StartDate types.String `tfsdk:"start_date"` + Streams []SourceMicrosoftOnedriveFileBasedStreamConfig `tfsdk:"streams"` } diff --git a/internal/provider/types/source_punk_api.go b/internal/provider/types/source_punk_api.go deleted file mode 100644 index 7c8c3e222..000000000 --- a/internal/provider/types/source_punk_api.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package types - -import "github.com/hashicorp/terraform-plugin-framework/types" - -type SourcePunkAPI struct { - BrewedAfter types.String `tfsdk:"brewed_after"` - BrewedBefore types.String `tfsdk:"brewed_before"` - ID types.String `tfsdk:"id"` -} diff --git a/internal/provider/types/source_s3.go b/internal/provider/types/source_s3.go index a61dc250a..9427420bd 100644 --- a/internal/provider/types/source_s3.go +++ b/internal/provider/types/source_s3.go @@ -5,17 +5,17 @@ package types import "github.com/hashicorp/terraform-plugin-framework/types" type SourceS3 struct { - AwsAccessKeyID types.String `tfsdk:"aws_access_key_id"` - AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key"` - Bucket types.String `tfsdk:"bucket"` - Dataset types.String `tfsdk:"dataset"` - Endpoint types.String `tfsdk:"endpoint"` - Format *SourceS3FileFormat `tfsdk:"format"` - PathPattern types.String `tfsdk:"path_pattern"` - Provider *SourceS3S3AmazonWebServices `tfsdk:"provider"` - RegionName types.String `tfsdk:"region_name"` - RoleArn types.String `tfsdk:"role_arn"` - Schema types.String `tfsdk:"schema"` - StartDate types.String `tfsdk:"start_date"` - Streams []FileBasedStreamConfig `tfsdk:"streams"` + AwsAccessKeyID types.String `tfsdk:"aws_access_key_id"` + AwsSecretAccessKey types.String `tfsdk:"aws_secret_access_key"` + Bucket types.String `tfsdk:"bucket"` + Dataset types.String `tfsdk:"dataset"` + Endpoint types.String `tfsdk:"endpoint"` + Format *SourceS3FileFormat `tfsdk:"format"` + PathPattern types.String `tfsdk:"path_pattern"` + Provider *SourceS3S3AmazonWebServices `tfsdk:"provider"` + RegionName types.String `tfsdk:"region_name"` + RoleArn types.String `tfsdk:"role_arn"` + Schema types.String `tfsdk:"schema"` + StartDate types.String `tfsdk:"start_date"` + Streams []SourceS3FileBasedStreamConfig `tfsdk:"streams"` } diff --git a/internal/provider/types/source_s3_file_based_stream_config.go b/internal/provider/types/source_s3_file_based_stream_config.go new file mode 100644 index 000000000..ea5e4791c --- /dev/null +++ b/internal/provider/types/source_s3_file_based_stream_config.go @@ -0,0 +1,17 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type SourceS3FileBasedStreamConfig struct { + DaysToSyncIfHistoryIsFull types.Int64 `tfsdk:"days_to_sync_if_history_is_full"` + Format SourceS3Format `tfsdk:"format"` + Globs []types.String `tfsdk:"globs"` + InputSchema types.String `tfsdk:"input_schema"` + LegacyPrefix types.String `tfsdk:"legacy_prefix"` + Name types.String `tfsdk:"name"` + PrimaryKey types.String `tfsdk:"primary_key"` + Schemaless types.Bool `tfsdk:"schemaless"` + ValidationPolicy types.String `tfsdk:"validation_policy"` +} diff --git a/internal/provider/types/source_s3_format.go b/internal/provider/types/source_s3_format.go new file mode 100644 index 000000000..8611b8a42 --- /dev/null +++ b/internal/provider/types/source_s3_format.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +type SourceS3Format struct { + AvroFormat *AvroFormat `tfsdk:"avro_format" tfPlanOnly:"true"` + CSVFormat *CSVFormat `tfsdk:"csv_format" tfPlanOnly:"true"` + JsonlFormat *Fake `tfsdk:"jsonl_format" tfPlanOnly:"true"` + ParquetFormat *ParquetFormat `tfsdk:"parquet_format" tfPlanOnly:"true"` + UnstructuredDocumentFormat *DocumentFileTypeFormatExperimental `tfsdk:"unstructured_document_format" tfPlanOnly:"true"` +} diff --git a/internal/provider/types/source_shopify.go b/internal/provider/types/source_shopify.go index 041896250..63a448ed8 100644 --- a/internal/provider/types/source_shopify.go +++ b/internal/provider/types/source_shopify.go @@ -8,6 +8,7 @@ type SourceShopify struct { BulkWindowInDays types.Int64 `tfsdk:"bulk_window_in_days"` Credentials *SourceShopifyShopifyAuthorizationMethod `tfsdk:"credentials"` FetchTransactionsUserID types.Bool `tfsdk:"fetch_transactions_user_id"` + JobTerminationThreshold types.Int64 `tfsdk:"job_termination_threshold"` Shop types.String `tfsdk:"shop"` StartDate types.String `tfsdk:"start_date"` } diff --git a/internal/provider/types/source_snowflake_authorization_method.go b/internal/provider/types/source_snowflake_authorization_method.go index b6338b33f..4c0354bbb 100644 --- a/internal/provider/types/source_snowflake_authorization_method.go +++ b/internal/provider/types/source_snowflake_authorization_method.go @@ -3,6 +3,7 @@ package types type SourceSnowflakeAuthorizationMethod struct { - OAuth20 *SourceSnowflakeOAuth20 `tfsdk:"o_auth20" tfPlanOnly:"true"` - UsernameAndPassword *UsernamePassword `tfsdk:"username_and_password" tfPlanOnly:"true"` + KeyPairAuthentication *SourceSnowflakeKeyPairAuthentication `tfsdk:"key_pair_authentication" tfPlanOnly:"true"` + OAuth20 *SourceSnowflakeOAuth20 `tfsdk:"o_auth20" tfPlanOnly:"true"` + UsernameAndPassword *UsernamePassword `tfsdk:"username_and_password" tfPlanOnly:"true"` } diff --git a/internal/provider/types/source_snowflake_key_pair_authentication.go b/internal/provider/types/source_snowflake_key_pair_authentication.go new file mode 100644 index 000000000..8b2a8302d --- /dev/null +++ b/internal/provider/types/source_snowflake_key_pair_authentication.go @@ -0,0 +1,11 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package types + +import "github.com/hashicorp/terraform-plugin-framework/types" + +type SourceSnowflakeKeyPairAuthentication struct { + PrivateKey types.String `tfsdk:"private_key"` + PrivateKeyPassword types.String `tfsdk:"private_key_password"` + Username types.String `tfsdk:"username"` +} diff --git a/internal/sdk/connections.go b/internal/sdk/connections.go index 80f08ef6a..631e2e6d1 100644 --- a/internal/sdk/connections.go +++ b/internal/sdk/connections.go @@ -27,7 +27,7 @@ func newConnections(sdkConfig sdkConfiguration) *Connections { } // CreateConnection - Create a connection -func (s *Connections) CreateConnection(ctx context.Context, request shared.ConnectionCreateRequest) (*operations.CreateConnectionResponse, error) { +func (s *Connections) CreateConnection(ctx context.Context, request shared.ConnectionCreateRequest, opts ...operations.Option) (*operations.CreateConnectionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createConnection", @@ -35,6 +35,17 @@ func (s *Connections) CreateConnection(ctx context.Context, request shared.Conne SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/connections") if err != nil { @@ -46,6 +57,17 @@ func (s *Connections) CreateConnection(ctx context.Context, request shared.Conne return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -125,7 +147,7 @@ func (s *Connections) CreateConnection(ctx context.Context, request shared.Conne } // DeleteConnection - Delete a Connection -func (s *Connections) DeleteConnection(ctx context.Context, request operations.DeleteConnectionRequest) (*operations.DeleteConnectionResponse, error) { +func (s *Connections) DeleteConnection(ctx context.Context, request operations.DeleteConnectionRequest, opts ...operations.Option) (*operations.DeleteConnectionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteConnection", @@ -133,12 +155,34 @@ func (s *Connections) DeleteConnection(ctx context.Context, request operations.D SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/connections/{connectionId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -207,7 +251,7 @@ func (s *Connections) DeleteConnection(ctx context.Context, request operations.D } // GetConnection - Get Connection details -func (s *Connections) GetConnection(ctx context.Context, request operations.GetConnectionRequest) (*operations.GetConnectionResponse, error) { +func (s *Connections) GetConnection(ctx context.Context, request operations.GetConnectionRequest, opts ...operations.Option) (*operations.GetConnectionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getConnection", @@ -215,12 +259,34 @@ func (s *Connections) GetConnection(ctx context.Context, request operations.GetC SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/connections/{connectionId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -299,7 +365,7 @@ func (s *Connections) GetConnection(ctx context.Context, request operations.GetC } // ListConnections - List connections -func (s *Connections) ListConnections(ctx context.Context, request operations.ListConnectionsRequest) (*operations.ListConnectionsResponse, error) { +func (s *Connections) ListConnections(ctx context.Context, request operations.ListConnectionsRequest, opts ...operations.Option) (*operations.ListConnectionsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listConnections", @@ -307,12 +373,34 @@ func (s *Connections) ListConnections(ctx context.Context, request operations.Li SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/connections") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -395,7 +483,7 @@ func (s *Connections) ListConnections(ctx context.Context, request operations.Li } // PatchConnection - Update Connection details -func (s *Connections) PatchConnection(ctx context.Context, request operations.PatchConnectionRequest) (*operations.PatchConnectionResponse, error) { +func (s *Connections) PatchConnection(ctx context.Context, request operations.PatchConnectionRequest, opts ...operations.Option) (*operations.PatchConnectionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "patchConnection", @@ -403,6 +491,17 @@ func (s *Connections) PatchConnection(ctx context.Context, request operations.Pa SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/connections/{connectionId}", request, nil) if err != nil { @@ -414,6 +513,17 @@ func (s *Connections) PatchConnection(ctx context.Context, request operations.Pa return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/destinations.go b/internal/sdk/destinations.go index 33f80afdd..77476f31d 100644 --- a/internal/sdk/destinations.go +++ b/internal/sdk/destinations.go @@ -28,7 +28,7 @@ func newDestinations(sdkConfig sdkConfiguration) *Destinations { // CreateDestination - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Destinations) CreateDestination(ctx context.Context, request *shared.DestinationCreateRequest) (*operations.CreateDestinationResponse, error) { +func (s *Destinations) CreateDestination(ctx context.Context, request *shared.DestinationCreateRequest, opts ...operations.Option) (*operations.CreateDestinationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestination", @@ -36,6 +36,17 @@ func (s *Destinations) CreateDestination(ctx context.Context, request *shared.De SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -47,6 +58,17 @@ func (s *Destinations) CreateDestination(ctx context.Context, request *shared.De return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -129,7 +151,7 @@ func (s *Destinations) CreateDestination(ctx context.Context, request *shared.De // CreateDestinationAstra - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationAstra(ctx context.Context, request *shared.DestinationAstraCreateRequest) (*operations.CreateDestinationAstraResponse, error) { +func (s *Destinations) CreateDestinationAstra(ctx context.Context, request *shared.DestinationAstraCreateRequest, opts ...operations.Option) (*operations.CreateDestinationAstraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationAstra", @@ -137,6 +159,17 @@ func (s *Destinations) CreateDestinationAstra(ctx context.Context, request *shar SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -148,6 +181,17 @@ func (s *Destinations) CreateDestinationAstra(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -228,7 +272,7 @@ func (s *Destinations) CreateDestinationAstra(ctx context.Context, request *shar // CreateDestinationAwsDatalake - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationAwsDatalake(ctx context.Context, request *shared.DestinationAwsDatalakeCreateRequest) (*operations.CreateDestinationAwsDatalakeResponse, error) { +func (s *Destinations) CreateDestinationAwsDatalake(ctx context.Context, request *shared.DestinationAwsDatalakeCreateRequest, opts ...operations.Option) (*operations.CreateDestinationAwsDatalakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationAwsDatalake", @@ -236,6 +280,17 @@ func (s *Destinations) CreateDestinationAwsDatalake(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -247,6 +302,17 @@ func (s *Destinations) CreateDestinationAwsDatalake(ctx context.Context, request return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -327,7 +393,7 @@ func (s *Destinations) CreateDestinationAwsDatalake(ctx context.Context, request // CreateDestinationAzureBlobStorage - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationAzureBlobStorage(ctx context.Context, request *shared.DestinationAzureBlobStorageCreateRequest) (*operations.CreateDestinationAzureBlobStorageResponse, error) { +func (s *Destinations) CreateDestinationAzureBlobStorage(ctx context.Context, request *shared.DestinationAzureBlobStorageCreateRequest, opts ...operations.Option) (*operations.CreateDestinationAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationAzureBlobStorage", @@ -335,6 +401,17 @@ func (s *Destinations) CreateDestinationAzureBlobStorage(ctx context.Context, re SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -346,6 +423,17 @@ func (s *Destinations) CreateDestinationAzureBlobStorage(ctx context.Context, re return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -426,7 +514,7 @@ func (s *Destinations) CreateDestinationAzureBlobStorage(ctx context.Context, re // CreateDestinationBigquery - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationBigquery(ctx context.Context, request *shared.DestinationBigqueryCreateRequest) (*operations.CreateDestinationBigqueryResponse, error) { +func (s *Destinations) CreateDestinationBigquery(ctx context.Context, request *shared.DestinationBigqueryCreateRequest, opts ...operations.Option) (*operations.CreateDestinationBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationBigquery", @@ -434,6 +522,17 @@ func (s *Destinations) CreateDestinationBigquery(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -445,6 +544,17 @@ func (s *Destinations) CreateDestinationBigquery(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -525,7 +635,7 @@ func (s *Destinations) CreateDestinationBigquery(ctx context.Context, request *s // CreateDestinationClickhouse - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationClickhouse(ctx context.Context, request *shared.DestinationClickhouseCreateRequest) (*operations.CreateDestinationClickhouseResponse, error) { +func (s *Destinations) CreateDestinationClickhouse(ctx context.Context, request *shared.DestinationClickhouseCreateRequest, opts ...operations.Option) (*operations.CreateDestinationClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationClickhouse", @@ -533,6 +643,17 @@ func (s *Destinations) CreateDestinationClickhouse(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -544,6 +665,17 @@ func (s *Destinations) CreateDestinationClickhouse(ctx context.Context, request return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -624,7 +756,7 @@ func (s *Destinations) CreateDestinationClickhouse(ctx context.Context, request // CreateDestinationConvex - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationConvex(ctx context.Context, request *shared.DestinationConvexCreateRequest) (*operations.CreateDestinationConvexResponse, error) { +func (s *Destinations) CreateDestinationConvex(ctx context.Context, request *shared.DestinationConvexCreateRequest, opts ...operations.Option) (*operations.CreateDestinationConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationConvex", @@ -632,6 +764,17 @@ func (s *Destinations) CreateDestinationConvex(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -643,6 +786,17 @@ func (s *Destinations) CreateDestinationConvex(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -723,7 +877,7 @@ func (s *Destinations) CreateDestinationConvex(ctx context.Context, request *sha // CreateDestinationCustom - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationCustom(ctx context.Context, request *shared.DestinationCustomCreateRequest) (*operations.CreateDestinationCustomResponse, error) { +func (s *Destinations) CreateDestinationCustom(ctx context.Context, request *shared.DestinationCustomCreateRequest, opts ...operations.Option) (*operations.CreateDestinationCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationCustom", @@ -731,6 +885,17 @@ func (s *Destinations) CreateDestinationCustom(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -742,6 +907,17 @@ func (s *Destinations) CreateDestinationCustom(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -822,7 +998,7 @@ func (s *Destinations) CreateDestinationCustom(ctx context.Context, request *sha // CreateDestinationDatabricks - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationDatabricks(ctx context.Context, request *shared.DestinationDatabricksCreateRequest) (*operations.CreateDestinationDatabricksResponse, error) { +func (s *Destinations) CreateDestinationDatabricks(ctx context.Context, request *shared.DestinationDatabricksCreateRequest, opts ...operations.Option) (*operations.CreateDestinationDatabricksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationDatabricks", @@ -830,6 +1006,17 @@ func (s *Destinations) CreateDestinationDatabricks(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -841,6 +1028,17 @@ func (s *Destinations) CreateDestinationDatabricks(ctx context.Context, request return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -921,7 +1119,7 @@ func (s *Destinations) CreateDestinationDatabricks(ctx context.Context, request // CreateDestinationDevNull - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationDevNull(ctx context.Context, request *shared.DestinationDevNullCreateRequest) (*operations.CreateDestinationDevNullResponse, error) { +func (s *Destinations) CreateDestinationDevNull(ctx context.Context, request *shared.DestinationDevNullCreateRequest, opts ...operations.Option) (*operations.CreateDestinationDevNullResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationDevNull", @@ -929,6 +1127,17 @@ func (s *Destinations) CreateDestinationDevNull(ctx context.Context, request *sh SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -940,6 +1149,17 @@ func (s *Destinations) CreateDestinationDevNull(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1020,7 +1240,7 @@ func (s *Destinations) CreateDestinationDevNull(ctx context.Context, request *sh // CreateDestinationDuckdb - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationDuckdb(ctx context.Context, request *shared.DestinationDuckdbCreateRequest) (*operations.CreateDestinationDuckdbResponse, error) { +func (s *Destinations) CreateDestinationDuckdb(ctx context.Context, request *shared.DestinationDuckdbCreateRequest, opts ...operations.Option) (*operations.CreateDestinationDuckdbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationDuckdb", @@ -1028,6 +1248,17 @@ func (s *Destinations) CreateDestinationDuckdb(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1039,6 +1270,17 @@ func (s *Destinations) CreateDestinationDuckdb(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1119,7 +1361,7 @@ func (s *Destinations) CreateDestinationDuckdb(ctx context.Context, request *sha // CreateDestinationDynamodb - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationDynamodb(ctx context.Context, request *shared.DestinationDynamodbCreateRequest) (*operations.CreateDestinationDynamodbResponse, error) { +func (s *Destinations) CreateDestinationDynamodb(ctx context.Context, request *shared.DestinationDynamodbCreateRequest, opts ...operations.Option) (*operations.CreateDestinationDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationDynamodb", @@ -1127,6 +1369,17 @@ func (s *Destinations) CreateDestinationDynamodb(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1138,6 +1391,17 @@ func (s *Destinations) CreateDestinationDynamodb(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1218,7 +1482,7 @@ func (s *Destinations) CreateDestinationDynamodb(ctx context.Context, request *s // CreateDestinationElasticsearch - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationElasticsearch(ctx context.Context, request *shared.DestinationElasticsearchCreateRequest) (*operations.CreateDestinationElasticsearchResponse, error) { +func (s *Destinations) CreateDestinationElasticsearch(ctx context.Context, request *shared.DestinationElasticsearchCreateRequest, opts ...operations.Option) (*operations.CreateDestinationElasticsearchResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationElasticsearch", @@ -1226,6 +1490,17 @@ func (s *Destinations) CreateDestinationElasticsearch(ctx context.Context, reque SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1237,6 +1512,17 @@ func (s *Destinations) CreateDestinationElasticsearch(ctx context.Context, reque return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1317,7 +1603,7 @@ func (s *Destinations) CreateDestinationElasticsearch(ctx context.Context, reque // CreateDestinationFirebolt - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationFirebolt(ctx context.Context, request *shared.DestinationFireboltCreateRequest) (*operations.CreateDestinationFireboltResponse, error) { +func (s *Destinations) CreateDestinationFirebolt(ctx context.Context, request *shared.DestinationFireboltCreateRequest, opts ...operations.Option) (*operations.CreateDestinationFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationFirebolt", @@ -1325,6 +1611,17 @@ func (s *Destinations) CreateDestinationFirebolt(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1336,6 +1633,17 @@ func (s *Destinations) CreateDestinationFirebolt(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1416,7 +1724,7 @@ func (s *Destinations) CreateDestinationFirebolt(ctx context.Context, request *s // CreateDestinationFirestore - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationFirestore(ctx context.Context, request *shared.DestinationFirestoreCreateRequest) (*operations.CreateDestinationFirestoreResponse, error) { +func (s *Destinations) CreateDestinationFirestore(ctx context.Context, request *shared.DestinationFirestoreCreateRequest, opts ...operations.Option) (*operations.CreateDestinationFirestoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationFirestore", @@ -1424,6 +1732,17 @@ func (s *Destinations) CreateDestinationFirestore(ctx context.Context, request * SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1435,6 +1754,17 @@ func (s *Destinations) CreateDestinationFirestore(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1515,7 +1845,7 @@ func (s *Destinations) CreateDestinationFirestore(ctx context.Context, request * // CreateDestinationGcs - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationGcs(ctx context.Context, request *shared.DestinationGcsCreateRequest) (*operations.CreateDestinationGcsResponse, error) { +func (s *Destinations) CreateDestinationGcs(ctx context.Context, request *shared.DestinationGcsCreateRequest, opts ...operations.Option) (*operations.CreateDestinationGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationGcs", @@ -1523,6 +1853,17 @@ func (s *Destinations) CreateDestinationGcs(ctx context.Context, request *shared SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1534,6 +1875,17 @@ func (s *Destinations) CreateDestinationGcs(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1614,7 +1966,7 @@ func (s *Destinations) CreateDestinationGcs(ctx context.Context, request *shared // CreateDestinationGoogleSheets - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationGoogleSheets(ctx context.Context, request *shared.DestinationGoogleSheetsCreateRequest) (*operations.CreateDestinationGoogleSheetsResponse, error) { +func (s *Destinations) CreateDestinationGoogleSheets(ctx context.Context, request *shared.DestinationGoogleSheetsCreateRequest, opts ...operations.Option) (*operations.CreateDestinationGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationGoogleSheets", @@ -1622,6 +1974,17 @@ func (s *Destinations) CreateDestinationGoogleSheets(ctx context.Context, reques SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1633,6 +1996,17 @@ func (s *Destinations) CreateDestinationGoogleSheets(ctx context.Context, reques return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1711,16 +2085,27 @@ func (s *Destinations) CreateDestinationGoogleSheets(ctx context.Context, reques } -// CreateDestinationLangchain - Create a destination +// CreateDestinationMilvus - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationLangchain(ctx context.Context, request *shared.DestinationLangchainCreateRequest) (*operations.CreateDestinationLangchainResponse, error) { +func (s *Destinations) CreateDestinationMilvus(ctx context.Context, request *shared.DestinationMilvusCreateRequest, opts ...operations.Option) (*operations.CreateDestinationMilvusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationLangchain", + OperationID: "createDestinationMilvus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1732,6 +2117,17 @@ func (s *Destinations) CreateDestinationLangchain(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1773,7 +2169,7 @@ func (s *Destinations) CreateDestinationLangchain(ctx context.Context, request * } } - res := &operations.CreateDestinationLangchainResponse{ + res := &operations.CreateDestinationMilvusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -1810,16 +2206,27 @@ func (s *Destinations) CreateDestinationLangchain(ctx context.Context, request * } -// CreateDestinationMilvus - Create a destination +// CreateDestinationMongodb - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationMilvus(ctx context.Context, request *shared.DestinationMilvusCreateRequest) (*operations.CreateDestinationMilvusResponse, error) { +func (s *Destinations) CreateDestinationMongodb(ctx context.Context, request *shared.DestinationMongodbCreateRequest, opts ...operations.Option) (*operations.CreateDestinationMongodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationMilvus", + OperationID: "createDestinationMongodb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1831,6 +2238,17 @@ func (s *Destinations) CreateDestinationMilvus(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1872,7 +2290,7 @@ func (s *Destinations) CreateDestinationMilvus(ctx context.Context, request *sha } } - res := &operations.CreateDestinationMilvusResponse{ + res := &operations.CreateDestinationMongodbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -1909,16 +2327,27 @@ func (s *Destinations) CreateDestinationMilvus(ctx context.Context, request *sha } -// CreateDestinationMongodb - Create a destination +// CreateDestinationMssql - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationMongodb(ctx context.Context, request *shared.DestinationMongodbCreateRequest) (*operations.CreateDestinationMongodbResponse, error) { +func (s *Destinations) CreateDestinationMssql(ctx context.Context, request *shared.DestinationMssqlCreateRequest, opts ...operations.Option) (*operations.CreateDestinationMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationMongodb", + OperationID: "createDestinationMssql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -1930,6 +2359,17 @@ func (s *Destinations) CreateDestinationMongodb(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1971,7 +2411,7 @@ func (s *Destinations) CreateDestinationMongodb(ctx context.Context, request *sh } } - res := &operations.CreateDestinationMongodbResponse{ + res := &operations.CreateDestinationMssqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2008,16 +2448,27 @@ func (s *Destinations) CreateDestinationMongodb(ctx context.Context, request *sh } -// CreateDestinationMssql - Create a destination +// CreateDestinationMysql - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationMssql(ctx context.Context, request *shared.DestinationMssqlCreateRequest) (*operations.CreateDestinationMssqlResponse, error) { +func (s *Destinations) CreateDestinationMysql(ctx context.Context, request *shared.DestinationMysqlCreateRequest, opts ...operations.Option) (*operations.CreateDestinationMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationMssql", + OperationID: "createDestinationMysql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2029,6 +2480,17 @@ func (s *Destinations) CreateDestinationMssql(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2070,7 +2532,7 @@ func (s *Destinations) CreateDestinationMssql(ctx context.Context, request *shar } } - res := &operations.CreateDestinationMssqlResponse{ + res := &operations.CreateDestinationMysqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2107,16 +2569,27 @@ func (s *Destinations) CreateDestinationMssql(ctx context.Context, request *shar } -// CreateDestinationMysql - Create a destination +// CreateDestinationOracle - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationMysql(ctx context.Context, request *shared.DestinationMysqlCreateRequest) (*operations.CreateDestinationMysqlResponse, error) { +func (s *Destinations) CreateDestinationOracle(ctx context.Context, request *shared.DestinationOracleCreateRequest, opts ...operations.Option) (*operations.CreateDestinationOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationMysql", + OperationID: "createDestinationOracle", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2128,6 +2601,17 @@ func (s *Destinations) CreateDestinationMysql(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2169,7 +2653,7 @@ func (s *Destinations) CreateDestinationMysql(ctx context.Context, request *shar } } - res := &operations.CreateDestinationMysqlResponse{ + res := &operations.CreateDestinationOracleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2206,16 +2690,27 @@ func (s *Destinations) CreateDestinationMysql(ctx context.Context, request *shar } -// CreateDestinationOracle - Create a destination +// CreateDestinationPinecone - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationOracle(ctx context.Context, request *shared.DestinationOracleCreateRequest) (*operations.CreateDestinationOracleResponse, error) { +func (s *Destinations) CreateDestinationPinecone(ctx context.Context, request *shared.DestinationPineconeCreateRequest, opts ...operations.Option) (*operations.CreateDestinationPineconeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationOracle", + OperationID: "createDestinationPinecone", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2227,6 +2722,17 @@ func (s *Destinations) CreateDestinationOracle(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2268,7 +2774,7 @@ func (s *Destinations) CreateDestinationOracle(ctx context.Context, request *sha } } - res := &operations.CreateDestinationOracleResponse{ + res := &operations.CreateDestinationPineconeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2305,16 +2811,27 @@ func (s *Destinations) CreateDestinationOracle(ctx context.Context, request *sha } -// CreateDestinationPinecone - Create a destination +// CreateDestinationPostgres - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationPinecone(ctx context.Context, request *shared.DestinationPineconeCreateRequest) (*operations.CreateDestinationPineconeResponse, error) { +func (s *Destinations) CreateDestinationPostgres(ctx context.Context, request *shared.DestinationPostgresCreateRequest, opts ...operations.Option) (*operations.CreateDestinationPostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationPinecone", + OperationID: "createDestinationPostgres", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2326,6 +2843,17 @@ func (s *Destinations) CreateDestinationPinecone(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2367,7 +2895,7 @@ func (s *Destinations) CreateDestinationPinecone(ctx context.Context, request *s } } - res := &operations.CreateDestinationPineconeResponse{ + res := &operations.CreateDestinationPostgresResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2404,113 +2932,25 @@ func (s *Destinations) CreateDestinationPinecone(ctx context.Context, request *s } -// CreateDestinationPostgres - Create a destination +// CreateDestinationPubsub - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationPostgres(ctx context.Context, request *shared.DestinationPostgresCreateRequest) (*operations.CreateDestinationPostgresResponse, error) { +func (s *Destinations) CreateDestinationPubsub(ctx context.Context, request *shared.DestinationPubsubCreateRequest, opts ...operations.Option) (*operations.CreateDestinationPubsubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createDestinationPostgres", + OperationID: "createDestinationPubsub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/destinations") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateDestinationPostgresResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.DestinationResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - res.DestinationResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateDestinationPubsub - Create a destination -// Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationPubsub(ctx context.Context, request *shared.DestinationPubsubCreateRequest) (*operations.CreateDestinationPubsubResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createDestinationPubsub", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -2524,6 +2964,17 @@ func (s *Destinations) CreateDestinationPubsub(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2604,7 +3055,7 @@ func (s *Destinations) CreateDestinationPubsub(ctx context.Context, request *sha // CreateDestinationQdrant - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationQdrant(ctx context.Context, request *shared.DestinationQdrantCreateRequest) (*operations.CreateDestinationQdrantResponse, error) { +func (s *Destinations) CreateDestinationQdrant(ctx context.Context, request *shared.DestinationQdrantCreateRequest, opts ...operations.Option) (*operations.CreateDestinationQdrantResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationQdrant", @@ -2612,6 +3063,17 @@ func (s *Destinations) CreateDestinationQdrant(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2623,6 +3085,17 @@ func (s *Destinations) CreateDestinationQdrant(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2703,7 +3176,7 @@ func (s *Destinations) CreateDestinationQdrant(ctx context.Context, request *sha // CreateDestinationRedis - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationRedis(ctx context.Context, request *shared.DestinationRedisCreateRequest) (*operations.CreateDestinationRedisResponse, error) { +func (s *Destinations) CreateDestinationRedis(ctx context.Context, request *shared.DestinationRedisCreateRequest, opts ...operations.Option) (*operations.CreateDestinationRedisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationRedis", @@ -2711,6 +3184,17 @@ func (s *Destinations) CreateDestinationRedis(ctx context.Context, request *shar SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2722,6 +3206,17 @@ func (s *Destinations) CreateDestinationRedis(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2802,7 +3297,7 @@ func (s *Destinations) CreateDestinationRedis(ctx context.Context, request *shar // CreateDestinationRedshift - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationRedshift(ctx context.Context, request *shared.DestinationRedshiftCreateRequest) (*operations.CreateDestinationRedshiftResponse, error) { +func (s *Destinations) CreateDestinationRedshift(ctx context.Context, request *shared.DestinationRedshiftCreateRequest, opts ...operations.Option) (*operations.CreateDestinationRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationRedshift", @@ -2810,6 +3305,17 @@ func (s *Destinations) CreateDestinationRedshift(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2821,6 +3327,17 @@ func (s *Destinations) CreateDestinationRedshift(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2901,7 +3418,7 @@ func (s *Destinations) CreateDestinationRedshift(ctx context.Context, request *s // CreateDestinationS3 - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationS3(ctx context.Context, request *shared.DestinationS3CreateRequest) (*operations.CreateDestinationS3Response, error) { +func (s *Destinations) CreateDestinationS3(ctx context.Context, request *shared.DestinationS3CreateRequest, opts ...operations.Option) (*operations.CreateDestinationS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationS3", @@ -2909,6 +3426,17 @@ func (s *Destinations) CreateDestinationS3(ctx context.Context, request *shared. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -2920,6 +3448,17 @@ func (s *Destinations) CreateDestinationS3(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3000,7 +3539,7 @@ func (s *Destinations) CreateDestinationS3(ctx context.Context, request *shared. // CreateDestinationS3Glue - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationS3Glue(ctx context.Context, request *shared.DestinationS3GlueCreateRequest) (*operations.CreateDestinationS3GlueResponse, error) { +func (s *Destinations) CreateDestinationS3Glue(ctx context.Context, request *shared.DestinationS3GlueCreateRequest, opts ...operations.Option) (*operations.CreateDestinationS3GlueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationS3Glue", @@ -3008,6 +3547,17 @@ func (s *Destinations) CreateDestinationS3Glue(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3019,6 +3569,17 @@ func (s *Destinations) CreateDestinationS3Glue(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3099,7 +3660,7 @@ func (s *Destinations) CreateDestinationS3Glue(ctx context.Context, request *sha // CreateDestinationSftpJSON - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationSftpJSON(ctx context.Context, request *shared.DestinationSftpJSONCreateRequest) (*operations.CreateDestinationSftpJSONResponse, error) { +func (s *Destinations) CreateDestinationSftpJSON(ctx context.Context, request *shared.DestinationSftpJSONCreateRequest, opts ...operations.Option) (*operations.CreateDestinationSftpJSONResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationSftpJson", @@ -3107,6 +3668,17 @@ func (s *Destinations) CreateDestinationSftpJSON(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3118,6 +3690,17 @@ func (s *Destinations) CreateDestinationSftpJSON(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3198,7 +3781,7 @@ func (s *Destinations) CreateDestinationSftpJSON(ctx context.Context, request *s // CreateDestinationSnowflake - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationSnowflake(ctx context.Context, request *shared.DestinationSnowflakeCreateRequest) (*operations.CreateDestinationSnowflakeResponse, error) { +func (s *Destinations) CreateDestinationSnowflake(ctx context.Context, request *shared.DestinationSnowflakeCreateRequest, opts ...operations.Option) (*operations.CreateDestinationSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationSnowflake", @@ -3206,6 +3789,17 @@ func (s *Destinations) CreateDestinationSnowflake(ctx context.Context, request * SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3217,6 +3811,17 @@ func (s *Destinations) CreateDestinationSnowflake(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3297,7 +3902,7 @@ func (s *Destinations) CreateDestinationSnowflake(ctx context.Context, request * // CreateDestinationSnowflakeCortex - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationSnowflakeCortex(ctx context.Context, request *shared.DestinationSnowflakeCortexCreateRequest) (*operations.CreateDestinationSnowflakeCortexResponse, error) { +func (s *Destinations) CreateDestinationSnowflakeCortex(ctx context.Context, request *shared.DestinationSnowflakeCortexCreateRequest, opts ...operations.Option) (*operations.CreateDestinationSnowflakeCortexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationSnowflakeCortex", @@ -3305,6 +3910,17 @@ func (s *Destinations) CreateDestinationSnowflakeCortex(ctx context.Context, req SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3316,6 +3932,17 @@ func (s *Destinations) CreateDestinationSnowflakeCortex(ctx context.Context, req return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3396,7 +4023,7 @@ func (s *Destinations) CreateDestinationSnowflakeCortex(ctx context.Context, req // CreateDestinationTeradata - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationTeradata(ctx context.Context, request *shared.DestinationTeradataCreateRequest) (*operations.CreateDestinationTeradataResponse, error) { +func (s *Destinations) CreateDestinationTeradata(ctx context.Context, request *shared.DestinationTeradataCreateRequest, opts ...operations.Option) (*operations.CreateDestinationTeradataResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationTeradata", @@ -3404,6 +4031,17 @@ func (s *Destinations) CreateDestinationTeradata(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3415,6 +4053,17 @@ func (s *Destinations) CreateDestinationTeradata(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3495,7 +4144,7 @@ func (s *Destinations) CreateDestinationTeradata(ctx context.Context, request *s // CreateDestinationTypesense - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationTypesense(ctx context.Context, request *shared.DestinationTypesenseCreateRequest) (*operations.CreateDestinationTypesenseResponse, error) { +func (s *Destinations) CreateDestinationTypesense(ctx context.Context, request *shared.DestinationTypesenseCreateRequest, opts ...operations.Option) (*operations.CreateDestinationTypesenseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationTypesense", @@ -3503,6 +4152,17 @@ func (s *Destinations) CreateDestinationTypesense(ctx context.Context, request * SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3514,6 +4174,17 @@ func (s *Destinations) CreateDestinationTypesense(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3594,7 +4265,7 @@ func (s *Destinations) CreateDestinationTypesense(ctx context.Context, request * // CreateDestinationVectara - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationVectara(ctx context.Context, request *shared.DestinationVectaraCreateRequest) (*operations.CreateDestinationVectaraResponse, error) { +func (s *Destinations) CreateDestinationVectara(ctx context.Context, request *shared.DestinationVectaraCreateRequest, opts ...operations.Option) (*operations.CreateDestinationVectaraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationVectara", @@ -3602,6 +4273,17 @@ func (s *Destinations) CreateDestinationVectara(ctx context.Context, request *sh SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3613,6 +4295,17 @@ func (s *Destinations) CreateDestinationVectara(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3693,7 +4386,7 @@ func (s *Destinations) CreateDestinationVectara(ctx context.Context, request *sh // CreateDestinationWeaviate - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationWeaviate(ctx context.Context, request *shared.DestinationWeaviateCreateRequest) (*operations.CreateDestinationWeaviateResponse, error) { +func (s *Destinations) CreateDestinationWeaviate(ctx context.Context, request *shared.DestinationWeaviateCreateRequest, opts ...operations.Option) (*operations.CreateDestinationWeaviateResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationWeaviate", @@ -3701,6 +4394,17 @@ func (s *Destinations) CreateDestinationWeaviate(ctx context.Context, request *s SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3712,6 +4416,17 @@ func (s *Destinations) CreateDestinationWeaviate(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3792,7 +4507,7 @@ func (s *Destinations) CreateDestinationWeaviate(ctx context.Context, request *s // CreateDestinationYellowbrick - Create a destination // Creates a destination given a name, workspace id, and a json blob containing the configuration for the destination. -func (s *Destinations) CreateDestinationYellowbrick(ctx context.Context, request *shared.DestinationYellowbrickCreateRequest) (*operations.CreateDestinationYellowbrickResponse, error) { +func (s *Destinations) CreateDestinationYellowbrick(ctx context.Context, request *shared.DestinationYellowbrickCreateRequest, opts ...operations.Option) (*operations.CreateDestinationYellowbrickResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createDestinationYellowbrick", @@ -3800,6 +4515,17 @@ func (s *Destinations) CreateDestinationYellowbrick(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { @@ -3811,6 +4537,17 @@ func (s *Destinations) CreateDestinationYellowbrick(ctx context.Context, request return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3890,7 +4627,7 @@ func (s *Destinations) CreateDestinationYellowbrick(ctx context.Context, request } // DeleteDestination - Delete a Destination -func (s *Destinations) DeleteDestination(ctx context.Context, request operations.DeleteDestinationRequest) (*operations.DeleteDestinationResponse, error) { +func (s *Destinations) DeleteDestination(ctx context.Context, request operations.DeleteDestinationRequest, opts ...operations.Option) (*operations.DeleteDestinationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestination", @@ -3898,12 +4635,34 @@ func (s *Destinations) DeleteDestination(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3972,7 +4731,7 @@ func (s *Destinations) DeleteDestination(ctx context.Context, request operations } // DeleteDestinationAstra - Delete a Destination -func (s *Destinations) DeleteDestinationAstra(ctx context.Context, request operations.DeleteDestinationAstraRequest) (*operations.DeleteDestinationAstraResponse, error) { +func (s *Destinations) DeleteDestinationAstra(ctx context.Context, request operations.DeleteDestinationAstraRequest, opts ...operations.Option) (*operations.DeleteDestinationAstraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationAstra", @@ -3980,12 +4739,34 @@ func (s *Destinations) DeleteDestinationAstra(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4054,7 +4835,7 @@ func (s *Destinations) DeleteDestinationAstra(ctx context.Context, request opera } // DeleteDestinationAwsDatalake - Delete a Destination -func (s *Destinations) DeleteDestinationAwsDatalake(ctx context.Context, request operations.DeleteDestinationAwsDatalakeRequest) (*operations.DeleteDestinationAwsDatalakeResponse, error) { +func (s *Destinations) DeleteDestinationAwsDatalake(ctx context.Context, request operations.DeleteDestinationAwsDatalakeRequest, opts ...operations.Option) (*operations.DeleteDestinationAwsDatalakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationAwsDatalake", @@ -4062,12 +4843,34 @@ func (s *Destinations) DeleteDestinationAwsDatalake(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4136,7 +4939,7 @@ func (s *Destinations) DeleteDestinationAwsDatalake(ctx context.Context, request } // DeleteDestinationAzureBlobStorage - Delete a Destination -func (s *Destinations) DeleteDestinationAzureBlobStorage(ctx context.Context, request operations.DeleteDestinationAzureBlobStorageRequest) (*operations.DeleteDestinationAzureBlobStorageResponse, error) { +func (s *Destinations) DeleteDestinationAzureBlobStorage(ctx context.Context, request operations.DeleteDestinationAzureBlobStorageRequest, opts ...operations.Option) (*operations.DeleteDestinationAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationAzureBlobStorage", @@ -4144,12 +4947,34 @@ func (s *Destinations) DeleteDestinationAzureBlobStorage(ctx context.Context, re SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4218,7 +5043,7 @@ func (s *Destinations) DeleteDestinationAzureBlobStorage(ctx context.Context, re } // DeleteDestinationBigquery - Delete a Destination -func (s *Destinations) DeleteDestinationBigquery(ctx context.Context, request operations.DeleteDestinationBigqueryRequest) (*operations.DeleteDestinationBigqueryResponse, error) { +func (s *Destinations) DeleteDestinationBigquery(ctx context.Context, request operations.DeleteDestinationBigqueryRequest, opts ...operations.Option) (*operations.DeleteDestinationBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationBigquery", @@ -4226,12 +5051,34 @@ func (s *Destinations) DeleteDestinationBigquery(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) + if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4300,7 +5147,7 @@ func (s *Destinations) DeleteDestinationBigquery(ctx context.Context, request op } // DeleteDestinationClickhouse - Delete a Destination -func (s *Destinations) DeleteDestinationClickhouse(ctx context.Context, request operations.DeleteDestinationClickhouseRequest) (*operations.DeleteDestinationClickhouseResponse, error) { +func (s *Destinations) DeleteDestinationClickhouse(ctx context.Context, request operations.DeleteDestinationClickhouseRequest, opts ...operations.Option) (*operations.DeleteDestinationClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationClickhouse", @@ -4308,12 +5155,34 @@ func (s *Destinations) DeleteDestinationClickhouse(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4382,7 +5251,7 @@ func (s *Destinations) DeleteDestinationClickhouse(ctx context.Context, request } // DeleteDestinationConvex - Delete a Destination -func (s *Destinations) DeleteDestinationConvex(ctx context.Context, request operations.DeleteDestinationConvexRequest) (*operations.DeleteDestinationConvexResponse, error) { +func (s *Destinations) DeleteDestinationConvex(ctx context.Context, request operations.DeleteDestinationConvexRequest, opts ...operations.Option) (*operations.DeleteDestinationConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationConvex", @@ -4390,12 +5259,34 @@ func (s *Destinations) DeleteDestinationConvex(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4464,7 +5355,7 @@ func (s *Destinations) DeleteDestinationConvex(ctx context.Context, request oper } // DeleteDestinationCustom - Delete a Destination -func (s *Destinations) DeleteDestinationCustom(ctx context.Context, request operations.DeleteDestinationCustomRequest) (*operations.DeleteDestinationCustomResponse, error) { +func (s *Destinations) DeleteDestinationCustom(ctx context.Context, request operations.DeleteDestinationCustomRequest, opts ...operations.Option) (*operations.DeleteDestinationCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationCustom", @@ -4472,12 +5363,34 @@ func (s *Destinations) DeleteDestinationCustom(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4546,7 +5459,7 @@ func (s *Destinations) DeleteDestinationCustom(ctx context.Context, request oper } // DeleteDestinationDatabricks - Delete a Destination -func (s *Destinations) DeleteDestinationDatabricks(ctx context.Context, request operations.DeleteDestinationDatabricksRequest) (*operations.DeleteDestinationDatabricksResponse, error) { +func (s *Destinations) DeleteDestinationDatabricks(ctx context.Context, request operations.DeleteDestinationDatabricksRequest, opts ...operations.Option) (*operations.DeleteDestinationDatabricksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationDatabricks", @@ -4554,12 +5467,34 @@ func (s *Destinations) DeleteDestinationDatabricks(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4628,7 +5563,7 @@ func (s *Destinations) DeleteDestinationDatabricks(ctx context.Context, request } // DeleteDestinationDevNull - Delete a Destination -func (s *Destinations) DeleteDestinationDevNull(ctx context.Context, request operations.DeleteDestinationDevNullRequest) (*operations.DeleteDestinationDevNullResponse, error) { +func (s *Destinations) DeleteDestinationDevNull(ctx context.Context, request operations.DeleteDestinationDevNullRequest, opts ...operations.Option) (*operations.DeleteDestinationDevNullResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationDevNull", @@ -4636,12 +5571,34 @@ func (s *Destinations) DeleteDestinationDevNull(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4710,7 +5667,7 @@ func (s *Destinations) DeleteDestinationDevNull(ctx context.Context, request ope } // DeleteDestinationDuckdb - Delete a Destination -func (s *Destinations) DeleteDestinationDuckdb(ctx context.Context, request operations.DeleteDestinationDuckdbRequest) (*operations.DeleteDestinationDuckdbResponse, error) { +func (s *Destinations) DeleteDestinationDuckdb(ctx context.Context, request operations.DeleteDestinationDuckdbRequest, opts ...operations.Option) (*operations.DeleteDestinationDuckdbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationDuckdb", @@ -4718,12 +5675,34 @@ func (s *Destinations) DeleteDestinationDuckdb(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4792,7 +5771,7 @@ func (s *Destinations) DeleteDestinationDuckdb(ctx context.Context, request oper } // DeleteDestinationDynamodb - Delete a Destination -func (s *Destinations) DeleteDestinationDynamodb(ctx context.Context, request operations.DeleteDestinationDynamodbRequest) (*operations.DeleteDestinationDynamodbResponse, error) { +func (s *Destinations) DeleteDestinationDynamodb(ctx context.Context, request operations.DeleteDestinationDynamodbRequest, opts ...operations.Option) (*operations.DeleteDestinationDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationDynamodb", @@ -4800,12 +5779,34 @@ func (s *Destinations) DeleteDestinationDynamodb(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4874,7 +5875,7 @@ func (s *Destinations) DeleteDestinationDynamodb(ctx context.Context, request op } // DeleteDestinationElasticsearch - Delete a Destination -func (s *Destinations) DeleteDestinationElasticsearch(ctx context.Context, request operations.DeleteDestinationElasticsearchRequest) (*operations.DeleteDestinationElasticsearchResponse, error) { +func (s *Destinations) DeleteDestinationElasticsearch(ctx context.Context, request operations.DeleteDestinationElasticsearchRequest, opts ...operations.Option) (*operations.DeleteDestinationElasticsearchResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationElasticsearch", @@ -4882,12 +5883,34 @@ func (s *Destinations) DeleteDestinationElasticsearch(ctx context.Context, reque SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4956,7 +5979,7 @@ func (s *Destinations) DeleteDestinationElasticsearch(ctx context.Context, reque } // DeleteDestinationFirebolt - Delete a Destination -func (s *Destinations) DeleteDestinationFirebolt(ctx context.Context, request operations.DeleteDestinationFireboltRequest) (*operations.DeleteDestinationFireboltResponse, error) { +func (s *Destinations) DeleteDestinationFirebolt(ctx context.Context, request operations.DeleteDestinationFireboltRequest, opts ...operations.Option) (*operations.DeleteDestinationFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationFirebolt", @@ -4964,12 +5987,34 @@ func (s *Destinations) DeleteDestinationFirebolt(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5038,7 +6083,7 @@ func (s *Destinations) DeleteDestinationFirebolt(ctx context.Context, request op } // DeleteDestinationFirestore - Delete a Destination -func (s *Destinations) DeleteDestinationFirestore(ctx context.Context, request operations.DeleteDestinationFirestoreRequest) (*operations.DeleteDestinationFirestoreResponse, error) { +func (s *Destinations) DeleteDestinationFirestore(ctx context.Context, request operations.DeleteDestinationFirestoreRequest, opts ...operations.Option) (*operations.DeleteDestinationFirestoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationFirestore", @@ -5046,12 +6091,34 @@ func (s *Destinations) DeleteDestinationFirestore(ctx context.Context, request o SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5120,7 +6187,7 @@ func (s *Destinations) DeleteDestinationFirestore(ctx context.Context, request o } // DeleteDestinationGcs - Delete a Destination -func (s *Destinations) DeleteDestinationGcs(ctx context.Context, request operations.DeleteDestinationGcsRequest) (*operations.DeleteDestinationGcsResponse, error) { +func (s *Destinations) DeleteDestinationGcs(ctx context.Context, request operations.DeleteDestinationGcsRequest, opts ...operations.Option) (*operations.DeleteDestinationGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationGcs", @@ -5128,12 +6195,34 @@ func (s *Destinations) DeleteDestinationGcs(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5202,7 +6291,7 @@ func (s *Destinations) DeleteDestinationGcs(ctx context.Context, request operati } // DeleteDestinationGoogleSheets - Delete a Destination -func (s *Destinations) DeleteDestinationGoogleSheets(ctx context.Context, request operations.DeleteDestinationGoogleSheetsRequest) (*operations.DeleteDestinationGoogleSheetsResponse, error) { +func (s *Destinations) DeleteDestinationGoogleSheets(ctx context.Context, request operations.DeleteDestinationGoogleSheetsRequest, opts ...operations.Option) (*operations.DeleteDestinationGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationGoogleSheets", @@ -5210,12 +6299,34 @@ func (s *Destinations) DeleteDestinationGoogleSheets(ctx context.Context, reques SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5283,21 +6394,43 @@ func (s *Destinations) DeleteDestinationGoogleSheets(ctx context.Context, reques } -// DeleteDestinationLangchain - Delete a Destination -func (s *Destinations) DeleteDestinationLangchain(ctx context.Context, request operations.DeleteDestinationLangchainRequest) (*operations.DeleteDestinationLangchainResponse, error) { +// DeleteDestinationMilvus - Delete a Destination +func (s *Destinations) DeleteDestinationMilvus(ctx context.Context, request operations.DeleteDestinationMilvusRequest, opts ...operations.Option) (*operations.DeleteDestinationMilvusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationLangchain", + OperationID: "deleteDestinationMilvus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5338,7 +6471,7 @@ func (s *Destinations) DeleteDestinationLangchain(ctx context.Context, request o } } - res := &operations.DeleteDestinationLangchainResponse{ + res := &operations.DeleteDestinationMilvusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5365,21 +6498,43 @@ func (s *Destinations) DeleteDestinationLangchain(ctx context.Context, request o } -// DeleteDestinationMilvus - Delete a Destination -func (s *Destinations) DeleteDestinationMilvus(ctx context.Context, request operations.DeleteDestinationMilvusRequest) (*operations.DeleteDestinationMilvusResponse, error) { +// DeleteDestinationMongodb - Delete a Destination +func (s *Destinations) DeleteDestinationMongodb(ctx context.Context, request operations.DeleteDestinationMongodbRequest, opts ...operations.Option) (*operations.DeleteDestinationMongodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationMilvus", + OperationID: "deleteDestinationMongodb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5420,7 +6575,7 @@ func (s *Destinations) DeleteDestinationMilvus(ctx context.Context, request oper } } - res := &operations.DeleteDestinationMilvusResponse{ + res := &operations.DeleteDestinationMongodbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5447,21 +6602,43 @@ func (s *Destinations) DeleteDestinationMilvus(ctx context.Context, request oper } -// DeleteDestinationMongodb - Delete a Destination -func (s *Destinations) DeleteDestinationMongodb(ctx context.Context, request operations.DeleteDestinationMongodbRequest) (*operations.DeleteDestinationMongodbResponse, error) { +// DeleteDestinationMssql - Delete a Destination +func (s *Destinations) DeleteDestinationMssql(ctx context.Context, request operations.DeleteDestinationMssqlRequest, opts ...operations.Option) (*operations.DeleteDestinationMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationMongodb", + OperationID: "deleteDestinationMssql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5502,7 +6679,7 @@ func (s *Destinations) DeleteDestinationMongodb(ctx context.Context, request ope } } - res := &operations.DeleteDestinationMongodbResponse{ + res := &operations.DeleteDestinationMssqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5529,21 +6706,43 @@ func (s *Destinations) DeleteDestinationMongodb(ctx context.Context, request ope } -// DeleteDestinationMssql - Delete a Destination -func (s *Destinations) DeleteDestinationMssql(ctx context.Context, request operations.DeleteDestinationMssqlRequest) (*operations.DeleteDestinationMssqlResponse, error) { +// DeleteDestinationMysql - Delete a Destination +func (s *Destinations) DeleteDestinationMysql(ctx context.Context, request operations.DeleteDestinationMysqlRequest, opts ...operations.Option) (*operations.DeleteDestinationMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationMssql", + OperationID: "deleteDestinationMysql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5584,7 +6783,7 @@ func (s *Destinations) DeleteDestinationMssql(ctx context.Context, request opera } } - res := &operations.DeleteDestinationMssqlResponse{ + res := &operations.DeleteDestinationMysqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5611,21 +6810,43 @@ func (s *Destinations) DeleteDestinationMssql(ctx context.Context, request opera } -// DeleteDestinationMysql - Delete a Destination -func (s *Destinations) DeleteDestinationMysql(ctx context.Context, request operations.DeleteDestinationMysqlRequest) (*operations.DeleteDestinationMysqlResponse, error) { +// DeleteDestinationOracle - Delete a Destination +func (s *Destinations) DeleteDestinationOracle(ctx context.Context, request operations.DeleteDestinationOracleRequest, opts ...operations.Option) (*operations.DeleteDestinationOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationMysql", + OperationID: "deleteDestinationOracle", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5666,7 +6887,7 @@ func (s *Destinations) DeleteDestinationMysql(ctx context.Context, request opera } } - res := &operations.DeleteDestinationMysqlResponse{ + res := &operations.DeleteDestinationOracleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5693,21 +6914,43 @@ func (s *Destinations) DeleteDestinationMysql(ctx context.Context, request opera } -// DeleteDestinationOracle - Delete a Destination -func (s *Destinations) DeleteDestinationOracle(ctx context.Context, request operations.DeleteDestinationOracleRequest) (*operations.DeleteDestinationOracleResponse, error) { +// DeleteDestinationPinecone - Delete a Destination +func (s *Destinations) DeleteDestinationPinecone(ctx context.Context, request operations.DeleteDestinationPineconeRequest, opts ...operations.Option) (*operations.DeleteDestinationPineconeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationOracle", + OperationID: "deleteDestinationPinecone", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5748,7 +6991,7 @@ func (s *Destinations) DeleteDestinationOracle(ctx context.Context, request oper } } - res := &operations.DeleteDestinationOracleResponse{ + res := &operations.DeleteDestinationPineconeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5775,21 +7018,43 @@ func (s *Destinations) DeleteDestinationOracle(ctx context.Context, request oper } -// DeleteDestinationPinecone - Delete a Destination -func (s *Destinations) DeleteDestinationPinecone(ctx context.Context, request operations.DeleteDestinationPineconeRequest) (*operations.DeleteDestinationPineconeResponse, error) { +// DeleteDestinationPostgres - Delete a Destination +func (s *Destinations) DeleteDestinationPostgres(ctx context.Context, request operations.DeleteDestinationPostgresRequest, opts ...operations.Option) (*operations.DeleteDestinationPostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationPinecone", + OperationID: "deleteDestinationPostgres", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5830,7 +7095,7 @@ func (s *Destinations) DeleteDestinationPinecone(ctx context.Context, request op } } - res := &operations.DeleteDestinationPineconeResponse{ + res := &operations.DeleteDestinationPostgresResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5857,21 +7122,43 @@ func (s *Destinations) DeleteDestinationPinecone(ctx context.Context, request op } -// DeleteDestinationPostgres - Delete a Destination -func (s *Destinations) DeleteDestinationPostgres(ctx context.Context, request operations.DeleteDestinationPostgresRequest) (*operations.DeleteDestinationPostgresResponse, error) { +// DeleteDestinationPubsub - Delete a Destination +func (s *Destinations) DeleteDestinationPubsub(ctx context.Context, request operations.DeleteDestinationPubsubRequest, opts ...operations.Option) (*operations.DeleteDestinationPubsubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationPostgres", + OperationID: "deleteDestinationPubsub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5912,7 +7199,7 @@ func (s *Destinations) DeleteDestinationPostgres(ctx context.Context, request op } } - res := &operations.DeleteDestinationPostgresResponse{ + res := &operations.DeleteDestinationPubsubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5939,21 +7226,43 @@ func (s *Destinations) DeleteDestinationPostgres(ctx context.Context, request op } -// DeleteDestinationPubsub - Delete a Destination -func (s *Destinations) DeleteDestinationPubsub(ctx context.Context, request operations.DeleteDestinationPubsubRequest) (*operations.DeleteDestinationPubsubResponse, error) { +// DeleteDestinationQdrant - Delete a Destination +func (s *Destinations) DeleteDestinationQdrant(ctx context.Context, request operations.DeleteDestinationQdrantRequest, opts ...operations.Option) (*operations.DeleteDestinationQdrantResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationPubsub", + OperationID: "deleteDestinationQdrant", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5994,7 +7303,7 @@ func (s *Destinations) DeleteDestinationPubsub(ctx context.Context, request oper } } - res := &operations.DeleteDestinationPubsubResponse{ + res := &operations.DeleteDestinationQdrantResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6021,101 +7330,41 @@ func (s *Destinations) DeleteDestinationPubsub(ctx context.Context, request oper } -// DeleteDestinationQdrant - Delete a Destination -func (s *Destinations) DeleteDestinationQdrant(ctx context.Context, request operations.DeleteDestinationQdrantRequest) (*operations.DeleteDestinationQdrantResponse, error) { +// DeleteDestinationRedis - Delete a Destination +func (s *Destinations) DeleteDestinationRedis(ctx context.Context, request operations.DeleteDestinationRedisRequest, opts ...operations.Option) (*operations.DeleteDestinationRedisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteDestinationQdrant", + OperationID: "deleteDestinationRedis", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteDestinationQdrantResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteDestinationRedis - Delete a Destination -func (s *Destinations) DeleteDestinationRedis(ctx context.Context, request operations.DeleteDestinationRedisRequest) (*operations.DeleteDestinationRedisResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteDestinationRedis", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -6186,7 +7435,7 @@ func (s *Destinations) DeleteDestinationRedis(ctx context.Context, request opera } // DeleteDestinationRedshift - Delete a Destination -func (s *Destinations) DeleteDestinationRedshift(ctx context.Context, request operations.DeleteDestinationRedshiftRequest) (*operations.DeleteDestinationRedshiftResponse, error) { +func (s *Destinations) DeleteDestinationRedshift(ctx context.Context, request operations.DeleteDestinationRedshiftRequest, opts ...operations.Option) (*operations.DeleteDestinationRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationRedshift", @@ -6194,12 +7443,34 @@ func (s *Destinations) DeleteDestinationRedshift(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6268,7 +7539,7 @@ func (s *Destinations) DeleteDestinationRedshift(ctx context.Context, request op } // DeleteDestinationS3 - Delete a Destination -func (s *Destinations) DeleteDestinationS3(ctx context.Context, request operations.DeleteDestinationS3Request) (*operations.DeleteDestinationS3Response, error) { +func (s *Destinations) DeleteDestinationS3(ctx context.Context, request operations.DeleteDestinationS3Request, opts ...operations.Option) (*operations.DeleteDestinationS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationS3", @@ -6276,12 +7547,34 @@ func (s *Destinations) DeleteDestinationS3(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6350,7 +7643,7 @@ func (s *Destinations) DeleteDestinationS3(ctx context.Context, request operatio } // DeleteDestinationS3Glue - Delete a Destination -func (s *Destinations) DeleteDestinationS3Glue(ctx context.Context, request operations.DeleteDestinationS3GlueRequest) (*operations.DeleteDestinationS3GlueResponse, error) { +func (s *Destinations) DeleteDestinationS3Glue(ctx context.Context, request operations.DeleteDestinationS3GlueRequest, opts ...operations.Option) (*operations.DeleteDestinationS3GlueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationS3Glue", @@ -6358,12 +7651,34 @@ func (s *Destinations) DeleteDestinationS3Glue(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6432,7 +7747,7 @@ func (s *Destinations) DeleteDestinationS3Glue(ctx context.Context, request oper } // DeleteDestinationSftpJSON - Delete a Destination -func (s *Destinations) DeleteDestinationSftpJSON(ctx context.Context, request operations.DeleteDestinationSftpJSONRequest) (*operations.DeleteDestinationSftpJSONResponse, error) { +func (s *Destinations) DeleteDestinationSftpJSON(ctx context.Context, request operations.DeleteDestinationSftpJSONRequest, opts ...operations.Option) (*operations.DeleteDestinationSftpJSONResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationSftpJson", @@ -6440,12 +7755,34 @@ func (s *Destinations) DeleteDestinationSftpJSON(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6514,7 +7851,7 @@ func (s *Destinations) DeleteDestinationSftpJSON(ctx context.Context, request op } // DeleteDestinationSnowflake - Delete a Destination -func (s *Destinations) DeleteDestinationSnowflake(ctx context.Context, request operations.DeleteDestinationSnowflakeRequest) (*operations.DeleteDestinationSnowflakeResponse, error) { +func (s *Destinations) DeleteDestinationSnowflake(ctx context.Context, request operations.DeleteDestinationSnowflakeRequest, opts ...operations.Option) (*operations.DeleteDestinationSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationSnowflake", @@ -6522,12 +7859,34 @@ func (s *Destinations) DeleteDestinationSnowflake(ctx context.Context, request o SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6596,7 +7955,7 @@ func (s *Destinations) DeleteDestinationSnowflake(ctx context.Context, request o } // DeleteDestinationSnowflakeCortex - Delete a Destination -func (s *Destinations) DeleteDestinationSnowflakeCortex(ctx context.Context, request operations.DeleteDestinationSnowflakeCortexRequest) (*operations.DeleteDestinationSnowflakeCortexResponse, error) { +func (s *Destinations) DeleteDestinationSnowflakeCortex(ctx context.Context, request operations.DeleteDestinationSnowflakeCortexRequest, opts ...operations.Option) (*operations.DeleteDestinationSnowflakeCortexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationSnowflakeCortex", @@ -6604,12 +7963,34 @@ func (s *Destinations) DeleteDestinationSnowflakeCortex(ctx context.Context, req SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6678,7 +8059,7 @@ func (s *Destinations) DeleteDestinationSnowflakeCortex(ctx context.Context, req } // DeleteDestinationTeradata - Delete a Destination -func (s *Destinations) DeleteDestinationTeradata(ctx context.Context, request operations.DeleteDestinationTeradataRequest) (*operations.DeleteDestinationTeradataResponse, error) { +func (s *Destinations) DeleteDestinationTeradata(ctx context.Context, request operations.DeleteDestinationTeradataRequest, opts ...operations.Option) (*operations.DeleteDestinationTeradataResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationTeradata", @@ -6686,12 +8067,34 @@ func (s *Destinations) DeleteDestinationTeradata(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6760,7 +8163,7 @@ func (s *Destinations) DeleteDestinationTeradata(ctx context.Context, request op } // DeleteDestinationTypesense - Delete a Destination -func (s *Destinations) DeleteDestinationTypesense(ctx context.Context, request operations.DeleteDestinationTypesenseRequest) (*operations.DeleteDestinationTypesenseResponse, error) { +func (s *Destinations) DeleteDestinationTypesense(ctx context.Context, request operations.DeleteDestinationTypesenseRequest, opts ...operations.Option) (*operations.DeleteDestinationTypesenseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationTypesense", @@ -6768,12 +8171,34 @@ func (s *Destinations) DeleteDestinationTypesense(ctx context.Context, request o SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6842,7 +8267,7 @@ func (s *Destinations) DeleteDestinationTypesense(ctx context.Context, request o } // DeleteDestinationVectara - Delete a Destination -func (s *Destinations) DeleteDestinationVectara(ctx context.Context, request operations.DeleteDestinationVectaraRequest) (*operations.DeleteDestinationVectaraResponse, error) { +func (s *Destinations) DeleteDestinationVectara(ctx context.Context, request operations.DeleteDestinationVectaraRequest, opts ...operations.Option) (*operations.DeleteDestinationVectaraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationVectara", @@ -6850,12 +8275,34 @@ func (s *Destinations) DeleteDestinationVectara(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6924,7 +8371,7 @@ func (s *Destinations) DeleteDestinationVectara(ctx context.Context, request ope } // DeleteDestinationWeaviate - Delete a Destination -func (s *Destinations) DeleteDestinationWeaviate(ctx context.Context, request operations.DeleteDestinationWeaviateRequest) (*operations.DeleteDestinationWeaviateResponse, error) { +func (s *Destinations) DeleteDestinationWeaviate(ctx context.Context, request operations.DeleteDestinationWeaviateRequest, opts ...operations.Option) (*operations.DeleteDestinationWeaviateResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationWeaviate", @@ -6932,12 +8379,34 @@ func (s *Destinations) DeleteDestinationWeaviate(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7006,7 +8475,7 @@ func (s *Destinations) DeleteDestinationWeaviate(ctx context.Context, request op } // DeleteDestinationYellowbrick - Delete a Destination -func (s *Destinations) DeleteDestinationYellowbrick(ctx context.Context, request operations.DeleteDestinationYellowbrickRequest) (*operations.DeleteDestinationYellowbrickResponse, error) { +func (s *Destinations) DeleteDestinationYellowbrick(ctx context.Context, request operations.DeleteDestinationYellowbrickRequest, opts ...operations.Option) (*operations.DeleteDestinationYellowbrickResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteDestinationYellowbrick", @@ -7014,12 +8483,34 @@ func (s *Destinations) DeleteDestinationYellowbrick(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7088,7 +8579,7 @@ func (s *Destinations) DeleteDestinationYellowbrick(ctx context.Context, request } // GetDestination - Get Destination details -func (s *Destinations) GetDestination(ctx context.Context, request operations.GetDestinationRequest) (*operations.GetDestinationResponse, error) { +func (s *Destinations) GetDestination(ctx context.Context, request operations.GetDestinationRequest, opts ...operations.Option) (*operations.GetDestinationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestination", @@ -7096,12 +8587,34 @@ func (s *Destinations) GetDestination(ctx context.Context, request operations.Ge SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7180,7 +8693,7 @@ func (s *Destinations) GetDestination(ctx context.Context, request operations.Ge } // GetDestinationAstra - Get Destination details -func (s *Destinations) GetDestinationAstra(ctx context.Context, request operations.GetDestinationAstraRequest) (*operations.GetDestinationAstraResponse, error) { +func (s *Destinations) GetDestinationAstra(ctx context.Context, request operations.GetDestinationAstraRequest, opts ...operations.Option) (*operations.GetDestinationAstraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationAstra", @@ -7188,12 +8701,34 @@ func (s *Destinations) GetDestinationAstra(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7272,7 +8807,7 @@ func (s *Destinations) GetDestinationAstra(ctx context.Context, request operatio } // GetDestinationAwsDatalake - Get Destination details -func (s *Destinations) GetDestinationAwsDatalake(ctx context.Context, request operations.GetDestinationAwsDatalakeRequest) (*operations.GetDestinationAwsDatalakeResponse, error) { +func (s *Destinations) GetDestinationAwsDatalake(ctx context.Context, request operations.GetDestinationAwsDatalakeRequest, opts ...operations.Option) (*operations.GetDestinationAwsDatalakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationAwsDatalake", @@ -7280,12 +8815,34 @@ func (s *Destinations) GetDestinationAwsDatalake(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7364,7 +8921,7 @@ func (s *Destinations) GetDestinationAwsDatalake(ctx context.Context, request op } // GetDestinationAzureBlobStorage - Get Destination details -func (s *Destinations) GetDestinationAzureBlobStorage(ctx context.Context, request operations.GetDestinationAzureBlobStorageRequest) (*operations.GetDestinationAzureBlobStorageResponse, error) { +func (s *Destinations) GetDestinationAzureBlobStorage(ctx context.Context, request operations.GetDestinationAzureBlobStorageRequest, opts ...operations.Option) (*operations.GetDestinationAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationAzureBlobStorage", @@ -7372,12 +8929,34 @@ func (s *Destinations) GetDestinationAzureBlobStorage(ctx context.Context, reque SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7456,7 +9035,7 @@ func (s *Destinations) GetDestinationAzureBlobStorage(ctx context.Context, reque } // GetDestinationBigquery - Get Destination details -func (s *Destinations) GetDestinationBigquery(ctx context.Context, request operations.GetDestinationBigqueryRequest) (*operations.GetDestinationBigqueryResponse, error) { +func (s *Destinations) GetDestinationBigquery(ctx context.Context, request operations.GetDestinationBigqueryRequest, opts ...operations.Option) (*operations.GetDestinationBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationBigquery", @@ -7464,12 +9043,34 @@ func (s *Destinations) GetDestinationBigquery(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7548,7 +9149,7 @@ func (s *Destinations) GetDestinationBigquery(ctx context.Context, request opera } // GetDestinationClickhouse - Get Destination details -func (s *Destinations) GetDestinationClickhouse(ctx context.Context, request operations.GetDestinationClickhouseRequest) (*operations.GetDestinationClickhouseResponse, error) { +func (s *Destinations) GetDestinationClickhouse(ctx context.Context, request operations.GetDestinationClickhouseRequest, opts ...operations.Option) (*operations.GetDestinationClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationClickhouse", @@ -7556,12 +9157,34 @@ func (s *Destinations) GetDestinationClickhouse(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7640,7 +9263,7 @@ func (s *Destinations) GetDestinationClickhouse(ctx context.Context, request ope } // GetDestinationConvex - Get Destination details -func (s *Destinations) GetDestinationConvex(ctx context.Context, request operations.GetDestinationConvexRequest) (*operations.GetDestinationConvexResponse, error) { +func (s *Destinations) GetDestinationConvex(ctx context.Context, request operations.GetDestinationConvexRequest, opts ...operations.Option) (*operations.GetDestinationConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationConvex", @@ -7648,12 +9271,34 @@ func (s *Destinations) GetDestinationConvex(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7732,7 +9377,7 @@ func (s *Destinations) GetDestinationConvex(ctx context.Context, request operati } // GetDestinationCustom - Get Destination details -func (s *Destinations) GetDestinationCustom(ctx context.Context, request operations.GetDestinationCustomRequest) (*operations.GetDestinationCustomResponse, error) { +func (s *Destinations) GetDestinationCustom(ctx context.Context, request operations.GetDestinationCustomRequest, opts ...operations.Option) (*operations.GetDestinationCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationCustom", @@ -7740,12 +9385,34 @@ func (s *Destinations) GetDestinationCustom(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7824,7 +9491,7 @@ func (s *Destinations) GetDestinationCustom(ctx context.Context, request operati } // GetDestinationDatabricks - Get Destination details -func (s *Destinations) GetDestinationDatabricks(ctx context.Context, request operations.GetDestinationDatabricksRequest) (*operations.GetDestinationDatabricksResponse, error) { +func (s *Destinations) GetDestinationDatabricks(ctx context.Context, request operations.GetDestinationDatabricksRequest, opts ...operations.Option) (*operations.GetDestinationDatabricksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationDatabricks", @@ -7832,102 +9499,32 @@ func (s *Destinations) GetDestinationDatabricks(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.GetDestinationDatabricksResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.DestinationResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.DestinationResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetDestinationDevNull - Get Destination details -func (s *Destinations) GetDestinationDevNull(ctx context.Context, request operations.GetDestinationDevNullRequest) (*operations.GetDestinationDevNullResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getDestinationDevNull", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -7970,7 +9567,7 @@ func (s *Destinations) GetDestinationDevNull(ctx context.Context, request operat } } - res := &operations.GetDestinationDevNullResponse{ + res := &operations.GetDestinationDatabricksResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8007,21 +9604,43 @@ func (s *Destinations) GetDestinationDevNull(ctx context.Context, request operat } -// GetDestinationDuckdb - Get Destination details -func (s *Destinations) GetDestinationDuckdb(ctx context.Context, request operations.GetDestinationDuckdbRequest) (*operations.GetDestinationDuckdbResponse, error) { +// GetDestinationDevNull - Get Destination details +func (s *Destinations) GetDestinationDevNull(ctx context.Context, request operations.GetDestinationDevNullRequest, opts ...operations.Option) (*operations.GetDestinationDevNullResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationDuckdb", + OperationID: "getDestinationDevNull", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8062,7 +9681,7 @@ func (s *Destinations) GetDestinationDuckdb(ctx context.Context, request operati } } - res := &operations.GetDestinationDuckdbResponse{ + res := &operations.GetDestinationDevNullResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8099,21 +9718,43 @@ func (s *Destinations) GetDestinationDuckdb(ctx context.Context, request operati } -// GetDestinationDynamodb - Get Destination details -func (s *Destinations) GetDestinationDynamodb(ctx context.Context, request operations.GetDestinationDynamodbRequest) (*operations.GetDestinationDynamodbResponse, error) { +// GetDestinationDuckdb - Get Destination details +func (s *Destinations) GetDestinationDuckdb(ctx context.Context, request operations.GetDestinationDuckdbRequest, opts ...operations.Option) (*operations.GetDestinationDuckdbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationDynamodb", + OperationID: "getDestinationDuckdb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8154,7 +9795,7 @@ func (s *Destinations) GetDestinationDynamodb(ctx context.Context, request opera } } - res := &operations.GetDestinationDynamodbResponse{ + res := &operations.GetDestinationDuckdbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8191,21 +9832,43 @@ func (s *Destinations) GetDestinationDynamodb(ctx context.Context, request opera } -// GetDestinationElasticsearch - Get Destination details -func (s *Destinations) GetDestinationElasticsearch(ctx context.Context, request operations.GetDestinationElasticsearchRequest) (*operations.GetDestinationElasticsearchResponse, error) { +// GetDestinationDynamodb - Get Destination details +func (s *Destinations) GetDestinationDynamodb(ctx context.Context, request operations.GetDestinationDynamodbRequest, opts ...operations.Option) (*operations.GetDestinationDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationElasticsearch", + OperationID: "getDestinationDynamodb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8246,7 +9909,7 @@ func (s *Destinations) GetDestinationElasticsearch(ctx context.Context, request } } - res := &operations.GetDestinationElasticsearchResponse{ + res := &operations.GetDestinationDynamodbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8283,21 +9946,43 @@ func (s *Destinations) GetDestinationElasticsearch(ctx context.Context, request } -// GetDestinationFirebolt - Get Destination details -func (s *Destinations) GetDestinationFirebolt(ctx context.Context, request operations.GetDestinationFireboltRequest) (*operations.GetDestinationFireboltResponse, error) { +// GetDestinationElasticsearch - Get Destination details +func (s *Destinations) GetDestinationElasticsearch(ctx context.Context, request operations.GetDestinationElasticsearchRequest, opts ...operations.Option) (*operations.GetDestinationElasticsearchResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationFirebolt", + OperationID: "getDestinationElasticsearch", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8338,7 +10023,7 @@ func (s *Destinations) GetDestinationFirebolt(ctx context.Context, request opera } } - res := &operations.GetDestinationFireboltResponse{ + res := &operations.GetDestinationElasticsearchResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8375,21 +10060,43 @@ func (s *Destinations) GetDestinationFirebolt(ctx context.Context, request opera } -// GetDestinationFirestore - Get Destination details -func (s *Destinations) GetDestinationFirestore(ctx context.Context, request operations.GetDestinationFirestoreRequest) (*operations.GetDestinationFirestoreResponse, error) { +// GetDestinationFirebolt - Get Destination details +func (s *Destinations) GetDestinationFirebolt(ctx context.Context, request operations.GetDestinationFireboltRequest, opts ...operations.Option) (*operations.GetDestinationFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationFirestore", + OperationID: "getDestinationFirebolt", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8430,7 +10137,7 @@ func (s *Destinations) GetDestinationFirestore(ctx context.Context, request oper } } - res := &operations.GetDestinationFirestoreResponse{ + res := &operations.GetDestinationFireboltResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8467,21 +10174,43 @@ func (s *Destinations) GetDestinationFirestore(ctx context.Context, request oper } -// GetDestinationGcs - Get Destination details -func (s *Destinations) GetDestinationGcs(ctx context.Context, request operations.GetDestinationGcsRequest) (*operations.GetDestinationGcsResponse, error) { +// GetDestinationFirestore - Get Destination details +func (s *Destinations) GetDestinationFirestore(ctx context.Context, request operations.GetDestinationFirestoreRequest, opts ...operations.Option) (*operations.GetDestinationFirestoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationGcs", + OperationID: "getDestinationFirestore", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8522,7 +10251,7 @@ func (s *Destinations) GetDestinationGcs(ctx context.Context, request operations } } - res := &operations.GetDestinationGcsResponse{ + res := &operations.GetDestinationFirestoreResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8559,21 +10288,43 @@ func (s *Destinations) GetDestinationGcs(ctx context.Context, request operations } -// GetDestinationGoogleSheets - Get Destination details -func (s *Destinations) GetDestinationGoogleSheets(ctx context.Context, request operations.GetDestinationGoogleSheetsRequest) (*operations.GetDestinationGoogleSheetsResponse, error) { +// GetDestinationGcs - Get Destination details +func (s *Destinations) GetDestinationGcs(ctx context.Context, request operations.GetDestinationGcsRequest, opts ...operations.Option) (*operations.GetDestinationGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationGoogleSheets", + OperationID: "getDestinationGcs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8614,7 +10365,7 @@ func (s *Destinations) GetDestinationGoogleSheets(ctx context.Context, request o } } - res := &operations.GetDestinationGoogleSheetsResponse{ + res := &operations.GetDestinationGcsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8651,21 +10402,43 @@ func (s *Destinations) GetDestinationGoogleSheets(ctx context.Context, request o } -// GetDestinationLangchain - Get Destination details -func (s *Destinations) GetDestinationLangchain(ctx context.Context, request operations.GetDestinationLangchainRequest) (*operations.GetDestinationLangchainResponse, error) { +// GetDestinationGoogleSheets - Get Destination details +func (s *Destinations) GetDestinationGoogleSheets(ctx context.Context, request operations.GetDestinationGoogleSheetsRequest, opts ...operations.Option) (*operations.GetDestinationGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getDestinationLangchain", + OperationID: "getDestinationGoogleSheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8706,7 +10479,7 @@ func (s *Destinations) GetDestinationLangchain(ctx context.Context, request oper } } - res := &operations.GetDestinationLangchainResponse{ + res := &operations.GetDestinationGoogleSheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8744,7 +10517,7 @@ func (s *Destinations) GetDestinationLangchain(ctx context.Context, request oper } // GetDestinationMilvus - Get Destination details -func (s *Destinations) GetDestinationMilvus(ctx context.Context, request operations.GetDestinationMilvusRequest) (*operations.GetDestinationMilvusResponse, error) { +func (s *Destinations) GetDestinationMilvus(ctx context.Context, request operations.GetDestinationMilvusRequest, opts ...operations.Option) (*operations.GetDestinationMilvusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationMilvus", @@ -8752,12 +10525,34 @@ func (s *Destinations) GetDestinationMilvus(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8836,7 +10631,7 @@ func (s *Destinations) GetDestinationMilvus(ctx context.Context, request operati } // GetDestinationMongodb - Get Destination details -func (s *Destinations) GetDestinationMongodb(ctx context.Context, request operations.GetDestinationMongodbRequest) (*operations.GetDestinationMongodbResponse, error) { +func (s *Destinations) GetDestinationMongodb(ctx context.Context, request operations.GetDestinationMongodbRequest, opts ...operations.Option) (*operations.GetDestinationMongodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationMongodb", @@ -8844,12 +10639,34 @@ func (s *Destinations) GetDestinationMongodb(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8928,7 +10745,7 @@ func (s *Destinations) GetDestinationMongodb(ctx context.Context, request operat } // GetDestinationMssql - Get Destination details -func (s *Destinations) GetDestinationMssql(ctx context.Context, request operations.GetDestinationMssqlRequest) (*operations.GetDestinationMssqlResponse, error) { +func (s *Destinations) GetDestinationMssql(ctx context.Context, request operations.GetDestinationMssqlRequest, opts ...operations.Option) (*operations.GetDestinationMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationMssql", @@ -8936,12 +10753,34 @@ func (s *Destinations) GetDestinationMssql(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9020,7 +10859,7 @@ func (s *Destinations) GetDestinationMssql(ctx context.Context, request operatio } // GetDestinationMysql - Get Destination details -func (s *Destinations) GetDestinationMysql(ctx context.Context, request operations.GetDestinationMysqlRequest) (*operations.GetDestinationMysqlResponse, error) { +func (s *Destinations) GetDestinationMysql(ctx context.Context, request operations.GetDestinationMysqlRequest, opts ...operations.Option) (*operations.GetDestinationMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationMysql", @@ -9028,12 +10867,34 @@ func (s *Destinations) GetDestinationMysql(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9112,7 +10973,7 @@ func (s *Destinations) GetDestinationMysql(ctx context.Context, request operatio } // GetDestinationOracle - Get Destination details -func (s *Destinations) GetDestinationOracle(ctx context.Context, request operations.GetDestinationOracleRequest) (*operations.GetDestinationOracleResponse, error) { +func (s *Destinations) GetDestinationOracle(ctx context.Context, request operations.GetDestinationOracleRequest, opts ...operations.Option) (*operations.GetDestinationOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationOracle", @@ -9120,12 +10981,34 @@ func (s *Destinations) GetDestinationOracle(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9204,7 +11087,7 @@ func (s *Destinations) GetDestinationOracle(ctx context.Context, request operati } // GetDestinationPinecone - Get Destination details -func (s *Destinations) GetDestinationPinecone(ctx context.Context, request operations.GetDestinationPineconeRequest) (*operations.GetDestinationPineconeResponse, error) { +func (s *Destinations) GetDestinationPinecone(ctx context.Context, request operations.GetDestinationPineconeRequest, opts ...operations.Option) (*operations.GetDestinationPineconeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationPinecone", @@ -9212,12 +11095,34 @@ func (s *Destinations) GetDestinationPinecone(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9296,7 +11201,7 @@ func (s *Destinations) GetDestinationPinecone(ctx context.Context, request opera } // GetDestinationPostgres - Get Destination details -func (s *Destinations) GetDestinationPostgres(ctx context.Context, request operations.GetDestinationPostgresRequest) (*operations.GetDestinationPostgresResponse, error) { +func (s *Destinations) GetDestinationPostgres(ctx context.Context, request operations.GetDestinationPostgresRequest, opts ...operations.Option) (*operations.GetDestinationPostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationPostgres", @@ -9304,12 +11209,34 @@ func (s *Destinations) GetDestinationPostgres(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9388,7 +11315,7 @@ func (s *Destinations) GetDestinationPostgres(ctx context.Context, request opera } // GetDestinationPubsub - Get Destination details -func (s *Destinations) GetDestinationPubsub(ctx context.Context, request operations.GetDestinationPubsubRequest) (*operations.GetDestinationPubsubResponse, error) { +func (s *Destinations) GetDestinationPubsub(ctx context.Context, request operations.GetDestinationPubsubRequest, opts ...operations.Option) (*operations.GetDestinationPubsubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationPubsub", @@ -9396,12 +11323,34 @@ func (s *Destinations) GetDestinationPubsub(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9480,7 +11429,7 @@ func (s *Destinations) GetDestinationPubsub(ctx context.Context, request operati } // GetDestinationQdrant - Get Destination details -func (s *Destinations) GetDestinationQdrant(ctx context.Context, request operations.GetDestinationQdrantRequest) (*operations.GetDestinationQdrantResponse, error) { +func (s *Destinations) GetDestinationQdrant(ctx context.Context, request operations.GetDestinationQdrantRequest, opts ...operations.Option) (*operations.GetDestinationQdrantResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationQdrant", @@ -9488,12 +11437,34 @@ func (s *Destinations) GetDestinationQdrant(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9572,7 +11543,7 @@ func (s *Destinations) GetDestinationQdrant(ctx context.Context, request operati } // GetDestinationRedis - Get Destination details -func (s *Destinations) GetDestinationRedis(ctx context.Context, request operations.GetDestinationRedisRequest) (*operations.GetDestinationRedisResponse, error) { +func (s *Destinations) GetDestinationRedis(ctx context.Context, request operations.GetDestinationRedisRequest, opts ...operations.Option) (*operations.GetDestinationRedisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationRedis", @@ -9580,12 +11551,34 @@ func (s *Destinations) GetDestinationRedis(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9664,7 +11657,7 @@ func (s *Destinations) GetDestinationRedis(ctx context.Context, request operatio } // GetDestinationRedshift - Get Destination details -func (s *Destinations) GetDestinationRedshift(ctx context.Context, request operations.GetDestinationRedshiftRequest) (*operations.GetDestinationRedshiftResponse, error) { +func (s *Destinations) GetDestinationRedshift(ctx context.Context, request operations.GetDestinationRedshiftRequest, opts ...operations.Option) (*operations.GetDestinationRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationRedshift", @@ -9672,12 +11665,34 @@ func (s *Destinations) GetDestinationRedshift(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9756,7 +11771,7 @@ func (s *Destinations) GetDestinationRedshift(ctx context.Context, request opera } // GetDestinationS3 - Get Destination details -func (s *Destinations) GetDestinationS3(ctx context.Context, request operations.GetDestinationS3Request) (*operations.GetDestinationS3Response, error) { +func (s *Destinations) GetDestinationS3(ctx context.Context, request operations.GetDestinationS3Request, opts ...operations.Option) (*operations.GetDestinationS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationS3", @@ -9764,12 +11779,34 @@ func (s *Destinations) GetDestinationS3(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9848,7 +11885,7 @@ func (s *Destinations) GetDestinationS3(ctx context.Context, request operations. } // GetDestinationS3Glue - Get Destination details -func (s *Destinations) GetDestinationS3Glue(ctx context.Context, request operations.GetDestinationS3GlueRequest) (*operations.GetDestinationS3GlueResponse, error) { +func (s *Destinations) GetDestinationS3Glue(ctx context.Context, request operations.GetDestinationS3GlueRequest, opts ...operations.Option) (*operations.GetDestinationS3GlueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationS3Glue", @@ -9856,12 +11893,34 @@ func (s *Destinations) GetDestinationS3Glue(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9940,7 +11999,7 @@ func (s *Destinations) GetDestinationS3Glue(ctx context.Context, request operati } // GetDestinationSftpJSON - Get Destination details -func (s *Destinations) GetDestinationSftpJSON(ctx context.Context, request operations.GetDestinationSftpJSONRequest) (*operations.GetDestinationSftpJSONResponse, error) { +func (s *Destinations) GetDestinationSftpJSON(ctx context.Context, request operations.GetDestinationSftpJSONRequest, opts ...operations.Option) (*operations.GetDestinationSftpJSONResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationSftpJson", @@ -9948,12 +12007,34 @@ func (s *Destinations) GetDestinationSftpJSON(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10032,7 +12113,7 @@ func (s *Destinations) GetDestinationSftpJSON(ctx context.Context, request opera } // GetDestinationSnowflake - Get Destination details -func (s *Destinations) GetDestinationSnowflake(ctx context.Context, request operations.GetDestinationSnowflakeRequest) (*operations.GetDestinationSnowflakeResponse, error) { +func (s *Destinations) GetDestinationSnowflake(ctx context.Context, request operations.GetDestinationSnowflakeRequest, opts ...operations.Option) (*operations.GetDestinationSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationSnowflake", @@ -10040,12 +12121,34 @@ func (s *Destinations) GetDestinationSnowflake(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10124,7 +12227,7 @@ func (s *Destinations) GetDestinationSnowflake(ctx context.Context, request oper } // GetDestinationSnowflakeCortex - Get Destination details -func (s *Destinations) GetDestinationSnowflakeCortex(ctx context.Context, request operations.GetDestinationSnowflakeCortexRequest) (*operations.GetDestinationSnowflakeCortexResponse, error) { +func (s *Destinations) GetDestinationSnowflakeCortex(ctx context.Context, request operations.GetDestinationSnowflakeCortexRequest, opts ...operations.Option) (*operations.GetDestinationSnowflakeCortexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationSnowflakeCortex", @@ -10132,12 +12235,34 @@ func (s *Destinations) GetDestinationSnowflakeCortex(ctx context.Context, reques SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10216,7 +12341,7 @@ func (s *Destinations) GetDestinationSnowflakeCortex(ctx context.Context, reques } // GetDestinationTeradata - Get Destination details -func (s *Destinations) GetDestinationTeradata(ctx context.Context, request operations.GetDestinationTeradataRequest) (*operations.GetDestinationTeradataResponse, error) { +func (s *Destinations) GetDestinationTeradata(ctx context.Context, request operations.GetDestinationTeradataRequest, opts ...operations.Option) (*operations.GetDestinationTeradataResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationTeradata", @@ -10224,12 +12349,34 @@ func (s *Destinations) GetDestinationTeradata(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10308,7 +12455,7 @@ func (s *Destinations) GetDestinationTeradata(ctx context.Context, request opera } // GetDestinationTypesense - Get Destination details -func (s *Destinations) GetDestinationTypesense(ctx context.Context, request operations.GetDestinationTypesenseRequest) (*operations.GetDestinationTypesenseResponse, error) { +func (s *Destinations) GetDestinationTypesense(ctx context.Context, request operations.GetDestinationTypesenseRequest, opts ...operations.Option) (*operations.GetDestinationTypesenseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationTypesense", @@ -10316,12 +12463,34 @@ func (s *Destinations) GetDestinationTypesense(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10400,7 +12569,7 @@ func (s *Destinations) GetDestinationTypesense(ctx context.Context, request oper } // GetDestinationVectara - Get Destination details -func (s *Destinations) GetDestinationVectara(ctx context.Context, request operations.GetDestinationVectaraRequest) (*operations.GetDestinationVectaraResponse, error) { +func (s *Destinations) GetDestinationVectara(ctx context.Context, request operations.GetDestinationVectaraRequest, opts ...operations.Option) (*operations.GetDestinationVectaraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationVectara", @@ -10408,12 +12577,34 @@ func (s *Destinations) GetDestinationVectara(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10492,7 +12683,7 @@ func (s *Destinations) GetDestinationVectara(ctx context.Context, request operat } // GetDestinationWeaviate - Get Destination details -func (s *Destinations) GetDestinationWeaviate(ctx context.Context, request operations.GetDestinationWeaviateRequest) (*operations.GetDestinationWeaviateResponse, error) { +func (s *Destinations) GetDestinationWeaviate(ctx context.Context, request operations.GetDestinationWeaviateRequest, opts ...operations.Option) (*operations.GetDestinationWeaviateResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationWeaviate", @@ -10500,12 +12691,34 @@ func (s *Destinations) GetDestinationWeaviate(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10584,7 +12797,7 @@ func (s *Destinations) GetDestinationWeaviate(ctx context.Context, request opera } // GetDestinationYellowbrick - Get Destination details -func (s *Destinations) GetDestinationYellowbrick(ctx context.Context, request operations.GetDestinationYellowbrickRequest) (*operations.GetDestinationYellowbrickResponse, error) { +func (s *Destinations) GetDestinationYellowbrick(ctx context.Context, request operations.GetDestinationYellowbrickRequest, opts ...operations.Option) (*operations.GetDestinationYellowbrickResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getDestinationYellowbrick", @@ -10592,12 +12805,34 @@ func (s *Destinations) GetDestinationYellowbrick(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10676,7 +12911,7 @@ func (s *Destinations) GetDestinationYellowbrick(ctx context.Context, request op } // ListDestinations - List destinations -func (s *Destinations) ListDestinations(ctx context.Context, request operations.ListDestinationsRequest) (*operations.ListDestinationsResponse, error) { +func (s *Destinations) ListDestinations(ctx context.Context, request operations.ListDestinationsRequest, opts ...operations.Option) (*operations.ListDestinationsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listDestinations", @@ -10684,12 +12919,34 @@ func (s *Destinations) ListDestinations(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/destinations") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10772,7 +13029,7 @@ func (s *Destinations) ListDestinations(ctx context.Context, request operations. } // PatchDestination - Update a Destination -func (s *Destinations) PatchDestination(ctx context.Context, request operations.PatchDestinationRequest) (*operations.PatchDestinationResponse, error) { +func (s *Destinations) PatchDestination(ctx context.Context, request operations.PatchDestinationRequest, opts ...operations.Option) (*operations.PatchDestinationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "patchDestination", @@ -10780,6 +13037,17 @@ func (s *Destinations) PatchDestination(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -10791,6 +13059,17 @@ func (s *Destinations) PatchDestination(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10870,7 +13149,7 @@ func (s *Destinations) PatchDestination(ctx context.Context, request operations. } // PutDestination - Update a Destination and fully overwrite it -func (s *Destinations) PutDestination(ctx context.Context, request operations.PutDestinationRequest) (*operations.PutDestinationResponse, error) { +func (s *Destinations) PutDestination(ctx context.Context, request operations.PutDestinationRequest, opts ...operations.Option) (*operations.PutDestinationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestination", @@ -10878,6 +13157,17 @@ func (s *Destinations) PutDestination(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -10889,6 +13179,17 @@ func (s *Destinations) PutDestination(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10968,7 +13269,7 @@ func (s *Destinations) PutDestination(ctx context.Context, request operations.Pu } // PutDestinationAstra - Update a Destination fully -func (s *Destinations) PutDestinationAstra(ctx context.Context, request operations.PutDestinationAstraRequest) (*operations.PutDestinationAstraResponse, error) { +func (s *Destinations) PutDestinationAstra(ctx context.Context, request operations.PutDestinationAstraRequest, opts ...operations.Option) (*operations.PutDestinationAstraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationAstra", @@ -10976,6 +13277,17 @@ func (s *Destinations) PutDestinationAstra(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -10987,6 +13299,17 @@ func (s *Destinations) PutDestinationAstra(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11056,7 +13379,7 @@ func (s *Destinations) PutDestinationAstra(ctx context.Context, request operatio } // PutDestinationAwsDatalake - Update a Destination fully -func (s *Destinations) PutDestinationAwsDatalake(ctx context.Context, request operations.PutDestinationAwsDatalakeRequest) (*operations.PutDestinationAwsDatalakeResponse, error) { +func (s *Destinations) PutDestinationAwsDatalake(ctx context.Context, request operations.PutDestinationAwsDatalakeRequest, opts ...operations.Option) (*operations.PutDestinationAwsDatalakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationAwsDatalake", @@ -11064,6 +13387,17 @@ func (s *Destinations) PutDestinationAwsDatalake(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11075,6 +13409,17 @@ func (s *Destinations) PutDestinationAwsDatalake(ctx context.Context, request op return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11144,7 +13489,7 @@ func (s *Destinations) PutDestinationAwsDatalake(ctx context.Context, request op } // PutDestinationAzureBlobStorage - Update a Destination fully -func (s *Destinations) PutDestinationAzureBlobStorage(ctx context.Context, request operations.PutDestinationAzureBlobStorageRequest) (*operations.PutDestinationAzureBlobStorageResponse, error) { +func (s *Destinations) PutDestinationAzureBlobStorage(ctx context.Context, request operations.PutDestinationAzureBlobStorageRequest, opts ...operations.Option) (*operations.PutDestinationAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationAzureBlobStorage", @@ -11152,6 +13497,17 @@ func (s *Destinations) PutDestinationAzureBlobStorage(ctx context.Context, reque SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11163,6 +13519,17 @@ func (s *Destinations) PutDestinationAzureBlobStorage(ctx context.Context, reque return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11232,7 +13599,7 @@ func (s *Destinations) PutDestinationAzureBlobStorage(ctx context.Context, reque } // PutDestinationBigquery - Update a Destination fully -func (s *Destinations) PutDestinationBigquery(ctx context.Context, request operations.PutDestinationBigqueryRequest) (*operations.PutDestinationBigqueryResponse, error) { +func (s *Destinations) PutDestinationBigquery(ctx context.Context, request operations.PutDestinationBigqueryRequest, opts ...operations.Option) (*operations.PutDestinationBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationBigquery", @@ -11240,6 +13607,17 @@ func (s *Destinations) PutDestinationBigquery(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11251,6 +13629,17 @@ func (s *Destinations) PutDestinationBigquery(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11320,7 +13709,7 @@ func (s *Destinations) PutDestinationBigquery(ctx context.Context, request opera } // PutDestinationClickhouse - Update a Destination fully -func (s *Destinations) PutDestinationClickhouse(ctx context.Context, request operations.PutDestinationClickhouseRequest) (*operations.PutDestinationClickhouseResponse, error) { +func (s *Destinations) PutDestinationClickhouse(ctx context.Context, request operations.PutDestinationClickhouseRequest, opts ...operations.Option) (*operations.PutDestinationClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationClickhouse", @@ -11328,6 +13717,17 @@ func (s *Destinations) PutDestinationClickhouse(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11339,6 +13739,17 @@ func (s *Destinations) PutDestinationClickhouse(ctx context.Context, request ope return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11408,7 +13819,7 @@ func (s *Destinations) PutDestinationClickhouse(ctx context.Context, request ope } // PutDestinationConvex - Update a Destination fully -func (s *Destinations) PutDestinationConvex(ctx context.Context, request operations.PutDestinationConvexRequest) (*operations.PutDestinationConvexResponse, error) { +func (s *Destinations) PutDestinationConvex(ctx context.Context, request operations.PutDestinationConvexRequest, opts ...operations.Option) (*operations.PutDestinationConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationConvex", @@ -11416,6 +13827,17 @@ func (s *Destinations) PutDestinationConvex(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11427,6 +13849,17 @@ func (s *Destinations) PutDestinationConvex(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11496,7 +13929,7 @@ func (s *Destinations) PutDestinationConvex(ctx context.Context, request operati } // PutDestinationCustom - Update a Destination fully -func (s *Destinations) PutDestinationCustom(ctx context.Context, request operations.PutDestinationCustomRequest) (*operations.PutDestinationCustomResponse, error) { +func (s *Destinations) PutDestinationCustom(ctx context.Context, request operations.PutDestinationCustomRequest, opts ...operations.Option) (*operations.PutDestinationCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationCustom", @@ -11504,6 +13937,17 @@ func (s *Destinations) PutDestinationCustom(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11515,6 +13959,17 @@ func (s *Destinations) PutDestinationCustom(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11584,7 +14039,7 @@ func (s *Destinations) PutDestinationCustom(ctx context.Context, request operati } // PutDestinationDatabricks - Update a Destination fully -func (s *Destinations) PutDestinationDatabricks(ctx context.Context, request operations.PutDestinationDatabricksRequest) (*operations.PutDestinationDatabricksResponse, error) { +func (s *Destinations) PutDestinationDatabricks(ctx context.Context, request operations.PutDestinationDatabricksRequest, opts ...operations.Option) (*operations.PutDestinationDatabricksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationDatabricks", @@ -11592,6 +14047,17 @@ func (s *Destinations) PutDestinationDatabricks(ctx context.Context, request ope SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11603,6 +14069,17 @@ func (s *Destinations) PutDestinationDatabricks(ctx context.Context, request ope return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11672,7 +14149,7 @@ func (s *Destinations) PutDestinationDatabricks(ctx context.Context, request ope } // PutDestinationDevNull - Update a Destination fully -func (s *Destinations) PutDestinationDevNull(ctx context.Context, request operations.PutDestinationDevNullRequest) (*operations.PutDestinationDevNullResponse, error) { +func (s *Destinations) PutDestinationDevNull(ctx context.Context, request operations.PutDestinationDevNullRequest, opts ...operations.Option) (*operations.PutDestinationDevNullResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationDevNull", @@ -11680,6 +14157,17 @@ func (s *Destinations) PutDestinationDevNull(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11691,6 +14179,17 @@ func (s *Destinations) PutDestinationDevNull(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11760,7 +14259,7 @@ func (s *Destinations) PutDestinationDevNull(ctx context.Context, request operat } // PutDestinationDuckdb - Update a Destination fully -func (s *Destinations) PutDestinationDuckdb(ctx context.Context, request operations.PutDestinationDuckdbRequest) (*operations.PutDestinationDuckdbResponse, error) { +func (s *Destinations) PutDestinationDuckdb(ctx context.Context, request operations.PutDestinationDuckdbRequest, opts ...operations.Option) (*operations.PutDestinationDuckdbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationDuckdb", @@ -11768,6 +14267,17 @@ func (s *Destinations) PutDestinationDuckdb(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11779,6 +14289,17 @@ func (s *Destinations) PutDestinationDuckdb(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11848,7 +14369,7 @@ func (s *Destinations) PutDestinationDuckdb(ctx context.Context, request operati } // PutDestinationDynamodb - Update a Destination fully -func (s *Destinations) PutDestinationDynamodb(ctx context.Context, request operations.PutDestinationDynamodbRequest) (*operations.PutDestinationDynamodbResponse, error) { +func (s *Destinations) PutDestinationDynamodb(ctx context.Context, request operations.PutDestinationDynamodbRequest, opts ...operations.Option) (*operations.PutDestinationDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationDynamodb", @@ -11856,6 +14377,17 @@ func (s *Destinations) PutDestinationDynamodb(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -11867,6 +14399,17 @@ func (s *Destinations) PutDestinationDynamodb(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11936,7 +14479,7 @@ func (s *Destinations) PutDestinationDynamodb(ctx context.Context, request opera } // PutDestinationElasticsearch - Update a Destination fully -func (s *Destinations) PutDestinationElasticsearch(ctx context.Context, request operations.PutDestinationElasticsearchRequest) (*operations.PutDestinationElasticsearchResponse, error) { +func (s *Destinations) PutDestinationElasticsearch(ctx context.Context, request operations.PutDestinationElasticsearchRequest, opts ...operations.Option) (*operations.PutDestinationElasticsearchResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationElasticsearch", @@ -11944,105 +14487,39 @@ func (s *Destinations) PutDestinationElasticsearch(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationElasticsearchPutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.PutDestinationElasticsearchResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutDestinationFirebolt - Update a Destination fully -func (s *Destinations) PutDestinationFirebolt(ctx context.Context, request operations.PutDestinationFireboltRequest) (*operations.PutDestinationFireboltResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putDestinationFirebolt", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationFireboltPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationElasticsearchPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12084,7 +14561,7 @@ func (s *Destinations) PutDestinationFirebolt(ctx context.Context, request opera } } - res := &operations.PutDestinationFireboltResponse{ + res := &operations.PutDestinationElasticsearchResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12111,26 +14588,48 @@ func (s *Destinations) PutDestinationFirebolt(ctx context.Context, request opera } -// PutDestinationFirestore - Update a Destination fully -func (s *Destinations) PutDestinationFirestore(ctx context.Context, request operations.PutDestinationFirestoreRequest) (*operations.PutDestinationFirestoreResponse, error) { +// PutDestinationFirebolt - Update a Destination fully +func (s *Destinations) PutDestinationFirebolt(ctx context.Context, request operations.PutDestinationFireboltRequest, opts ...operations.Option) (*operations.PutDestinationFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putDestinationFirestore", + OperationID: "putDestinationFirebolt", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationFirestorePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationFireboltPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12172,7 +14671,7 @@ func (s *Destinations) PutDestinationFirestore(ctx context.Context, request oper } } - res := &operations.PutDestinationFirestoreResponse{ + res := &operations.PutDestinationFireboltResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12199,26 +14698,48 @@ func (s *Destinations) PutDestinationFirestore(ctx context.Context, request oper } -// PutDestinationGcs - Update a Destination fully -func (s *Destinations) PutDestinationGcs(ctx context.Context, request operations.PutDestinationGcsRequest) (*operations.PutDestinationGcsResponse, error) { +// PutDestinationFirestore - Update a Destination fully +func (s *Destinations) PutDestinationFirestore(ctx context.Context, request operations.PutDestinationFirestoreRequest, opts ...operations.Option) (*operations.PutDestinationFirestoreResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putDestinationGcs", + OperationID: "putDestinationFirestore", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationGcsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationFirestorePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12260,7 +14781,7 @@ func (s *Destinations) PutDestinationGcs(ctx context.Context, request operations } } - res := &operations.PutDestinationGcsResponse{ + res := &operations.PutDestinationFirestoreResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12287,26 +14808,48 @@ func (s *Destinations) PutDestinationGcs(ctx context.Context, request operations } -// PutDestinationGoogleSheets - Update a Destination fully -func (s *Destinations) PutDestinationGoogleSheets(ctx context.Context, request operations.PutDestinationGoogleSheetsRequest) (*operations.PutDestinationGoogleSheetsResponse, error) { +// PutDestinationGcs - Update a Destination fully +func (s *Destinations) PutDestinationGcs(ctx context.Context, request operations.PutDestinationGcsRequest, opts ...operations.Option) (*operations.PutDestinationGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putDestinationGoogleSheets", + OperationID: "putDestinationGcs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationGoogleSheetsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationGcsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12348,7 +14891,7 @@ func (s *Destinations) PutDestinationGoogleSheets(ctx context.Context, request o } } - res := &operations.PutDestinationGoogleSheetsResponse{ + res := &operations.PutDestinationGcsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12375,26 +14918,48 @@ func (s *Destinations) PutDestinationGoogleSheets(ctx context.Context, request o } -// PutDestinationLangchain - Update a Destination fully -func (s *Destinations) PutDestinationLangchain(ctx context.Context, request operations.PutDestinationLangchainRequest) (*operations.PutDestinationLangchainResponse, error) { +// PutDestinationGoogleSheets - Update a Destination fully +func (s *Destinations) PutDestinationGoogleSheets(ctx context.Context, request operations.PutDestinationGoogleSheetsRequest, opts ...operations.Option) (*operations.PutDestinationGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putDestinationLangchain", + OperationID: "putDestinationGoogleSheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationLangchainPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "DestinationGoogleSheetsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12436,7 +15001,7 @@ func (s *Destinations) PutDestinationLangchain(ctx context.Context, request oper } } - res := &operations.PutDestinationLangchainResponse{ + res := &operations.PutDestinationGoogleSheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12464,7 +15029,7 @@ func (s *Destinations) PutDestinationLangchain(ctx context.Context, request oper } // PutDestinationMilvus - Update a Destination fully -func (s *Destinations) PutDestinationMilvus(ctx context.Context, request operations.PutDestinationMilvusRequest) (*operations.PutDestinationMilvusResponse, error) { +func (s *Destinations) PutDestinationMilvus(ctx context.Context, request operations.PutDestinationMilvusRequest, opts ...operations.Option) (*operations.PutDestinationMilvusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationMilvus", @@ -12472,6 +15037,17 @@ func (s *Destinations) PutDestinationMilvus(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12483,6 +15059,17 @@ func (s *Destinations) PutDestinationMilvus(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12552,7 +15139,7 @@ func (s *Destinations) PutDestinationMilvus(ctx context.Context, request operati } // PutDestinationMongodb - Update a Destination fully -func (s *Destinations) PutDestinationMongodb(ctx context.Context, request operations.PutDestinationMongodbRequest) (*operations.PutDestinationMongodbResponse, error) { +func (s *Destinations) PutDestinationMongodb(ctx context.Context, request operations.PutDestinationMongodbRequest, opts ...operations.Option) (*operations.PutDestinationMongodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationMongodb", @@ -12560,6 +15147,17 @@ func (s *Destinations) PutDestinationMongodb(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12571,6 +15169,17 @@ func (s *Destinations) PutDestinationMongodb(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12640,7 +15249,7 @@ func (s *Destinations) PutDestinationMongodb(ctx context.Context, request operat } // PutDestinationMssql - Update a Destination fully -func (s *Destinations) PutDestinationMssql(ctx context.Context, request operations.PutDestinationMssqlRequest) (*operations.PutDestinationMssqlResponse, error) { +func (s *Destinations) PutDestinationMssql(ctx context.Context, request operations.PutDestinationMssqlRequest, opts ...operations.Option) (*operations.PutDestinationMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationMssql", @@ -12648,6 +15257,17 @@ func (s *Destinations) PutDestinationMssql(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12659,6 +15279,17 @@ func (s *Destinations) PutDestinationMssql(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12728,7 +15359,7 @@ func (s *Destinations) PutDestinationMssql(ctx context.Context, request operatio } // PutDestinationMysql - Update a Destination fully -func (s *Destinations) PutDestinationMysql(ctx context.Context, request operations.PutDestinationMysqlRequest) (*operations.PutDestinationMysqlResponse, error) { +func (s *Destinations) PutDestinationMysql(ctx context.Context, request operations.PutDestinationMysqlRequest, opts ...operations.Option) (*operations.PutDestinationMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationMysql", @@ -12736,6 +15367,17 @@ func (s *Destinations) PutDestinationMysql(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12747,6 +15389,17 @@ func (s *Destinations) PutDestinationMysql(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12816,7 +15469,7 @@ func (s *Destinations) PutDestinationMysql(ctx context.Context, request operatio } // PutDestinationOracle - Update a Destination fully -func (s *Destinations) PutDestinationOracle(ctx context.Context, request operations.PutDestinationOracleRequest) (*operations.PutDestinationOracleResponse, error) { +func (s *Destinations) PutDestinationOracle(ctx context.Context, request operations.PutDestinationOracleRequest, opts ...operations.Option) (*operations.PutDestinationOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationOracle", @@ -12824,6 +15477,17 @@ func (s *Destinations) PutDestinationOracle(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12835,6 +15499,17 @@ func (s *Destinations) PutDestinationOracle(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12904,7 +15579,7 @@ func (s *Destinations) PutDestinationOracle(ctx context.Context, request operati } // PutDestinationPinecone - Update a Destination fully -func (s *Destinations) PutDestinationPinecone(ctx context.Context, request operations.PutDestinationPineconeRequest) (*operations.PutDestinationPineconeResponse, error) { +func (s *Destinations) PutDestinationPinecone(ctx context.Context, request operations.PutDestinationPineconeRequest, opts ...operations.Option) (*operations.PutDestinationPineconeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationPinecone", @@ -12912,6 +15587,17 @@ func (s *Destinations) PutDestinationPinecone(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -12923,6 +15609,17 @@ func (s *Destinations) PutDestinationPinecone(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12992,7 +15689,7 @@ func (s *Destinations) PutDestinationPinecone(ctx context.Context, request opera } // PutDestinationPostgres - Update a Destination fully -func (s *Destinations) PutDestinationPostgres(ctx context.Context, request operations.PutDestinationPostgresRequest) (*operations.PutDestinationPostgresResponse, error) { +func (s *Destinations) PutDestinationPostgres(ctx context.Context, request operations.PutDestinationPostgresRequest, opts ...operations.Option) (*operations.PutDestinationPostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationPostgres", @@ -13000,6 +15697,17 @@ func (s *Destinations) PutDestinationPostgres(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13011,6 +15719,17 @@ func (s *Destinations) PutDestinationPostgres(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13080,7 +15799,7 @@ func (s *Destinations) PutDestinationPostgres(ctx context.Context, request opera } // PutDestinationPubsub - Update a Destination fully -func (s *Destinations) PutDestinationPubsub(ctx context.Context, request operations.PutDestinationPubsubRequest) (*operations.PutDestinationPubsubResponse, error) { +func (s *Destinations) PutDestinationPubsub(ctx context.Context, request operations.PutDestinationPubsubRequest, opts ...operations.Option) (*operations.PutDestinationPubsubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationPubsub", @@ -13088,6 +15807,17 @@ func (s *Destinations) PutDestinationPubsub(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13099,6 +15829,17 @@ func (s *Destinations) PutDestinationPubsub(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13168,7 +15909,7 @@ func (s *Destinations) PutDestinationPubsub(ctx context.Context, request operati } // PutDestinationQdrant - Update a Destination fully -func (s *Destinations) PutDestinationQdrant(ctx context.Context, request operations.PutDestinationQdrantRequest) (*operations.PutDestinationQdrantResponse, error) { +func (s *Destinations) PutDestinationQdrant(ctx context.Context, request operations.PutDestinationQdrantRequest, opts ...operations.Option) (*operations.PutDestinationQdrantResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationQdrant", @@ -13176,6 +15917,17 @@ func (s *Destinations) PutDestinationQdrant(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13187,6 +15939,17 @@ func (s *Destinations) PutDestinationQdrant(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13256,7 +16019,7 @@ func (s *Destinations) PutDestinationQdrant(ctx context.Context, request operati } // PutDestinationRedis - Update a Destination fully -func (s *Destinations) PutDestinationRedis(ctx context.Context, request operations.PutDestinationRedisRequest) (*operations.PutDestinationRedisResponse, error) { +func (s *Destinations) PutDestinationRedis(ctx context.Context, request operations.PutDestinationRedisRequest, opts ...operations.Option) (*operations.PutDestinationRedisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationRedis", @@ -13264,6 +16027,17 @@ func (s *Destinations) PutDestinationRedis(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13275,6 +16049,17 @@ func (s *Destinations) PutDestinationRedis(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13344,7 +16129,7 @@ func (s *Destinations) PutDestinationRedis(ctx context.Context, request operatio } // PutDestinationRedshift - Update a Destination fully -func (s *Destinations) PutDestinationRedshift(ctx context.Context, request operations.PutDestinationRedshiftRequest) (*operations.PutDestinationRedshiftResponse, error) { +func (s *Destinations) PutDestinationRedshift(ctx context.Context, request operations.PutDestinationRedshiftRequest, opts ...operations.Option) (*operations.PutDestinationRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationRedshift", @@ -13352,6 +16137,17 @@ func (s *Destinations) PutDestinationRedshift(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13363,6 +16159,17 @@ func (s *Destinations) PutDestinationRedshift(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13432,7 +16239,7 @@ func (s *Destinations) PutDestinationRedshift(ctx context.Context, request opera } // PutDestinationS3 - Update a Destination fully -func (s *Destinations) PutDestinationS3(ctx context.Context, request operations.PutDestinationS3Request) (*operations.PutDestinationS3Response, error) { +func (s *Destinations) PutDestinationS3(ctx context.Context, request operations.PutDestinationS3Request, opts ...operations.Option) (*operations.PutDestinationS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationS3", @@ -13440,6 +16247,17 @@ func (s *Destinations) PutDestinationS3(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13451,6 +16269,17 @@ func (s *Destinations) PutDestinationS3(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13520,7 +16349,7 @@ func (s *Destinations) PutDestinationS3(ctx context.Context, request operations. } // PutDestinationS3Glue - Update a Destination fully -func (s *Destinations) PutDestinationS3Glue(ctx context.Context, request operations.PutDestinationS3GlueRequest) (*operations.PutDestinationS3GlueResponse, error) { +func (s *Destinations) PutDestinationS3Glue(ctx context.Context, request operations.PutDestinationS3GlueRequest, opts ...operations.Option) (*operations.PutDestinationS3GlueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationS3Glue", @@ -13528,6 +16357,17 @@ func (s *Destinations) PutDestinationS3Glue(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13539,6 +16379,17 @@ func (s *Destinations) PutDestinationS3Glue(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13608,7 +16459,7 @@ func (s *Destinations) PutDestinationS3Glue(ctx context.Context, request operati } // PutDestinationSftpJSON - Update a Destination fully -func (s *Destinations) PutDestinationSftpJSON(ctx context.Context, request operations.PutDestinationSftpJSONRequest) (*operations.PutDestinationSftpJSONResponse, error) { +func (s *Destinations) PutDestinationSftpJSON(ctx context.Context, request operations.PutDestinationSftpJSONRequest, opts ...operations.Option) (*operations.PutDestinationSftpJSONResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationSftpJson", @@ -13616,6 +16467,17 @@ func (s *Destinations) PutDestinationSftpJSON(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13627,6 +16489,17 @@ func (s *Destinations) PutDestinationSftpJSON(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13696,7 +16569,7 @@ func (s *Destinations) PutDestinationSftpJSON(ctx context.Context, request opera } // PutDestinationSnowflake - Update a Destination fully -func (s *Destinations) PutDestinationSnowflake(ctx context.Context, request operations.PutDestinationSnowflakeRequest) (*operations.PutDestinationSnowflakeResponse, error) { +func (s *Destinations) PutDestinationSnowflake(ctx context.Context, request operations.PutDestinationSnowflakeRequest, opts ...operations.Option) (*operations.PutDestinationSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationSnowflake", @@ -13704,6 +16577,17 @@ func (s *Destinations) PutDestinationSnowflake(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13715,6 +16599,17 @@ func (s *Destinations) PutDestinationSnowflake(ctx context.Context, request oper return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13784,7 +16679,7 @@ func (s *Destinations) PutDestinationSnowflake(ctx context.Context, request oper } // PutDestinationSnowflakeCortex - Update a Destination fully -func (s *Destinations) PutDestinationSnowflakeCortex(ctx context.Context, request operations.PutDestinationSnowflakeCortexRequest) (*operations.PutDestinationSnowflakeCortexResponse, error) { +func (s *Destinations) PutDestinationSnowflakeCortex(ctx context.Context, request operations.PutDestinationSnowflakeCortexRequest, opts ...operations.Option) (*operations.PutDestinationSnowflakeCortexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationSnowflakeCortex", @@ -13792,6 +16687,17 @@ func (s *Destinations) PutDestinationSnowflakeCortex(ctx context.Context, reques SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13803,6 +16709,17 @@ func (s *Destinations) PutDestinationSnowflakeCortex(ctx context.Context, reques return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13872,7 +16789,7 @@ func (s *Destinations) PutDestinationSnowflakeCortex(ctx context.Context, reques } // PutDestinationTeradata - Update a Destination fully -func (s *Destinations) PutDestinationTeradata(ctx context.Context, request operations.PutDestinationTeradataRequest) (*operations.PutDestinationTeradataResponse, error) { +func (s *Destinations) PutDestinationTeradata(ctx context.Context, request operations.PutDestinationTeradataRequest, opts ...operations.Option) (*operations.PutDestinationTeradataResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationTeradata", @@ -13880,6 +16797,17 @@ func (s *Destinations) PutDestinationTeradata(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13891,6 +16819,17 @@ func (s *Destinations) PutDestinationTeradata(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13960,7 +16899,7 @@ func (s *Destinations) PutDestinationTeradata(ctx context.Context, request opera } // PutDestinationTypesense - Update a Destination fully -func (s *Destinations) PutDestinationTypesense(ctx context.Context, request operations.PutDestinationTypesenseRequest) (*operations.PutDestinationTypesenseResponse, error) { +func (s *Destinations) PutDestinationTypesense(ctx context.Context, request operations.PutDestinationTypesenseRequest, opts ...operations.Option) (*operations.PutDestinationTypesenseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationTypesense", @@ -13968,6 +16907,17 @@ func (s *Destinations) PutDestinationTypesense(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -13979,6 +16929,17 @@ func (s *Destinations) PutDestinationTypesense(ctx context.Context, request oper return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14048,7 +17009,7 @@ func (s *Destinations) PutDestinationTypesense(ctx context.Context, request oper } // PutDestinationVectara - Update a Destination fully -func (s *Destinations) PutDestinationVectara(ctx context.Context, request operations.PutDestinationVectaraRequest) (*operations.PutDestinationVectaraResponse, error) { +func (s *Destinations) PutDestinationVectara(ctx context.Context, request operations.PutDestinationVectaraRequest, opts ...operations.Option) (*operations.PutDestinationVectaraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationVectara", @@ -14056,6 +17017,17 @@ func (s *Destinations) PutDestinationVectara(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -14067,6 +17039,17 @@ func (s *Destinations) PutDestinationVectara(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14136,7 +17119,7 @@ func (s *Destinations) PutDestinationVectara(ctx context.Context, request operat } // PutDestinationWeaviate - Update a Destination fully -func (s *Destinations) PutDestinationWeaviate(ctx context.Context, request operations.PutDestinationWeaviateRequest) (*operations.PutDestinationWeaviateResponse, error) { +func (s *Destinations) PutDestinationWeaviate(ctx context.Context, request operations.PutDestinationWeaviateRequest, opts ...operations.Option) (*operations.PutDestinationWeaviateResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationWeaviate", @@ -14144,6 +17127,17 @@ func (s *Destinations) PutDestinationWeaviate(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -14155,6 +17149,17 @@ func (s *Destinations) PutDestinationWeaviate(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14224,7 +17229,7 @@ func (s *Destinations) PutDestinationWeaviate(ctx context.Context, request opera } // PutDestinationYellowbrick - Update a Destination fully -func (s *Destinations) PutDestinationYellowbrick(ctx context.Context, request operations.PutDestinationYellowbrickRequest) (*operations.PutDestinationYellowbrickResponse, error) { +func (s *Destinations) PutDestinationYellowbrick(ctx context.Context, request operations.PutDestinationYellowbrickRequest, opts ...operations.Option) (*operations.PutDestinationYellowbrickResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putDestinationYellowbrick", @@ -14232,6 +17237,17 @@ func (s *Destinations) PutDestinationYellowbrick(ctx context.Context, request op SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/destinations/{destinationId}", request, nil) if err != nil { @@ -14243,6 +17259,17 @@ func (s *Destinations) PutDestinationYellowbrick(ctx context.Context, request op return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/health.go b/internal/sdk/health.go index a4ba32b14..c661532b0 100644 --- a/internal/sdk/health.go +++ b/internal/sdk/health.go @@ -26,7 +26,7 @@ func newHealth(sdkConfig sdkConfiguration) *Health { } // GetHealthCheck - Health Check -func (s *Health) GetHealthCheck(ctx context.Context) (*operations.GetHealthCheckResponse, error) { +func (s *Health) GetHealthCheck(ctx context.Context, opts ...operations.Option) (*operations.GetHealthCheckResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getHealthCheck", @@ -34,12 +34,34 @@ func (s *Health) GetHealthCheck(ctx context.Context) (*operations.GetHealthCheck SecuritySource: nil, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/health") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/internal/utils/queryparams.go b/internal/sdk/internal/utils/queryparams.go index e2c5b9d0d..14a9092d5 100644 --- a/internal/sdk/internal/utils/queryparams.go +++ b/internal/sdk/internal/utils/queryparams.go @@ -6,9 +6,15 @@ import ( "context" "encoding/json" "fmt" + "math/big" "net/http" "net/url" "reflect" + "time" + + "github.com/ericlagergren/decimal" + + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" ) func PopulateQueryParams(_ context.Context, req *http.Request, queryParams interface{}, globals interface{}) error { @@ -132,54 +138,97 @@ func populateDeepObjectParams(tag *paramTag, objType reflect.Type, objValue refl return values } - if objType.Kind() == reflect.Pointer { - objType = objType.Elem() + if objValue.Kind() == reflect.Pointer { objValue = objValue.Elem() } - switch objType.Kind() { + switch objValue.Kind() { + case reflect.Map: + populateDeepObjectParamsMap(values, tag.ParamName, objValue) case reflect.Struct: - for i := 0; i < objType.NumField(); i++ { - fieldType := objType.Field(i) - valType := objValue.Field(i) + populateDeepObjectParamsStruct(values, tag.ParamName, objValue) + } - if isNil(fieldType.Type, valType) { - continue - } + return values +} - if fieldType.Type.Kind() == reflect.Pointer { - valType = valType.Elem() - } +func populateDeepObjectParamsArray(qsValues url.Values, priorScope string, value reflect.Value) { + if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { + return + } - qpTag := parseQueryParamTag(fieldType) - if qpTag == nil { - continue - } + for i := 0; i < value.Len(); i++ { + qsValues.Add(priorScope, valToString(value.Index(i).Interface())) + } +} - switch valType.Kind() { - case reflect.Array, reflect.Slice: - for i := 0; i < valType.Len(); i++ { - values.Add(fmt.Sprintf("%s[%s]", tag.ParamName, qpTag.ParamName), valToString(valType.Index(i).Interface())) - } - default: - values.Add(fmt.Sprintf("%s[%s]", tag.ParamName, qpTag.ParamName), valToString(valType.Interface())) - } +func populateDeepObjectParamsMap(qsValues url.Values, priorScope string, mapValue reflect.Value) { + if mapValue.Kind() != reflect.Map { + return + } + + iter := mapValue.MapRange() + + for iter.Next() { + scope := priorScope + "[" + iter.Key().String() + "]" + iterValue := iter.Value() + + switch iterValue.Kind() { + case reflect.Array, reflect.Slice: + populateDeepObjectParamsArray(qsValues, scope, iterValue) + case reflect.Map: + populateDeepObjectParamsMap(qsValues, scope, iterValue) + default: + qsValues.Add(scope, valToString(iterValue.Interface())) } - case reflect.Map: - iter := objValue.MapRange() - for iter.Next() { - switch iter.Value().Kind() { - case reflect.Array, reflect.Slice: - for i := 0; i < iter.Value().Len(); i++ { - values.Add(fmt.Sprintf("%s[%s]", tag.ParamName, iter.Key().String()), valToString(iter.Value().Index(i).Interface())) - } - default: - values.Add(fmt.Sprintf("%s[%s]", tag.ParamName, iter.Key().String()), valToString(iter.Value().Interface())) + } +} + +func populateDeepObjectParamsStruct(qsValues url.Values, priorScope string, structValue reflect.Value) { + if structValue.Kind() != reflect.Struct { + return + } + + structType := structValue.Type() + + for i := 0; i < structType.NumField(); i++ { + field := structType.Field(i) + fieldValue := structValue.Field(i) + + if isNil(field.Type, fieldValue) { + continue + } + + if fieldValue.Kind() == reflect.Pointer { + fieldValue = fieldValue.Elem() + } + + qpTag := parseQueryParamTag(field) + + if qpTag == nil { + continue + } + + scope := priorScope + "[" + qpTag.ParamName + "]" + + switch fieldValue.Kind() { + case reflect.Array, reflect.Slice: + populateDeepObjectParamsArray(qsValues, scope, fieldValue) + case reflect.Map: + populateDeepObjectParamsMap(qsValues, scope, fieldValue) + case reflect.Struct: + switch fieldValue.Type() { + case reflect.TypeOf(big.Int{}), reflect.TypeOf(decimal.Big{}), reflect.TypeOf(time.Time{}), reflect.TypeOf(types.Date{}): + qsValues.Add(scope, valToString(fieldValue.Interface())) + + continue } + + populateDeepObjectParamsStruct(qsValues, scope, fieldValue) + default: + qsValues.Add(scope, valToString(fieldValue.Interface())) } } - - return values } func populateFormParams(tag *paramTag, objType reflect.Type, objValue reflect.Value, delimiter string) url.Values { diff --git a/internal/sdk/jobs.go b/internal/sdk/jobs.go index 54b6d8833..e4070b890 100644 --- a/internal/sdk/jobs.go +++ b/internal/sdk/jobs.go @@ -27,7 +27,7 @@ func newJobs(sdkConfig sdkConfiguration) *Jobs { } // CancelJob - Cancel a running Job -func (s *Jobs) CancelJob(ctx context.Context, request operations.CancelJobRequest) (*operations.CancelJobResponse, error) { +func (s *Jobs) CancelJob(ctx context.Context, request operations.CancelJobRequest, opts ...operations.Option) (*operations.CancelJobResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "cancelJob", @@ -35,12 +35,34 @@ func (s *Jobs) CancelJob(ctx context.Context, request operations.CancelJobReques SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/jobs/{jobId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -119,7 +141,7 @@ func (s *Jobs) CancelJob(ctx context.Context, request operations.CancelJobReques } // CreateJob - Trigger a sync or reset job of a connection -func (s *Jobs) CreateJob(ctx context.Context, request shared.JobCreateRequest) (*operations.CreateJobResponse, error) { +func (s *Jobs) CreateJob(ctx context.Context, request shared.JobCreateRequest, opts ...operations.Option) (*operations.CreateJobResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createJob", @@ -127,6 +149,17 @@ func (s *Jobs) CreateJob(ctx context.Context, request shared.JobCreateRequest) ( SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/jobs") if err != nil { @@ -138,6 +171,17 @@ func (s *Jobs) CreateJob(ctx context.Context, request shared.JobCreateRequest) ( return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -217,7 +261,7 @@ func (s *Jobs) CreateJob(ctx context.Context, request shared.JobCreateRequest) ( } // GetJob - Get Job status and details -func (s *Jobs) GetJob(ctx context.Context, request operations.GetJobRequest) (*operations.GetJobResponse, error) { +func (s *Jobs) GetJob(ctx context.Context, request operations.GetJobRequest, opts ...operations.Option) (*operations.GetJobResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getJob", @@ -225,12 +269,34 @@ func (s *Jobs) GetJob(ctx context.Context, request operations.GetJobRequest) (*o SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/jobs/{jobId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -309,7 +375,7 @@ func (s *Jobs) GetJob(ctx context.Context, request operations.GetJobRequest) (*o } // ListJobs - List Jobs by sync type -func (s *Jobs) ListJobs(ctx context.Context, request operations.ListJobsRequest) (*operations.ListJobsResponse, error) { +func (s *Jobs) ListJobs(ctx context.Context, request operations.ListJobsRequest, opts ...operations.Option) (*operations.ListJobsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listJobs", @@ -317,12 +383,34 @@ func (s *Jobs) ListJobs(ctx context.Context, request operations.ListJobsRequest) SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/jobs") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/models/operations/createsourcegoogleanalyticsv4serviceaccountonly.go b/internal/sdk/models/operations/createsourceclazar.go similarity index 60% rename from internal/sdk/models/operations/createsourcegoogleanalyticsv4serviceaccountonly.go rename to internal/sdk/models/operations/createsourceclazar.go index 840853615..999f381e8 100644 --- a/internal/sdk/models/operations/createsourcegoogleanalyticsv4serviceaccountonly.go +++ b/internal/sdk/models/operations/createsourceclazar.go @@ -7,7 +7,7 @@ import ( "net/http" ) -type CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { +type CreateSourceClazarResponse struct { // HTTP response content type for this operation ContentType string // Successful operation @@ -18,28 +18,28 @@ type CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { RawResponse *http.Response } -func (o *CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetContentType() string { +func (o *CreateSourceClazarResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetSourceResponse() *shared.SourceResponse { +func (o *CreateSourceClazarResponse) GetSourceResponse() *shared.SourceResponse { if o == nil { return nil } return o.SourceResponse } -func (o *CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetStatusCode() int { +func (o *CreateSourceClazarResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetRawResponse() *http.Response { +func (o *CreateSourceClazarResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/createsourcepunkapi.go b/internal/sdk/models/operations/createsourcedatadog.go similarity index 71% rename from internal/sdk/models/operations/createsourcepunkapi.go rename to internal/sdk/models/operations/createsourcedatadog.go index afb1bda3d..d55a613f8 100644 --- a/internal/sdk/models/operations/createsourcepunkapi.go +++ b/internal/sdk/models/operations/createsourcedatadog.go @@ -7,7 +7,7 @@ import ( "net/http" ) -type CreateSourcePunkAPIResponse struct { +type CreateSourceDatadogResponse struct { // HTTP response content type for this operation ContentType string // Successful operation @@ -18,28 +18,28 @@ type CreateSourcePunkAPIResponse struct { RawResponse *http.Response } -func (o *CreateSourcePunkAPIResponse) GetContentType() string { +func (o *CreateSourceDatadogResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *CreateSourcePunkAPIResponse) GetSourceResponse() *shared.SourceResponse { +func (o *CreateSourceDatadogResponse) GetSourceResponse() *shared.SourceResponse { if o == nil { return nil } return o.SourceResponse } -func (o *CreateSourcePunkAPIResponse) GetStatusCode() int { +func (o *CreateSourceDatadogResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *CreateSourcePunkAPIResponse) GetRawResponse() *http.Response { +func (o *CreateSourceDatadogResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/createdestinationlangchain.go b/internal/sdk/models/operations/createsourcegoldcast.go similarity index 59% rename from internal/sdk/models/operations/createdestinationlangchain.go rename to internal/sdk/models/operations/createsourcegoldcast.go index 7829a6e0c..7f0b376fb 100644 --- a/internal/sdk/models/operations/createdestinationlangchain.go +++ b/internal/sdk/models/operations/createsourcegoldcast.go @@ -7,39 +7,39 @@ import ( "net/http" ) -type CreateDestinationLangchainResponse struct { +type CreateSourceGoldcastResponse struct { // HTTP response content type for this operation ContentType string // Successful operation - DestinationResponse *shared.DestinationResponse + SourceResponse *shared.SourceResponse // HTTP response status code for this operation StatusCode int // Raw HTTP response; suitable for custom response parsing RawResponse *http.Response } -func (o *CreateDestinationLangchainResponse) GetContentType() string { +func (o *CreateSourceGoldcastResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *CreateDestinationLangchainResponse) GetDestinationResponse() *shared.DestinationResponse { +func (o *CreateSourceGoldcastResponse) GetSourceResponse() *shared.SourceResponse { if o == nil { return nil } - return o.DestinationResponse + return o.SourceResponse } -func (o *CreateDestinationLangchainResponse) GetStatusCode() int { +func (o *CreateSourceGoldcastResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *CreateDestinationLangchainResponse) GetRawResponse() *http.Response { +func (o *CreateSourceGoldcastResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/deletesourcegoogleanalyticsv4serviceaccountonly.go b/internal/sdk/models/operations/deletesourceclazar.go similarity index 55% rename from internal/sdk/models/operations/deletesourcegoogleanalyticsv4serviceaccountonly.go rename to internal/sdk/models/operations/deletesourceclazar.go index 45fa6fd44..1e5cb109b 100644 --- a/internal/sdk/models/operations/deletesourcegoogleanalyticsv4serviceaccountonly.go +++ b/internal/sdk/models/operations/deletesourceclazar.go @@ -6,18 +6,18 @@ import ( "net/http" ) -type DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyRequest struct { +type DeleteSourceClazarRequest struct { SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) GetSourceID() string { +func (o *DeleteSourceClazarRequest) GetSourceID() string { if o == nil { return "" } return o.SourceID } -type DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { +type DeleteSourceClazarResponse struct { // HTTP response content type for this operation ContentType string // HTTP response status code for this operation @@ -26,21 +26,21 @@ type DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { RawResponse *http.Response } -func (o *DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetContentType() string { +func (o *DeleteSourceClazarResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetStatusCode() int { +func (o *DeleteSourceClazarResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetRawResponse() *http.Response { +func (o *DeleteSourceClazarResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/deletesourcepunkapi.go b/internal/sdk/models/operations/deletesourcedatadog.go similarity index 65% rename from internal/sdk/models/operations/deletesourcepunkapi.go rename to internal/sdk/models/operations/deletesourcedatadog.go index a779cb183..1606445ef 100644 --- a/internal/sdk/models/operations/deletesourcepunkapi.go +++ b/internal/sdk/models/operations/deletesourcedatadog.go @@ -6,18 +6,18 @@ import ( "net/http" ) -type DeleteSourcePunkAPIRequest struct { +type DeleteSourceDatadogRequest struct { SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *DeleteSourcePunkAPIRequest) GetSourceID() string { +func (o *DeleteSourceDatadogRequest) GetSourceID() string { if o == nil { return "" } return o.SourceID } -type DeleteSourcePunkAPIResponse struct { +type DeleteSourceDatadogResponse struct { // HTTP response content type for this operation ContentType string // HTTP response status code for this operation @@ -26,21 +26,21 @@ type DeleteSourcePunkAPIResponse struct { RawResponse *http.Response } -func (o *DeleteSourcePunkAPIResponse) GetContentType() string { +func (o *DeleteSourceDatadogResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *DeleteSourcePunkAPIResponse) GetStatusCode() int { +func (o *DeleteSourceDatadogResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *DeleteSourcePunkAPIResponse) GetRawResponse() *http.Response { +func (o *DeleteSourceDatadogResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/deletedestinationlangchain.go b/internal/sdk/models/operations/deletesourcegoldcast.go similarity index 52% rename from internal/sdk/models/operations/deletedestinationlangchain.go rename to internal/sdk/models/operations/deletesourcegoldcast.go index 0e6665605..14d0e40c6 100644 --- a/internal/sdk/models/operations/deletedestinationlangchain.go +++ b/internal/sdk/models/operations/deletesourcegoldcast.go @@ -6,18 +6,18 @@ import ( "net/http" ) -type DeleteDestinationLangchainRequest struct { - DestinationID string `pathParam:"style=simple,explode=false,name=destinationId"` +type DeleteSourceGoldcastRequest struct { + SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *DeleteDestinationLangchainRequest) GetDestinationID() string { +func (o *DeleteSourceGoldcastRequest) GetSourceID() string { if o == nil { return "" } - return o.DestinationID + return o.SourceID } -type DeleteDestinationLangchainResponse struct { +type DeleteSourceGoldcastResponse struct { // HTTP response content type for this operation ContentType string // HTTP response status code for this operation @@ -26,21 +26,21 @@ type DeleteDestinationLangchainResponse struct { RawResponse *http.Response } -func (o *DeleteDestinationLangchainResponse) GetContentType() string { +func (o *DeleteSourceGoldcastResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *DeleteDestinationLangchainResponse) GetStatusCode() int { +func (o *DeleteSourceGoldcastResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *DeleteDestinationLangchainResponse) GetRawResponse() *http.Response { +func (o *DeleteSourceGoldcastResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/getdestinationlangchain.go b/internal/sdk/models/operations/getdestinationlangchain.go deleted file mode 100644 index adb9116aa..000000000 --- a/internal/sdk/models/operations/getdestinationlangchain.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package operations - -import ( - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - "net/http" -) - -type GetDestinationLangchainRequest struct { - DestinationID string `pathParam:"style=simple,explode=false,name=destinationId"` -} - -func (o *GetDestinationLangchainRequest) GetDestinationID() string { - if o == nil { - return "" - } - return o.DestinationID -} - -type GetDestinationLangchainResponse struct { - // HTTP response content type for this operation - ContentType string - // Get a Destination by the id in the path. - DestinationResponse *shared.DestinationResponse - // HTTP response status code for this operation - StatusCode int - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response -} - -func (o *GetDestinationLangchainResponse) GetContentType() string { - if o == nil { - return "" - } - return o.ContentType -} - -func (o *GetDestinationLangchainResponse) GetDestinationResponse() *shared.DestinationResponse { - if o == nil { - return nil - } - return o.DestinationResponse -} - -func (o *GetDestinationLangchainResponse) GetStatusCode() int { - if o == nil { - return 0 - } - return o.StatusCode -} - -func (o *GetDestinationLangchainResponse) GetRawResponse() *http.Response { - if o == nil { - return nil - } - return o.RawResponse -} diff --git a/internal/sdk/models/operations/getsourcegoogleanalyticsv4serviceaccountonly.go b/internal/sdk/models/operations/getsourceclazar.go similarity index 58% rename from internal/sdk/models/operations/getsourcegoogleanalyticsv4serviceaccountonly.go rename to internal/sdk/models/operations/getsourceclazar.go index 207c5e0fe..243be3a96 100644 --- a/internal/sdk/models/operations/getsourcegoogleanalyticsv4serviceaccountonly.go +++ b/internal/sdk/models/operations/getsourceclazar.go @@ -7,18 +7,18 @@ import ( "net/http" ) -type GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest struct { +type GetSourceClazarRequest struct { SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) GetSourceID() string { +func (o *GetSourceClazarRequest) GetSourceID() string { if o == nil { return "" } return o.SourceID } -type GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { +type GetSourceClazarResponse struct { // HTTP response content type for this operation ContentType string // Get a Source by the id in the path. @@ -29,28 +29,28 @@ type GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { RawResponse *http.Response } -func (o *GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetContentType() string { +func (o *GetSourceClazarResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetSourceResponse() *shared.SourceResponse { +func (o *GetSourceClazarResponse) GetSourceResponse() *shared.SourceResponse { if o == nil { return nil } return o.SourceResponse } -func (o *GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetStatusCode() int { +func (o *GetSourceClazarResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetRawResponse() *http.Response { +func (o *GetSourceClazarResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/getsourcepunkapi.go b/internal/sdk/models/operations/getsourcedatadog.go similarity index 69% rename from internal/sdk/models/operations/getsourcepunkapi.go rename to internal/sdk/models/operations/getsourcedatadog.go index 6cb711ba1..a50657695 100644 --- a/internal/sdk/models/operations/getsourcepunkapi.go +++ b/internal/sdk/models/operations/getsourcedatadog.go @@ -7,18 +7,18 @@ import ( "net/http" ) -type GetSourcePunkAPIRequest struct { +type GetSourceDatadogRequest struct { SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *GetSourcePunkAPIRequest) GetSourceID() string { +func (o *GetSourceDatadogRequest) GetSourceID() string { if o == nil { return "" } return o.SourceID } -type GetSourcePunkAPIResponse struct { +type GetSourceDatadogResponse struct { // HTTP response content type for this operation ContentType string // Get a Source by the id in the path. @@ -29,28 +29,28 @@ type GetSourcePunkAPIResponse struct { RawResponse *http.Response } -func (o *GetSourcePunkAPIResponse) GetContentType() string { +func (o *GetSourceDatadogResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *GetSourcePunkAPIResponse) GetSourceResponse() *shared.SourceResponse { +func (o *GetSourceDatadogResponse) GetSourceResponse() *shared.SourceResponse { if o == nil { return nil } return o.SourceResponse } -func (o *GetSourcePunkAPIResponse) GetStatusCode() int { +func (o *GetSourceDatadogResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *GetSourcePunkAPIResponse) GetRawResponse() *http.Response { +func (o *GetSourceDatadogResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/getsourcegoldcast.go b/internal/sdk/models/operations/getsourcegoldcast.go new file mode 100644 index 000000000..86bf7222d --- /dev/null +++ b/internal/sdk/models/operations/getsourcegoldcast.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package operations + +import ( + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" + "net/http" +) + +type GetSourceGoldcastRequest struct { + SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` +} + +func (o *GetSourceGoldcastRequest) GetSourceID() string { + if o == nil { + return "" + } + return o.SourceID +} + +type GetSourceGoldcastResponse struct { + // HTTP response content type for this operation + ContentType string + // Get a Source by the id in the path. + SourceResponse *shared.SourceResponse + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *GetSourceGoldcastResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *GetSourceGoldcastResponse) GetSourceResponse() *shared.SourceResponse { + if o == nil { + return nil + } + return o.SourceResponse +} + +func (o *GetSourceGoldcastResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *GetSourceGoldcastResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/internal/sdk/models/operations/options.go b/internal/sdk/models/operations/options.go new file mode 100644 index 000000000..54850f919 --- /dev/null +++ b/internal/sdk/models/operations/options.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package operations + +import ( + "errors" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/retry" + "time" +) + +var ErrUnsupportedOption = errors.New("unsupported option") + +const ( + SupportedOptionServerURL = "serverURL" + SupportedOptionRetries = "retries" + SupportedOptionTimeout = "timeout" + SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride" +) + +type AcceptHeaderEnum string + +const ( + AcceptHeaderEnumApplicationJson AcceptHeaderEnum = "application/json" + AcceptHeaderEnumWildcardWildcard AcceptHeaderEnum = "*/*" +) + +func (e AcceptHeaderEnum) ToPointer() *AcceptHeaderEnum { + return &e +} + +type Options struct { + ServerURL *string + Retries *retry.Config + Timeout *time.Duration + AcceptHeaderOverride *AcceptHeaderEnum +} + +type Option func(*Options, ...string) error + +// WithServerURL allows providing an alternative server URL. +func WithServerURL(serverURL string) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionServerURL) { + return ErrUnsupportedOption + } + + opts.ServerURL = &serverURL + return nil + } +} + +// WithTemplatedServerURL allows providing an alternative server URL with templated parameters. +func WithTemplatedServerURL(serverURL string, params map[string]string) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionServerURL) { + return ErrUnsupportedOption + } + + if params != nil { + serverURL = utils.ReplaceParameters(serverURL, params) + } + + opts.ServerURL = &serverURL + return nil + } +} + +// WithRetries allows customizing the default retry configuration. +func WithRetries(config retry.Config) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionRetries) { + return ErrUnsupportedOption + } + + opts.Retries = &config + return nil + } +} + +// WithOperationTimeout allows setting the request timeout applied for an operation. +func WithOperationTimeout(timeout time.Duration) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionRetries) { + return ErrUnsupportedOption + } + + opts.Timeout = &timeout + return nil + } +} + +func WithAcceptHeaderOverride(acceptHeaderOverride AcceptHeaderEnum) Option { + return func(opts *Options, supportedOptions ...string) error { + if !utils.Contains(supportedOptions, SupportedOptionAcceptHeaderOverride) { + return ErrUnsupportedOption + } + + opts.AcceptHeaderOverride = &acceptHeaderOverride + return nil + } +} diff --git a/internal/sdk/models/operations/putdestinationlangchain.go b/internal/sdk/models/operations/putdestinationlangchain.go deleted file mode 100644 index 95ab8e466..000000000 --- a/internal/sdk/models/operations/putdestinationlangchain.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package operations - -import ( - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - "net/http" -) - -type PutDestinationLangchainRequest struct { - DestinationLangchainPutRequest *shared.DestinationLangchainPutRequest `request:"mediaType=application/json"` - DestinationID string `pathParam:"style=simple,explode=false,name=destinationId"` -} - -func (o *PutDestinationLangchainRequest) GetDestinationLangchainPutRequest() *shared.DestinationLangchainPutRequest { - if o == nil { - return nil - } - return o.DestinationLangchainPutRequest -} - -func (o *PutDestinationLangchainRequest) GetDestinationID() string { - if o == nil { - return "" - } - return o.DestinationID -} - -type PutDestinationLangchainResponse struct { - // HTTP response content type for this operation - ContentType string - // HTTP response status code for this operation - StatusCode int - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response -} - -func (o *PutDestinationLangchainResponse) GetContentType() string { - if o == nil { - return "" - } - return o.ContentType -} - -func (o *PutDestinationLangchainResponse) GetStatusCode() int { - if o == nil { - return 0 - } - return o.StatusCode -} - -func (o *PutDestinationLangchainResponse) GetRawResponse() *http.Response { - if o == nil { - return nil - } - return o.RawResponse -} diff --git a/internal/sdk/models/operations/putsourceclazar.go b/internal/sdk/models/operations/putsourceclazar.go new file mode 100644 index 000000000..6377c7340 --- /dev/null +++ b/internal/sdk/models/operations/putsourceclazar.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package operations + +import ( + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" + "net/http" +) + +type PutSourceClazarRequest struct { + SourceClazarPutRequest *shared.SourceClazarPutRequest `request:"mediaType=application/json"` + SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` +} + +func (o *PutSourceClazarRequest) GetSourceClazarPutRequest() *shared.SourceClazarPutRequest { + if o == nil { + return nil + } + return o.SourceClazarPutRequest +} + +func (o *PutSourceClazarRequest) GetSourceID() string { + if o == nil { + return "" + } + return o.SourceID +} + +type PutSourceClazarResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *PutSourceClazarResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *PutSourceClazarResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *PutSourceClazarResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/internal/sdk/models/operations/putsourcepunkapi.go b/internal/sdk/models/operations/putsourcedatadog.go similarity index 61% rename from internal/sdk/models/operations/putsourcepunkapi.go rename to internal/sdk/models/operations/putsourcedatadog.go index 33d5166ab..2d5c01f0e 100644 --- a/internal/sdk/models/operations/putsourcepunkapi.go +++ b/internal/sdk/models/operations/putsourcedatadog.go @@ -7,26 +7,26 @@ import ( "net/http" ) -type PutSourcePunkAPIRequest struct { - SourcePunkAPIPutRequest *shared.SourcePunkAPIPutRequest `request:"mediaType=application/json"` +type PutSourceDatadogRequest struct { + SourceDatadogPutRequest *shared.SourceDatadogPutRequest `request:"mediaType=application/json"` SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` } -func (o *PutSourcePunkAPIRequest) GetSourcePunkAPIPutRequest() *shared.SourcePunkAPIPutRequest { +func (o *PutSourceDatadogRequest) GetSourceDatadogPutRequest() *shared.SourceDatadogPutRequest { if o == nil { return nil } - return o.SourcePunkAPIPutRequest + return o.SourceDatadogPutRequest } -func (o *PutSourcePunkAPIRequest) GetSourceID() string { +func (o *PutSourceDatadogRequest) GetSourceID() string { if o == nil { return "" } return o.SourceID } -type PutSourcePunkAPIResponse struct { +type PutSourceDatadogResponse struct { // HTTP response content type for this operation ContentType string // HTTP response status code for this operation @@ -35,21 +35,21 @@ type PutSourcePunkAPIResponse struct { RawResponse *http.Response } -func (o *PutSourcePunkAPIResponse) GetContentType() string { +func (o *PutSourceDatadogResponse) GetContentType() string { if o == nil { return "" } return o.ContentType } -func (o *PutSourcePunkAPIResponse) GetStatusCode() int { +func (o *PutSourceDatadogResponse) GetStatusCode() int { if o == nil { return 0 } return o.StatusCode } -func (o *PutSourcePunkAPIResponse) GetRawResponse() *http.Response { +func (o *PutSourceDatadogResponse) GetRawResponse() *http.Response { if o == nil { return nil } diff --git a/internal/sdk/models/operations/putsourcegoldcast.go b/internal/sdk/models/operations/putsourcegoldcast.go new file mode 100644 index 000000000..656dd79f7 --- /dev/null +++ b/internal/sdk/models/operations/putsourcegoldcast.go @@ -0,0 +1,57 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package operations + +import ( + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" + "net/http" +) + +type PutSourceGoldcastRequest struct { + SourceGoldcastPutRequest *shared.SourceGoldcastPutRequest `request:"mediaType=application/json"` + SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` +} + +func (o *PutSourceGoldcastRequest) GetSourceGoldcastPutRequest() *shared.SourceGoldcastPutRequest { + if o == nil { + return nil + } + return o.SourceGoldcastPutRequest +} + +func (o *PutSourceGoldcastRequest) GetSourceID() string { + if o == nil { + return "" + } + return o.SourceID +} + +type PutSourceGoldcastResponse struct { + // HTTP response content type for this operation + ContentType string + // HTTP response status code for this operation + StatusCode int + // Raw HTTP response; suitable for custom response parsing + RawResponse *http.Response +} + +func (o *PutSourceGoldcastResponse) GetContentType() string { + if o == nil { + return "" + } + return o.ContentType +} + +func (o *PutSourceGoldcastResponse) GetStatusCode() int { + if o == nil { + return 0 + } + return o.StatusCode +} + +func (o *PutSourceGoldcastResponse) GetRawResponse() *http.Response { + if o == nil { + return nil + } + return o.RawResponse +} diff --git a/internal/sdk/models/operations/putsourcegoogleanalyticsv4serviceaccountonly.go b/internal/sdk/models/operations/putsourcegoogleanalyticsv4serviceaccountonly.go deleted file mode 100644 index d7c6dd658..000000000 --- a/internal/sdk/models/operations/putsourcegoogleanalyticsv4serviceaccountonly.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package operations - -import ( - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared" - "net/http" -) - -type PutSourceGoogleAnalyticsV4ServiceAccountOnlyRequest struct { - SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest `request:"mediaType=application/json"` - SourceID string `pathParam:"style=simple,explode=false,name=sourceId"` -} - -func (o *PutSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) GetSourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest() *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest { - if o == nil { - return nil - } - return o.SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest -} - -func (o *PutSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) GetSourceID() string { - if o == nil { - return "" - } - return o.SourceID -} - -type PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse struct { - // HTTP response content type for this operation - ContentType string - // HTTP response status code for this operation - StatusCode int - // Raw HTTP response; suitable for custom response parsing - RawResponse *http.Response -} - -func (o *PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetContentType() string { - if o == nil { - return "" - } - return o.ContentType -} - -func (o *PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetStatusCode() int { - if o == nil { - return 0 - } - return o.StatusCode -} - -func (o *PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse) GetRawResponse() *http.Response { - if o == nil { - return nil - } - return o.RawResponse -} diff --git a/internal/sdk/models/shared/destinationlangchain.go b/internal/sdk/models/shared/destinationlangchain.go deleted file mode 100644 index 372465c7c..000000000 --- a/internal/sdk/models/shared/destinationlangchain.go +++ /dev/null @@ -1,545 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "errors" - "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" -) - -type Langchain string - -const ( - LangchainLangchain Langchain = "langchain" -) - -func (e Langchain) ToPointer() *Langchain { - return &e -} -func (e *Langchain) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "langchain": - *e = Langchain(v) - return nil - default: - return fmt.Errorf("invalid value for Langchain: %v", v) - } -} - -type DestinationLangchainSchemasMode string - -const ( - DestinationLangchainSchemasModeFake DestinationLangchainSchemasMode = "fake" -) - -func (e DestinationLangchainSchemasMode) ToPointer() *DestinationLangchainSchemasMode { - return &e -} -func (e *DestinationLangchainSchemasMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "fake": - *e = DestinationLangchainSchemasMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainSchemasMode: %v", v) - } -} - -// DestinationLangchainFake - Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. -type DestinationLangchainFake struct { - mode *DestinationLangchainSchemasMode `const:"fake" json:"mode"` -} - -func (d DestinationLangchainFake) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainFake) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainFake) GetMode() *DestinationLangchainSchemasMode { - return DestinationLangchainSchemasModeFake.ToPointer() -} - -type DestinationLangchainMode string - -const ( - DestinationLangchainModeOpenai DestinationLangchainMode = "openai" -) - -func (e DestinationLangchainMode) ToPointer() *DestinationLangchainMode { - return &e -} -func (e *DestinationLangchainMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "openai": - *e = DestinationLangchainMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainMode: %v", v) - } -} - -// DestinationLangchainOpenAI - Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. -type DestinationLangchainOpenAI struct { - mode *DestinationLangchainMode `const:"openai" json:"mode"` - OpenaiKey string `json:"openai_key"` -} - -func (d DestinationLangchainOpenAI) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainOpenAI) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainOpenAI) GetMode() *DestinationLangchainMode { - return DestinationLangchainModeOpenai.ToPointer() -} - -func (o *DestinationLangchainOpenAI) GetOpenaiKey() string { - if o == nil { - return "" - } - return o.OpenaiKey -} - -type DestinationLangchainEmbeddingType string - -const ( - DestinationLangchainEmbeddingTypeDestinationLangchainOpenAI DestinationLangchainEmbeddingType = "destination-langchain_OpenAI" - DestinationLangchainEmbeddingTypeDestinationLangchainFake DestinationLangchainEmbeddingType = "destination-langchain_Fake" -) - -// DestinationLangchainEmbedding - Embedding configuration -type DestinationLangchainEmbedding struct { - DestinationLangchainOpenAI *DestinationLangchainOpenAI - DestinationLangchainFake *DestinationLangchainFake - - Type DestinationLangchainEmbeddingType -} - -func CreateDestinationLangchainEmbeddingDestinationLangchainOpenAI(destinationLangchainOpenAI DestinationLangchainOpenAI) DestinationLangchainEmbedding { - typ := DestinationLangchainEmbeddingTypeDestinationLangchainOpenAI - - return DestinationLangchainEmbedding{ - DestinationLangchainOpenAI: &destinationLangchainOpenAI, - Type: typ, - } -} - -func CreateDestinationLangchainEmbeddingDestinationLangchainFake(destinationLangchainFake DestinationLangchainFake) DestinationLangchainEmbedding { - typ := DestinationLangchainEmbeddingTypeDestinationLangchainFake - - return DestinationLangchainEmbedding{ - DestinationLangchainFake: &destinationLangchainFake, - Type: typ, - } -} - -func (u *DestinationLangchainEmbedding) UnmarshalJSON(data []byte) error { - - var destinationLangchainFake DestinationLangchainFake = DestinationLangchainFake{} - if err := utils.UnmarshalJSON(data, &destinationLangchainFake, "", true, true); err == nil { - u.DestinationLangchainFake = &destinationLangchainFake - u.Type = DestinationLangchainEmbeddingTypeDestinationLangchainFake - return nil - } - - var destinationLangchainOpenAI DestinationLangchainOpenAI = DestinationLangchainOpenAI{} - if err := utils.UnmarshalJSON(data, &destinationLangchainOpenAI, "", true, true); err == nil { - u.DestinationLangchainOpenAI = &destinationLangchainOpenAI - u.Type = DestinationLangchainEmbeddingTypeDestinationLangchainOpenAI - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationLangchainEmbedding", string(data)) -} - -func (u DestinationLangchainEmbedding) MarshalJSON() ([]byte, error) { - if u.DestinationLangchainOpenAI != nil { - return utils.MarshalJSON(u.DestinationLangchainOpenAI, "", true) - } - - if u.DestinationLangchainFake != nil { - return utils.MarshalJSON(u.DestinationLangchainFake, "", true) - } - - return nil, errors.New("could not marshal union type DestinationLangchainEmbedding: all fields are null") -} - -type DestinationLangchainSchemasIndexingIndexing3Mode string - -const ( - DestinationLangchainSchemasIndexingIndexing3ModeChromaLocal DestinationLangchainSchemasIndexingIndexing3Mode = "chroma_local" -) - -func (e DestinationLangchainSchemasIndexingIndexing3Mode) ToPointer() *DestinationLangchainSchemasIndexingIndexing3Mode { - return &e -} -func (e *DestinationLangchainSchemasIndexingIndexing3Mode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "chroma_local": - *e = DestinationLangchainSchemasIndexingIndexing3Mode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainSchemasIndexingIndexing3Mode: %v", v) - } -} - -// DestinationLangchainChromaLocalPersistance - Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync. -type DestinationLangchainChromaLocalPersistance struct { - // Name of the collection to use. - CollectionName *string `default:"langchain" json:"collection_name"` - // Path to the directory where chroma files will be written. The files will be placed inside that local mount. - DestinationPath string `json:"destination_path"` - mode *DestinationLangchainSchemasIndexingIndexing3Mode `const:"chroma_local" json:"mode"` -} - -func (d DestinationLangchainChromaLocalPersistance) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainChromaLocalPersistance) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainChromaLocalPersistance) GetCollectionName() *string { - if o == nil { - return nil - } - return o.CollectionName -} - -func (o *DestinationLangchainChromaLocalPersistance) GetDestinationPath() string { - if o == nil { - return "" - } - return o.DestinationPath -} - -func (o *DestinationLangchainChromaLocalPersistance) GetMode() *DestinationLangchainSchemasIndexingIndexing3Mode { - return DestinationLangchainSchemasIndexingIndexing3ModeChromaLocal.ToPointer() -} - -type DestinationLangchainSchemasIndexingIndexingMode string - -const ( - DestinationLangchainSchemasIndexingIndexingModeDocArrayHnswSearch DestinationLangchainSchemasIndexingIndexingMode = "DocArrayHnswSearch" -) - -func (e DestinationLangchainSchemasIndexingIndexingMode) ToPointer() *DestinationLangchainSchemasIndexingIndexingMode { - return &e -} -func (e *DestinationLangchainSchemasIndexingIndexingMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "DocArrayHnswSearch": - *e = DestinationLangchainSchemasIndexingIndexingMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainSchemasIndexingIndexingMode: %v", v) - } -} - -// DestinationLangchainDocArrayHnswSearch - DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite. -type DestinationLangchainDocArrayHnswSearch struct { - // Path to the directory where hnswlib and meta data files will be written. The files will be placed inside that local mount. All files in the specified destination directory will be deleted on each run. - DestinationPath string `json:"destination_path"` - mode *DestinationLangchainSchemasIndexingIndexingMode `const:"DocArrayHnswSearch" json:"mode"` -} - -func (d DestinationLangchainDocArrayHnswSearch) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainDocArrayHnswSearch) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainDocArrayHnswSearch) GetDestinationPath() string { - if o == nil { - return "" - } - return o.DestinationPath -} - -func (o *DestinationLangchainDocArrayHnswSearch) GetMode() *DestinationLangchainSchemasIndexingIndexingMode { - return DestinationLangchainSchemasIndexingIndexingModeDocArrayHnswSearch.ToPointer() -} - -type DestinationLangchainSchemasIndexingMode string - -const ( - DestinationLangchainSchemasIndexingModePinecone DestinationLangchainSchemasIndexingMode = "pinecone" -) - -func (e DestinationLangchainSchemasIndexingMode) ToPointer() *DestinationLangchainSchemasIndexingMode { - return &e -} -func (e *DestinationLangchainSchemasIndexingMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "pinecone": - *e = DestinationLangchainSchemasIndexingMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainSchemasIndexingMode: %v", v) - } -} - -// DestinationLangchainPinecone - Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain. -type DestinationLangchainPinecone struct { - // Pinecone index to use - Index string `json:"index"` - mode *DestinationLangchainSchemasIndexingMode `const:"pinecone" json:"mode"` - // Pinecone environment to use - PineconeEnvironment string `json:"pinecone_environment"` - PineconeKey string `json:"pinecone_key"` -} - -func (d DestinationLangchainPinecone) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainPinecone) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainPinecone) GetIndex() string { - if o == nil { - return "" - } - return o.Index -} - -func (o *DestinationLangchainPinecone) GetMode() *DestinationLangchainSchemasIndexingMode { - return DestinationLangchainSchemasIndexingModePinecone.ToPointer() -} - -func (o *DestinationLangchainPinecone) GetPineconeEnvironment() string { - if o == nil { - return "" - } - return o.PineconeEnvironment -} - -func (o *DestinationLangchainPinecone) GetPineconeKey() string { - if o == nil { - return "" - } - return o.PineconeKey -} - -type DestinationLangchainIndexingType string - -const ( - DestinationLangchainIndexingTypeDestinationLangchainPinecone DestinationLangchainIndexingType = "destination-langchain_Pinecone" - DestinationLangchainIndexingTypeDestinationLangchainDocArrayHnswSearch DestinationLangchainIndexingType = "destination-langchain_DocArrayHnswSearch" - DestinationLangchainIndexingTypeDestinationLangchainChromaLocalPersistance DestinationLangchainIndexingType = "destination-langchain_Chroma (local persistance)" -) - -// DestinationLangchainIndexing - Indexing configuration -type DestinationLangchainIndexing struct { - DestinationLangchainPinecone *DestinationLangchainPinecone - DestinationLangchainDocArrayHnswSearch *DestinationLangchainDocArrayHnswSearch - DestinationLangchainChromaLocalPersistance *DestinationLangchainChromaLocalPersistance - - Type DestinationLangchainIndexingType -} - -func CreateDestinationLangchainIndexingDestinationLangchainPinecone(destinationLangchainPinecone DestinationLangchainPinecone) DestinationLangchainIndexing { - typ := DestinationLangchainIndexingTypeDestinationLangchainPinecone - - return DestinationLangchainIndexing{ - DestinationLangchainPinecone: &destinationLangchainPinecone, - Type: typ, - } -} - -func CreateDestinationLangchainIndexingDestinationLangchainDocArrayHnswSearch(destinationLangchainDocArrayHnswSearch DestinationLangchainDocArrayHnswSearch) DestinationLangchainIndexing { - typ := DestinationLangchainIndexingTypeDestinationLangchainDocArrayHnswSearch - - return DestinationLangchainIndexing{ - DestinationLangchainDocArrayHnswSearch: &destinationLangchainDocArrayHnswSearch, - Type: typ, - } -} - -func CreateDestinationLangchainIndexingDestinationLangchainChromaLocalPersistance(destinationLangchainChromaLocalPersistance DestinationLangchainChromaLocalPersistance) DestinationLangchainIndexing { - typ := DestinationLangchainIndexingTypeDestinationLangchainChromaLocalPersistance - - return DestinationLangchainIndexing{ - DestinationLangchainChromaLocalPersistance: &destinationLangchainChromaLocalPersistance, - Type: typ, - } -} - -func (u *DestinationLangchainIndexing) UnmarshalJSON(data []byte) error { - - var destinationLangchainDocArrayHnswSearch DestinationLangchainDocArrayHnswSearch = DestinationLangchainDocArrayHnswSearch{} - if err := utils.UnmarshalJSON(data, &destinationLangchainDocArrayHnswSearch, "", true, true); err == nil { - u.DestinationLangchainDocArrayHnswSearch = &destinationLangchainDocArrayHnswSearch - u.Type = DestinationLangchainIndexingTypeDestinationLangchainDocArrayHnswSearch - return nil - } - - var destinationLangchainChromaLocalPersistance DestinationLangchainChromaLocalPersistance = DestinationLangchainChromaLocalPersistance{} - if err := utils.UnmarshalJSON(data, &destinationLangchainChromaLocalPersistance, "", true, true); err == nil { - u.DestinationLangchainChromaLocalPersistance = &destinationLangchainChromaLocalPersistance - u.Type = DestinationLangchainIndexingTypeDestinationLangchainChromaLocalPersistance - return nil - } - - var destinationLangchainPinecone DestinationLangchainPinecone = DestinationLangchainPinecone{} - if err := utils.UnmarshalJSON(data, &destinationLangchainPinecone, "", true, true); err == nil { - u.DestinationLangchainPinecone = &destinationLangchainPinecone - u.Type = DestinationLangchainIndexingTypeDestinationLangchainPinecone - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationLangchainIndexing", string(data)) -} - -func (u DestinationLangchainIndexing) MarshalJSON() ([]byte, error) { - if u.DestinationLangchainPinecone != nil { - return utils.MarshalJSON(u.DestinationLangchainPinecone, "", true) - } - - if u.DestinationLangchainDocArrayHnswSearch != nil { - return utils.MarshalJSON(u.DestinationLangchainDocArrayHnswSearch, "", true) - } - - if u.DestinationLangchainChromaLocalPersistance != nil { - return utils.MarshalJSON(u.DestinationLangchainChromaLocalPersistance, "", true) - } - - return nil, errors.New("could not marshal union type DestinationLangchainIndexing: all fields are null") -} - -type DestinationLangchainProcessingConfigModel struct { - // Size of overlap between chunks in tokens to store in vector store to better capture relevant context - ChunkOverlap *int64 `default:"0" json:"chunk_overlap"` - // Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) - ChunkSize int64 `json:"chunk_size"` - // List of fields in the record that should be used to calculate the embedding. All other fields are passed along as meta fields. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. - TextFields []string `json:"text_fields"` -} - -func (d DestinationLangchainProcessingConfigModel) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainProcessingConfigModel) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainProcessingConfigModel) GetChunkOverlap() *int64 { - if o == nil { - return nil - } - return o.ChunkOverlap -} - -func (o *DestinationLangchainProcessingConfigModel) GetChunkSize() int64 { - if o == nil { - return 0 - } - return o.ChunkSize -} - -func (o *DestinationLangchainProcessingConfigModel) GetTextFields() []string { - if o == nil { - return []string{} - } - return o.TextFields -} - -type DestinationLangchain struct { - destinationType Langchain `const:"langchain" json:"destinationType"` - // Embedding configuration - Embedding DestinationLangchainEmbedding `json:"embedding"` - // Indexing configuration - Indexing DestinationLangchainIndexing `json:"indexing"` - Processing DestinationLangchainProcessingConfigModel `json:"processing"` -} - -func (d DestinationLangchain) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchain) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchain) GetDestinationType() Langchain { - return LangchainLangchain -} - -func (o *DestinationLangchain) GetEmbedding() DestinationLangchainEmbedding { - if o == nil { - return DestinationLangchainEmbedding{} - } - return o.Embedding -} - -func (o *DestinationLangchain) GetIndexing() DestinationLangchainIndexing { - if o == nil { - return DestinationLangchainIndexing{} - } - return o.Indexing -} - -func (o *DestinationLangchain) GetProcessing() DestinationLangchainProcessingConfigModel { - if o == nil { - return DestinationLangchainProcessingConfigModel{} - } - return o.Processing -} diff --git a/internal/sdk/models/shared/destinationlangchaincreaterequest.go b/internal/sdk/models/shared/destinationlangchaincreaterequest.go deleted file mode 100644 index b4945cc39..000000000 --- a/internal/sdk/models/shared/destinationlangchaincreaterequest.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -type DestinationLangchainCreateRequest struct { - Configuration DestinationLangchain `json:"configuration"` - // The UUID of the connector definition. One of configuration.destinationType or definitionId must be provided. - DefinitionID *string `json:"definitionId,omitempty"` - // Name of the destination e.g. dev-mysql-instance. - Name string `json:"name"` - WorkspaceID string `json:"workspaceId"` -} - -func (o *DestinationLangchainCreateRequest) GetConfiguration() DestinationLangchain { - if o == nil { - return DestinationLangchain{} - } - return o.Configuration -} - -func (o *DestinationLangchainCreateRequest) GetDefinitionID() *string { - if o == nil { - return nil - } - return o.DefinitionID -} - -func (o *DestinationLangchainCreateRequest) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *DestinationLangchainCreateRequest) GetWorkspaceID() string { - if o == nil { - return "" - } - return o.WorkspaceID -} diff --git a/internal/sdk/models/shared/destinationlangchainputrequest.go b/internal/sdk/models/shared/destinationlangchainputrequest.go deleted file mode 100644 index cd3de13c9..000000000 --- a/internal/sdk/models/shared/destinationlangchainputrequest.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -type DestinationLangchainPutRequest struct { - Configuration DestinationLangchainUpdate `json:"configuration"` - Name string `json:"name"` - WorkspaceID string `json:"workspaceId"` -} - -func (o *DestinationLangchainPutRequest) GetConfiguration() DestinationLangchainUpdate { - if o == nil { - return DestinationLangchainUpdate{} - } - return o.Configuration -} - -func (o *DestinationLangchainPutRequest) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *DestinationLangchainPutRequest) GetWorkspaceID() string { - if o == nil { - return "" - } - return o.WorkspaceID -} diff --git a/internal/sdk/models/shared/destinationlangchainupdate.go b/internal/sdk/models/shared/destinationlangchainupdate.go deleted file mode 100644 index d299ae5da..000000000 --- a/internal/sdk/models/shared/destinationlangchainupdate.go +++ /dev/null @@ -1,506 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "errors" - "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" -) - -type DestinationLangchainUpdateSchemasMode string - -const ( - DestinationLangchainUpdateSchemasModeFake DestinationLangchainUpdateSchemasMode = "fake" -) - -func (e DestinationLangchainUpdateSchemasMode) ToPointer() *DestinationLangchainUpdateSchemasMode { - return &e -} -func (e *DestinationLangchainUpdateSchemasMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "fake": - *e = DestinationLangchainUpdateSchemasMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainUpdateSchemasMode: %v", v) - } -} - -// DestinationLangchainUpdateFake - Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. -type DestinationLangchainUpdateFake struct { - mode *DestinationLangchainUpdateSchemasMode `const:"fake" json:"mode"` -} - -func (d DestinationLangchainUpdateFake) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainUpdateFake) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainUpdateFake) GetMode() *DestinationLangchainUpdateSchemasMode { - return DestinationLangchainUpdateSchemasModeFake.ToPointer() -} - -type DestinationLangchainUpdateMode string - -const ( - DestinationLangchainUpdateModeOpenai DestinationLangchainUpdateMode = "openai" -) - -func (e DestinationLangchainUpdateMode) ToPointer() *DestinationLangchainUpdateMode { - return &e -} -func (e *DestinationLangchainUpdateMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "openai": - *e = DestinationLangchainUpdateMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainUpdateMode: %v", v) - } -} - -// DestinationLangchainUpdateOpenAI - Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. -type DestinationLangchainUpdateOpenAI struct { - mode *DestinationLangchainUpdateMode `const:"openai" json:"mode"` - OpenaiKey string `json:"openai_key"` -} - -func (d DestinationLangchainUpdateOpenAI) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainUpdateOpenAI) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainUpdateOpenAI) GetMode() *DestinationLangchainUpdateMode { - return DestinationLangchainUpdateModeOpenai.ToPointer() -} - -func (o *DestinationLangchainUpdateOpenAI) GetOpenaiKey() string { - if o == nil { - return "" - } - return o.OpenaiKey -} - -type DestinationLangchainUpdateEmbeddingType string - -const ( - DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateOpenAI DestinationLangchainUpdateEmbeddingType = "destination-langchain-update_OpenAI" - DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateFake DestinationLangchainUpdateEmbeddingType = "destination-langchain-update_Fake" -) - -// DestinationLangchainUpdateEmbedding - Embedding configuration -type DestinationLangchainUpdateEmbedding struct { - DestinationLangchainUpdateOpenAI *DestinationLangchainUpdateOpenAI - DestinationLangchainUpdateFake *DestinationLangchainUpdateFake - - Type DestinationLangchainUpdateEmbeddingType -} - -func CreateDestinationLangchainUpdateEmbeddingDestinationLangchainUpdateOpenAI(destinationLangchainUpdateOpenAI DestinationLangchainUpdateOpenAI) DestinationLangchainUpdateEmbedding { - typ := DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateOpenAI - - return DestinationLangchainUpdateEmbedding{ - DestinationLangchainUpdateOpenAI: &destinationLangchainUpdateOpenAI, - Type: typ, - } -} - -func CreateDestinationLangchainUpdateEmbeddingDestinationLangchainUpdateFake(destinationLangchainUpdateFake DestinationLangchainUpdateFake) DestinationLangchainUpdateEmbedding { - typ := DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateFake - - return DestinationLangchainUpdateEmbedding{ - DestinationLangchainUpdateFake: &destinationLangchainUpdateFake, - Type: typ, - } -} - -func (u *DestinationLangchainUpdateEmbedding) UnmarshalJSON(data []byte) error { - - var destinationLangchainUpdateFake DestinationLangchainUpdateFake = DestinationLangchainUpdateFake{} - if err := utils.UnmarshalJSON(data, &destinationLangchainUpdateFake, "", true, true); err == nil { - u.DestinationLangchainUpdateFake = &destinationLangchainUpdateFake - u.Type = DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateFake - return nil - } - - var destinationLangchainUpdateOpenAI DestinationLangchainUpdateOpenAI = DestinationLangchainUpdateOpenAI{} - if err := utils.UnmarshalJSON(data, &destinationLangchainUpdateOpenAI, "", true, true); err == nil { - u.DestinationLangchainUpdateOpenAI = &destinationLangchainUpdateOpenAI - u.Type = DestinationLangchainUpdateEmbeddingTypeDestinationLangchainUpdateOpenAI - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationLangchainUpdateEmbedding", string(data)) -} - -func (u DestinationLangchainUpdateEmbedding) MarshalJSON() ([]byte, error) { - if u.DestinationLangchainUpdateOpenAI != nil { - return utils.MarshalJSON(u.DestinationLangchainUpdateOpenAI, "", true) - } - - if u.DestinationLangchainUpdateFake != nil { - return utils.MarshalJSON(u.DestinationLangchainUpdateFake, "", true) - } - - return nil, errors.New("could not marshal union type DestinationLangchainUpdateEmbedding: all fields are null") -} - -type DestinationLangchainUpdateSchemasIndexingIndexing3Mode string - -const ( - DestinationLangchainUpdateSchemasIndexingIndexing3ModeChromaLocal DestinationLangchainUpdateSchemasIndexingIndexing3Mode = "chroma_local" -) - -func (e DestinationLangchainUpdateSchemasIndexingIndexing3Mode) ToPointer() *DestinationLangchainUpdateSchemasIndexingIndexing3Mode { - return &e -} -func (e *DestinationLangchainUpdateSchemasIndexingIndexing3Mode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "chroma_local": - *e = DestinationLangchainUpdateSchemasIndexingIndexing3Mode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainUpdateSchemasIndexingIndexing3Mode: %v", v) - } -} - -// ChromaLocalPersistance - Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync. -type ChromaLocalPersistance struct { - // Name of the collection to use. - CollectionName *string `default:"langchain" json:"collection_name"` - // Path to the directory where chroma files will be written. The files will be placed inside that local mount. - DestinationPath string `json:"destination_path"` - mode *DestinationLangchainUpdateSchemasIndexingIndexing3Mode `const:"chroma_local" json:"mode"` -} - -func (c ChromaLocalPersistance) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(c, "", false) -} - -func (c *ChromaLocalPersistance) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &c, "", false, true); err != nil { - return err - } - return nil -} - -func (o *ChromaLocalPersistance) GetCollectionName() *string { - if o == nil { - return nil - } - return o.CollectionName -} - -func (o *ChromaLocalPersistance) GetDestinationPath() string { - if o == nil { - return "" - } - return o.DestinationPath -} - -func (o *ChromaLocalPersistance) GetMode() *DestinationLangchainUpdateSchemasIndexingIndexing3Mode { - return DestinationLangchainUpdateSchemasIndexingIndexing3ModeChromaLocal.ToPointer() -} - -type DestinationLangchainUpdateSchemasIndexingIndexingMode string - -const ( - DestinationLangchainUpdateSchemasIndexingIndexingModeDocArrayHnswSearch DestinationLangchainUpdateSchemasIndexingIndexingMode = "DocArrayHnswSearch" -) - -func (e DestinationLangchainUpdateSchemasIndexingIndexingMode) ToPointer() *DestinationLangchainUpdateSchemasIndexingIndexingMode { - return &e -} -func (e *DestinationLangchainUpdateSchemasIndexingIndexingMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "DocArrayHnswSearch": - *e = DestinationLangchainUpdateSchemasIndexingIndexingMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainUpdateSchemasIndexingIndexingMode: %v", v) - } -} - -// DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite. -type DocArrayHnswSearch struct { - // Path to the directory where hnswlib and meta data files will be written. The files will be placed inside that local mount. All files in the specified destination directory will be deleted on each run. - DestinationPath string `json:"destination_path"` - mode *DestinationLangchainUpdateSchemasIndexingIndexingMode `const:"DocArrayHnswSearch" json:"mode"` -} - -func (d DocArrayHnswSearch) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DocArrayHnswSearch) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DocArrayHnswSearch) GetDestinationPath() string { - if o == nil { - return "" - } - return o.DestinationPath -} - -func (o *DocArrayHnswSearch) GetMode() *DestinationLangchainUpdateSchemasIndexingIndexingMode { - return DestinationLangchainUpdateSchemasIndexingIndexingModeDocArrayHnswSearch.ToPointer() -} - -type DestinationLangchainUpdateSchemasIndexingMode string - -const ( - DestinationLangchainUpdateSchemasIndexingModePinecone DestinationLangchainUpdateSchemasIndexingMode = "pinecone" -) - -func (e DestinationLangchainUpdateSchemasIndexingMode) ToPointer() *DestinationLangchainUpdateSchemasIndexingMode { - return &e -} -func (e *DestinationLangchainUpdateSchemasIndexingMode) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "pinecone": - *e = DestinationLangchainUpdateSchemasIndexingMode(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationLangchainUpdateSchemasIndexingMode: %v", v) - } -} - -// DestinationLangchainUpdatePinecone - Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain. -type DestinationLangchainUpdatePinecone struct { - // Pinecone index to use - Index string `json:"index"` - mode *DestinationLangchainUpdateSchemasIndexingMode `const:"pinecone" json:"mode"` - // Pinecone environment to use - PineconeEnvironment string `json:"pinecone_environment"` - PineconeKey string `json:"pinecone_key"` -} - -func (d DestinationLangchainUpdatePinecone) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainUpdatePinecone) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainUpdatePinecone) GetIndex() string { - if o == nil { - return "" - } - return o.Index -} - -func (o *DestinationLangchainUpdatePinecone) GetMode() *DestinationLangchainUpdateSchemasIndexingMode { - return DestinationLangchainUpdateSchemasIndexingModePinecone.ToPointer() -} - -func (o *DestinationLangchainUpdatePinecone) GetPineconeEnvironment() string { - if o == nil { - return "" - } - return o.PineconeEnvironment -} - -func (o *DestinationLangchainUpdatePinecone) GetPineconeKey() string { - if o == nil { - return "" - } - return o.PineconeKey -} - -type DestinationLangchainUpdateIndexingType string - -const ( - DestinationLangchainUpdateIndexingTypeDestinationLangchainUpdatePinecone DestinationLangchainUpdateIndexingType = "destination-langchain-update_Pinecone" - DestinationLangchainUpdateIndexingTypeDocArrayHnswSearch DestinationLangchainUpdateIndexingType = "DocArrayHnswSearch" - DestinationLangchainUpdateIndexingTypeChromaLocalPersistance DestinationLangchainUpdateIndexingType = "Chroma (local persistance)" -) - -// DestinationLangchainUpdateIndexing - Indexing configuration -type DestinationLangchainUpdateIndexing struct { - DestinationLangchainUpdatePinecone *DestinationLangchainUpdatePinecone - DocArrayHnswSearch *DocArrayHnswSearch - ChromaLocalPersistance *ChromaLocalPersistance - - Type DestinationLangchainUpdateIndexingType -} - -func CreateDestinationLangchainUpdateIndexingDestinationLangchainUpdatePinecone(destinationLangchainUpdatePinecone DestinationLangchainUpdatePinecone) DestinationLangchainUpdateIndexing { - typ := DestinationLangchainUpdateIndexingTypeDestinationLangchainUpdatePinecone - - return DestinationLangchainUpdateIndexing{ - DestinationLangchainUpdatePinecone: &destinationLangchainUpdatePinecone, - Type: typ, - } -} - -func CreateDestinationLangchainUpdateIndexingDocArrayHnswSearch(docArrayHnswSearch DocArrayHnswSearch) DestinationLangchainUpdateIndexing { - typ := DestinationLangchainUpdateIndexingTypeDocArrayHnswSearch - - return DestinationLangchainUpdateIndexing{ - DocArrayHnswSearch: &docArrayHnswSearch, - Type: typ, - } -} - -func CreateDestinationLangchainUpdateIndexingChromaLocalPersistance(chromaLocalPersistance ChromaLocalPersistance) DestinationLangchainUpdateIndexing { - typ := DestinationLangchainUpdateIndexingTypeChromaLocalPersistance - - return DestinationLangchainUpdateIndexing{ - ChromaLocalPersistance: &chromaLocalPersistance, - Type: typ, - } -} - -func (u *DestinationLangchainUpdateIndexing) UnmarshalJSON(data []byte) error { - - var docArrayHnswSearch DocArrayHnswSearch = DocArrayHnswSearch{} - if err := utils.UnmarshalJSON(data, &docArrayHnswSearch, "", true, true); err == nil { - u.DocArrayHnswSearch = &docArrayHnswSearch - u.Type = DestinationLangchainUpdateIndexingTypeDocArrayHnswSearch - return nil - } - - var chromaLocalPersistance ChromaLocalPersistance = ChromaLocalPersistance{} - if err := utils.UnmarshalJSON(data, &chromaLocalPersistance, "", true, true); err == nil { - u.ChromaLocalPersistance = &chromaLocalPersistance - u.Type = DestinationLangchainUpdateIndexingTypeChromaLocalPersistance - return nil - } - - var destinationLangchainUpdatePinecone DestinationLangchainUpdatePinecone = DestinationLangchainUpdatePinecone{} - if err := utils.UnmarshalJSON(data, &destinationLangchainUpdatePinecone, "", true, true); err == nil { - u.DestinationLangchainUpdatePinecone = &destinationLangchainUpdatePinecone - u.Type = DestinationLangchainUpdateIndexingTypeDestinationLangchainUpdatePinecone - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationLangchainUpdateIndexing", string(data)) -} - -func (u DestinationLangchainUpdateIndexing) MarshalJSON() ([]byte, error) { - if u.DestinationLangchainUpdatePinecone != nil { - return utils.MarshalJSON(u.DestinationLangchainUpdatePinecone, "", true) - } - - if u.DocArrayHnswSearch != nil { - return utils.MarshalJSON(u.DocArrayHnswSearch, "", true) - } - - if u.ChromaLocalPersistance != nil { - return utils.MarshalJSON(u.ChromaLocalPersistance, "", true) - } - - return nil, errors.New("could not marshal union type DestinationLangchainUpdateIndexing: all fields are null") -} - -type DestinationLangchainUpdateProcessingConfigModel struct { - // Size of overlap between chunks in tokens to store in vector store to better capture relevant context - ChunkOverlap *int64 `default:"0" json:"chunk_overlap"` - // Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM) - ChunkSize int64 `json:"chunk_size"` - // List of fields in the record that should be used to calculate the embedding. All other fields are passed along as meta fields. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. - TextFields []string `json:"text_fields"` -} - -func (d DestinationLangchainUpdateProcessingConfigModel) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationLangchainUpdateProcessingConfigModel) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, false); err != nil { - return err - } - return nil -} - -func (o *DestinationLangchainUpdateProcessingConfigModel) GetChunkOverlap() *int64 { - if o == nil { - return nil - } - return o.ChunkOverlap -} - -func (o *DestinationLangchainUpdateProcessingConfigModel) GetChunkSize() int64 { - if o == nil { - return 0 - } - return o.ChunkSize -} - -func (o *DestinationLangchainUpdateProcessingConfigModel) GetTextFields() []string { - if o == nil { - return []string{} - } - return o.TextFields -} - -type DestinationLangchainUpdate struct { - // Embedding configuration - Embedding DestinationLangchainUpdateEmbedding `json:"embedding"` - // Indexing configuration - Indexing DestinationLangchainUpdateIndexing `json:"indexing"` - Processing DestinationLangchainUpdateProcessingConfigModel `json:"processing"` -} - -func (o *DestinationLangchainUpdate) GetEmbedding() DestinationLangchainUpdateEmbedding { - if o == nil { - return DestinationLangchainUpdateEmbedding{} - } - return o.Embedding -} - -func (o *DestinationLangchainUpdate) GetIndexing() DestinationLangchainUpdateIndexing { - if o == nil { - return DestinationLangchainUpdateIndexing{} - } - return o.Indexing -} - -func (o *DestinationLangchainUpdate) GetProcessing() DestinationLangchainUpdateProcessingConfigModel { - if o == nil { - return DestinationLangchainUpdateProcessingConfigModel{} - } - return o.Processing -} diff --git a/internal/sdk/models/shared/destinationredshift.go b/internal/sdk/models/shared/destinationredshift.go index b57efe5df..8cb265185 100644 --- a/internal/sdk/models/shared/destinationredshift.go +++ b/internal/sdk/models/shared/destinationredshift.go @@ -322,165 +322,6 @@ func (u DestinationRedshiftSSHTunnelMethod) MarshalJSON() ([]byte, error) { return nil, errors.New("could not marshal union type DestinationRedshiftSSHTunnelMethod: all fields are null") } -type DestinationRedshiftSchemasEncryptionType string - -const ( - DestinationRedshiftSchemasEncryptionTypeAesCbcEnvelope DestinationRedshiftSchemasEncryptionType = "aes_cbc_envelope" -) - -func (e DestinationRedshiftSchemasEncryptionType) ToPointer() *DestinationRedshiftSchemasEncryptionType { - return &e -} -func (e *DestinationRedshiftSchemasEncryptionType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "aes_cbc_envelope": - *e = DestinationRedshiftSchemasEncryptionType(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationRedshiftSchemasEncryptionType: %v", v) - } -} - -// DestinationRedshiftAESCBCEnvelopeEncryption - Staging data will be encrypted using AES-CBC envelope encryption. -type DestinationRedshiftAESCBCEnvelopeEncryption struct { - encryptionType *DestinationRedshiftSchemasEncryptionType `const:"aes_cbc_envelope" json:"encryption_type"` - // The key, base64-encoded. Must be either 128, 192, or 256 bits. Leave blank to have Airbyte generate an ephemeral key for each sync. - KeyEncryptingKey *string `json:"key_encrypting_key,omitempty"` -} - -func (d DestinationRedshiftAESCBCEnvelopeEncryption) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationRedshiftAESCBCEnvelopeEncryption) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationRedshiftAESCBCEnvelopeEncryption) GetEncryptionType() *DestinationRedshiftSchemasEncryptionType { - return DestinationRedshiftSchemasEncryptionTypeAesCbcEnvelope.ToPointer() -} - -func (o *DestinationRedshiftAESCBCEnvelopeEncryption) GetKeyEncryptingKey() *string { - if o == nil { - return nil - } - return o.KeyEncryptingKey -} - -type DestinationRedshiftEncryptionType string - -const ( - DestinationRedshiftEncryptionTypeNone DestinationRedshiftEncryptionType = "none" -) - -func (e DestinationRedshiftEncryptionType) ToPointer() *DestinationRedshiftEncryptionType { - return &e -} -func (e *DestinationRedshiftEncryptionType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "none": - *e = DestinationRedshiftEncryptionType(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationRedshiftEncryptionType: %v", v) - } -} - -// DestinationRedshiftNoEncryption - Staging data will be stored in plaintext. -type DestinationRedshiftNoEncryption struct { - encryptionType *DestinationRedshiftEncryptionType `const:"none" json:"encryption_type"` -} - -func (d DestinationRedshiftNoEncryption) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(d, "", false) -} - -func (d *DestinationRedshiftNoEncryption) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &d, "", false, true); err != nil { - return err - } - return nil -} - -func (o *DestinationRedshiftNoEncryption) GetEncryptionType() *DestinationRedshiftEncryptionType { - return DestinationRedshiftEncryptionTypeNone.ToPointer() -} - -type DestinationRedshiftEncryptionUnionType string - -const ( - DestinationRedshiftEncryptionUnionTypeDestinationRedshiftNoEncryption DestinationRedshiftEncryptionUnionType = "destination-redshift_No encryption" - DestinationRedshiftEncryptionUnionTypeDestinationRedshiftAESCBCEnvelopeEncryption DestinationRedshiftEncryptionUnionType = "destination-redshift_AES-CBC envelope encryption" -) - -// DestinationRedshiftEncryption - How to encrypt the staging data -type DestinationRedshiftEncryption struct { - DestinationRedshiftNoEncryption *DestinationRedshiftNoEncryption - DestinationRedshiftAESCBCEnvelopeEncryption *DestinationRedshiftAESCBCEnvelopeEncryption - - Type DestinationRedshiftEncryptionUnionType -} - -func CreateDestinationRedshiftEncryptionDestinationRedshiftNoEncryption(destinationRedshiftNoEncryption DestinationRedshiftNoEncryption) DestinationRedshiftEncryption { - typ := DestinationRedshiftEncryptionUnionTypeDestinationRedshiftNoEncryption - - return DestinationRedshiftEncryption{ - DestinationRedshiftNoEncryption: &destinationRedshiftNoEncryption, - Type: typ, - } -} - -func CreateDestinationRedshiftEncryptionDestinationRedshiftAESCBCEnvelopeEncryption(destinationRedshiftAESCBCEnvelopeEncryption DestinationRedshiftAESCBCEnvelopeEncryption) DestinationRedshiftEncryption { - typ := DestinationRedshiftEncryptionUnionTypeDestinationRedshiftAESCBCEnvelopeEncryption - - return DestinationRedshiftEncryption{ - DestinationRedshiftAESCBCEnvelopeEncryption: &destinationRedshiftAESCBCEnvelopeEncryption, - Type: typ, - } -} - -func (u *DestinationRedshiftEncryption) UnmarshalJSON(data []byte) error { - - var destinationRedshiftNoEncryption DestinationRedshiftNoEncryption = DestinationRedshiftNoEncryption{} - if err := utils.UnmarshalJSON(data, &destinationRedshiftNoEncryption, "", true, true); err == nil { - u.DestinationRedshiftNoEncryption = &destinationRedshiftNoEncryption - u.Type = DestinationRedshiftEncryptionUnionTypeDestinationRedshiftNoEncryption - return nil - } - - var destinationRedshiftAESCBCEnvelopeEncryption DestinationRedshiftAESCBCEnvelopeEncryption = DestinationRedshiftAESCBCEnvelopeEncryption{} - if err := utils.UnmarshalJSON(data, &destinationRedshiftAESCBCEnvelopeEncryption, "", true, true); err == nil { - u.DestinationRedshiftAESCBCEnvelopeEncryption = &destinationRedshiftAESCBCEnvelopeEncryption - u.Type = DestinationRedshiftEncryptionUnionTypeDestinationRedshiftAESCBCEnvelopeEncryption - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationRedshiftEncryption", string(data)) -} - -func (u DestinationRedshiftEncryption) MarshalJSON() ([]byte, error) { - if u.DestinationRedshiftNoEncryption != nil { - return utils.MarshalJSON(u.DestinationRedshiftNoEncryption, "", true) - } - - if u.DestinationRedshiftAESCBCEnvelopeEncryption != nil { - return utils.MarshalJSON(u.DestinationRedshiftAESCBCEnvelopeEncryption, "", true) - } - - return nil, errors.New("could not marshal union type DestinationRedshiftEncryption: all fields are null") -} - type DestinationRedshiftMethod string const ( @@ -631,8 +472,6 @@ func (e *DestinationRedshiftS3BucketRegion) UnmarshalJSON(data []byte) error { type DestinationRedshiftAWSS3Staging struct { // This ID grants access to the above S3 staging bucket. Airbyte requires Read and Write permissions to the given bucket. See AWS docs on how to generate an access key ID and secret access key. AccessKeyID string `json:"access_key_id"` - // How to encrypt the staging data - Encryption *DestinationRedshiftEncryption `json:"encryption,omitempty"` // The pattern allows you to set the file-name format for the S3 staging file(s) FileNamePattern *string `json:"file_name_pattern,omitempty"` method DestinationRedshiftMethod `const:"S3 Staging" json:"method"` @@ -666,13 +505,6 @@ func (o *DestinationRedshiftAWSS3Staging) GetAccessKeyID() string { return o.AccessKeyID } -func (o *DestinationRedshiftAWSS3Staging) GetEncryption() *DestinationRedshiftEncryption { - if o == nil { - return nil - } - return o.Encryption -} - func (o *DestinationRedshiftAWSS3Staging) GetFileNamePattern() *string { if o == nil { return nil diff --git a/internal/sdk/models/shared/destinationredshiftupdate.go b/internal/sdk/models/shared/destinationredshiftupdate.go index e0d493c9d..d9c823322 100644 --- a/internal/sdk/models/shared/destinationredshiftupdate.go +++ b/internal/sdk/models/shared/destinationredshiftupdate.go @@ -299,165 +299,6 @@ func (u DestinationRedshiftUpdateSSHTunnelMethod) MarshalJSON() ([]byte, error) return nil, errors.New("could not marshal union type DestinationRedshiftUpdateSSHTunnelMethod: all fields are null") } -type DestinationRedshiftUpdateEncryptionType string - -const ( - DestinationRedshiftUpdateEncryptionTypeAesCbcEnvelope DestinationRedshiftUpdateEncryptionType = "aes_cbc_envelope" -) - -func (e DestinationRedshiftUpdateEncryptionType) ToPointer() *DestinationRedshiftUpdateEncryptionType { - return &e -} -func (e *DestinationRedshiftUpdateEncryptionType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "aes_cbc_envelope": - *e = DestinationRedshiftUpdateEncryptionType(v) - return nil - default: - return fmt.Errorf("invalid value for DestinationRedshiftUpdateEncryptionType: %v", v) - } -} - -// AESCBCEnvelopeEncryption - Staging data will be encrypted using AES-CBC envelope encryption. -type AESCBCEnvelopeEncryption struct { - encryptionType *DestinationRedshiftUpdateEncryptionType `const:"aes_cbc_envelope" json:"encryption_type"` - // The key, base64-encoded. Must be either 128, 192, or 256 bits. Leave blank to have Airbyte generate an ephemeral key for each sync. - KeyEncryptingKey *string `json:"key_encrypting_key,omitempty"` -} - -func (a AESCBCEnvelopeEncryption) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(a, "", false) -} - -func (a *AESCBCEnvelopeEncryption) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &a, "", false, true); err != nil { - return err - } - return nil -} - -func (o *AESCBCEnvelopeEncryption) GetEncryptionType() *DestinationRedshiftUpdateEncryptionType { - return DestinationRedshiftUpdateEncryptionTypeAesCbcEnvelope.ToPointer() -} - -func (o *AESCBCEnvelopeEncryption) GetKeyEncryptingKey() *string { - if o == nil { - return nil - } - return o.KeyEncryptingKey -} - -type EncryptionType string - -const ( - EncryptionTypeNone EncryptionType = "none" -) - -func (e EncryptionType) ToPointer() *EncryptionType { - return &e -} -func (e *EncryptionType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "none": - *e = EncryptionType(v) - return nil - default: - return fmt.Errorf("invalid value for EncryptionType: %v", v) - } -} - -// NoEncryption - Staging data will be stored in plaintext. -type NoEncryption struct { - encryptionType *EncryptionType `const:"none" json:"encryption_type"` -} - -func (n NoEncryption) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(n, "", false) -} - -func (n *NoEncryption) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &n, "", false, true); err != nil { - return err - } - return nil -} - -func (o *NoEncryption) GetEncryptionType() *EncryptionType { - return EncryptionTypeNone.ToPointer() -} - -type DestinationRedshiftUpdateEncryptionUnionType string - -const ( - DestinationRedshiftUpdateEncryptionUnionTypeNoEncryption DestinationRedshiftUpdateEncryptionUnionType = "No encryption" - DestinationRedshiftUpdateEncryptionUnionTypeAESCBCEnvelopeEncryption DestinationRedshiftUpdateEncryptionUnionType = "AES-CBC envelope encryption" -) - -// DestinationRedshiftUpdateEncryption - How to encrypt the staging data -type DestinationRedshiftUpdateEncryption struct { - NoEncryption *NoEncryption - AESCBCEnvelopeEncryption *AESCBCEnvelopeEncryption - - Type DestinationRedshiftUpdateEncryptionUnionType -} - -func CreateDestinationRedshiftUpdateEncryptionNoEncryption(noEncryption NoEncryption) DestinationRedshiftUpdateEncryption { - typ := DestinationRedshiftUpdateEncryptionUnionTypeNoEncryption - - return DestinationRedshiftUpdateEncryption{ - NoEncryption: &noEncryption, - Type: typ, - } -} - -func CreateDestinationRedshiftUpdateEncryptionAESCBCEnvelopeEncryption(aesCBCEnvelopeEncryption AESCBCEnvelopeEncryption) DestinationRedshiftUpdateEncryption { - typ := DestinationRedshiftUpdateEncryptionUnionTypeAESCBCEnvelopeEncryption - - return DestinationRedshiftUpdateEncryption{ - AESCBCEnvelopeEncryption: &aesCBCEnvelopeEncryption, - Type: typ, - } -} - -func (u *DestinationRedshiftUpdateEncryption) UnmarshalJSON(data []byte) error { - - var noEncryption NoEncryption = NoEncryption{} - if err := utils.UnmarshalJSON(data, &noEncryption, "", true, true); err == nil { - u.NoEncryption = &noEncryption - u.Type = DestinationRedshiftUpdateEncryptionUnionTypeNoEncryption - return nil - } - - var aesCBCEnvelopeEncryption AESCBCEnvelopeEncryption = AESCBCEnvelopeEncryption{} - if err := utils.UnmarshalJSON(data, &aesCBCEnvelopeEncryption, "", true, true); err == nil { - u.AESCBCEnvelopeEncryption = &aesCBCEnvelopeEncryption - u.Type = DestinationRedshiftUpdateEncryptionUnionTypeAESCBCEnvelopeEncryption - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for DestinationRedshiftUpdateEncryption", string(data)) -} - -func (u DestinationRedshiftUpdateEncryption) MarshalJSON() ([]byte, error) { - if u.NoEncryption != nil { - return utils.MarshalJSON(u.NoEncryption, "", true) - } - - if u.AESCBCEnvelopeEncryption != nil { - return utils.MarshalJSON(u.AESCBCEnvelopeEncryption, "", true) - } - - return nil, errors.New("could not marshal union type DestinationRedshiftUpdateEncryption: all fields are null") -} - type DestinationRedshiftUpdateMethod string const ( @@ -608,8 +449,6 @@ func (e *DestinationRedshiftUpdateS3BucketRegion) UnmarshalJSON(data []byte) err type AWSS3Staging struct { // This ID grants access to the above S3 staging bucket. Airbyte requires Read and Write permissions to the given bucket. See AWS docs on how to generate an access key ID and secret access key. AccessKeyID string `json:"access_key_id"` - // How to encrypt the staging data - Encryption *DestinationRedshiftUpdateEncryption `json:"encryption,omitempty"` // The pattern allows you to set the file-name format for the S3 staging file(s) FileNamePattern *string `json:"file_name_pattern,omitempty"` method DestinationRedshiftUpdateMethod `const:"S3 Staging" json:"method"` @@ -643,13 +482,6 @@ func (o *AWSS3Staging) GetAccessKeyID() string { return o.AccessKeyID } -func (o *AWSS3Staging) GetEncryption() *DestinationRedshiftUpdateEncryption { - if o == nil { - return nil - } - return o.Encryption -} - func (o *AWSS3Staging) GetFileNamePattern() *string { if o == nil { return nil diff --git a/internal/sdk/models/shared/destinationsnowflake.go b/internal/sdk/models/shared/destinationsnowflake.go index e1ce4c4a1..7ee65d88b 100644 --- a/internal/sdk/models/shared/destinationsnowflake.go +++ b/internal/sdk/models/shared/destinationsnowflake.go @@ -327,7 +327,7 @@ type DestinationSnowflake struct { Schema string `json:"schema"` // Enter the name of the user you want to use to access the database Username string `json:"username"` - // Enter the name of the warehouse that you want to sync data into + // Enter the name of the warehouse that you want to use as a compute cluster Warehouse string `json:"warehouse"` } diff --git a/internal/sdk/models/shared/destinationsnowflakecortex.go b/internal/sdk/models/shared/destinationsnowflakecortex.go index df427ec43..97728af24 100644 --- a/internal/sdk/models/shared/destinationsnowflakecortex.go +++ b/internal/sdk/models/shared/destinationsnowflakecortex.go @@ -480,7 +480,7 @@ type DestinationSnowflakeCortexSnowflakeConnection struct { Role string `json:"role"` // Enter the name of the user you want to use to access the database Username string `json:"username"` - // Enter the name of the warehouse that you want to sync data into + // Enter the name of the warehouse that you want to use as a compute cluster Warehouse string `json:"warehouse"` } diff --git a/internal/sdk/models/shared/destinationsnowflakecortexupdate.go b/internal/sdk/models/shared/destinationsnowflakecortexupdate.go index 479a31f5a..9f77ea09b 100644 --- a/internal/sdk/models/shared/destinationsnowflakecortexupdate.go +++ b/internal/sdk/models/shared/destinationsnowflakecortexupdate.go @@ -457,7 +457,7 @@ type SnowflakeConnection struct { Role string `json:"role"` // Enter the name of the user you want to use to access the database Username string `json:"username"` - // Enter the name of the warehouse that you want to sync data into + // Enter the name of the warehouse that you want to use as a compute cluster Warehouse string `json:"warehouse"` } diff --git a/internal/sdk/models/shared/destinationsnowflakeupdate.go b/internal/sdk/models/shared/destinationsnowflakeupdate.go index 1225f7b53..1ca9a034c 100644 --- a/internal/sdk/models/shared/destinationsnowflakeupdate.go +++ b/internal/sdk/models/shared/destinationsnowflakeupdate.go @@ -303,7 +303,7 @@ type DestinationSnowflakeUpdate struct { Schema string `json:"schema"` // Enter the name of the user you want to use to access the database Username string `json:"username"` - // Enter the name of the warehouse that you want to sync data into + // Enter the name of the warehouse that you want to use as a compute cluster Warehouse string `json:"warehouse"` } diff --git a/internal/sdk/models/shared/schemeclientcredentials.go b/internal/sdk/models/shared/schemeclientcredentials.go index 492194be9..003ede0b5 100644 --- a/internal/sdk/models/shared/schemeclientcredentials.go +++ b/internal/sdk/models/shared/schemeclientcredentials.go @@ -9,7 +9,7 @@ import ( type SchemeClientCredentials struct { ClientID string `security:"name=clientID"` ClientSecret string `security:"name=clientSecret"` - tokenURL string `const:"/api/v1/applications/token"` + tokenURL string `const:"/applications/token"` } func (s SchemeClientCredentials) MarshalJSON() ([]byte, error) { @@ -38,5 +38,5 @@ func (o *SchemeClientCredentials) GetClientSecret() string { } func (o *SchemeClientCredentials) GetTokenURL() string { - return "/api/v1/applications/token" + return "/applications/token" } diff --git a/internal/sdk/models/shared/sourceamazonsellerpartner.go b/internal/sdk/models/shared/sourceamazonsellerpartner.go index e10df3559..54e51f37b 100644 --- a/internal/sdk/models/shared/sourceamazonsellerpartner.go +++ b/internal/sdk/models/shared/sourceamazonsellerpartner.go @@ -392,7 +392,7 @@ type SourceAmazonSellerPartner struct { Region *SourceAmazonSellerPartnerAWSRegion `default:"US" json:"region"` // UTC date and time in the format 2017-01-25T00:00:00Z. Any data after this date will not be replicated. ReplicationEndDate *time.Time `json:"replication_end_date,omitempty"` - // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided, the date 2 years ago from today will be used. + // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided or older than 2 years ago from today, the date 2 years ago from today will be used. ReplicationStartDate *time.Time `json:"replication_start_date,omitempty"` // Additional information passed to reports. This varies by report type. ReportOptionsList []SourceAmazonSellerPartnerReportOptions `json:"report_options_list,omitempty"` diff --git a/internal/sdk/models/shared/sourceamazonsellerpartnerupdate.go b/internal/sdk/models/shared/sourceamazonsellerpartnerupdate.go index 4e16321da..3b27565da 100644 --- a/internal/sdk/models/shared/sourceamazonsellerpartnerupdate.go +++ b/internal/sdk/models/shared/sourceamazonsellerpartnerupdate.go @@ -369,7 +369,7 @@ type SourceAmazonSellerPartnerUpdate struct { Region *AWSRegion `default:"US" json:"region"` // UTC date and time in the format 2017-01-25T00:00:00Z. Any data after this date will not be replicated. ReplicationEndDate *time.Time `json:"replication_end_date,omitempty"` - // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided, the date 2 years ago from today will be used. + // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided or older than 2 years ago from today, the date 2 years ago from today will be used. ReplicationStartDate *time.Time `json:"replication_start_date,omitempty"` // Additional information passed to reports. This varies by report type. ReportOptionsList []ReportOptions `json:"report_options_list,omitempty"` diff --git a/internal/sdk/models/shared/sourceawscloudtrail.go b/internal/sdk/models/shared/sourceawscloudtrail.go index 47afcc121..cb45b8cc6 100644 --- a/internal/sdk/models/shared/sourceawscloudtrail.go +++ b/internal/sdk/models/shared/sourceawscloudtrail.go @@ -9,6 +9,36 @@ import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" ) +type SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody struct { + AttributeKey *string `default:"EventName" json:"attribute_key"` + AttributeValue *string `default:"ListInstanceAssociations" json:"attribute_value"` +} + +func (s SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) GetAttributeKey() *string { + if o == nil { + return nil + } + return o.AttributeKey +} + +func (o *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) GetAttributeValue() *string { + if o == nil { + return nil + } + return o.AttributeValue +} + type AwsCloudtrail string const ( @@ -36,12 +66,13 @@ type SourceAwsCloudtrail struct { // AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. AwsKeyID string `json:"aws_key_id"` // The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name. - AwsRegionName string `json:"aws_region_name"` + AwsRegionName *string `default:"us-east-1" json:"aws_region_name"` // AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. - AwsSecretKey string `json:"aws_secret_key"` - sourceType AwsCloudtrail `const:"aws-cloudtrail" json:"sourceType"` + AwsSecretKey string `json:"aws_secret_key"` + LookupAttributesFilter *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody `json:"lookup_attributes_filter,omitempty"` + sourceType AwsCloudtrail `const:"aws-cloudtrail" json:"sourceType"` // The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD. - StartDate *types.Date `default:"1970-01-01" json:"start_date"` + StartDate *types.Date `json:"start_date,omitempty"` } func (s SourceAwsCloudtrail) MarshalJSON() ([]byte, error) { @@ -62,9 +93,9 @@ func (o *SourceAwsCloudtrail) GetAwsKeyID() string { return o.AwsKeyID } -func (o *SourceAwsCloudtrail) GetAwsRegionName() string { +func (o *SourceAwsCloudtrail) GetAwsRegionName() *string { if o == nil { - return "" + return nil } return o.AwsRegionName } @@ -76,6 +107,13 @@ func (o *SourceAwsCloudtrail) GetAwsSecretKey() string { return o.AwsSecretKey } +func (o *SourceAwsCloudtrail) GetLookupAttributesFilter() *SourceAwsCloudtrailFilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody { + if o == nil { + return nil + } + return o.LookupAttributesFilter +} + func (o *SourceAwsCloudtrail) GetSourceType() AwsCloudtrail { return AwsCloudtrailAwsCloudtrail } diff --git a/internal/sdk/models/shared/sourceawscloudtrailupdate.go b/internal/sdk/models/shared/sourceawscloudtrailupdate.go index ecfb7dff5..3ab86b30c 100644 --- a/internal/sdk/models/shared/sourceawscloudtrailupdate.go +++ b/internal/sdk/models/shared/sourceawscloudtrailupdate.go @@ -7,15 +7,46 @@ import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" ) +type FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody struct { + AttributeKey *string `default:"EventName" json:"attribute_key"` + AttributeValue *string `default:"ListInstanceAssociations" json:"attribute_value"` +} + +func (f FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(f, "", false) +} + +func (f *FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &f, "", false, false); err != nil { + return err + } + return nil +} + +func (o *FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) GetAttributeKey() *string { + if o == nil { + return nil + } + return o.AttributeKey +} + +func (o *FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody) GetAttributeValue() *string { + if o == nil { + return nil + } + return o.AttributeValue +} + type SourceAwsCloudtrailUpdate struct { // AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. AwsKeyID string `json:"aws_key_id"` // The default AWS Region to use, for example, us-west-1 or us-west-2. When specifying a Region inline during client initialization, this property is named region_name. - AwsRegionName string `json:"aws_region_name"` + AwsRegionName *string `default:"us-east-1" json:"aws_region_name"` // AWS CloudTrail Access Key ID. See the docs for more information on how to obtain this key. - AwsSecretKey string `json:"aws_secret_key"` + AwsSecretKey string `json:"aws_secret_key"` + LookupAttributesFilter *FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody `json:"lookup_attributes_filter,omitempty"` // The date you would like to replicate data. Data in AWS CloudTrail is available for last 90 days only. Format: YYYY-MM-DD. - StartDate *types.Date `default:"1970-01-01" json:"start_date"` + StartDate *types.Date `json:"start_date,omitempty"` } func (s SourceAwsCloudtrailUpdate) MarshalJSON() ([]byte, error) { @@ -36,9 +67,9 @@ func (o *SourceAwsCloudtrailUpdate) GetAwsKeyID() string { return o.AwsKeyID } -func (o *SourceAwsCloudtrailUpdate) GetAwsRegionName() string { +func (o *SourceAwsCloudtrailUpdate) GetAwsRegionName() *string { if o == nil { - return "" + return nil } return o.AwsRegionName } @@ -50,6 +81,13 @@ func (o *SourceAwsCloudtrailUpdate) GetAwsSecretKey() string { return o.AwsSecretKey } +func (o *SourceAwsCloudtrailUpdate) GetLookupAttributesFilter() *FilterAppliedWhileFetchingRecordsBasedOnAttributeKeyAndAttributeValueWhichWillBeAppendedOnTheRequestBody { + if o == nil { + return nil + } + return o.LookupAttributesFilter +} + func (o *SourceAwsCloudtrailUpdate) GetStartDate() *types.Date { if o == nil { return nil diff --git a/internal/sdk/models/shared/sourceclazar.go b/internal/sdk/models/shared/sourceclazar.go new file mode 100644 index 000000000..0b53a68e3 --- /dev/null +++ b/internal/sdk/models/shared/sourceclazar.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" +) + +type Clazar string + +const ( + ClazarClazar Clazar = "clazar" +) + +func (e Clazar) ToPointer() *Clazar { + return &e +} +func (e *Clazar) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "clazar": + *e = Clazar(v) + return nil + default: + return fmt.Errorf("invalid value for Clazar: %v", v) + } +} + +type SourceClazar struct { + ClientID string `json:"client_id"` + ClientSecret string `json:"client_secret"` + sourceType Clazar `const:"clazar" json:"sourceType"` +} + +func (s SourceClazar) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceClazar) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SourceClazar) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *SourceClazar) GetClientSecret() string { + if o == nil { + return "" + } + return o.ClientSecret +} + +func (o *SourceClazar) GetSourceType() Clazar { + return ClazarClazar +} diff --git a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlycreaterequest.go b/internal/sdk/models/shared/sourceclazarcreaterequest.go similarity index 52% rename from internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlycreaterequest.go rename to internal/sdk/models/shared/sourceclazarcreaterequest.go index cb1df8524..d2f5ba0f3 100644 --- a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlycreaterequest.go +++ b/internal/sdk/models/shared/sourceclazarcreaterequest.go @@ -2,8 +2,8 @@ package shared -type SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest struct { - Configuration SourceGoogleAnalyticsV4ServiceAccountOnly `json:"configuration"` +type SourceClazarCreateRequest struct { + Configuration SourceClazar `json:"configuration"` // The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. DefinitionID *string `json:"definitionId,omitempty"` // Name of the source e.g. dev-mysql-instance. @@ -13,35 +13,35 @@ type SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest struct { WorkspaceID string `json:"workspaceId"` } -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) GetConfiguration() SourceGoogleAnalyticsV4ServiceAccountOnly { +func (o *SourceClazarCreateRequest) GetConfiguration() SourceClazar { if o == nil { - return SourceGoogleAnalyticsV4ServiceAccountOnly{} + return SourceClazar{} } return o.Configuration } -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) GetDefinitionID() *string { +func (o *SourceClazarCreateRequest) GetDefinitionID() *string { if o == nil { return nil } return o.DefinitionID } -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) GetName() string { +func (o *SourceClazarCreateRequest) GetName() string { if o == nil { return "" } return o.Name } -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) GetSecretID() *string { +func (o *SourceClazarCreateRequest) GetSecretID() *string { if o == nil { return nil } return o.SecretID } -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) GetWorkspaceID() string { +func (o *SourceClazarCreateRequest) GetWorkspaceID() string { if o == nil { return "" } diff --git a/internal/sdk/models/shared/sourceclazarputrequest.go b/internal/sdk/models/shared/sourceclazarputrequest.go new file mode 100644 index 000000000..08d15a7d9 --- /dev/null +++ b/internal/sdk/models/shared/sourceclazarputrequest.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type SourceClazarPutRequest struct { + Configuration SourceClazarUpdate `json:"configuration"` + Name string `json:"name"` + WorkspaceID string `json:"workspaceId"` +} + +func (o *SourceClazarPutRequest) GetConfiguration() SourceClazarUpdate { + if o == nil { + return SourceClazarUpdate{} + } + return o.Configuration +} + +func (o *SourceClazarPutRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SourceClazarPutRequest) GetWorkspaceID() string { + if o == nil { + return "" + } + return o.WorkspaceID +} diff --git a/internal/sdk/models/shared/sourceclazarupdate.go b/internal/sdk/models/shared/sourceclazarupdate.go new file mode 100644 index 000000000..4f70ef9ba --- /dev/null +++ b/internal/sdk/models/shared/sourceclazarupdate.go @@ -0,0 +1,22 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type SourceClazarUpdate struct { + ClientID string `json:"client_id"` + ClientSecret string `json:"client_secret"` +} + +func (o *SourceClazarUpdate) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *SourceClazarUpdate) GetClientSecret() string { + if o == nil { + return "" + } + return o.ClientSecret +} diff --git a/internal/sdk/models/shared/sourcedatadog.go b/internal/sdk/models/shared/sourcedatadog.go new file mode 100644 index 000000000..2a0e4943f --- /dev/null +++ b/internal/sdk/models/shared/sourcedatadog.go @@ -0,0 +1,222 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" +) + +// SourceDatadogDataSource - A data source that is powered by the platform. +type SourceDatadogDataSource string + +const ( + SourceDatadogDataSourceMetrics SourceDatadogDataSource = "metrics" + SourceDatadogDataSourceCloudCost SourceDatadogDataSource = "cloud_cost" + SourceDatadogDataSourceLogs SourceDatadogDataSource = "logs" + SourceDatadogDataSourceRum SourceDatadogDataSource = "rum" +) + +func (e SourceDatadogDataSource) ToPointer() *SourceDatadogDataSource { + return &e +} +func (e *SourceDatadogDataSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "metrics": + fallthrough + case "cloud_cost": + fallthrough + case "logs": + fallthrough + case "rum": + *e = SourceDatadogDataSource(v) + return nil + default: + return fmt.Errorf("invalid value for SourceDatadogDataSource: %v", v) + } +} + +type SourceDatadogQueries struct { + // A data source that is powered by the platform. + DataSource SourceDatadogDataSource `json:"data_source"` + // The variable name for use in queries. + Name string `json:"name"` + // A classic query string. + Query string `json:"query"` +} + +func (o *SourceDatadogQueries) GetDataSource() SourceDatadogDataSource { + if o == nil { + return SourceDatadogDataSource("") + } + return o.DataSource +} + +func (o *SourceDatadogQueries) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SourceDatadogQueries) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +// SourceDatadogSite - The site where Datadog data resides in. +type SourceDatadogSite string + +const ( + SourceDatadogSiteDatadoghqCom SourceDatadogSite = "datadoghq.com" + SourceDatadogSiteUs3DatadoghqCom SourceDatadogSite = "us3.datadoghq.com" + SourceDatadogSiteUs5DatadoghqCom SourceDatadogSite = "us5.datadoghq.com" + SourceDatadogSiteDatadoghqEu SourceDatadogSite = "datadoghq.eu" + SourceDatadogSiteDdogGovCom SourceDatadogSite = "ddog-gov.com" +) + +func (e SourceDatadogSite) ToPointer() *SourceDatadogSite { + return &e +} +func (e *SourceDatadogSite) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "datadoghq.com": + fallthrough + case "us3.datadoghq.com": + fallthrough + case "us5.datadoghq.com": + fallthrough + case "datadoghq.eu": + fallthrough + case "ddog-gov.com": + *e = SourceDatadogSite(v) + return nil + default: + return fmt.Errorf("invalid value for SourceDatadogSite: %v", v) + } +} + +type Datadog string + +const ( + DatadogDatadog Datadog = "datadog" +) + +func (e Datadog) ToPointer() *Datadog { + return &e +} +func (e *Datadog) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "datadog": + *e = Datadog(v) + return nil + default: + return fmt.Errorf("invalid value for Datadog: %v", v) + } +} + +type SourceDatadog struct { + // Datadog API key + APIKey string `json:"api_key"` + // Datadog application key + ApplicationKey string `json:"application_key"` + // UTC date and time in the format 2017-01-25T00:00:00Z. Data after this date will not be replicated. An empty value will represent the current datetime for each execution. This just applies to Incremental syncs. + EndDate *string `json:"end_date,omitempty"` + // Maximum number of records to collect per request. + MaxRecordsPerRequest *int64 `default:"5000" json:"max_records_per_request"` + // List of queries to be run and used as inputs. + Queries []SourceDatadogQueries `json:"queries,omitempty"` + // The search query. This just applies to Incremental syncs. If empty, it'll collect all logs. + Query *string `json:"query,omitempty"` + // The site where Datadog data resides in. + Site *SourceDatadogSite `default:"datadoghq.com" json:"site"` + sourceType Datadog `const:"datadog" json:"sourceType"` + // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. This just applies to Incremental syncs. + StartDate *string `json:"start_date,omitempty"` +} + +func (s SourceDatadog) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceDatadog) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SourceDatadog) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} + +func (o *SourceDatadog) GetApplicationKey() string { + if o == nil { + return "" + } + return o.ApplicationKey +} + +func (o *SourceDatadog) GetEndDate() *string { + if o == nil { + return nil + } + return o.EndDate +} + +func (o *SourceDatadog) GetMaxRecordsPerRequest() *int64 { + if o == nil { + return nil + } + return o.MaxRecordsPerRequest +} + +func (o *SourceDatadog) GetQueries() []SourceDatadogQueries { + if o == nil { + return nil + } + return o.Queries +} + +func (o *SourceDatadog) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *SourceDatadog) GetSite() *SourceDatadogSite { + if o == nil { + return nil + } + return o.Site +} + +func (o *SourceDatadog) GetSourceType() Datadog { + return DatadogDatadog +} + +func (o *SourceDatadog) GetStartDate() *string { + if o == nil { + return nil + } + return o.StartDate +} diff --git a/internal/sdk/models/shared/sourcepunkapicreaterequest.go b/internal/sdk/models/shared/sourcedatadogcreaterequest.go similarity index 63% rename from internal/sdk/models/shared/sourcepunkapicreaterequest.go rename to internal/sdk/models/shared/sourcedatadogcreaterequest.go index 585e3b724..eebbd1c1e 100644 --- a/internal/sdk/models/shared/sourcepunkapicreaterequest.go +++ b/internal/sdk/models/shared/sourcedatadogcreaterequest.go @@ -2,8 +2,8 @@ package shared -type SourcePunkAPICreateRequest struct { - Configuration SourcePunkAPI `json:"configuration"` +type SourceDatadogCreateRequest struct { + Configuration SourceDatadog `json:"configuration"` // The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. DefinitionID *string `json:"definitionId,omitempty"` // Name of the source e.g. dev-mysql-instance. @@ -13,35 +13,35 @@ type SourcePunkAPICreateRequest struct { WorkspaceID string `json:"workspaceId"` } -func (o *SourcePunkAPICreateRequest) GetConfiguration() SourcePunkAPI { +func (o *SourceDatadogCreateRequest) GetConfiguration() SourceDatadog { if o == nil { - return SourcePunkAPI{} + return SourceDatadog{} } return o.Configuration } -func (o *SourcePunkAPICreateRequest) GetDefinitionID() *string { +func (o *SourceDatadogCreateRequest) GetDefinitionID() *string { if o == nil { return nil } return o.DefinitionID } -func (o *SourcePunkAPICreateRequest) GetName() string { +func (o *SourceDatadogCreateRequest) GetName() string { if o == nil { return "" } return o.Name } -func (o *SourcePunkAPICreateRequest) GetSecretID() *string { +func (o *SourceDatadogCreateRequest) GetSecretID() *string { if o == nil { return nil } return o.SecretID } -func (o *SourcePunkAPICreateRequest) GetWorkspaceID() string { +func (o *SourceDatadogCreateRequest) GetWorkspaceID() string { if o == nil { return "" } diff --git a/internal/sdk/models/shared/sourcepunkapiputrequest.go b/internal/sdk/models/shared/sourcedatadogputrequest.go similarity index 52% rename from internal/sdk/models/shared/sourcepunkapiputrequest.go rename to internal/sdk/models/shared/sourcedatadogputrequest.go index bd53af290..6acbaae3b 100644 --- a/internal/sdk/models/shared/sourcepunkapiputrequest.go +++ b/internal/sdk/models/shared/sourcedatadogputrequest.go @@ -2,27 +2,27 @@ package shared -type SourcePunkAPIPutRequest struct { - Configuration SourcePunkAPIUpdate `json:"configuration"` +type SourceDatadogPutRequest struct { + Configuration SourceDatadogUpdate `json:"configuration"` Name string `json:"name"` WorkspaceID string `json:"workspaceId"` } -func (o *SourcePunkAPIPutRequest) GetConfiguration() SourcePunkAPIUpdate { +func (o *SourceDatadogPutRequest) GetConfiguration() SourceDatadogUpdate { if o == nil { - return SourcePunkAPIUpdate{} + return SourceDatadogUpdate{} } return o.Configuration } -func (o *SourcePunkAPIPutRequest) GetName() string { +func (o *SourceDatadogPutRequest) GetName() string { if o == nil { return "" } return o.Name } -func (o *SourcePunkAPIPutRequest) GetWorkspaceID() string { +func (o *SourceDatadogPutRequest) GetWorkspaceID() string { if o == nil { return "" } diff --git a/internal/sdk/models/shared/sourcedatadogupdate.go b/internal/sdk/models/shared/sourcedatadogupdate.go new file mode 100644 index 000000000..0f321be80 --- /dev/null +++ b/internal/sdk/models/shared/sourcedatadogupdate.go @@ -0,0 +1,194 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" +) + +// SourceDatadogUpdateDataSource - A data source that is powered by the platform. +type SourceDatadogUpdateDataSource string + +const ( + SourceDatadogUpdateDataSourceMetrics SourceDatadogUpdateDataSource = "metrics" + SourceDatadogUpdateDataSourceCloudCost SourceDatadogUpdateDataSource = "cloud_cost" + SourceDatadogUpdateDataSourceLogs SourceDatadogUpdateDataSource = "logs" + SourceDatadogUpdateDataSourceRum SourceDatadogUpdateDataSource = "rum" +) + +func (e SourceDatadogUpdateDataSource) ToPointer() *SourceDatadogUpdateDataSource { + return &e +} +func (e *SourceDatadogUpdateDataSource) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "metrics": + fallthrough + case "cloud_cost": + fallthrough + case "logs": + fallthrough + case "rum": + *e = SourceDatadogUpdateDataSource(v) + return nil + default: + return fmt.Errorf("invalid value for SourceDatadogUpdateDataSource: %v", v) + } +} + +type Queries struct { + // A data source that is powered by the platform. + DataSource SourceDatadogUpdateDataSource `json:"data_source"` + // The variable name for use in queries. + Name string `json:"name"` + // A classic query string. + Query string `json:"query"` +} + +func (o *Queries) GetDataSource() SourceDatadogUpdateDataSource { + if o == nil { + return SourceDatadogUpdateDataSource("") + } + return o.DataSource +} + +func (o *Queries) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *Queries) GetQuery() string { + if o == nil { + return "" + } + return o.Query +} + +// Site - The site where Datadog data resides in. +type Site string + +const ( + SiteDatadoghqCom Site = "datadoghq.com" + SiteUs3DatadoghqCom Site = "us3.datadoghq.com" + SiteUs5DatadoghqCom Site = "us5.datadoghq.com" + SiteDatadoghqEu Site = "datadoghq.eu" + SiteDdogGovCom Site = "ddog-gov.com" +) + +func (e Site) ToPointer() *Site { + return &e +} +func (e *Site) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "datadoghq.com": + fallthrough + case "us3.datadoghq.com": + fallthrough + case "us5.datadoghq.com": + fallthrough + case "datadoghq.eu": + fallthrough + case "ddog-gov.com": + *e = Site(v) + return nil + default: + return fmt.Errorf("invalid value for Site: %v", v) + } +} + +type SourceDatadogUpdate struct { + // Datadog API key + APIKey string `json:"api_key"` + // Datadog application key + ApplicationKey string `json:"application_key"` + // UTC date and time in the format 2017-01-25T00:00:00Z. Data after this date will not be replicated. An empty value will represent the current datetime for each execution. This just applies to Incremental syncs. + EndDate *string `json:"end_date,omitempty"` + // Maximum number of records to collect per request. + MaxRecordsPerRequest *int64 `default:"5000" json:"max_records_per_request"` + // List of queries to be run and used as inputs. + Queries []Queries `json:"queries,omitempty"` + // The search query. This just applies to Incremental syncs. If empty, it'll collect all logs. + Query *string `json:"query,omitempty"` + // The site where Datadog data resides in. + Site *Site `default:"datadoghq.com" json:"site"` + // UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. This just applies to Incremental syncs. + StartDate *string `json:"start_date,omitempty"` +} + +func (s SourceDatadogUpdate) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceDatadogUpdate) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SourceDatadogUpdate) GetAPIKey() string { + if o == nil { + return "" + } + return o.APIKey +} + +func (o *SourceDatadogUpdate) GetApplicationKey() string { + if o == nil { + return "" + } + return o.ApplicationKey +} + +func (o *SourceDatadogUpdate) GetEndDate() *string { + if o == nil { + return nil + } + return o.EndDate +} + +func (o *SourceDatadogUpdate) GetMaxRecordsPerRequest() *int64 { + if o == nil { + return nil + } + return o.MaxRecordsPerRequest +} + +func (o *SourceDatadogUpdate) GetQueries() []Queries { + if o == nil { + return nil + } + return o.Queries +} + +func (o *SourceDatadogUpdate) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +func (o *SourceDatadogUpdate) GetSite() *Site { + if o == nil { + return nil + } + return o.Site +} + +func (o *SourceDatadogUpdate) GetStartDate() *string { + if o == nil { + return nil + } + return o.StartDate +} diff --git a/internal/sdk/models/shared/sourcefacebookmarketing.go b/internal/sdk/models/shared/sourcefacebookmarketing.go index 8cca57bab..97a2eee50 100644 --- a/internal/sdk/models/shared/sourcefacebookmarketing.go +++ b/internal/sdk/models/shared/sourcefacebookmarketing.go @@ -4,6 +4,7 @@ package shared import ( "encoding/json" + "errors" "fmt" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" "time" @@ -147,6 +148,190 @@ func (e *SourceFacebookMarketingValidCampaignStatuses) UnmarshalJSON(data []byte } } +type SourceFacebookMarketingSchemasAuthType string + +const ( + SourceFacebookMarketingSchemasAuthTypeService SourceFacebookMarketingSchemasAuthType = "Service" +) + +func (e SourceFacebookMarketingSchemasAuthType) ToPointer() *SourceFacebookMarketingSchemasAuthType { + return &e +} +func (e *SourceFacebookMarketingSchemasAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Service": + *e = SourceFacebookMarketingSchemasAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceFacebookMarketingSchemasAuthType: %v", v) + } +} + +type SourceFacebookMarketingServiceAccountKeyAuthentication struct { + // The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + AccessToken string `json:"access_token"` + authType *SourceFacebookMarketingSchemasAuthType `const:"Service" json:"auth_type"` +} + +func (s SourceFacebookMarketingServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceFacebookMarketingServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *SourceFacebookMarketingServiceAccountKeyAuthentication) GetAccessToken() string { + if o == nil { + return "" + } + return o.AccessToken +} + +func (o *SourceFacebookMarketingServiceAccountKeyAuthentication) GetAuthType() *SourceFacebookMarketingSchemasAuthType { + return SourceFacebookMarketingSchemasAuthTypeService.ToPointer() +} + +type SourceFacebookMarketingAuthType string + +const ( + SourceFacebookMarketingAuthTypeClient SourceFacebookMarketingAuthType = "Client" +) + +func (e SourceFacebookMarketingAuthType) ToPointer() *SourceFacebookMarketingAuthType { + return &e +} +func (e *SourceFacebookMarketingAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Client": + *e = SourceFacebookMarketingAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceFacebookMarketingAuthType: %v", v) + } +} + +type SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth struct { + // The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + AccessToken *string `json:"access_token,omitempty"` + authType *SourceFacebookMarketingAuthType `const:"Client" json:"auth_type"` + // Client ID for the Facebook Marketing API + ClientID string `json:"client_id"` + // Client Secret for the Facebook Marketing API + ClientSecret string `json:"client_secret"` +} + +func (s SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) GetAccessToken() *string { + if o == nil { + return nil + } + return o.AccessToken +} + +func (o *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) GetAuthType() *SourceFacebookMarketingAuthType { + return SourceFacebookMarketingAuthTypeClient.ToPointer() +} + +func (o *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) GetClientSecret() string { + if o == nil { + return "" + } + return o.ClientSecret +} + +type SourceFacebookMarketingAuthenticationType string + +const ( + SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingAuthenticateViaFacebookMarketingOauth SourceFacebookMarketingAuthenticationType = "source-facebook-marketing_Authenticate via Facebook Marketing (Oauth)" + SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingServiceAccountKeyAuthentication SourceFacebookMarketingAuthenticationType = "source-facebook-marketing_Service Account Key Authentication" +) + +// SourceFacebookMarketingAuthentication - Credentials for connecting to the Facebook Marketing API +type SourceFacebookMarketingAuthentication struct { + SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth *SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth + SourceFacebookMarketingServiceAccountKeyAuthentication *SourceFacebookMarketingServiceAccountKeyAuthentication + + Type SourceFacebookMarketingAuthenticationType +} + +func CreateSourceFacebookMarketingAuthenticationSourceFacebookMarketingAuthenticateViaFacebookMarketingOauth(sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth) SourceFacebookMarketingAuthentication { + typ := SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingAuthenticateViaFacebookMarketingOauth + + return SourceFacebookMarketingAuthentication{ + SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth: &sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth, + Type: typ, + } +} + +func CreateSourceFacebookMarketingAuthenticationSourceFacebookMarketingServiceAccountKeyAuthentication(sourceFacebookMarketingServiceAccountKeyAuthentication SourceFacebookMarketingServiceAccountKeyAuthentication) SourceFacebookMarketingAuthentication { + typ := SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingServiceAccountKeyAuthentication + + return SourceFacebookMarketingAuthentication{ + SourceFacebookMarketingServiceAccountKeyAuthentication: &sourceFacebookMarketingServiceAccountKeyAuthentication, + Type: typ, + } +} + +func (u *SourceFacebookMarketingAuthentication) UnmarshalJSON(data []byte) error { + + var sourceFacebookMarketingServiceAccountKeyAuthentication SourceFacebookMarketingServiceAccountKeyAuthentication = SourceFacebookMarketingServiceAccountKeyAuthentication{} + if err := utils.UnmarshalJSON(data, &sourceFacebookMarketingServiceAccountKeyAuthentication, "", true, true); err == nil { + u.SourceFacebookMarketingServiceAccountKeyAuthentication = &sourceFacebookMarketingServiceAccountKeyAuthentication + u.Type = SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingServiceAccountKeyAuthentication + return nil + } + + var sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth = SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth{} + if err := utils.UnmarshalJSON(data, &sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth, "", true, true); err == nil { + u.SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth = &sourceFacebookMarketingAuthenticateViaFacebookMarketingOauth + u.Type = SourceFacebookMarketingAuthenticationTypeSourceFacebookMarketingAuthenticateViaFacebookMarketingOauth + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceFacebookMarketingAuthentication", string(data)) +} + +func (u SourceFacebookMarketingAuthentication) MarshalJSON() ([]byte, error) { + if u.SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth != nil { + return utils.MarshalJSON(u.SourceFacebookMarketingAuthenticateViaFacebookMarketingOauth, "", true) + } + + if u.SourceFacebookMarketingServiceAccountKeyAuthentication != nil { + return utils.MarshalJSON(u.SourceFacebookMarketingServiceAccountKeyAuthentication, "", true) + } + + return nil, errors.New("could not marshal union type SourceFacebookMarketingAuthentication: all fields are null") +} + // SourceFacebookMarketingValidActionBreakdowns - An enumeration. type SourceFacebookMarketingValidActionBreakdowns string @@ -397,7 +582,6 @@ const ( SourceFacebookMarketingValidEnumsAdsetEnd SourceFacebookMarketingValidEnums = "adset_end" SourceFacebookMarketingValidEnumsAdsetID SourceFacebookMarketingValidEnums = "adset_id" SourceFacebookMarketingValidEnumsAdsetName SourceFacebookMarketingValidEnums = "adset_name" - SourceFacebookMarketingValidEnumsAdsetStart SourceFacebookMarketingValidEnums = "adset_start" SourceFacebookMarketingValidEnumsAgeTargeting SourceFacebookMarketingValidEnums = "age_targeting" SourceFacebookMarketingValidEnumsAttributionSetting SourceFacebookMarketingValidEnums = "attribution_setting" SourceFacebookMarketingValidEnumsAuctionBid SourceFacebookMarketingValidEnums = "auction_bid" @@ -552,8 +736,6 @@ func (e *SourceFacebookMarketingValidEnums) UnmarshalJSON(data []byte) error { fallthrough case "adset_name": fallthrough - case "adset_start": - fallthrough case "age_targeting": fallthrough case "attribution_setting": @@ -985,6 +1167,8 @@ type SourceFacebookMarketing struct { ClientID *string `json:"client_id,omitempty"` // The Client Secret for your OAuth app ClientSecret *string `json:"client_secret,omitempty"` + // Credentials for connecting to the Facebook Marketing API + Credentials *SourceFacebookMarketingAuthentication `json:"credentials,omitempty"` // A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. Click on "add" to fill this field. CustomInsights []SourceFacebookMarketingInsightConfig `json:"custom_insights,omitempty"` // The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated between the start date and this end date will be replicated. Not setting this option will result in always syncing the latest data. @@ -1069,6 +1253,13 @@ func (o *SourceFacebookMarketing) GetClientSecret() *string { return o.ClientSecret } +func (o *SourceFacebookMarketing) GetCredentials() *SourceFacebookMarketingAuthentication { + if o == nil { + return nil + } + return o.Credentials +} + func (o *SourceFacebookMarketing) GetCustomInsights() []SourceFacebookMarketingInsightConfig { if o == nil { return nil diff --git a/internal/sdk/models/shared/sourcefacebookmarketingupdate.go b/internal/sdk/models/shared/sourcefacebookmarketingupdate.go index 2d5b4d976..42144e2bc 100644 --- a/internal/sdk/models/shared/sourcefacebookmarketingupdate.go +++ b/internal/sdk/models/shared/sourcefacebookmarketingupdate.go @@ -4,6 +4,7 @@ package shared import ( "encoding/json" + "errors" "fmt" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" "time" @@ -147,6 +148,190 @@ func (e *ValidCampaignStatuses) UnmarshalJSON(data []byte) error { } } +type SourceFacebookMarketingUpdateSchemasAuthType string + +const ( + SourceFacebookMarketingUpdateSchemasAuthTypeService SourceFacebookMarketingUpdateSchemasAuthType = "Service" +) + +func (e SourceFacebookMarketingUpdateSchemasAuthType) ToPointer() *SourceFacebookMarketingUpdateSchemasAuthType { + return &e +} +func (e *SourceFacebookMarketingUpdateSchemasAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Service": + *e = SourceFacebookMarketingUpdateSchemasAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceFacebookMarketingUpdateSchemasAuthType: %v", v) + } +} + +type ServiceAccountKeyAuthentication struct { + // The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + AccessToken string `json:"access_token"` + authType *SourceFacebookMarketingUpdateSchemasAuthType `const:"Service" json:"auth_type"` +} + +func (s ServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *ServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *ServiceAccountKeyAuthentication) GetAccessToken() string { + if o == nil { + return "" + } + return o.AccessToken +} + +func (o *ServiceAccountKeyAuthentication) GetAuthType() *SourceFacebookMarketingUpdateSchemasAuthType { + return SourceFacebookMarketingUpdateSchemasAuthTypeService.ToPointer() +} + +type SourceFacebookMarketingUpdateAuthType string + +const ( + SourceFacebookMarketingUpdateAuthTypeClient SourceFacebookMarketingUpdateAuthType = "Client" +) + +func (e SourceFacebookMarketingUpdateAuthType) ToPointer() *SourceFacebookMarketingUpdateAuthType { + return &e +} +func (e *SourceFacebookMarketingUpdateAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Client": + *e = SourceFacebookMarketingUpdateAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceFacebookMarketingUpdateAuthType: %v", v) + } +} + +type AuthenticateViaFacebookMarketingOauth struct { + // The value of the generated access token. From your App’s Dashboard, click on "Marketing API" then "Tools". Select permissions ads_management, ads_read, read_insights, business_management. Then click on "Get token". See the docs for more information. + AccessToken *string `json:"access_token,omitempty"` + authType *SourceFacebookMarketingUpdateAuthType `const:"Client" json:"auth_type"` + // Client ID for the Facebook Marketing API + ClientID string `json:"client_id"` + // Client Secret for the Facebook Marketing API + ClientSecret string `json:"client_secret"` +} + +func (a AuthenticateViaFacebookMarketingOauth) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(a, "", false) +} + +func (a *AuthenticateViaFacebookMarketingOauth) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &a, "", false, true); err != nil { + return err + } + return nil +} + +func (o *AuthenticateViaFacebookMarketingOauth) GetAccessToken() *string { + if o == nil { + return nil + } + return o.AccessToken +} + +func (o *AuthenticateViaFacebookMarketingOauth) GetAuthType() *SourceFacebookMarketingUpdateAuthType { + return SourceFacebookMarketingUpdateAuthTypeClient.ToPointer() +} + +func (o *AuthenticateViaFacebookMarketingOauth) GetClientID() string { + if o == nil { + return "" + } + return o.ClientID +} + +func (o *AuthenticateViaFacebookMarketingOauth) GetClientSecret() string { + if o == nil { + return "" + } + return o.ClientSecret +} + +type SourceFacebookMarketingUpdateAuthenticationType string + +const ( + SourceFacebookMarketingUpdateAuthenticationTypeAuthenticateViaFacebookMarketingOauth SourceFacebookMarketingUpdateAuthenticationType = "Authenticate via Facebook Marketing (Oauth)" + SourceFacebookMarketingUpdateAuthenticationTypeServiceAccountKeyAuthentication SourceFacebookMarketingUpdateAuthenticationType = "Service Account Key Authentication" +) + +// SourceFacebookMarketingUpdateAuthentication - Credentials for connecting to the Facebook Marketing API +type SourceFacebookMarketingUpdateAuthentication struct { + AuthenticateViaFacebookMarketingOauth *AuthenticateViaFacebookMarketingOauth + ServiceAccountKeyAuthentication *ServiceAccountKeyAuthentication + + Type SourceFacebookMarketingUpdateAuthenticationType +} + +func CreateSourceFacebookMarketingUpdateAuthenticationAuthenticateViaFacebookMarketingOauth(authenticateViaFacebookMarketingOauth AuthenticateViaFacebookMarketingOauth) SourceFacebookMarketingUpdateAuthentication { + typ := SourceFacebookMarketingUpdateAuthenticationTypeAuthenticateViaFacebookMarketingOauth + + return SourceFacebookMarketingUpdateAuthentication{ + AuthenticateViaFacebookMarketingOauth: &authenticateViaFacebookMarketingOauth, + Type: typ, + } +} + +func CreateSourceFacebookMarketingUpdateAuthenticationServiceAccountKeyAuthentication(serviceAccountKeyAuthentication ServiceAccountKeyAuthentication) SourceFacebookMarketingUpdateAuthentication { + typ := SourceFacebookMarketingUpdateAuthenticationTypeServiceAccountKeyAuthentication + + return SourceFacebookMarketingUpdateAuthentication{ + ServiceAccountKeyAuthentication: &serviceAccountKeyAuthentication, + Type: typ, + } +} + +func (u *SourceFacebookMarketingUpdateAuthentication) UnmarshalJSON(data []byte) error { + + var serviceAccountKeyAuthentication ServiceAccountKeyAuthentication = ServiceAccountKeyAuthentication{} + if err := utils.UnmarshalJSON(data, &serviceAccountKeyAuthentication, "", true, true); err == nil { + u.ServiceAccountKeyAuthentication = &serviceAccountKeyAuthentication + u.Type = SourceFacebookMarketingUpdateAuthenticationTypeServiceAccountKeyAuthentication + return nil + } + + var authenticateViaFacebookMarketingOauth AuthenticateViaFacebookMarketingOauth = AuthenticateViaFacebookMarketingOauth{} + if err := utils.UnmarshalJSON(data, &authenticateViaFacebookMarketingOauth, "", true, true); err == nil { + u.AuthenticateViaFacebookMarketingOauth = &authenticateViaFacebookMarketingOauth + u.Type = SourceFacebookMarketingUpdateAuthenticationTypeAuthenticateViaFacebookMarketingOauth + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceFacebookMarketingUpdateAuthentication", string(data)) +} + +func (u SourceFacebookMarketingUpdateAuthentication) MarshalJSON() ([]byte, error) { + if u.AuthenticateViaFacebookMarketingOauth != nil { + return utils.MarshalJSON(u.AuthenticateViaFacebookMarketingOauth, "", true) + } + + if u.ServiceAccountKeyAuthentication != nil { + return utils.MarshalJSON(u.ServiceAccountKeyAuthentication, "", true) + } + + return nil, errors.New("could not marshal union type SourceFacebookMarketingUpdateAuthentication: all fields are null") +} + // ValidActionBreakdowns - An enumeration. type ValidActionBreakdowns string @@ -397,7 +582,6 @@ const ( SourceFacebookMarketingUpdateValidEnumsAdsetEnd SourceFacebookMarketingUpdateValidEnums = "adset_end" SourceFacebookMarketingUpdateValidEnumsAdsetID SourceFacebookMarketingUpdateValidEnums = "adset_id" SourceFacebookMarketingUpdateValidEnumsAdsetName SourceFacebookMarketingUpdateValidEnums = "adset_name" - SourceFacebookMarketingUpdateValidEnumsAdsetStart SourceFacebookMarketingUpdateValidEnums = "adset_start" SourceFacebookMarketingUpdateValidEnumsAgeTargeting SourceFacebookMarketingUpdateValidEnums = "age_targeting" SourceFacebookMarketingUpdateValidEnumsAttributionSetting SourceFacebookMarketingUpdateValidEnums = "attribution_setting" SourceFacebookMarketingUpdateValidEnumsAuctionBid SourceFacebookMarketingUpdateValidEnums = "auction_bid" @@ -552,8 +736,6 @@ func (e *SourceFacebookMarketingUpdateValidEnums) UnmarshalJSON(data []byte) err fallthrough case "adset_name": fallthrough - case "adset_start": - fallthrough case "age_targeting": fallthrough case "attribution_setting": @@ -962,6 +1144,8 @@ type SourceFacebookMarketingUpdate struct { ClientID *string `json:"client_id,omitempty"` // The Client Secret for your OAuth app ClientSecret *string `json:"client_secret,omitempty"` + // Credentials for connecting to the Facebook Marketing API + Credentials *SourceFacebookMarketingUpdateAuthentication `json:"credentials,omitempty"` // A list which contains ad statistics entries, each entry must have a name and can contains fields, breakdowns or action_breakdowns. Click on "add" to fill this field. CustomInsights []InsightConfig `json:"custom_insights,omitempty"` // The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated between the start date and this end date will be replicated. Not setting this option will result in always syncing the latest data. @@ -1045,6 +1229,13 @@ func (o *SourceFacebookMarketingUpdate) GetClientSecret() *string { return o.ClientSecret } +func (o *SourceFacebookMarketingUpdate) GetCredentials() *SourceFacebookMarketingUpdateAuthentication { + if o == nil { + return nil + } + return o.Credentials +} + func (o *SourceFacebookMarketingUpdate) GetCustomInsights() []InsightConfig { if o == nil { return nil diff --git a/internal/sdk/models/shared/sourcegoldcast.go b/internal/sdk/models/shared/sourcegoldcast.go new file mode 100644 index 000000000..27d7c413f --- /dev/null +++ b/internal/sdk/models/shared/sourcegoldcast.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +import ( + "encoding/json" + "fmt" + "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" +) + +type Goldcast string + +const ( + GoldcastGoldcast Goldcast = "goldcast" +) + +func (e Goldcast) ToPointer() *Goldcast { + return &e +} +func (e *Goldcast) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "goldcast": + *e = Goldcast(v) + return nil + default: + return fmt.Errorf("invalid value for Goldcast: %v", v) + } +} + +type SourceGoldcast struct { + // Your API Access Key. See here. The key is case sensitive. + AccessKey string `json:"access_key"` + sourceType Goldcast `const:"goldcast" json:"sourceType"` +} + +func (s SourceGoldcast) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceGoldcast) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { + return err + } + return nil +} + +func (o *SourceGoldcast) GetAccessKey() string { + if o == nil { + return "" + } + return o.AccessKey +} + +func (o *SourceGoldcast) GetSourceType() Goldcast { + return GoldcastGoldcast +} diff --git a/internal/sdk/models/shared/sourcegoldcastcreaterequest.go b/internal/sdk/models/shared/sourcegoldcastcreaterequest.go new file mode 100644 index 000000000..5c36ce9e4 --- /dev/null +++ b/internal/sdk/models/shared/sourcegoldcastcreaterequest.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type SourceGoldcastCreateRequest struct { + Configuration SourceGoldcast `json:"configuration"` + // The UUID of the connector definition. One of configuration.sourceType or definitionId must be provided. + DefinitionID *string `json:"definitionId,omitempty"` + // Name of the source e.g. dev-mysql-instance. + Name string `json:"name"` + // Optional secretID obtained through the public API OAuth redirect flow. + SecretID *string `json:"secretId,omitempty"` + WorkspaceID string `json:"workspaceId"` +} + +func (o *SourceGoldcastCreateRequest) GetConfiguration() SourceGoldcast { + if o == nil { + return SourceGoldcast{} + } + return o.Configuration +} + +func (o *SourceGoldcastCreateRequest) GetDefinitionID() *string { + if o == nil { + return nil + } + return o.DefinitionID +} + +func (o *SourceGoldcastCreateRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SourceGoldcastCreateRequest) GetSecretID() *string { + if o == nil { + return nil + } + return o.SecretID +} + +func (o *SourceGoldcastCreateRequest) GetWorkspaceID() string { + if o == nil { + return "" + } + return o.WorkspaceID +} diff --git a/internal/sdk/models/shared/sourcegoldcastputrequest.go b/internal/sdk/models/shared/sourcegoldcastputrequest.go new file mode 100644 index 000000000..8d75d6d80 --- /dev/null +++ b/internal/sdk/models/shared/sourcegoldcastputrequest.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type SourceGoldcastPutRequest struct { + Configuration SourceGoldcastUpdate `json:"configuration"` + Name string `json:"name"` + WorkspaceID string `json:"workspaceId"` +} + +func (o *SourceGoldcastPutRequest) GetConfiguration() SourceGoldcastUpdate { + if o == nil { + return SourceGoldcastUpdate{} + } + return o.Configuration +} + +func (o *SourceGoldcastPutRequest) GetName() string { + if o == nil { + return "" + } + return o.Name +} + +func (o *SourceGoldcastPutRequest) GetWorkspaceID() string { + if o == nil { + return "" + } + return o.WorkspaceID +} diff --git a/internal/sdk/models/shared/sourcegoldcastupdate.go b/internal/sdk/models/shared/sourcegoldcastupdate.go new file mode 100644 index 000000000..01278a80b --- /dev/null +++ b/internal/sdk/models/shared/sourcegoldcastupdate.go @@ -0,0 +1,15 @@ +// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + +package shared + +type SourceGoldcastUpdate struct { + // Your API Access Key. See here. The key is case sensitive. + AccessKey string `json:"access_key"` +} + +func (o *SourceGoldcastUpdate) GetAccessKey() string { + if o == nil { + return "" + } + return o.AccessKey +} diff --git a/internal/sdk/models/shared/sourcegoogleanalyticsdataapiupdate.go b/internal/sdk/models/shared/sourcegoogleanalyticsdataapiupdate.go index 34025079b..6cd07826a 100644 --- a/internal/sdk/models/shared/sourcegoogleanalyticsdataapiupdate.go +++ b/internal/sdk/models/shared/sourcegoogleanalyticsdataapiupdate.go @@ -33,28 +33,28 @@ func (e *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType) UnmarshalJSON(data [ } } -type ServiceAccountKeyAuthentication struct { +type SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication struct { authType *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType `const:"Service" json:"auth_type,omitempty"` // The JSON key linked to the service account used for authorization. For steps on obtaining this key, refer to the setup guide. CredentialsJSON string `json:"credentials_json"` } -func (s ServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { +func (s SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *ServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { +func (s *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *ServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType { +func (o *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleAnalyticsDataAPIUpdateSchemasAuthType { return SourceGoogleAnalyticsDataAPIUpdateSchemasAuthTypeService.ToPointer() } -func (o *ServiceAccountKeyAuthentication) GetCredentialsJSON() string { +func (o *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) GetCredentialsJSON() string { if o == nil { return "" } @@ -142,14 +142,14 @@ func (o *AuthenticateViaGoogleOauth) GetRefreshToken() string { type SourceGoogleAnalyticsDataAPIUpdateCredentialsType string const ( - SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeAuthenticateViaGoogleOauth SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "Authenticate via Google (Oauth)" - SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "Service Account Key Authentication" + SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeAuthenticateViaGoogleOauth SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "Authenticate via Google (Oauth)" + SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateCredentialsType = "source-google-analytics-data-api-update_Service Account Key Authentication" ) // SourceGoogleAnalyticsDataAPIUpdateCredentials - Credentials for the service type SourceGoogleAnalyticsDataAPIUpdateCredentials struct { - AuthenticateViaGoogleOauth *AuthenticateViaGoogleOauth - ServiceAccountKeyAuthentication *ServiceAccountKeyAuthentication + AuthenticateViaGoogleOauth *AuthenticateViaGoogleOauth + SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication *SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication Type SourceGoogleAnalyticsDataAPIUpdateCredentialsType } @@ -163,21 +163,21 @@ func CreateSourceGoogleAnalyticsDataAPIUpdateCredentialsAuthenticateViaGoogleOau } } -func CreateSourceGoogleAnalyticsDataAPIUpdateCredentialsServiceAccountKeyAuthentication(serviceAccountKeyAuthentication ServiceAccountKeyAuthentication) SourceGoogleAnalyticsDataAPIUpdateCredentials { - typ := SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeServiceAccountKeyAuthentication +func CreateSourceGoogleAnalyticsDataAPIUpdateCredentialsSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication(sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication) SourceGoogleAnalyticsDataAPIUpdateCredentials { + typ := SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication return SourceGoogleAnalyticsDataAPIUpdateCredentials{ - ServiceAccountKeyAuthentication: &serviceAccountKeyAuthentication, - Type: typ, + SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication: &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, + Type: typ, } } func (u *SourceGoogleAnalyticsDataAPIUpdateCredentials) UnmarshalJSON(data []byte) error { - var serviceAccountKeyAuthentication ServiceAccountKeyAuthentication = ServiceAccountKeyAuthentication{} - if err := utils.UnmarshalJSON(data, &serviceAccountKeyAuthentication, "", true, true); err == nil { - u.ServiceAccountKeyAuthentication = &serviceAccountKeyAuthentication - u.Type = SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeServiceAccountKeyAuthentication + var sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication = SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication{} + if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, "", true, true); err == nil { + u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication = &sourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication + u.Type = SourceGoogleAnalyticsDataAPIUpdateCredentialsTypeSourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication return nil } @@ -196,8 +196,8 @@ func (u SourceGoogleAnalyticsDataAPIUpdateCredentials) MarshalJSON() ([]byte, er return utils.MarshalJSON(u.AuthenticateViaGoogleOauth, "", true) } - if u.ServiceAccountKeyAuthentication != nil { - return utils.MarshalJSON(u.ServiceAccountKeyAuthentication, "", true) + if u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication != nil { + return utils.MarshalJSON(u.SourceGoogleAnalyticsDataAPIUpdateServiceAccountKeyAuthentication, "", true) } return nil, errors.New("could not marshal union type SourceGoogleAnalyticsDataAPIUpdateCredentials: all fields are null") diff --git a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonly.go b/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonly.go deleted file mode 100644 index b216d73bd..000000000 --- a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonly.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "errors" - "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" -) - -type SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType string - -const ( - SourceGoogleAnalyticsV4ServiceAccountOnlyAuthTypeService SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType = "Service" -) - -func (e SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType) ToPointer() *SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType { - return &e -} -func (e *SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "Service": - *e = SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType(v) - return nil - default: - return fmt.Errorf("invalid value for SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType: %v", v) - } -} - -type SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication struct { - authType *SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType `const:"Service" json:"auth_type,omitempty"` - // The JSON key of the service account to use for authorization - CredentialsJSON string `json:"credentials_json"` -} - -func (s SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { - return err - } - return nil -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleAnalyticsV4ServiceAccountOnlyAuthType { - return SourceGoogleAnalyticsV4ServiceAccountOnlyAuthTypeService.ToPointer() -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication) GetCredentialsJSON() string { - if o == nil { - return "" - } - return o.CredentialsJSON -} - -type SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsType string - -const ( - SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsType = "source-google-analytics-v4-service-account-only_Service Account Key Authentication" -) - -// SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials - Credentials for the service -type SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials struct { - SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication *SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication - - Type SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsType -} - -func CreateSourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsSourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication(sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication) SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials { - typ := SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication - - return SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials{ - SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication: &sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication, - Type: typ, - } -} - -func (u *SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials) UnmarshalJSON(data []byte) error { - - var sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication = SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication{} - if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication, "", true, true); err == nil { - u.SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication = &sourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication - u.Type = SourceGoogleAnalyticsV4ServiceAccountOnlyCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials", string(data)) -} - -func (u SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials) MarshalJSON() ([]byte, error) { - if u.SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication != nil { - return utils.MarshalJSON(u.SourceGoogleAnalyticsV4ServiceAccountOnlyServiceAccountKeyAuthentication, "", true) - } - - return nil, errors.New("could not marshal union type SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials: all fields are null") -} - -type GoogleAnalyticsV4ServiceAccountOnly string - -const ( - GoogleAnalyticsV4ServiceAccountOnlyGoogleAnalyticsV4ServiceAccountOnly GoogleAnalyticsV4ServiceAccountOnly = "google-analytics-v4-service-account-only" -) - -func (e GoogleAnalyticsV4ServiceAccountOnly) ToPointer() *GoogleAnalyticsV4ServiceAccountOnly { - return &e -} -func (e *GoogleAnalyticsV4ServiceAccountOnly) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "google-analytics-v4-service-account-only": - *e = GoogleAnalyticsV4ServiceAccountOnly(v) - return nil - default: - return fmt.Errorf("invalid value for GoogleAnalyticsV4ServiceAccountOnly: %v", v) - } -} - -type SourceGoogleAnalyticsV4ServiceAccountOnly struct { - // Credentials for the service - Credentials *SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials `json:"credentials,omitempty"` - // A JSON array describing the custom reports you want to sync from Google Analytics. See the docs for more information about the exact format you can use to fill out this field. - CustomReports *string `json:"custom_reports,omitempty"` - // The date in the format YYYY-MM-DD. Any data after this date will not be replicated. - EndDate *types.Date `json:"end_date,omitempty"` - sourceType GoogleAnalyticsV4ServiceAccountOnly `const:"google-analytics-v4-service-account-only" json:"sourceType"` - // The date in the format YYYY-MM-DD. Any data before this date will not be replicated. - StartDate types.Date `json:"start_date"` - // The ID for the Google Analytics View you want to fetch data from. This can be found from the Google Analytics Account Explorer. - ViewID string `json:"view_id"` - // The time increment used by the connector when requesting data from the Google Analytics API. More information is available in the the docs. The bigger this value is, the faster the sync will be, but the more likely that sampling will be applied to your data, potentially causing inaccuracies in the returned results. We recommend setting this to 1 unless you have a hard requirement to make the sync faster at the expense of accuracy. The minimum allowed value for this field is 1, and the maximum is 364. - WindowInDays *int64 `default:"1" json:"window_in_days"` -} - -func (s SourceGoogleAnalyticsV4ServiceAccountOnly) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourceGoogleAnalyticsV4ServiceAccountOnly) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { - return err - } - return nil -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetCredentials() *SourceGoogleAnalyticsV4ServiceAccountOnlyCredentials { - if o == nil { - return nil - } - return o.Credentials -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetCustomReports() *string { - if o == nil { - return nil - } - return o.CustomReports -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetEndDate() *types.Date { - if o == nil { - return nil - } - return o.EndDate -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetSourceType() GoogleAnalyticsV4ServiceAccountOnly { - return GoogleAnalyticsV4ServiceAccountOnlyGoogleAnalyticsV4ServiceAccountOnly -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetStartDate() types.Date { - if o == nil { - return types.Date{} - } - return o.StartDate -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetViewID() string { - if o == nil { - return "" - } - return o.ViewID -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnly) GetWindowInDays() *int64 { - if o == nil { - return nil - } - return o.WindowInDays -} diff --git a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyputrequest.go b/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyputrequest.go deleted file mode 100644 index 21c712e61..000000000 --- a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyputrequest.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -type SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest struct { - Configuration SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate `json:"configuration"` - Name string `json:"name"` - WorkspaceID string `json:"workspaceId"` -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest) GetConfiguration() SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate { - if o == nil { - return SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate{} - } - return o.Configuration -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest) GetName() string { - if o == nil { - return "" - } - return o.Name -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest) GetWorkspaceID() string { - if o == nil { - return "" - } - return o.WorkspaceID -} diff --git a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyupdate.go b/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyupdate.go deleted file mode 100644 index 9a0bc4d0b..000000000 --- a/internal/sdk/models/shared/sourcegoogleanalyticsv4serviceaccountonlyupdate.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "errors" - "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" -) - -type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType string - -const ( - SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthTypeService SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType = "Service" -) - -func (e SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType) ToPointer() *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType { - return &e -} -func (e *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "Service": - *e = SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType(v) - return nil - default: - return fmt.Errorf("invalid value for SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType: %v", v) - } -} - -type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication struct { - authType *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType `const:"Service" json:"auth_type,omitempty"` - // The JSON key of the service account to use for authorization - CredentialsJSON string `json:"credentials_json"` -} - -func (s SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { - return err - } - return nil -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthType { - return SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateAuthTypeService.ToPointer() -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication) GetCredentialsJSON() string { - if o == nil { - return "" - } - return o.CredentialsJSON -} - -type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsType string - -const ( - SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsType = "source-google-analytics-v4-service-account-only-update_Service Account Key Authentication" -) - -// SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials - Credentials for the service -type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials struct { - SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication - - Type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsType -} - -func CreateSourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsSourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication(sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication) SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials { - typ := SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication - - return SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials{ - SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication: &sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication, - Type: typ, - } -} - -func (u *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials) UnmarshalJSON(data []byte) error { - - var sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication = SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication{} - if err := utils.UnmarshalJSON(data, &sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication, "", true, true); err == nil { - u.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication = &sourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication - u.Type = SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentialsTypeSourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication - return nil - } - - return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials", string(data)) -} - -func (u SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials) MarshalJSON() ([]byte, error) { - if u.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication != nil { - return utils.MarshalJSON(u.SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateServiceAccountKeyAuthentication, "", true) - } - - return nil, errors.New("could not marshal union type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials: all fields are null") -} - -type SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate struct { - // Credentials for the service - Credentials *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials `json:"credentials,omitempty"` - // A JSON array describing the custom reports you want to sync from Google Analytics. See the docs for more information about the exact format you can use to fill out this field. - CustomReports *string `json:"custom_reports,omitempty"` - // The date in the format YYYY-MM-DD. Any data after this date will not be replicated. - EndDate *types.Date `json:"end_date,omitempty"` - // The date in the format YYYY-MM-DD. Any data before this date will not be replicated. - StartDate types.Date `json:"start_date"` - // The ID for the Google Analytics View you want to fetch data from. This can be found from the Google Analytics Account Explorer. - ViewID string `json:"view_id"` - // The time increment used by the connector when requesting data from the Google Analytics API. More information is available in the the docs. The bigger this value is, the faster the sync will be, but the more likely that sampling will be applied to your data, potentially causing inaccuracies in the returned results. We recommend setting this to 1 unless you have a hard requirement to make the sync faster at the expense of accuracy. The minimum allowed value for this field is 1, and the maximum is 364. - WindowInDays *int64 `default:"1" json:"window_in_days"` -} - -func (s SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { - return err - } - return nil -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetCredentials() *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdateCredentials { - if o == nil { - return nil - } - return o.Credentials -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetCustomReports() *string { - if o == nil { - return nil - } - return o.CustomReports -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetEndDate() *types.Date { - if o == nil { - return nil - } - return o.EndDate -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetStartDate() types.Date { - if o == nil { - return types.Date{} - } - return o.StartDate -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetViewID() string { - if o == nil { - return "" - } - return o.ViewID -} - -func (o *SourceGoogleAnalyticsV4ServiceAccountOnlyUpdate) GetWindowInDays() *int64 { - if o == nil { - return nil - } - return o.WindowInDays -} diff --git a/internal/sdk/models/shared/sourcemicrosoftonedrive.go b/internal/sdk/models/shared/sourcemicrosoftonedrive.go index d8b39b7fa..c54d99a0a 100644 --- a/internal/sdk/models/shared/sourcemicrosoftonedrive.go +++ b/internal/sdk/models/shared/sourcemicrosoftonedrive.go @@ -428,8 +428,8 @@ func (e *SourceMicrosoftOnedriveParsingStrategy) UnmarshalJSON(data []byte) erro } } -// SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental struct { +// SourceMicrosoftOnedriveUnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type SourceMicrosoftOnedriveUnstructuredDocumentFormat struct { filetype *SourceMicrosoftOnedriveSchemasStreamsFormatFormatFiletype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceMicrosoftOnedriveProcessing `json:"processing,omitempty"` @@ -439,36 +439,36 @@ type SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental struct { Strategy *SourceMicrosoftOnedriveParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { +func (s SourceMicrosoftOnedriveUnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { +func (s *SourceMicrosoftOnedriveUnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) GetFiletype() *SourceMicrosoftOnedriveSchemasStreamsFormatFormatFiletype { +func (o *SourceMicrosoftOnedriveUnstructuredDocumentFormat) GetFiletype() *SourceMicrosoftOnedriveSchemasStreamsFormatFormatFiletype { return SourceMicrosoftOnedriveSchemasStreamsFormatFormatFiletypeUnstructured.ToPointer() } -func (o *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) GetProcessing() *SourceMicrosoftOnedriveProcessing { +func (o *SourceMicrosoftOnedriveUnstructuredDocumentFormat) GetProcessing() *SourceMicrosoftOnedriveProcessing { if o == nil { return nil } return o.Processing } -func (o *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *SourceMicrosoftOnedriveUnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) GetStrategy() *SourceMicrosoftOnedriveParsingStrategy { +func (o *SourceMicrosoftOnedriveUnstructuredDocumentFormat) GetStrategy() *SourceMicrosoftOnedriveParsingStrategy { if o == nil { return nil } @@ -1002,20 +1002,20 @@ func (o *SourceMicrosoftOnedriveAvroFormat) GetFiletype() *SourceMicrosoftOnedri type SourceMicrosoftOnedriveFormatType string const ( - SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveAvroFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Avro Format" - SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveCSVFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_CSV Format" - SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveJsonlFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Jsonl Format" - SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveParquetFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Parquet Format" - SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Document File Type Format (Experimental)" + SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveAvroFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Avro Format" + SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveCSVFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_CSV Format" + SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveJsonlFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Jsonl Format" + SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveParquetFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Parquet Format" + SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveUnstructuredDocumentFormat SourceMicrosoftOnedriveFormatType = "source-microsoft-onedrive_Unstructured Document Format" ) // SourceMicrosoftOnedriveFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceMicrosoftOnedriveFormat struct { - SourceMicrosoftOnedriveAvroFormat *SourceMicrosoftOnedriveAvroFormat - SourceMicrosoftOnedriveCSVFormat *SourceMicrosoftOnedriveCSVFormat - SourceMicrosoftOnedriveJsonlFormat *SourceMicrosoftOnedriveJsonlFormat - SourceMicrosoftOnedriveParquetFormat *SourceMicrosoftOnedriveParquetFormat - SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental *SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental + SourceMicrosoftOnedriveAvroFormat *SourceMicrosoftOnedriveAvroFormat + SourceMicrosoftOnedriveCSVFormat *SourceMicrosoftOnedriveCSVFormat + SourceMicrosoftOnedriveJsonlFormat *SourceMicrosoftOnedriveJsonlFormat + SourceMicrosoftOnedriveParquetFormat *SourceMicrosoftOnedriveParquetFormat + SourceMicrosoftOnedriveUnstructuredDocumentFormat *SourceMicrosoftOnedriveUnstructuredDocumentFormat Type SourceMicrosoftOnedriveFormatType } @@ -1056,11 +1056,11 @@ func CreateSourceMicrosoftOnedriveFormatSourceMicrosoftOnedriveParquetFormat(sou } } -func CreateSourceMicrosoftOnedriveFormatSourceMicrosoftOnedriveDocumentFileTypeFormatExperimental(sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental) SourceMicrosoftOnedriveFormat { - typ := SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveDocumentFileTypeFormatExperimental +func CreateSourceMicrosoftOnedriveFormatSourceMicrosoftOnedriveUnstructuredDocumentFormat(sourceMicrosoftOnedriveUnstructuredDocumentFormat SourceMicrosoftOnedriveUnstructuredDocumentFormat) SourceMicrosoftOnedriveFormat { + typ := SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveUnstructuredDocumentFormat return SourceMicrosoftOnedriveFormat{ - SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental: &sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental, + SourceMicrosoftOnedriveUnstructuredDocumentFormat: &sourceMicrosoftOnedriveUnstructuredDocumentFormat, Type: typ, } } @@ -1088,10 +1088,10 @@ func (u *SourceMicrosoftOnedriveFormat) UnmarshalJSON(data []byte) error { return nil } - var sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental = SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental = &sourceMicrosoftOnedriveDocumentFileTypeFormatExperimental - u.Type = SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveDocumentFileTypeFormatExperimental + var sourceMicrosoftOnedriveUnstructuredDocumentFormat SourceMicrosoftOnedriveUnstructuredDocumentFormat = SourceMicrosoftOnedriveUnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &sourceMicrosoftOnedriveUnstructuredDocumentFormat, "", true, true); err == nil { + u.SourceMicrosoftOnedriveUnstructuredDocumentFormat = &sourceMicrosoftOnedriveUnstructuredDocumentFormat + u.Type = SourceMicrosoftOnedriveFormatTypeSourceMicrosoftOnedriveUnstructuredDocumentFormat return nil } @@ -1122,8 +1122,8 @@ func (u SourceMicrosoftOnedriveFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceMicrosoftOnedriveParquetFormat, "", true) } - if u.SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceMicrosoftOnedriveDocumentFileTypeFormatExperimental, "", true) + if u.SourceMicrosoftOnedriveUnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.SourceMicrosoftOnedriveUnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceMicrosoftOnedriveFormat: all fields are null") diff --git a/internal/sdk/models/shared/sourcemicrosoftonedriveupdate.go b/internal/sdk/models/shared/sourcemicrosoftonedriveupdate.go index ae339db49..2b130d902 100644 --- a/internal/sdk/models/shared/sourcemicrosoftonedriveupdate.go +++ b/internal/sdk/models/shared/sourcemicrosoftonedriveupdate.go @@ -405,8 +405,8 @@ func (e *SourceMicrosoftOnedriveUpdateParsingStrategy) UnmarshalJSON(data []byte } } -// SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental struct { +// UnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type UnstructuredDocumentFormat struct { filetype *SourceMicrosoftOnedriveUpdateSchemasStreamsFormatFormatFiletype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceMicrosoftOnedriveUpdateProcessing `json:"processing,omitempty"` @@ -416,36 +416,36 @@ type SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental struct { Strategy *SourceMicrosoftOnedriveUpdateParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) +func (u UnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(u, "", false) } -func (s *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { +func (u *UnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &u, "", false, true); err != nil { return err } return nil } -func (o *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) GetFiletype() *SourceMicrosoftOnedriveUpdateSchemasStreamsFormatFormatFiletype { +func (o *UnstructuredDocumentFormat) GetFiletype() *SourceMicrosoftOnedriveUpdateSchemasStreamsFormatFormatFiletype { return SourceMicrosoftOnedriveUpdateSchemasStreamsFormatFormatFiletypeUnstructured.ToPointer() } -func (o *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) GetProcessing() *SourceMicrosoftOnedriveUpdateProcessing { +func (o *UnstructuredDocumentFormat) GetProcessing() *SourceMicrosoftOnedriveUpdateProcessing { if o == nil { return nil } return o.Processing } -func (o *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *UnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) GetStrategy() *SourceMicrosoftOnedriveUpdateParsingStrategy { +func (o *UnstructuredDocumentFormat) GetStrategy() *SourceMicrosoftOnedriveUpdateParsingStrategy { if o == nil { return nil } @@ -979,20 +979,20 @@ func (o *SourceMicrosoftOnedriveUpdateAvroFormat) GetFiletype() *SourceMicrosoft type SourceMicrosoftOnedriveUpdateFormatType string const ( - SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateAvroFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Avro Format" - SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateCSVFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_CSV Format" - SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateJsonlFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Jsonl Format" - SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateParquetFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Parquet Format" - SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Document File Type Format (Experimental)" + SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateAvroFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Avro Format" + SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateCSVFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_CSV Format" + SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateJsonlFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Jsonl Format" + SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateParquetFormat SourceMicrosoftOnedriveUpdateFormatType = "source-microsoft-onedrive-update_Parquet Format" + SourceMicrosoftOnedriveUpdateFormatTypeUnstructuredDocumentFormat SourceMicrosoftOnedriveUpdateFormatType = "Unstructured Document Format" ) // SourceMicrosoftOnedriveUpdateFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceMicrosoftOnedriveUpdateFormat struct { - SourceMicrosoftOnedriveUpdateAvroFormat *SourceMicrosoftOnedriveUpdateAvroFormat - SourceMicrosoftOnedriveUpdateCSVFormat *SourceMicrosoftOnedriveUpdateCSVFormat - SourceMicrosoftOnedriveUpdateJsonlFormat *SourceMicrosoftOnedriveUpdateJsonlFormat - SourceMicrosoftOnedriveUpdateParquetFormat *SourceMicrosoftOnedriveUpdateParquetFormat - SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental *SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental + SourceMicrosoftOnedriveUpdateAvroFormat *SourceMicrosoftOnedriveUpdateAvroFormat + SourceMicrosoftOnedriveUpdateCSVFormat *SourceMicrosoftOnedriveUpdateCSVFormat + SourceMicrosoftOnedriveUpdateJsonlFormat *SourceMicrosoftOnedriveUpdateJsonlFormat + SourceMicrosoftOnedriveUpdateParquetFormat *SourceMicrosoftOnedriveUpdateParquetFormat + UnstructuredDocumentFormat *UnstructuredDocumentFormat Type SourceMicrosoftOnedriveUpdateFormatType } @@ -1033,12 +1033,12 @@ func CreateSourceMicrosoftOnedriveUpdateFormatSourceMicrosoftOnedriveUpdateParqu } } -func CreateSourceMicrosoftOnedriveUpdateFormatSourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental(sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental) SourceMicrosoftOnedriveUpdateFormat { - typ := SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental +func CreateSourceMicrosoftOnedriveUpdateFormatUnstructuredDocumentFormat(unstructuredDocumentFormat UnstructuredDocumentFormat) SourceMicrosoftOnedriveUpdateFormat { + typ := SourceMicrosoftOnedriveUpdateFormatTypeUnstructuredDocumentFormat return SourceMicrosoftOnedriveUpdateFormat{ - SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental: &sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental, - Type: typ, + UnstructuredDocumentFormat: &unstructuredDocumentFormat, + Type: typ, } } @@ -1065,10 +1065,10 @@ func (u *SourceMicrosoftOnedriveUpdateFormat) UnmarshalJSON(data []byte) error { return nil } - var sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental = SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental = &sourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental - u.Type = SourceMicrosoftOnedriveUpdateFormatTypeSourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental + var unstructuredDocumentFormat UnstructuredDocumentFormat = UnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &unstructuredDocumentFormat, "", true, true); err == nil { + u.UnstructuredDocumentFormat = &unstructuredDocumentFormat + u.Type = SourceMicrosoftOnedriveUpdateFormatTypeUnstructuredDocumentFormat return nil } @@ -1099,8 +1099,8 @@ func (u SourceMicrosoftOnedriveUpdateFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceMicrosoftOnedriveUpdateParquetFormat, "", true) } - if u.SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceMicrosoftOnedriveUpdateDocumentFileTypeFormatExperimental, "", true) + if u.UnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.UnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceMicrosoftOnedriveUpdateFormat: all fields are null") diff --git a/internal/sdk/models/shared/sourcemicrosoftsharepoint.go b/internal/sdk/models/shared/sourcemicrosoftsharepoint.go index 6d871c9f1..218ad4710 100644 --- a/internal/sdk/models/shared/sourcemicrosoftsharepoint.go +++ b/internal/sdk/models/shared/sourcemicrosoftsharepoint.go @@ -428,8 +428,8 @@ func (e *SourceMicrosoftSharepointParsingStrategy) UnmarshalJSON(data []byte) er } } -// SourceMicrosoftSharepointDocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceMicrosoftSharepointDocumentFileTypeFormatExperimental struct { +// SourceMicrosoftSharepointUnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type SourceMicrosoftSharepointUnstructuredDocumentFormat struct { filetype *SourceMicrosoftSharepointSchemasStreamsFormatFormatFiletype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceMicrosoftSharepointProcessing `json:"processing,omitempty"` @@ -439,36 +439,36 @@ type SourceMicrosoftSharepointDocumentFileTypeFormatExperimental struct { Strategy *SourceMicrosoftSharepointParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { +func (s SourceMicrosoftSharepointUnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { +func (s *SourceMicrosoftSharepointUnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) GetFiletype() *SourceMicrosoftSharepointSchemasStreamsFormatFormatFiletype { +func (o *SourceMicrosoftSharepointUnstructuredDocumentFormat) GetFiletype() *SourceMicrosoftSharepointSchemasStreamsFormatFormatFiletype { return SourceMicrosoftSharepointSchemasStreamsFormatFormatFiletypeUnstructured.ToPointer() } -func (o *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) GetProcessing() *SourceMicrosoftSharepointProcessing { +func (o *SourceMicrosoftSharepointUnstructuredDocumentFormat) GetProcessing() *SourceMicrosoftSharepointProcessing { if o == nil { return nil } return o.Processing } -func (o *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *SourceMicrosoftSharepointUnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) GetStrategy() *SourceMicrosoftSharepointParsingStrategy { +func (o *SourceMicrosoftSharepointUnstructuredDocumentFormat) GetStrategy() *SourceMicrosoftSharepointParsingStrategy { if o == nil { return nil } @@ -1002,20 +1002,20 @@ func (o *SourceMicrosoftSharepointAvroFormat) GetFiletype() *SourceMicrosoftShar type SourceMicrosoftSharepointFormatType string const ( - SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointAvroFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Avro Format" - SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointCSVFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_CSV Format" - SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointJsonlFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Jsonl Format" - SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointParquetFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Parquet Format" - SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointDocumentFileTypeFormatExperimental SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Document File Type Format (Experimental)" + SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointAvroFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Avro Format" + SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointCSVFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_CSV Format" + SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointJsonlFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Jsonl Format" + SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointParquetFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Parquet Format" + SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointUnstructuredDocumentFormat SourceMicrosoftSharepointFormatType = "source-microsoft-sharepoint_Unstructured Document Format" ) // SourceMicrosoftSharepointFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceMicrosoftSharepointFormat struct { - SourceMicrosoftSharepointAvroFormat *SourceMicrosoftSharepointAvroFormat - SourceMicrosoftSharepointCSVFormat *SourceMicrosoftSharepointCSVFormat - SourceMicrosoftSharepointJsonlFormat *SourceMicrosoftSharepointJsonlFormat - SourceMicrosoftSharepointParquetFormat *SourceMicrosoftSharepointParquetFormat - SourceMicrosoftSharepointDocumentFileTypeFormatExperimental *SourceMicrosoftSharepointDocumentFileTypeFormatExperimental + SourceMicrosoftSharepointAvroFormat *SourceMicrosoftSharepointAvroFormat + SourceMicrosoftSharepointCSVFormat *SourceMicrosoftSharepointCSVFormat + SourceMicrosoftSharepointJsonlFormat *SourceMicrosoftSharepointJsonlFormat + SourceMicrosoftSharepointParquetFormat *SourceMicrosoftSharepointParquetFormat + SourceMicrosoftSharepointUnstructuredDocumentFormat *SourceMicrosoftSharepointUnstructuredDocumentFormat Type SourceMicrosoftSharepointFormatType } @@ -1056,11 +1056,11 @@ func CreateSourceMicrosoftSharepointFormatSourceMicrosoftSharepointParquetFormat } } -func CreateSourceMicrosoftSharepointFormatSourceMicrosoftSharepointDocumentFileTypeFormatExperimental(sourceMicrosoftSharepointDocumentFileTypeFormatExperimental SourceMicrosoftSharepointDocumentFileTypeFormatExperimental) SourceMicrosoftSharepointFormat { - typ := SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointDocumentFileTypeFormatExperimental +func CreateSourceMicrosoftSharepointFormatSourceMicrosoftSharepointUnstructuredDocumentFormat(sourceMicrosoftSharepointUnstructuredDocumentFormat SourceMicrosoftSharepointUnstructuredDocumentFormat) SourceMicrosoftSharepointFormat { + typ := SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointUnstructuredDocumentFormat return SourceMicrosoftSharepointFormat{ - SourceMicrosoftSharepointDocumentFileTypeFormatExperimental: &sourceMicrosoftSharepointDocumentFileTypeFormatExperimental, + SourceMicrosoftSharepointUnstructuredDocumentFormat: &sourceMicrosoftSharepointUnstructuredDocumentFormat, Type: typ, } } @@ -1088,10 +1088,10 @@ func (u *SourceMicrosoftSharepointFormat) UnmarshalJSON(data []byte) error { return nil } - var sourceMicrosoftSharepointDocumentFileTypeFormatExperimental SourceMicrosoftSharepointDocumentFileTypeFormatExperimental = SourceMicrosoftSharepointDocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceMicrosoftSharepointDocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceMicrosoftSharepointDocumentFileTypeFormatExperimental = &sourceMicrosoftSharepointDocumentFileTypeFormatExperimental - u.Type = SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointDocumentFileTypeFormatExperimental + var sourceMicrosoftSharepointUnstructuredDocumentFormat SourceMicrosoftSharepointUnstructuredDocumentFormat = SourceMicrosoftSharepointUnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &sourceMicrosoftSharepointUnstructuredDocumentFormat, "", true, true); err == nil { + u.SourceMicrosoftSharepointUnstructuredDocumentFormat = &sourceMicrosoftSharepointUnstructuredDocumentFormat + u.Type = SourceMicrosoftSharepointFormatTypeSourceMicrosoftSharepointUnstructuredDocumentFormat return nil } @@ -1122,8 +1122,8 @@ func (u SourceMicrosoftSharepointFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceMicrosoftSharepointParquetFormat, "", true) } - if u.SourceMicrosoftSharepointDocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceMicrosoftSharepointDocumentFileTypeFormatExperimental, "", true) + if u.SourceMicrosoftSharepointUnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.SourceMicrosoftSharepointUnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceMicrosoftSharepointFormat: all fields are null") diff --git a/internal/sdk/models/shared/sourcemicrosoftsharepointupdate.go b/internal/sdk/models/shared/sourcemicrosoftsharepointupdate.go index 739c1729b..f65eaeb11 100644 --- a/internal/sdk/models/shared/sourcemicrosoftsharepointupdate.go +++ b/internal/sdk/models/shared/sourcemicrosoftsharepointupdate.go @@ -405,8 +405,8 @@ func (e *SourceMicrosoftSharepointUpdateParsingStrategy) UnmarshalJSON(data []by } } -// SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental struct { +// SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat struct { filetype *SourceMicrosoftSharepointUpdateSchemasStreamsFormatFormatFiletype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceMicrosoftSharepointUpdateProcessing `json:"processing,omitempty"` @@ -416,36 +416,36 @@ type SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental struct { Strategy *SourceMicrosoftSharepointUpdateParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { +func (s SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { +func (s *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) GetFiletype() *SourceMicrosoftSharepointUpdateSchemasStreamsFormatFormatFiletype { +func (o *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) GetFiletype() *SourceMicrosoftSharepointUpdateSchemasStreamsFormatFormatFiletype { return SourceMicrosoftSharepointUpdateSchemasStreamsFormatFormatFiletypeUnstructured.ToPointer() } -func (o *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) GetProcessing() *SourceMicrosoftSharepointUpdateProcessing { +func (o *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) GetProcessing() *SourceMicrosoftSharepointUpdateProcessing { if o == nil { return nil } return o.Processing } -func (o *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) GetStrategy() *SourceMicrosoftSharepointUpdateParsingStrategy { +func (o *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) GetStrategy() *SourceMicrosoftSharepointUpdateParsingStrategy { if o == nil { return nil } @@ -979,20 +979,20 @@ func (o *SourceMicrosoftSharepointUpdateAvroFormat) GetFiletype() *SourceMicroso type SourceMicrosoftSharepointUpdateFormatType string const ( - SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateAvroFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Avro Format" - SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateCSVFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_CSV Format" - SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateJsonlFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Jsonl Format" - SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateParquetFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Parquet Format" - SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Document File Type Format (Experimental)" + SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateAvroFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Avro Format" + SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateCSVFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_CSV Format" + SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateJsonlFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Jsonl Format" + SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateParquetFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Parquet Format" + SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateUnstructuredDocumentFormat SourceMicrosoftSharepointUpdateFormatType = "source-microsoft-sharepoint-update_Unstructured Document Format" ) // SourceMicrosoftSharepointUpdateFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceMicrosoftSharepointUpdateFormat struct { - SourceMicrosoftSharepointUpdateAvroFormat *SourceMicrosoftSharepointUpdateAvroFormat - SourceMicrosoftSharepointUpdateCSVFormat *SourceMicrosoftSharepointUpdateCSVFormat - SourceMicrosoftSharepointUpdateJsonlFormat *SourceMicrosoftSharepointUpdateJsonlFormat - SourceMicrosoftSharepointUpdateParquetFormat *SourceMicrosoftSharepointUpdateParquetFormat - SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental *SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental + SourceMicrosoftSharepointUpdateAvroFormat *SourceMicrosoftSharepointUpdateAvroFormat + SourceMicrosoftSharepointUpdateCSVFormat *SourceMicrosoftSharepointUpdateCSVFormat + SourceMicrosoftSharepointUpdateJsonlFormat *SourceMicrosoftSharepointUpdateJsonlFormat + SourceMicrosoftSharepointUpdateParquetFormat *SourceMicrosoftSharepointUpdateParquetFormat + SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat *SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat Type SourceMicrosoftSharepointUpdateFormatType } @@ -1033,11 +1033,11 @@ func CreateSourceMicrosoftSharepointUpdateFormatSourceMicrosoftSharepointUpdateP } } -func CreateSourceMicrosoftSharepointUpdateFormatSourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental(sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental) SourceMicrosoftSharepointUpdateFormat { - typ := SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental +func CreateSourceMicrosoftSharepointUpdateFormatSourceMicrosoftSharepointUpdateUnstructuredDocumentFormat(sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat) SourceMicrosoftSharepointUpdateFormat { + typ := SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateUnstructuredDocumentFormat return SourceMicrosoftSharepointUpdateFormat{ - SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental: &sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental, + SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat: &sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat, Type: typ, } } @@ -1065,10 +1065,10 @@ func (u *SourceMicrosoftSharepointUpdateFormat) UnmarshalJSON(data []byte) error return nil } - var sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental = SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental = &sourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental - u.Type = SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental + var sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat = SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat, "", true, true); err == nil { + u.SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat = &sourceMicrosoftSharepointUpdateUnstructuredDocumentFormat + u.Type = SourceMicrosoftSharepointUpdateFormatTypeSourceMicrosoftSharepointUpdateUnstructuredDocumentFormat return nil } @@ -1099,8 +1099,8 @@ func (u SourceMicrosoftSharepointUpdateFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceMicrosoftSharepointUpdateParquetFormat, "", true) } - if u.SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceMicrosoftSharepointUpdateDocumentFileTypeFormatExperimental, "", true) + if u.SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.SourceMicrosoftSharepointUpdateUnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceMicrosoftSharepointUpdateFormat: all fields are null") diff --git a/internal/sdk/models/shared/sourcemysql.go b/internal/sdk/models/shared/sourcemysql.go index 558885412..b9103f325 100644 --- a/internal/sdk/models/shared/sourcemysql.go +++ b/internal/sdk/models/shared/sourcemysql.go @@ -104,6 +104,8 @@ func (e *SourceMysqlMethod) UnmarshalJSON(data []byte) error { // SourceMysqlReadChangesUsingBinaryLogCDC - Recommended - Incrementally reads new inserts, updates, and deletes using the MySQL binary log. This must be enabled on your database. type SourceMysqlReadChangesUsingBinaryLogCDC struct { + // The amount of time an initial load is allowed to continue for before catching up on CDC logs. + InitialLoadTimeoutHours *int64 `default:"8" json:"initial_load_timeout_hours"` // The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 1200 seconds. Read about initial waiting time. InitialWaitingSeconds *int64 `default:"300" json:"initial_waiting_seconds"` // Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss. @@ -124,6 +126,13 @@ func (s *SourceMysqlReadChangesUsingBinaryLogCDC) UnmarshalJSON(data []byte) err return nil } +func (o *SourceMysqlReadChangesUsingBinaryLogCDC) GetInitialLoadTimeoutHours() *int64 { + if o == nil { + return nil + } + return o.InitialLoadTimeoutHours +} + func (o *SourceMysqlReadChangesUsingBinaryLogCDC) GetInitialWaitingSeconds() *int64 { if o == nil { return nil diff --git a/internal/sdk/models/shared/sourcemysqlupdate.go b/internal/sdk/models/shared/sourcemysqlupdate.go index ea65a7a8f..9f4dbd191 100644 --- a/internal/sdk/models/shared/sourcemysqlupdate.go +++ b/internal/sdk/models/shared/sourcemysqlupdate.go @@ -104,6 +104,8 @@ func (e *SourceMysqlUpdateSchemasReplicationMethodMethod) UnmarshalJSON(data []b // ReadChangesUsingBinaryLogCDC - Recommended - Incrementally reads new inserts, updates, and deletes using the MySQL binary log. This must be enabled on your database. type ReadChangesUsingBinaryLogCDC struct { + // The amount of time an initial load is allowed to continue for before catching up on CDC logs. + InitialLoadTimeoutHours *int64 `default:"8" json:"initial_load_timeout_hours"` // The amount of time the connector will wait when it launches to determine if there is new data to sync or not. Defaults to 300 seconds. Valid range: 120 seconds to 1200 seconds. Read about initial waiting time. InitialWaitingSeconds *int64 `default:"300" json:"initial_waiting_seconds"` // Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss. @@ -124,6 +126,13 @@ func (r *ReadChangesUsingBinaryLogCDC) UnmarshalJSON(data []byte) error { return nil } +func (o *ReadChangesUsingBinaryLogCDC) GetInitialLoadTimeoutHours() *int64 { + if o == nil { + return nil + } + return o.InitialLoadTimeoutHours +} + func (o *ReadChangesUsingBinaryLogCDC) GetInitialWaitingSeconds() *int64 { if o == nil { return nil diff --git a/internal/sdk/models/shared/sourcenytimes.go b/internal/sdk/models/shared/sourcenytimes.go index ef6be6760..adb21f77e 100644 --- a/internal/sdk/models/shared/sourcenytimes.go +++ b/internal/sdk/models/shared/sourcenytimes.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" ) // SourceNytimesPeriodUsedForMostPopularStreams - Period of time (in days) @@ -90,14 +89,14 @@ type SourceNytimes struct { // API Key APIKey string `json:"api_key"` // End date to stop the article retrieval (format YYYY-MM) - EndDate *types.Date `json:"end_date,omitempty"` + EndDate *string `json:"end_date,omitempty"` // Period of time (in days) Period SourceNytimesPeriodUsedForMostPopularStreams `json:"period"` // Share Type ShareType *SourceNytimesShareTypeUsedForMostPopularSharedStream `json:"share_type,omitempty"` sourceType Nytimes `const:"nytimes" json:"sourceType"` // Start date to begin the article retrieval (format YYYY-MM) - StartDate types.Date `json:"start_date"` + StartDate string `json:"start_date"` } func (s SourceNytimes) MarshalJSON() ([]byte, error) { @@ -118,7 +117,7 @@ func (o *SourceNytimes) GetAPIKey() string { return o.APIKey } -func (o *SourceNytimes) GetEndDate() *types.Date { +func (o *SourceNytimes) GetEndDate() *string { if o == nil { return nil } @@ -143,9 +142,9 @@ func (o *SourceNytimes) GetSourceType() Nytimes { return NytimesNytimes } -func (o *SourceNytimes) GetStartDate() types.Date { +func (o *SourceNytimes) GetStartDate() string { if o == nil { - return types.Date{} + return "" } return o.StartDate } diff --git a/internal/sdk/models/shared/sourcenytimesupdate.go b/internal/sdk/models/shared/sourcenytimesupdate.go index 7e466605a..31a0bdca0 100644 --- a/internal/sdk/models/shared/sourcenytimesupdate.go +++ b/internal/sdk/models/shared/sourcenytimesupdate.go @@ -5,8 +5,6 @@ package shared import ( "encoding/json" "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/types" ) // PeriodUsedForMostPopularStreams - Period of time (in days) @@ -67,24 +65,13 @@ type SourceNytimesUpdate struct { // API Key APIKey string `json:"api_key"` // End date to stop the article retrieval (format YYYY-MM) - EndDate *types.Date `json:"end_date,omitempty"` + EndDate *string `json:"end_date,omitempty"` // Period of time (in days) Period PeriodUsedForMostPopularStreams `json:"period"` // Share Type ShareType *ShareTypeUsedForMostPopularSharedStream `json:"share_type,omitempty"` // Start date to begin the article retrieval (format YYYY-MM) - StartDate types.Date `json:"start_date"` -} - -func (s SourceNytimesUpdate) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourceNytimesUpdate) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { - return err - } - return nil + StartDate string `json:"start_date"` } func (o *SourceNytimesUpdate) GetAPIKey() string { @@ -94,7 +81,7 @@ func (o *SourceNytimesUpdate) GetAPIKey() string { return o.APIKey } -func (o *SourceNytimesUpdate) GetEndDate() *types.Date { +func (o *SourceNytimesUpdate) GetEndDate() *string { if o == nil { return nil } @@ -115,9 +102,9 @@ func (o *SourceNytimesUpdate) GetShareType() *ShareTypeUsedForMostPopularSharedS return o.ShareType } -func (o *SourceNytimesUpdate) GetStartDate() types.Date { +func (o *SourceNytimesUpdate) GetStartDate() string { if o == nil { - return types.Date{} + return "" } return o.StartDate } diff --git a/internal/sdk/models/shared/sourceoracleupdate.go b/internal/sdk/models/shared/sourceoracleupdate.go index 719545136..872e42659 100644 --- a/internal/sdk/models/shared/sourceoracleupdate.go +++ b/internal/sdk/models/shared/sourceoracleupdate.go @@ -309,11 +309,11 @@ func (o *NativeNetworkEncryptionNNE) GetEncryptionMethod() EncryptionMethod { return EncryptionMethodClientNne } -type EncryptionUnionType string +type EncryptionType string const ( - EncryptionUnionTypeNativeNetworkEncryptionNNE EncryptionUnionType = "Native Network Encryption (NNE)" - EncryptionUnionTypeTLSEncryptedVerifyCertificate EncryptionUnionType = "TLS Encrypted (verify certificate)" + EncryptionTypeNativeNetworkEncryptionNNE EncryptionType = "Native Network Encryption (NNE)" + EncryptionTypeTLSEncryptedVerifyCertificate EncryptionType = "TLS Encrypted (verify certificate)" ) // Encryption - The encryption method with is used when communicating with the database. @@ -321,11 +321,11 @@ type Encryption struct { NativeNetworkEncryptionNNE *NativeNetworkEncryptionNNE TLSEncryptedVerifyCertificate *TLSEncryptedVerifyCertificate - Type EncryptionUnionType + Type EncryptionType } func CreateEncryptionNativeNetworkEncryptionNNE(nativeNetworkEncryptionNNE NativeNetworkEncryptionNNE) Encryption { - typ := EncryptionUnionTypeNativeNetworkEncryptionNNE + typ := EncryptionTypeNativeNetworkEncryptionNNE return Encryption{ NativeNetworkEncryptionNNE: &nativeNetworkEncryptionNNE, @@ -334,7 +334,7 @@ func CreateEncryptionNativeNetworkEncryptionNNE(nativeNetworkEncryptionNNE Nativ } func CreateEncryptionTLSEncryptedVerifyCertificate(tlsEncryptedVerifyCertificate TLSEncryptedVerifyCertificate) Encryption { - typ := EncryptionUnionTypeTLSEncryptedVerifyCertificate + typ := EncryptionTypeTLSEncryptedVerifyCertificate return Encryption{ TLSEncryptedVerifyCertificate: &tlsEncryptedVerifyCertificate, @@ -347,14 +347,14 @@ func (u *Encryption) UnmarshalJSON(data []byte) error { var nativeNetworkEncryptionNNE NativeNetworkEncryptionNNE = NativeNetworkEncryptionNNE{} if err := utils.UnmarshalJSON(data, &nativeNetworkEncryptionNNE, "", true, true); err == nil { u.NativeNetworkEncryptionNNE = &nativeNetworkEncryptionNNE - u.Type = EncryptionUnionTypeNativeNetworkEncryptionNNE + u.Type = EncryptionTypeNativeNetworkEncryptionNNE return nil } var tlsEncryptedVerifyCertificate TLSEncryptedVerifyCertificate = TLSEncryptedVerifyCertificate{} if err := utils.UnmarshalJSON(data, &tlsEncryptedVerifyCertificate, "", true, true); err == nil { u.TLSEncryptedVerifyCertificate = &tlsEncryptedVerifyCertificate - u.Type = EncryptionUnionTypeTLSEncryptedVerifyCertificate + u.Type = EncryptionTypeTLSEncryptedVerifyCertificate return nil } diff --git a/internal/sdk/models/shared/sourceorb.go b/internal/sdk/models/shared/sourceorb.go index 4e463e689..78df58047 100644 --- a/internal/sdk/models/shared/sourceorb.go +++ b/internal/sdk/models/shared/sourceorb.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" + "time" ) type Orb string @@ -44,7 +45,7 @@ type SourceOrb struct { PlanID *string `json:"plan_id,omitempty"` sourceType Orb `const:"orb" json:"sourceType"` // UTC date and time in the format 2022-03-01T00:00:00Z. Any data with created_at before this data will not be synced. For Subscription Usage, this becomes the `timeframe_start` API parameter. - StartDate string `json:"start_date"` + StartDate time.Time `json:"start_date"` // Property key names to extract from all events, in order to enrich ledger entries corresponding to an event deduction. StringEventPropertiesKeys []string `json:"string_event_properties_keys,omitempty"` // Property key name to group subscription usage by. @@ -101,9 +102,9 @@ func (o *SourceOrb) GetSourceType() Orb { return OrbOrb } -func (o *SourceOrb) GetStartDate() string { +func (o *SourceOrb) GetStartDate() time.Time { if o == nil { - return "" + return time.Time{} } return o.StartDate } diff --git a/internal/sdk/models/shared/sourceorbupdate.go b/internal/sdk/models/shared/sourceorbupdate.go index 199749495..41f6ea2db 100644 --- a/internal/sdk/models/shared/sourceorbupdate.go +++ b/internal/sdk/models/shared/sourceorbupdate.go @@ -4,6 +4,7 @@ package shared import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" + "time" ) type SourceOrbUpdate struct { @@ -18,7 +19,7 @@ type SourceOrbUpdate struct { // Orb Plan ID to filter subscriptions that should have usage fetched. PlanID *string `json:"plan_id,omitempty"` // UTC date and time in the format 2022-03-01T00:00:00Z. Any data with created_at before this data will not be synced. For Subscription Usage, this becomes the `timeframe_start` API parameter. - StartDate string `json:"start_date"` + StartDate time.Time `json:"start_date"` // Property key names to extract from all events, in order to enrich ledger entries corresponding to an event deduction. StringEventPropertiesKeys []string `json:"string_event_properties_keys,omitempty"` // Property key name to group subscription usage by. @@ -71,9 +72,9 @@ func (o *SourceOrbUpdate) GetPlanID() *string { return o.PlanID } -func (o *SourceOrbUpdate) GetStartDate() string { +func (o *SourceOrbUpdate) GetStartDate() time.Time { if o == nil { - return "" + return time.Time{} } return o.StartDate } diff --git a/internal/sdk/models/shared/sourcepunkapi.go b/internal/sdk/models/shared/sourcepunkapi.go deleted file mode 100644 index ce1486dd3..000000000 --- a/internal/sdk/models/shared/sourcepunkapi.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -import ( - "encoding/json" - "fmt" - "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" -) - -type PunkAPI string - -const ( - PunkAPIPunkAPI PunkAPI = "punk-api" -) - -func (e PunkAPI) ToPointer() *PunkAPI { - return &e -} -func (e *PunkAPI) UnmarshalJSON(data []byte) error { - var v string - if err := json.Unmarshal(data, &v); err != nil { - return err - } - switch v { - case "punk-api": - *e = PunkAPI(v) - return nil - default: - return fmt.Errorf("invalid value for PunkAPI: %v", v) - } -} - -type SourcePunkAPI struct { - // To extract specific data with Unique ID - BrewedAfter string `json:"brewed_after"` - // To extract specific data with Unique ID - BrewedBefore string `json:"brewed_before"` - // To extract specific data with Unique ID - ID *string `json:"id,omitempty"` - sourceType PunkAPI `const:"punk-api" json:"sourceType"` -} - -func (s SourcePunkAPI) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(s, "", false) -} - -func (s *SourcePunkAPI) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil { - return err - } - return nil -} - -func (o *SourcePunkAPI) GetBrewedAfter() string { - if o == nil { - return "" - } - return o.BrewedAfter -} - -func (o *SourcePunkAPI) GetBrewedBefore() string { - if o == nil { - return "" - } - return o.BrewedBefore -} - -func (o *SourcePunkAPI) GetID() *string { - if o == nil { - return nil - } - return o.ID -} - -func (o *SourcePunkAPI) GetSourceType() PunkAPI { - return PunkAPIPunkAPI -} diff --git a/internal/sdk/models/shared/sourcepunkapiupdate.go b/internal/sdk/models/shared/sourcepunkapiupdate.go deleted file mode 100644 index 53f27ff93..000000000 --- a/internal/sdk/models/shared/sourcepunkapiupdate.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - -package shared - -type SourcePunkAPIUpdate struct { - // To extract specific data with Unique ID - BrewedAfter string `json:"brewed_after"` - // To extract specific data with Unique ID - BrewedBefore string `json:"brewed_before"` - // To extract specific data with Unique ID - ID *string `json:"id,omitempty"` -} - -func (o *SourcePunkAPIUpdate) GetBrewedAfter() string { - if o == nil { - return "" - } - return o.BrewedAfter -} - -func (o *SourcePunkAPIUpdate) GetBrewedBefore() string { - if o == nil { - return "" - } - return o.BrewedBefore -} - -func (o *SourcePunkAPIUpdate) GetID() *string { - if o == nil { - return nil - } - return o.ID -} diff --git a/internal/sdk/models/shared/sources3.go b/internal/sdk/models/shared/sources3.go index 76f6fb058..0fc312401 100644 --- a/internal/sdk/models/shared/sources3.go +++ b/internal/sdk/models/shared/sources3.go @@ -715,8 +715,8 @@ func (e *SourceS3ParsingStrategy) UnmarshalJSON(data []byte) error { } } -// SourceS3DocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceS3DocumentFileTypeFormatExperimental struct { +// SourceS3UnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type SourceS3UnstructuredDocumentFormat struct { filetype *SourceS3SchemasStreamsFormatFormat5Filetype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceS3Processing `json:"processing,omitempty"` @@ -726,36 +726,36 @@ type SourceS3DocumentFileTypeFormatExperimental struct { Strategy *SourceS3ParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceS3DocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { +func (s SourceS3UnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *SourceS3DocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { +func (s *SourceS3UnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *SourceS3DocumentFileTypeFormatExperimental) GetFiletype() *SourceS3SchemasStreamsFormatFormat5Filetype { +func (o *SourceS3UnstructuredDocumentFormat) GetFiletype() *SourceS3SchemasStreamsFormatFormat5Filetype { return SourceS3SchemasStreamsFormatFormat5FiletypeUnstructured.ToPointer() } -func (o *SourceS3DocumentFileTypeFormatExperimental) GetProcessing() *SourceS3Processing { +func (o *SourceS3UnstructuredDocumentFormat) GetProcessing() *SourceS3Processing { if o == nil { return nil } return o.Processing } -func (o *SourceS3DocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *SourceS3UnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceS3DocumentFileTypeFormatExperimental) GetStrategy() *SourceS3ParsingStrategy { +func (o *SourceS3UnstructuredDocumentFormat) GetStrategy() *SourceS3ParsingStrategy { if o == nil { return nil } @@ -1325,20 +1325,20 @@ func (o *SourceS3AvroFormat) GetFiletype() *SourceS3SchemasStreamsFiletype { type SourceS3FormatType string const ( - SourceS3FormatTypeSourceS3AvroFormat SourceS3FormatType = "source-s3_Avro Format" - SourceS3FormatTypeSourceS3CSVFormat SourceS3FormatType = "source-s3_CSV Format" - SourceS3FormatTypeSourceS3JsonlFormat SourceS3FormatType = "source-s3_Jsonl Format" - SourceS3FormatTypeSourceS3ParquetFormat SourceS3FormatType = "source-s3_Parquet Format" - SourceS3FormatTypeSourceS3DocumentFileTypeFormatExperimental SourceS3FormatType = "source-s3_Document File Type Format (Experimental)" + SourceS3FormatTypeSourceS3AvroFormat SourceS3FormatType = "source-s3_Avro Format" + SourceS3FormatTypeSourceS3CSVFormat SourceS3FormatType = "source-s3_CSV Format" + SourceS3FormatTypeSourceS3JsonlFormat SourceS3FormatType = "source-s3_Jsonl Format" + SourceS3FormatTypeSourceS3ParquetFormat SourceS3FormatType = "source-s3_Parquet Format" + SourceS3FormatTypeSourceS3UnstructuredDocumentFormat SourceS3FormatType = "source-s3_Unstructured Document Format" ) // SourceS3Format - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceS3Format struct { - SourceS3AvroFormat *SourceS3AvroFormat - SourceS3CSVFormat *SourceS3CSVFormat - SourceS3JsonlFormat *SourceS3JsonlFormat - SourceS3ParquetFormat *SourceS3ParquetFormat - SourceS3DocumentFileTypeFormatExperimental *SourceS3DocumentFileTypeFormatExperimental + SourceS3AvroFormat *SourceS3AvroFormat + SourceS3CSVFormat *SourceS3CSVFormat + SourceS3JsonlFormat *SourceS3JsonlFormat + SourceS3ParquetFormat *SourceS3ParquetFormat + SourceS3UnstructuredDocumentFormat *SourceS3UnstructuredDocumentFormat Type SourceS3FormatType } @@ -1379,12 +1379,12 @@ func CreateSourceS3FormatSourceS3ParquetFormat(sourceS3ParquetFormat SourceS3Par } } -func CreateSourceS3FormatSourceS3DocumentFileTypeFormatExperimental(sourceS3DocumentFileTypeFormatExperimental SourceS3DocumentFileTypeFormatExperimental) SourceS3Format { - typ := SourceS3FormatTypeSourceS3DocumentFileTypeFormatExperimental +func CreateSourceS3FormatSourceS3UnstructuredDocumentFormat(sourceS3UnstructuredDocumentFormat SourceS3UnstructuredDocumentFormat) SourceS3Format { + typ := SourceS3FormatTypeSourceS3UnstructuredDocumentFormat return SourceS3Format{ - SourceS3DocumentFileTypeFormatExperimental: &sourceS3DocumentFileTypeFormatExperimental, - Type: typ, + SourceS3UnstructuredDocumentFormat: &sourceS3UnstructuredDocumentFormat, + Type: typ, } } @@ -1411,10 +1411,10 @@ func (u *SourceS3Format) UnmarshalJSON(data []byte) error { return nil } - var sourceS3DocumentFileTypeFormatExperimental SourceS3DocumentFileTypeFormatExperimental = SourceS3DocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceS3DocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceS3DocumentFileTypeFormatExperimental = &sourceS3DocumentFileTypeFormatExperimental - u.Type = SourceS3FormatTypeSourceS3DocumentFileTypeFormatExperimental + var sourceS3UnstructuredDocumentFormat SourceS3UnstructuredDocumentFormat = SourceS3UnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &sourceS3UnstructuredDocumentFormat, "", true, true); err == nil { + u.SourceS3UnstructuredDocumentFormat = &sourceS3UnstructuredDocumentFormat + u.Type = SourceS3FormatTypeSourceS3UnstructuredDocumentFormat return nil } @@ -1445,8 +1445,8 @@ func (u SourceS3Format) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceS3ParquetFormat, "", true) } - if u.SourceS3DocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceS3DocumentFileTypeFormatExperimental, "", true) + if u.SourceS3UnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.SourceS3UnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceS3Format: all fields are null") diff --git a/internal/sdk/models/shared/sources3update.go b/internal/sdk/models/shared/sources3update.go index a9f49b0da..302fa730a 100644 --- a/internal/sdk/models/shared/sources3update.go +++ b/internal/sdk/models/shared/sources3update.go @@ -692,8 +692,8 @@ func (e *SourceS3UpdateParsingStrategy) UnmarshalJSON(data []byte) error { } } -// SourceS3UpdateDocumentFileTypeFormatExperimental - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. -type SourceS3UpdateDocumentFileTypeFormatExperimental struct { +// SourceS3UpdateUnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file. +type SourceS3UpdateUnstructuredDocumentFormat struct { filetype *SourceS3UpdateSchemasStreamsFormatFormat5Filetype `const:"unstructured" json:"filetype"` // Processing configuration Processing *SourceS3UpdateProcessing `json:"processing,omitempty"` @@ -703,36 +703,36 @@ type SourceS3UpdateDocumentFileTypeFormatExperimental struct { Strategy *SourceS3UpdateParsingStrategy `default:"auto" json:"strategy"` } -func (s SourceS3UpdateDocumentFileTypeFormatExperimental) MarshalJSON() ([]byte, error) { +func (s SourceS3UpdateUnstructuredDocumentFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(s, "", false) } -func (s *SourceS3UpdateDocumentFileTypeFormatExperimental) UnmarshalJSON(data []byte) error { +func (s *SourceS3UpdateUnstructuredDocumentFormat) UnmarshalJSON(data []byte) error { if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { return err } return nil } -func (o *SourceS3UpdateDocumentFileTypeFormatExperimental) GetFiletype() *SourceS3UpdateSchemasStreamsFormatFormat5Filetype { +func (o *SourceS3UpdateUnstructuredDocumentFormat) GetFiletype() *SourceS3UpdateSchemasStreamsFormatFormat5Filetype { return SourceS3UpdateSchemasStreamsFormatFormat5FiletypeUnstructured.ToPointer() } -func (o *SourceS3UpdateDocumentFileTypeFormatExperimental) GetProcessing() *SourceS3UpdateProcessing { +func (o *SourceS3UpdateUnstructuredDocumentFormat) GetProcessing() *SourceS3UpdateProcessing { if o == nil { return nil } return o.Processing } -func (o *SourceS3UpdateDocumentFileTypeFormatExperimental) GetSkipUnprocessableFiles() *bool { +func (o *SourceS3UpdateUnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool { if o == nil { return nil } return o.SkipUnprocessableFiles } -func (o *SourceS3UpdateDocumentFileTypeFormatExperimental) GetStrategy() *SourceS3UpdateParsingStrategy { +func (o *SourceS3UpdateUnstructuredDocumentFormat) GetStrategy() *SourceS3UpdateParsingStrategy { if o == nil { return nil } @@ -1302,20 +1302,20 @@ func (o *SourceS3UpdateAvroFormat) GetFiletype() *SourceS3UpdateSchemasStreamsFi type SourceS3UpdateFormatType string const ( - SourceS3UpdateFormatTypeSourceS3UpdateAvroFormat SourceS3UpdateFormatType = "source-s3-update_Avro Format" - SourceS3UpdateFormatTypeSourceS3UpdateCSVFormat SourceS3UpdateFormatType = "source-s3-update_CSV Format" - SourceS3UpdateFormatTypeSourceS3UpdateJsonlFormat SourceS3UpdateFormatType = "source-s3-update_Jsonl Format" - SourceS3UpdateFormatTypeSourceS3UpdateParquetFormat SourceS3UpdateFormatType = "source-s3-update_Parquet Format" - SourceS3UpdateFormatTypeSourceS3UpdateDocumentFileTypeFormatExperimental SourceS3UpdateFormatType = "source-s3-update_Document File Type Format (Experimental)" + SourceS3UpdateFormatTypeSourceS3UpdateAvroFormat SourceS3UpdateFormatType = "source-s3-update_Avro Format" + SourceS3UpdateFormatTypeSourceS3UpdateCSVFormat SourceS3UpdateFormatType = "source-s3-update_CSV Format" + SourceS3UpdateFormatTypeSourceS3UpdateJsonlFormat SourceS3UpdateFormatType = "source-s3-update_Jsonl Format" + SourceS3UpdateFormatTypeSourceS3UpdateParquetFormat SourceS3UpdateFormatType = "source-s3-update_Parquet Format" + SourceS3UpdateFormatTypeSourceS3UpdateUnstructuredDocumentFormat SourceS3UpdateFormatType = "source-s3-update_Unstructured Document Format" ) // SourceS3UpdateFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting. type SourceS3UpdateFormat struct { - SourceS3UpdateAvroFormat *SourceS3UpdateAvroFormat - SourceS3UpdateCSVFormat *SourceS3UpdateCSVFormat - SourceS3UpdateJsonlFormat *SourceS3UpdateJsonlFormat - SourceS3UpdateParquetFormat *SourceS3UpdateParquetFormat - SourceS3UpdateDocumentFileTypeFormatExperimental *SourceS3UpdateDocumentFileTypeFormatExperimental + SourceS3UpdateAvroFormat *SourceS3UpdateAvroFormat + SourceS3UpdateCSVFormat *SourceS3UpdateCSVFormat + SourceS3UpdateJsonlFormat *SourceS3UpdateJsonlFormat + SourceS3UpdateParquetFormat *SourceS3UpdateParquetFormat + SourceS3UpdateUnstructuredDocumentFormat *SourceS3UpdateUnstructuredDocumentFormat Type SourceS3UpdateFormatType } @@ -1356,12 +1356,12 @@ func CreateSourceS3UpdateFormatSourceS3UpdateParquetFormat(sourceS3UpdateParquet } } -func CreateSourceS3UpdateFormatSourceS3UpdateDocumentFileTypeFormatExperimental(sourceS3UpdateDocumentFileTypeFormatExperimental SourceS3UpdateDocumentFileTypeFormatExperimental) SourceS3UpdateFormat { - typ := SourceS3UpdateFormatTypeSourceS3UpdateDocumentFileTypeFormatExperimental +func CreateSourceS3UpdateFormatSourceS3UpdateUnstructuredDocumentFormat(sourceS3UpdateUnstructuredDocumentFormat SourceS3UpdateUnstructuredDocumentFormat) SourceS3UpdateFormat { + typ := SourceS3UpdateFormatTypeSourceS3UpdateUnstructuredDocumentFormat return SourceS3UpdateFormat{ - SourceS3UpdateDocumentFileTypeFormatExperimental: &sourceS3UpdateDocumentFileTypeFormatExperimental, - Type: typ, + SourceS3UpdateUnstructuredDocumentFormat: &sourceS3UpdateUnstructuredDocumentFormat, + Type: typ, } } @@ -1388,10 +1388,10 @@ func (u *SourceS3UpdateFormat) UnmarshalJSON(data []byte) error { return nil } - var sourceS3UpdateDocumentFileTypeFormatExperimental SourceS3UpdateDocumentFileTypeFormatExperimental = SourceS3UpdateDocumentFileTypeFormatExperimental{} - if err := utils.UnmarshalJSON(data, &sourceS3UpdateDocumentFileTypeFormatExperimental, "", true, true); err == nil { - u.SourceS3UpdateDocumentFileTypeFormatExperimental = &sourceS3UpdateDocumentFileTypeFormatExperimental - u.Type = SourceS3UpdateFormatTypeSourceS3UpdateDocumentFileTypeFormatExperimental + var sourceS3UpdateUnstructuredDocumentFormat SourceS3UpdateUnstructuredDocumentFormat = SourceS3UpdateUnstructuredDocumentFormat{} + if err := utils.UnmarshalJSON(data, &sourceS3UpdateUnstructuredDocumentFormat, "", true, true); err == nil { + u.SourceS3UpdateUnstructuredDocumentFormat = &sourceS3UpdateUnstructuredDocumentFormat + u.Type = SourceS3UpdateFormatTypeSourceS3UpdateUnstructuredDocumentFormat return nil } @@ -1422,8 +1422,8 @@ func (u SourceS3UpdateFormat) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceS3UpdateParquetFormat, "", true) } - if u.SourceS3UpdateDocumentFileTypeFormatExperimental != nil { - return utils.MarshalJSON(u.SourceS3UpdateDocumentFileTypeFormatExperimental, "", true) + if u.SourceS3UpdateUnstructuredDocumentFormat != nil { + return utils.MarshalJSON(u.SourceS3UpdateUnstructuredDocumentFormat, "", true) } return nil, errors.New("could not marshal union type SourceS3UpdateFormat: all fields are null") diff --git a/internal/sdk/models/shared/sourceshopify.go b/internal/sdk/models/shared/sourceshopify.go index 2cb135dd8..d116381dc 100644 --- a/internal/sdk/models/shared/sourceshopify.go +++ b/internal/sdk/models/shared/sourceshopify.go @@ -226,6 +226,8 @@ type SourceShopify struct { Credentials *SourceShopifyShopifyAuthorizationMethod `json:"credentials,omitempty"` // Defines which API type (REST/BULK) to use to fetch `Transactions` data. If you are a `Shopify Plus` user, leave the default value to speed up the fetch. FetchTransactionsUserID *bool `default:"false" json:"fetch_transactions_user_id"` + // The max time in seconds, after which the single BULK Job should be `CANCELED` and retried. The bigger the value the longer the BULK Job is allowed to run. + JobTerminationThreshold *int64 `default:"3600" json:"job_termination_threshold"` // The name of your Shopify store found in the URL. For example, if your URL was https://NAME.myshopify.com, then the name would be 'NAME' or 'NAME.myshopify.com'. Shop string `json:"shop"` sourceType Shopify `const:"shopify" json:"sourceType"` @@ -265,6 +267,13 @@ func (o *SourceShopify) GetFetchTransactionsUserID() *bool { return o.FetchTransactionsUserID } +func (o *SourceShopify) GetJobTerminationThreshold() *int64 { + if o == nil { + return nil + } + return o.JobTerminationThreshold +} + func (o *SourceShopify) GetShop() string { if o == nil { return "" diff --git a/internal/sdk/models/shared/sourceshopifyupdate.go b/internal/sdk/models/shared/sourceshopifyupdate.go index 33cf696f4..ae726208d 100644 --- a/internal/sdk/models/shared/sourceshopifyupdate.go +++ b/internal/sdk/models/shared/sourceshopifyupdate.go @@ -203,6 +203,8 @@ type SourceShopifyUpdate struct { Credentials *ShopifyAuthorizationMethod `json:"credentials,omitempty"` // Defines which API type (REST/BULK) to use to fetch `Transactions` data. If you are a `Shopify Plus` user, leave the default value to speed up the fetch. FetchTransactionsUserID *bool `default:"false" json:"fetch_transactions_user_id"` + // The max time in seconds, after which the single BULK Job should be `CANCELED` and retried. The bigger the value the longer the BULK Job is allowed to run. + JobTerminationThreshold *int64 `default:"3600" json:"job_termination_threshold"` // The name of your Shopify store found in the URL. For example, if your URL was https://NAME.myshopify.com, then the name would be 'NAME' or 'NAME.myshopify.com'. Shop string `json:"shop"` // The date you would like to replicate data from. Format: YYYY-MM-DD. Any data before this date will not be replicated. @@ -241,6 +243,13 @@ func (o *SourceShopifyUpdate) GetFetchTransactionsUserID() *bool { return o.FetchTransactionsUserID } +func (o *SourceShopifyUpdate) GetJobTerminationThreshold() *int64 { + if o == nil { + return nil + } + return o.JobTerminationThreshold +} + func (o *SourceShopifyUpdate) GetShop() string { if o == nil { return "" diff --git a/internal/sdk/models/shared/sourcesnowflake.go b/internal/sdk/models/shared/sourcesnowflake.go index 43fc64fc4..248bb36d5 100644 --- a/internal/sdk/models/shared/sourcesnowflake.go +++ b/internal/sdk/models/shared/sourcesnowflake.go @@ -9,31 +9,31 @@ import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" ) -type SourceSnowflakeSchemasAuthType string +type SourceSnowflakeSchemasCredentialsAuthType string const ( - SourceSnowflakeSchemasAuthTypeUsernamePassword SourceSnowflakeSchemasAuthType = "username/password" + SourceSnowflakeSchemasCredentialsAuthTypeUsernamePassword SourceSnowflakeSchemasCredentialsAuthType = "username/password" ) -func (e SourceSnowflakeSchemasAuthType) ToPointer() *SourceSnowflakeSchemasAuthType { +func (e SourceSnowflakeSchemasCredentialsAuthType) ToPointer() *SourceSnowflakeSchemasCredentialsAuthType { return &e } -func (e *SourceSnowflakeSchemasAuthType) UnmarshalJSON(data []byte) error { +func (e *SourceSnowflakeSchemasCredentialsAuthType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "username/password": - *e = SourceSnowflakeSchemasAuthType(v) + *e = SourceSnowflakeSchemasCredentialsAuthType(v) return nil default: - return fmt.Errorf("invalid value for SourceSnowflakeSchemasAuthType: %v", v) + return fmt.Errorf("invalid value for SourceSnowflakeSchemasCredentialsAuthType: %v", v) } } type SourceSnowflakeUsernameAndPassword struct { - authType SourceSnowflakeSchemasAuthType `const:"username/password" json:"auth_type"` + authType SourceSnowflakeSchemasCredentialsAuthType `const:"username/password" json:"auth_type"` // The password associated with the username. Password string `json:"password"` // The username you created to allow Airbyte to access the database. @@ -51,8 +51,8 @@ func (s *SourceSnowflakeUsernameAndPassword) UnmarshalJSON(data []byte) error { return nil } -func (o *SourceSnowflakeUsernameAndPassword) GetAuthType() SourceSnowflakeSchemasAuthType { - return SourceSnowflakeSchemasAuthTypeUsernamePassword +func (o *SourceSnowflakeUsernameAndPassword) GetAuthType() SourceSnowflakeSchemasCredentialsAuthType { + return SourceSnowflakeSchemasCredentialsAuthTypeUsernamePassword } func (o *SourceSnowflakeUsernameAndPassword) GetPassword() string { @@ -69,6 +69,75 @@ func (o *SourceSnowflakeUsernameAndPassword) GetUsername() string { return o.Username } +type SourceSnowflakeSchemasAuthType string + +const ( + SourceSnowflakeSchemasAuthTypeKeyPairAuthentication SourceSnowflakeSchemasAuthType = "Key Pair Authentication" +) + +func (e SourceSnowflakeSchemasAuthType) ToPointer() *SourceSnowflakeSchemasAuthType { + return &e +} +func (e *SourceSnowflakeSchemasAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Key Pair Authentication": + *e = SourceSnowflakeSchemasAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceSnowflakeSchemasAuthType: %v", v) + } +} + +type SourceSnowflakeKeyPairAuthentication struct { + authType *SourceSnowflakeSchemasAuthType `const:"Key Pair Authentication" json:"auth_type,omitempty"` + // RSA Private key to use for Snowflake connection. See the docs for more information on how to obtain this key. + PrivateKey string `json:"private_key"` + // Passphrase for private key + PrivateKeyPassword *string `json:"private_key_password,omitempty"` + // The username you created to allow Airbyte to access the database. + Username string `json:"username"` +} + +func (s SourceSnowflakeKeyPairAuthentication) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceSnowflakeKeyPairAuthentication) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *SourceSnowflakeKeyPairAuthentication) GetAuthType() *SourceSnowflakeSchemasAuthType { + return SourceSnowflakeSchemasAuthTypeKeyPairAuthentication.ToPointer() +} + +func (o *SourceSnowflakeKeyPairAuthentication) GetPrivateKey() string { + if o == nil { + return "" + } + return o.PrivateKey +} + +func (o *SourceSnowflakeKeyPairAuthentication) GetPrivateKeyPassword() *string { + if o == nil { + return nil + } + return o.PrivateKeyPassword +} + +func (o *SourceSnowflakeKeyPairAuthentication) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + type SourceSnowflakeAuthType string const ( @@ -150,13 +219,15 @@ func (o *SourceSnowflakeOAuth20) GetRefreshToken() *string { type SourceSnowflakeAuthorizationMethodType string const ( - SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeOAuth20 SourceSnowflakeAuthorizationMethodType = "source-snowflake_OAuth2.0" - SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeUsernameAndPassword SourceSnowflakeAuthorizationMethodType = "source-snowflake_Username and Password" + SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeOAuth20 SourceSnowflakeAuthorizationMethodType = "source-snowflake_OAuth2.0" + SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeKeyPairAuthentication SourceSnowflakeAuthorizationMethodType = "source-snowflake_Key Pair Authentication" + SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeUsernameAndPassword SourceSnowflakeAuthorizationMethodType = "source-snowflake_Username and Password" ) type SourceSnowflakeAuthorizationMethod struct { - SourceSnowflakeOAuth20 *SourceSnowflakeOAuth20 - SourceSnowflakeUsernameAndPassword *SourceSnowflakeUsernameAndPassword + SourceSnowflakeOAuth20 *SourceSnowflakeOAuth20 + SourceSnowflakeKeyPairAuthentication *SourceSnowflakeKeyPairAuthentication + SourceSnowflakeUsernameAndPassword *SourceSnowflakeUsernameAndPassword Type SourceSnowflakeAuthorizationMethodType } @@ -170,6 +241,15 @@ func CreateSourceSnowflakeAuthorizationMethodSourceSnowflakeOAuth20(sourceSnowfl } } +func CreateSourceSnowflakeAuthorizationMethodSourceSnowflakeKeyPairAuthentication(sourceSnowflakeKeyPairAuthentication SourceSnowflakeKeyPairAuthentication) SourceSnowflakeAuthorizationMethod { + typ := SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeKeyPairAuthentication + + return SourceSnowflakeAuthorizationMethod{ + SourceSnowflakeKeyPairAuthentication: &sourceSnowflakeKeyPairAuthentication, + Type: typ, + } +} + func CreateSourceSnowflakeAuthorizationMethodSourceSnowflakeUsernameAndPassword(sourceSnowflakeUsernameAndPassword SourceSnowflakeUsernameAndPassword) SourceSnowflakeAuthorizationMethod { typ := SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeUsernameAndPassword @@ -188,6 +268,13 @@ func (u *SourceSnowflakeAuthorizationMethod) UnmarshalJSON(data []byte) error { return nil } + var sourceSnowflakeKeyPairAuthentication SourceSnowflakeKeyPairAuthentication = SourceSnowflakeKeyPairAuthentication{} + if err := utils.UnmarshalJSON(data, &sourceSnowflakeKeyPairAuthentication, "", true, true); err == nil { + u.SourceSnowflakeKeyPairAuthentication = &sourceSnowflakeKeyPairAuthentication + u.Type = SourceSnowflakeAuthorizationMethodTypeSourceSnowflakeKeyPairAuthentication + return nil + } + var sourceSnowflakeOAuth20 SourceSnowflakeOAuth20 = SourceSnowflakeOAuth20{} if err := utils.UnmarshalJSON(data, &sourceSnowflakeOAuth20, "", true, true); err == nil { u.SourceSnowflakeOAuth20 = &sourceSnowflakeOAuth20 @@ -203,6 +290,10 @@ func (u SourceSnowflakeAuthorizationMethod) MarshalJSON() ([]byte, error) { return utils.MarshalJSON(u.SourceSnowflakeOAuth20, "", true) } + if u.SourceSnowflakeKeyPairAuthentication != nil { + return utils.MarshalJSON(u.SourceSnowflakeKeyPairAuthentication, "", true) + } + if u.SourceSnowflakeUsernameAndPassword != nil { return utils.MarshalJSON(u.SourceSnowflakeUsernameAndPassword, "", true) } diff --git a/internal/sdk/models/shared/sourcesnowflakeupdate.go b/internal/sdk/models/shared/sourcesnowflakeupdate.go index e82637397..9e7d2b739 100644 --- a/internal/sdk/models/shared/sourcesnowflakeupdate.go +++ b/internal/sdk/models/shared/sourcesnowflakeupdate.go @@ -9,31 +9,31 @@ import ( "github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils" ) -type SourceSnowflakeUpdateSchemasAuthType string +type SourceSnowflakeUpdateSchemasCredentialsAuthType string const ( - SourceSnowflakeUpdateSchemasAuthTypeUsernamePassword SourceSnowflakeUpdateSchemasAuthType = "username/password" + SourceSnowflakeUpdateSchemasCredentialsAuthTypeUsernamePassword SourceSnowflakeUpdateSchemasCredentialsAuthType = "username/password" ) -func (e SourceSnowflakeUpdateSchemasAuthType) ToPointer() *SourceSnowflakeUpdateSchemasAuthType { +func (e SourceSnowflakeUpdateSchemasCredentialsAuthType) ToPointer() *SourceSnowflakeUpdateSchemasCredentialsAuthType { return &e } -func (e *SourceSnowflakeUpdateSchemasAuthType) UnmarshalJSON(data []byte) error { +func (e *SourceSnowflakeUpdateSchemasCredentialsAuthType) UnmarshalJSON(data []byte) error { var v string if err := json.Unmarshal(data, &v); err != nil { return err } switch v { case "username/password": - *e = SourceSnowflakeUpdateSchemasAuthType(v) + *e = SourceSnowflakeUpdateSchemasCredentialsAuthType(v) return nil default: - return fmt.Errorf("invalid value for SourceSnowflakeUpdateSchemasAuthType: %v", v) + return fmt.Errorf("invalid value for SourceSnowflakeUpdateSchemasCredentialsAuthType: %v", v) } } type SourceSnowflakeUpdateUsernameAndPassword struct { - authType SourceSnowflakeUpdateSchemasAuthType `const:"username/password" json:"auth_type"` + authType SourceSnowflakeUpdateSchemasCredentialsAuthType `const:"username/password" json:"auth_type"` // The password associated with the username. Password string `json:"password"` // The username you created to allow Airbyte to access the database. @@ -51,8 +51,8 @@ func (s *SourceSnowflakeUpdateUsernameAndPassword) UnmarshalJSON(data []byte) er return nil } -func (o *SourceSnowflakeUpdateUsernameAndPassword) GetAuthType() SourceSnowflakeUpdateSchemasAuthType { - return SourceSnowflakeUpdateSchemasAuthTypeUsernamePassword +func (o *SourceSnowflakeUpdateUsernameAndPassword) GetAuthType() SourceSnowflakeUpdateSchemasCredentialsAuthType { + return SourceSnowflakeUpdateSchemasCredentialsAuthTypeUsernamePassword } func (o *SourceSnowflakeUpdateUsernameAndPassword) GetPassword() string { @@ -69,6 +69,75 @@ func (o *SourceSnowflakeUpdateUsernameAndPassword) GetUsername() string { return o.Username } +type SourceSnowflakeUpdateSchemasAuthType string + +const ( + SourceSnowflakeUpdateSchemasAuthTypeKeyPairAuthentication SourceSnowflakeUpdateSchemasAuthType = "Key Pair Authentication" +) + +func (e SourceSnowflakeUpdateSchemasAuthType) ToPointer() *SourceSnowflakeUpdateSchemasAuthType { + return &e +} +func (e *SourceSnowflakeUpdateSchemasAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "Key Pair Authentication": + *e = SourceSnowflakeUpdateSchemasAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for SourceSnowflakeUpdateSchemasAuthType: %v", v) + } +} + +type SourceSnowflakeUpdateKeyPairAuthentication struct { + authType *SourceSnowflakeUpdateSchemasAuthType `const:"Key Pair Authentication" json:"auth_type,omitempty"` + // RSA Private key to use for Snowflake connection. See the docs for more information on how to obtain this key. + PrivateKey string `json:"private_key"` + // Passphrase for private key + PrivateKeyPassword *string `json:"private_key_password,omitempty"` + // The username you created to allow Airbyte to access the database. + Username string `json:"username"` +} + +func (s SourceSnowflakeUpdateKeyPairAuthentication) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(s, "", false) +} + +func (s *SourceSnowflakeUpdateKeyPairAuthentication) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil { + return err + } + return nil +} + +func (o *SourceSnowflakeUpdateKeyPairAuthentication) GetAuthType() *SourceSnowflakeUpdateSchemasAuthType { + return SourceSnowflakeUpdateSchemasAuthTypeKeyPairAuthentication.ToPointer() +} + +func (o *SourceSnowflakeUpdateKeyPairAuthentication) GetPrivateKey() string { + if o == nil { + return "" + } + return o.PrivateKey +} + +func (o *SourceSnowflakeUpdateKeyPairAuthentication) GetPrivateKeyPassword() *string { + if o == nil { + return nil + } + return o.PrivateKeyPassword +} + +func (o *SourceSnowflakeUpdateKeyPairAuthentication) GetUsername() string { + if o == nil { + return "" + } + return o.Username +} + type SourceSnowflakeUpdateAuthType string const ( @@ -150,13 +219,15 @@ func (o *SourceSnowflakeUpdateOAuth20) GetRefreshToken() *string { type SourceSnowflakeUpdateAuthorizationMethodType string const ( - SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateOAuth20 SourceSnowflakeUpdateAuthorizationMethodType = "source-snowflake-update_OAuth2.0" - SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateUsernameAndPassword SourceSnowflakeUpdateAuthorizationMethodType = "source-snowflake-update_Username and Password" + SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateOAuth20 SourceSnowflakeUpdateAuthorizationMethodType = "source-snowflake-update_OAuth2.0" + SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateKeyPairAuthentication SourceSnowflakeUpdateAuthorizationMethodType = "source-snowflake-update_Key Pair Authentication" + SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateUsernameAndPassword SourceSnowflakeUpdateAuthorizationMethodType = "source-snowflake-update_Username and Password" ) type SourceSnowflakeUpdateAuthorizationMethod struct { - SourceSnowflakeUpdateOAuth20 *SourceSnowflakeUpdateOAuth20 - SourceSnowflakeUpdateUsernameAndPassword *SourceSnowflakeUpdateUsernameAndPassword + SourceSnowflakeUpdateOAuth20 *SourceSnowflakeUpdateOAuth20 + SourceSnowflakeUpdateKeyPairAuthentication *SourceSnowflakeUpdateKeyPairAuthentication + SourceSnowflakeUpdateUsernameAndPassword *SourceSnowflakeUpdateUsernameAndPassword Type SourceSnowflakeUpdateAuthorizationMethodType } @@ -170,6 +241,15 @@ func CreateSourceSnowflakeUpdateAuthorizationMethodSourceSnowflakeUpdateOAuth20( } } +func CreateSourceSnowflakeUpdateAuthorizationMethodSourceSnowflakeUpdateKeyPairAuthentication(sourceSnowflakeUpdateKeyPairAuthentication SourceSnowflakeUpdateKeyPairAuthentication) SourceSnowflakeUpdateAuthorizationMethod { + typ := SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateKeyPairAuthentication + + return SourceSnowflakeUpdateAuthorizationMethod{ + SourceSnowflakeUpdateKeyPairAuthentication: &sourceSnowflakeUpdateKeyPairAuthentication, + Type: typ, + } +} + func CreateSourceSnowflakeUpdateAuthorizationMethodSourceSnowflakeUpdateUsernameAndPassword(sourceSnowflakeUpdateUsernameAndPassword SourceSnowflakeUpdateUsernameAndPassword) SourceSnowflakeUpdateAuthorizationMethod { typ := SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateUsernameAndPassword @@ -188,6 +268,13 @@ func (u *SourceSnowflakeUpdateAuthorizationMethod) UnmarshalJSON(data []byte) er return nil } + var sourceSnowflakeUpdateKeyPairAuthentication SourceSnowflakeUpdateKeyPairAuthentication = SourceSnowflakeUpdateKeyPairAuthentication{} + if err := utils.UnmarshalJSON(data, &sourceSnowflakeUpdateKeyPairAuthentication, "", true, true); err == nil { + u.SourceSnowflakeUpdateKeyPairAuthentication = &sourceSnowflakeUpdateKeyPairAuthentication + u.Type = SourceSnowflakeUpdateAuthorizationMethodTypeSourceSnowflakeUpdateKeyPairAuthentication + return nil + } + var sourceSnowflakeUpdateOAuth20 SourceSnowflakeUpdateOAuth20 = SourceSnowflakeUpdateOAuth20{} if err := utils.UnmarshalJSON(data, &sourceSnowflakeUpdateOAuth20, "", true, true); err == nil { u.SourceSnowflakeUpdateOAuth20 = &sourceSnowflakeUpdateOAuth20 @@ -203,6 +290,10 @@ func (u SourceSnowflakeUpdateAuthorizationMethod) MarshalJSON() ([]byte, error) return utils.MarshalJSON(u.SourceSnowflakeUpdateOAuth20, "", true) } + if u.SourceSnowflakeUpdateKeyPairAuthentication != nil { + return utils.MarshalJSON(u.SourceSnowflakeUpdateKeyPairAuthentication, "", true) + } + if u.SourceSnowflakeUpdateUsernameAndPassword != nil { return utils.MarshalJSON(u.SourceSnowflakeUpdateUsernameAndPassword, "", true) } diff --git a/internal/sdk/models/shared/sourcetiktokmarketing.go b/internal/sdk/models/shared/sourcetiktokmarketing.go index 4eb46a032..af045c6cb 100644 --- a/internal/sdk/models/shared/sourcetiktokmarketing.go +++ b/internal/sdk/models/shared/sourcetiktokmarketing.go @@ -242,7 +242,7 @@ type SourceTiktokMarketing struct { Credentials *SourceTiktokMarketingAuthenticationMethod `json:"credentials,omitempty"` // The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DD. All data generated between start_date and this date will be replicated. Not setting this option will result in always syncing the data till the current date. EndDate *types.Date `json:"end_date,omitempty"` - // Set to active if you want to include deleted data in reports. + // Set to active if you want to include deleted data in report based streams and Ads, Ad Groups and Campaign streams. IncludeDeleted *bool `default:"false" json:"include_deleted"` sourceType *TiktokMarketing `const:"tiktok-marketing" json:"sourceType,omitempty"` // The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated. diff --git a/internal/sdk/models/shared/sourcetiktokmarketingupdate.go b/internal/sdk/models/shared/sourcetiktokmarketingupdate.go index 09a9b3150..34e3f2aec 100644 --- a/internal/sdk/models/shared/sourcetiktokmarketingupdate.go +++ b/internal/sdk/models/shared/sourcetiktokmarketingupdate.go @@ -219,7 +219,7 @@ type SourceTiktokMarketingUpdate struct { Credentials *SourceTiktokMarketingUpdateAuthenticationMethod `json:"credentials,omitempty"` // The date until which you'd like to replicate data for all incremental streams, in the format YYYY-MM-DD. All data generated between start_date and this date will be replicated. Not setting this option will result in always syncing the data till the current date. EndDate *types.Date `json:"end_date,omitempty"` - // Set to active if you want to include deleted data in reports. + // Set to active if you want to include deleted data in report based streams and Ads, Ad Groups and Campaign streams. IncludeDeleted *bool `default:"false" json:"include_deleted"` // The Start Date in format: YYYY-MM-DD. Any data before this date will not be replicated. If this parameter is not set, all data will be replicated. StartDate *types.Date `default:"2016-09-01" json:"start_date"` diff --git a/internal/sdk/models/shared/sourcewikipediapageviews.go b/internal/sdk/models/shared/sourcewikipediapageviews.go index 3e1e1c0c1..eaff3af43 100644 --- a/internal/sdk/models/shared/sourcewikipediapageviews.go +++ b/internal/sdk/models/shared/sourcewikipediapageviews.go @@ -45,7 +45,7 @@ type SourceWikipediaPageviews struct { // If you want to filter by project, use the domain of any Wikimedia project. Project string `json:"project"` sourceType WikipediaPageviews `const:"wikipedia-pageviews" json:"sourceType"` - // The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. + // The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. Also serves as the date to retrieve data for the top articles. Start string `json:"start"` } diff --git a/internal/sdk/models/shared/sourcewikipediapageviewsupdate.go b/internal/sdk/models/shared/sourcewikipediapageviewsupdate.go index 41d4ef2d8..8a37773a1 100644 --- a/internal/sdk/models/shared/sourcewikipediapageviewsupdate.go +++ b/internal/sdk/models/shared/sourcewikipediapageviewsupdate.go @@ -15,7 +15,7 @@ type SourceWikipediaPageviewsUpdate struct { End string `json:"end"` // If you want to filter by project, use the domain of any Wikimedia project. Project string `json:"project"` - // The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. + // The date of the first day to include, in YYYYMMDD or YYYYMMDDHH format. Also serves as the date to retrieve data for the top articles. Start string `json:"start"` } diff --git a/internal/sdk/organizations.go b/internal/sdk/organizations.go index 36000d45e..ae26a0237 100644 --- a/internal/sdk/organizations.go +++ b/internal/sdk/organizations.go @@ -28,7 +28,7 @@ func newOrganizations(sdkConfig sdkConfiguration) *Organizations { // ListOrganizationsForUser - List all organizations for a user // Lists users organizations. -func (s *Organizations) ListOrganizationsForUser(ctx context.Context) (*operations.ListOrganizationsForUserResponse, error) { +func (s *Organizations) ListOrganizationsForUser(ctx context.Context, opts ...operations.Option) (*operations.ListOrganizationsForUserResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listOrganizationsForUser", @@ -36,12 +36,34 @@ func (s *Organizations) ListOrganizationsForUser(ctx context.Context) (*operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/organizations") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/permissions.go b/internal/sdk/permissions.go index c81e28f7d..0e9160eb4 100644 --- a/internal/sdk/permissions.go +++ b/internal/sdk/permissions.go @@ -27,7 +27,7 @@ func newPermissions(sdkConfig sdkConfiguration) *Permissions { } // CreatePermission - Create a permission -func (s *Permissions) CreatePermission(ctx context.Context, request shared.PermissionCreateRequest) (*operations.CreatePermissionResponse, error) { +func (s *Permissions) CreatePermission(ctx context.Context, request shared.PermissionCreateRequest, opts ...operations.Option) (*operations.CreatePermissionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createPermission", @@ -35,6 +35,17 @@ func (s *Permissions) CreatePermission(ctx context.Context, request shared.Permi SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/permissions") if err != nil { @@ -46,6 +57,17 @@ func (s *Permissions) CreatePermission(ctx context.Context, request shared.Permi return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -125,7 +147,7 @@ func (s *Permissions) CreatePermission(ctx context.Context, request shared.Permi } // DeletePermission - Delete a Permission -func (s *Permissions) DeletePermission(ctx context.Context, request operations.DeletePermissionRequest) (*operations.DeletePermissionResponse, error) { +func (s *Permissions) DeletePermission(ctx context.Context, request operations.DeletePermissionRequest, opts ...operations.Option) (*operations.DeletePermissionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deletePermission", @@ -133,12 +155,34 @@ func (s *Permissions) DeletePermission(ctx context.Context, request operations.D SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/permissions/{permissionId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -209,7 +253,7 @@ func (s *Permissions) DeletePermission(ctx context.Context, request operations.D } // GetPermission - Get Permission details -func (s *Permissions) GetPermission(ctx context.Context, request operations.GetPermissionRequest) (*operations.GetPermissionResponse, error) { +func (s *Permissions) GetPermission(ctx context.Context, request operations.GetPermissionRequest, opts ...operations.Option) (*operations.GetPermissionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getPermission", @@ -217,12 +261,34 @@ func (s *Permissions) GetPermission(ctx context.Context, request operations.GetP SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/permissions/{permissionId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -303,7 +369,7 @@ func (s *Permissions) GetPermission(ctx context.Context, request operations.GetP } // ListPermissions - List Permissions by user id -func (s *Permissions) ListPermissions(ctx context.Context, request operations.ListPermissionsRequest) (*operations.ListPermissionsResponse, error) { +func (s *Permissions) ListPermissions(ctx context.Context, request operations.ListPermissionsRequest, opts ...operations.Option) (*operations.ListPermissionsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listPermissions", @@ -311,12 +377,34 @@ func (s *Permissions) ListPermissions(ctx context.Context, request operations.Li SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/permissions") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -399,7 +487,7 @@ func (s *Permissions) ListPermissions(ctx context.Context, request operations.Li } // UpdatePermission - Update a permission -func (s *Permissions) UpdatePermission(ctx context.Context, request operations.UpdatePermissionRequest) (*operations.UpdatePermissionResponse, error) { +func (s *Permissions) UpdatePermission(ctx context.Context, request operations.UpdatePermissionRequest, opts ...operations.Option) (*operations.UpdatePermissionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updatePermission", @@ -407,6 +495,17 @@ func (s *Permissions) UpdatePermission(ctx context.Context, request operations.U SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/permissions/{permissionId}", request, nil) if err != nil { @@ -418,6 +517,17 @@ func (s *Permissions) UpdatePermission(ctx context.Context, request operations.U return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/sdk.go b/internal/sdk/sdk.go index 9f16a08f1..efe94963e 100644 --- a/internal/sdk/sdk.go +++ b/internal/sdk/sdk.go @@ -54,6 +54,7 @@ type sdkConfiguration struct { UserAgent string RetryConfig *retry.Config Hooks *hooks.Hooks + Timeout *time.Duration } func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) { @@ -140,6 +141,13 @@ func WithRetryConfig(retryConfig retry.Config) SDKOption { } } +// WithTimeout Optional request timeout applied to each operation +func WithTimeout(timeout time.Duration) SDKOption { + return func(sdk *SDK) { + sdk.sdkConfiguration.Timeout = &timeout + } +} + // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *SDK { sdk := &SDK{ @@ -147,8 +155,8 @@ func New(opts ...SDKOption) *SDK { Language: "go", OpenAPIDocVersion: "1.0.0", SDKVersion: "0.0.1", - GenVersion: "2.359.0", - UserAgent: "speakeasy-sdk/go 0.0.1 2.359.0 1.0.0 github.com/airbytehq/terraform-provider-airbyte/internal/sdk", + GenVersion: "2.372.3", + UserAgent: "speakeasy-sdk/go 0.0.1 2.372.3 1.0.0 github.com/airbytehq/terraform-provider-airbyte/internal/sdk", Hooks: hooks.New(), }, } diff --git a/internal/sdk/sources.go b/internal/sdk/sources.go index 486e01ff3..61e11177e 100644 --- a/internal/sdk/sources.go +++ b/internal/sdk/sources.go @@ -28,7 +28,7 @@ func newSources(sdkConfig sdkConfiguration) *Sources { // CreateSource - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSource(ctx context.Context, request *shared.SourceCreateRequest) (*operations.CreateSourceResponse, error) { +func (s *Sources) CreateSource(ctx context.Context, request *shared.SourceCreateRequest, opts ...operations.Option) (*operations.CreateSourceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSource", @@ -36,6 +36,17 @@ func (s *Sources) CreateSource(ctx context.Context, request *shared.SourceCreate SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -47,6 +58,17 @@ func (s *Sources) CreateSource(ctx context.Context, request *shared.SourceCreate return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -127,7 +149,7 @@ func (s *Sources) CreateSource(ctx context.Context, request *shared.SourceCreate // CreateSourceAha - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAha(ctx context.Context, request *shared.SourceAhaCreateRequest) (*operations.CreateSourceAhaResponse, error) { +func (s *Sources) CreateSourceAha(ctx context.Context, request *shared.SourceAhaCreateRequest, opts ...operations.Option) (*operations.CreateSourceAhaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAha", @@ -135,6 +157,17 @@ func (s *Sources) CreateSourceAha(ctx context.Context, request *shared.SourceAha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -146,6 +179,17 @@ func (s *Sources) CreateSourceAha(ctx context.Context, request *shared.SourceAha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -226,7 +270,7 @@ func (s *Sources) CreateSourceAha(ctx context.Context, request *shared.SourceAha // CreateSourceAircall - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAircall(ctx context.Context, request *shared.SourceAircallCreateRequest) (*operations.CreateSourceAircallResponse, error) { +func (s *Sources) CreateSourceAircall(ctx context.Context, request *shared.SourceAircallCreateRequest, opts ...operations.Option) (*operations.CreateSourceAircallResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAircall", @@ -234,6 +278,17 @@ func (s *Sources) CreateSourceAircall(ctx context.Context, request *shared.Sourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -245,6 +300,17 @@ func (s *Sources) CreateSourceAircall(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -325,7 +391,7 @@ func (s *Sources) CreateSourceAircall(ctx context.Context, request *shared.Sourc // CreateSourceAirtable - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAirtable(ctx context.Context, request *shared.SourceAirtableCreateRequest) (*operations.CreateSourceAirtableResponse, error) { +func (s *Sources) CreateSourceAirtable(ctx context.Context, request *shared.SourceAirtableCreateRequest, opts ...operations.Option) (*operations.CreateSourceAirtableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAirtable", @@ -333,6 +399,17 @@ func (s *Sources) CreateSourceAirtable(ctx context.Context, request *shared.Sour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -344,6 +421,17 @@ func (s *Sources) CreateSourceAirtable(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -424,7 +512,7 @@ func (s *Sources) CreateSourceAirtable(ctx context.Context, request *shared.Sour // CreateSourceAmazonAds - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAmazonAds(ctx context.Context, request *shared.SourceAmazonAdsCreateRequest) (*operations.CreateSourceAmazonAdsResponse, error) { +func (s *Sources) CreateSourceAmazonAds(ctx context.Context, request *shared.SourceAmazonAdsCreateRequest, opts ...operations.Option) (*operations.CreateSourceAmazonAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAmazonAds", @@ -432,6 +520,17 @@ func (s *Sources) CreateSourceAmazonAds(ctx context.Context, request *shared.Sou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -443,6 +542,17 @@ func (s *Sources) CreateSourceAmazonAds(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -523,7 +633,7 @@ func (s *Sources) CreateSourceAmazonAds(ctx context.Context, request *shared.Sou // CreateSourceAmazonSellerPartner - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAmazonSellerPartner(ctx context.Context, request *shared.SourceAmazonSellerPartnerCreateRequest) (*operations.CreateSourceAmazonSellerPartnerResponse, error) { +func (s *Sources) CreateSourceAmazonSellerPartner(ctx context.Context, request *shared.SourceAmazonSellerPartnerCreateRequest, opts ...operations.Option) (*operations.CreateSourceAmazonSellerPartnerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAmazonSellerPartner", @@ -531,6 +641,17 @@ func (s *Sources) CreateSourceAmazonSellerPartner(ctx context.Context, request * SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -542,6 +663,17 @@ func (s *Sources) CreateSourceAmazonSellerPartner(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -622,7 +754,7 @@ func (s *Sources) CreateSourceAmazonSellerPartner(ctx context.Context, request * // CreateSourceAmazonSqs - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAmazonSqs(ctx context.Context, request *shared.SourceAmazonSqsCreateRequest) (*operations.CreateSourceAmazonSqsResponse, error) { +func (s *Sources) CreateSourceAmazonSqs(ctx context.Context, request *shared.SourceAmazonSqsCreateRequest, opts ...operations.Option) (*operations.CreateSourceAmazonSqsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAmazonSqs", @@ -630,6 +762,17 @@ func (s *Sources) CreateSourceAmazonSqs(ctx context.Context, request *shared.Sou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -641,6 +784,17 @@ func (s *Sources) CreateSourceAmazonSqs(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -721,7 +875,7 @@ func (s *Sources) CreateSourceAmazonSqs(ctx context.Context, request *shared.Sou // CreateSourceAmplitude - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAmplitude(ctx context.Context, request *shared.SourceAmplitudeCreateRequest) (*operations.CreateSourceAmplitudeResponse, error) { +func (s *Sources) CreateSourceAmplitude(ctx context.Context, request *shared.SourceAmplitudeCreateRequest, opts ...operations.Option) (*operations.CreateSourceAmplitudeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAmplitude", @@ -729,6 +883,17 @@ func (s *Sources) CreateSourceAmplitude(ctx context.Context, request *shared.Sou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -740,6 +905,17 @@ func (s *Sources) CreateSourceAmplitude(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -820,7 +996,7 @@ func (s *Sources) CreateSourceAmplitude(ctx context.Context, request *shared.Sou // CreateSourceApifyDataset - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceApifyDataset(ctx context.Context, request *shared.SourceApifyDatasetCreateRequest) (*operations.CreateSourceApifyDatasetResponse, error) { +func (s *Sources) CreateSourceApifyDataset(ctx context.Context, request *shared.SourceApifyDatasetCreateRequest, opts ...operations.Option) (*operations.CreateSourceApifyDatasetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceApifyDataset", @@ -828,6 +1004,17 @@ func (s *Sources) CreateSourceApifyDataset(ctx context.Context, request *shared. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -839,6 +1026,17 @@ func (s *Sources) CreateSourceApifyDataset(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -919,7 +1117,7 @@ func (s *Sources) CreateSourceApifyDataset(ctx context.Context, request *shared. // CreateSourceAppfollow - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAppfollow(ctx context.Context, request *shared.SourceAppfollowCreateRequest) (*operations.CreateSourceAppfollowResponse, error) { +func (s *Sources) CreateSourceAppfollow(ctx context.Context, request *shared.SourceAppfollowCreateRequest, opts ...operations.Option) (*operations.CreateSourceAppfollowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAppfollow", @@ -927,6 +1125,17 @@ func (s *Sources) CreateSourceAppfollow(ctx context.Context, request *shared.Sou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -938,6 +1147,17 @@ func (s *Sources) CreateSourceAppfollow(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1018,7 +1238,7 @@ func (s *Sources) CreateSourceAppfollow(ctx context.Context, request *shared.Sou // CreateSourceAsana - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAsana(ctx context.Context, request *shared.SourceAsanaCreateRequest) (*operations.CreateSourceAsanaResponse, error) { +func (s *Sources) CreateSourceAsana(ctx context.Context, request *shared.SourceAsanaCreateRequest, opts ...operations.Option) (*operations.CreateSourceAsanaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAsana", @@ -1026,6 +1246,17 @@ func (s *Sources) CreateSourceAsana(ctx context.Context, request *shared.SourceA SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1037,6 +1268,17 @@ func (s *Sources) CreateSourceAsana(ctx context.Context, request *shared.SourceA return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1117,7 +1359,7 @@ func (s *Sources) CreateSourceAsana(ctx context.Context, request *shared.SourceA // CreateSourceAuth0 - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAuth0(ctx context.Context, request *shared.SourceAuth0CreateRequest) (*operations.CreateSourceAuth0Response, error) { +func (s *Sources) CreateSourceAuth0(ctx context.Context, request *shared.SourceAuth0CreateRequest, opts ...operations.Option) (*operations.CreateSourceAuth0Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAuth0", @@ -1125,6 +1367,17 @@ func (s *Sources) CreateSourceAuth0(ctx context.Context, request *shared.SourceA SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1136,6 +1389,17 @@ func (s *Sources) CreateSourceAuth0(ctx context.Context, request *shared.SourceA return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1216,7 +1480,7 @@ func (s *Sources) CreateSourceAuth0(ctx context.Context, request *shared.SourceA // CreateSourceAwsCloudtrail - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAwsCloudtrail(ctx context.Context, request *shared.SourceAwsCloudtrailCreateRequest) (*operations.CreateSourceAwsCloudtrailResponse, error) { +func (s *Sources) CreateSourceAwsCloudtrail(ctx context.Context, request *shared.SourceAwsCloudtrailCreateRequest, opts ...operations.Option) (*operations.CreateSourceAwsCloudtrailResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAwsCloudtrail", @@ -1224,6 +1488,17 @@ func (s *Sources) CreateSourceAwsCloudtrail(ctx context.Context, request *shared SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1235,6 +1510,17 @@ func (s *Sources) CreateSourceAwsCloudtrail(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1315,7 +1601,7 @@ func (s *Sources) CreateSourceAwsCloudtrail(ctx context.Context, request *shared // CreateSourceAzureBlobStorage - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAzureBlobStorage(ctx context.Context, request *shared.SourceAzureBlobStorageCreateRequest) (*operations.CreateSourceAzureBlobStorageResponse, error) { +func (s *Sources) CreateSourceAzureBlobStorage(ctx context.Context, request *shared.SourceAzureBlobStorageCreateRequest, opts ...operations.Option) (*operations.CreateSourceAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAzureBlobStorage", @@ -1323,6 +1609,17 @@ func (s *Sources) CreateSourceAzureBlobStorage(ctx context.Context, request *sha SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1334,6 +1631,17 @@ func (s *Sources) CreateSourceAzureBlobStorage(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1414,7 +1722,7 @@ func (s *Sources) CreateSourceAzureBlobStorage(ctx context.Context, request *sha // CreateSourceAzureTable - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceAzureTable(ctx context.Context, request *shared.SourceAzureTableCreateRequest) (*operations.CreateSourceAzureTableResponse, error) { +func (s *Sources) CreateSourceAzureTable(ctx context.Context, request *shared.SourceAzureTableCreateRequest, opts ...operations.Option) (*operations.CreateSourceAzureTableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceAzureTable", @@ -1422,6 +1730,17 @@ func (s *Sources) CreateSourceAzureTable(ctx context.Context, request *shared.So SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1433,6 +1752,17 @@ func (s *Sources) CreateSourceAzureTable(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1513,7 +1843,7 @@ func (s *Sources) CreateSourceAzureTable(ctx context.Context, request *shared.So // CreateSourceBambooHr - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceBambooHr(ctx context.Context, request *shared.SourceBambooHrCreateRequest) (*operations.CreateSourceBambooHrResponse, error) { +func (s *Sources) CreateSourceBambooHr(ctx context.Context, request *shared.SourceBambooHrCreateRequest, opts ...operations.Option) (*operations.CreateSourceBambooHrResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceBambooHr", @@ -1521,6 +1851,17 @@ func (s *Sources) CreateSourceBambooHr(ctx context.Context, request *shared.Sour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1532,6 +1873,17 @@ func (s *Sources) CreateSourceBambooHr(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1612,7 +1964,7 @@ func (s *Sources) CreateSourceBambooHr(ctx context.Context, request *shared.Sour // CreateSourceBigquery - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceBigquery(ctx context.Context, request *shared.SourceBigqueryCreateRequest) (*operations.CreateSourceBigqueryResponse, error) { +func (s *Sources) CreateSourceBigquery(ctx context.Context, request *shared.SourceBigqueryCreateRequest, opts ...operations.Option) (*operations.CreateSourceBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceBigquery", @@ -1620,6 +1972,17 @@ func (s *Sources) CreateSourceBigquery(ctx context.Context, request *shared.Sour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1631,6 +1994,17 @@ func (s *Sources) CreateSourceBigquery(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1711,7 +2085,7 @@ func (s *Sources) CreateSourceBigquery(ctx context.Context, request *shared.Sour // CreateSourceBingAds - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceBingAds(ctx context.Context, request *shared.SourceBingAdsCreateRequest) (*operations.CreateSourceBingAdsResponse, error) { +func (s *Sources) CreateSourceBingAds(ctx context.Context, request *shared.SourceBingAdsCreateRequest, opts ...operations.Option) (*operations.CreateSourceBingAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceBingAds", @@ -1719,6 +2093,17 @@ func (s *Sources) CreateSourceBingAds(ctx context.Context, request *shared.Sourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -1730,6 +2115,17 @@ func (s *Sources) CreateSourceBingAds(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1810,7 +2206,7 @@ func (s *Sources) CreateSourceBingAds(ctx context.Context, request *shared.Sourc // CreateSourceBraintree - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceBraintree(ctx context.Context, request *shared.SourceBraintreeCreateRequest) (*operations.CreateSourceBraintreeResponse, error) { +func (s *Sources) CreateSourceBraintree(ctx context.Context, request *shared.SourceBraintreeCreateRequest, opts ...operations.Option) (*operations.CreateSourceBraintreeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createSourceBraintree", @@ -1818,103 +2214,15 @@ func (s *Sources) CreateSourceBraintree(ctx context.Context, request *shared.Sou SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceBraintreeResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceBraze - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceBraze(ctx context.Context, request *shared.SourceBrazeCreateRequest) (*operations.CreateSourceBrazeResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceBraze", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -1928,6 +2236,17 @@ func (s *Sources) CreateSourceBraze(ctx context.Context, request *shared.SourceB return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -1969,7 +2288,7 @@ func (s *Sources) CreateSourceBraze(ctx context.Context, request *shared.SourceB } } - res := &operations.CreateSourceBrazeResponse{ + res := &operations.CreateSourceBraintreeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2006,113 +2325,25 @@ func (s *Sources) CreateSourceBraze(ctx context.Context, request *shared.SourceB } -// CreateSourceCart - Create a source +// CreateSourceBraze - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCart(ctx context.Context, request *shared.SourceCartCreateRequest) (*operations.CreateSourceCartResponse, error) { +func (s *Sources) CreateSourceBraze(ctx context.Context, request *shared.SourceBrazeCreateRequest, opts ...operations.Option) (*operations.CreateSourceBrazeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceCart", + OperationID: "createSourceBraze", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceCartResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceChargebee - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceChargebee(ctx context.Context, request *shared.SourceChargebeeCreateRequest) (*operations.CreateSourceChargebeeResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceChargebee", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -2126,6 +2357,17 @@ func (s *Sources) CreateSourceChargebee(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2167,7 +2409,7 @@ func (s *Sources) CreateSourceChargebee(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceChargebeeResponse{ + res := &operations.CreateSourceBrazeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2204,113 +2446,25 @@ func (s *Sources) CreateSourceChargebee(ctx context.Context, request *shared.Sou } -// CreateSourceChartmogul - Create a source +// CreateSourceCart - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceChartmogul(ctx context.Context, request *shared.SourceChartmogulCreateRequest) (*operations.CreateSourceChartmogulResponse, error) { +func (s *Sources) CreateSourceCart(ctx context.Context, request *shared.SourceCartCreateRequest, opts ...operations.Option) (*operations.CreateSourceCartResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceChartmogul", + OperationID: "createSourceCart", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceChartmogulResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceClickhouse - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceClickhouse(ctx context.Context, request *shared.SourceClickhouseCreateRequest) (*operations.CreateSourceClickhouseResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceClickhouse", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -2324,6 +2478,17 @@ func (s *Sources) CreateSourceClickhouse(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2365,7 +2530,7 @@ func (s *Sources) CreateSourceClickhouse(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceClickhouseResponse{ + res := &operations.CreateSourceCartResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2402,16 +2567,27 @@ func (s *Sources) CreateSourceClickhouse(ctx context.Context, request *shared.So } -// CreateSourceClickupAPI - Create a source +// CreateSourceChargebee - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceClickupAPI(ctx context.Context, request *shared.SourceClickupAPICreateRequest) (*operations.CreateSourceClickupAPIResponse, error) { +func (s *Sources) CreateSourceChargebee(ctx context.Context, request *shared.SourceChargebeeCreateRequest, opts ...operations.Option) (*operations.CreateSourceChargebeeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceClickupApi", + OperationID: "createSourceChargebee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -2423,6 +2599,17 @@ func (s *Sources) CreateSourceClickupAPI(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2464,7 +2651,7 @@ func (s *Sources) CreateSourceClickupAPI(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceClickupAPIResponse{ + res := &operations.CreateSourceChargebeeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2501,16 +2688,27 @@ func (s *Sources) CreateSourceClickupAPI(ctx context.Context, request *shared.So } -// CreateSourceClockify - Create a source +// CreateSourceChartmogul - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceClockify(ctx context.Context, request *shared.SourceClockifyCreateRequest) (*operations.CreateSourceClockifyResponse, error) { +func (s *Sources) CreateSourceChartmogul(ctx context.Context, request *shared.SourceChartmogulCreateRequest, opts ...operations.Option) (*operations.CreateSourceChartmogulResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceClockify", + OperationID: "createSourceChartmogul", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -2522,6 +2720,17 @@ func (s *Sources) CreateSourceClockify(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2563,7 +2772,7 @@ func (s *Sources) CreateSourceClockify(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceClockifyResponse{ + res := &operations.CreateSourceChartmogulResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2600,16 +2809,27 @@ func (s *Sources) CreateSourceClockify(ctx context.Context, request *shared.Sour } -// CreateSourceCloseCom - Create a source +// CreateSourceClazar - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCloseCom(ctx context.Context, request *shared.SourceCloseComCreateRequest) (*operations.CreateSourceCloseComResponse, error) { +func (s *Sources) CreateSourceClazar(ctx context.Context, request *shared.SourceClazarCreateRequest, opts ...operations.Option) (*operations.CreateSourceClazarResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceCloseCom", + OperationID: "createSourceClazar", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -2621,6 +2841,17 @@ func (s *Sources) CreateSourceCloseCom(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2662,7 +2893,7 @@ func (s *Sources) CreateSourceCloseCom(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceCloseComResponse{ + res := &operations.CreateSourceClazarResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2699,16 +2930,27 @@ func (s *Sources) CreateSourceCloseCom(ctx context.Context, request *shared.Sour } -// CreateSourceCoda - Create a source +// CreateSourceClickhouse - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCoda(ctx context.Context, request *shared.SourceCodaCreateRequest) (*operations.CreateSourceCodaResponse, error) { +func (s *Sources) CreateSourceClickhouse(ctx context.Context, request *shared.SourceClickhouseCreateRequest, opts ...operations.Option) (*operations.CreateSourceClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceCoda", + OperationID: "createSourceClickhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -2720,6 +2962,17 @@ func (s *Sources) CreateSourceCoda(ctx context.Context, request *shared.SourceCo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2761,7 +3014,7 @@ func (s *Sources) CreateSourceCoda(ctx context.Context, request *shared.SourceCo } } - res := &operations.CreateSourceCodaResponse{ + res := &operations.CreateSourceClickhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2798,113 +3051,25 @@ func (s *Sources) CreateSourceCoda(ctx context.Context, request *shared.SourceCo } -// CreateSourceCoinAPI - Create a source +// CreateSourceClickupAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCoinAPI(ctx context.Context, request *shared.SourceCoinAPICreateRequest) (*operations.CreateSourceCoinAPIResponse, error) { +func (s *Sources) CreateSourceClickupAPI(ctx context.Context, request *shared.SourceClickupAPICreateRequest, opts ...operations.Option) (*operations.CreateSourceClickupAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceCoinApi", + OperationID: "createSourceClickupApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceCoinAPIResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceCoinmarketcap - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCoinmarketcap(ctx context.Context, request *shared.SourceCoinmarketcapCreateRequest) (*operations.CreateSourceCoinmarketcapResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceCoinmarketcap", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -2918,6 +3083,17 @@ func (s *Sources) CreateSourceCoinmarketcap(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -2959,7 +3135,7 @@ func (s *Sources) CreateSourceCoinmarketcap(ctx context.Context, request *shared } } - res := &operations.CreateSourceCoinmarketcapResponse{ + res := &operations.CreateSourceClickupAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -2996,16 +3172,27 @@ func (s *Sources) CreateSourceCoinmarketcap(ctx context.Context, request *shared } -// CreateSourceConfigcat - Create a source +// CreateSourceClockify - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceConfigcat(ctx context.Context, request *shared.SourceConfigcatCreateRequest) (*operations.CreateSourceConfigcatResponse, error) { +func (s *Sources) CreateSourceClockify(ctx context.Context, request *shared.SourceClockifyCreateRequest, opts ...operations.Option) (*operations.CreateSourceClockifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceConfigcat", + OperationID: "createSourceClockify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3017,6 +3204,17 @@ func (s *Sources) CreateSourceConfigcat(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3058,7 +3256,7 @@ func (s *Sources) CreateSourceConfigcat(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceConfigcatResponse{ + res := &operations.CreateSourceClockifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3095,16 +3293,27 @@ func (s *Sources) CreateSourceConfigcat(ctx context.Context, request *shared.Sou } -// CreateSourceConfluence - Create a source +// CreateSourceCloseCom - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceConfluence(ctx context.Context, request *shared.SourceConfluenceCreateRequest) (*operations.CreateSourceConfluenceResponse, error) { +func (s *Sources) CreateSourceCloseCom(ctx context.Context, request *shared.SourceCloseComCreateRequest, opts ...operations.Option) (*operations.CreateSourceCloseComResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceConfluence", + OperationID: "createSourceCloseCom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3116,6 +3325,17 @@ func (s *Sources) CreateSourceConfluence(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3157,7 +3377,7 @@ func (s *Sources) CreateSourceConfluence(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceConfluenceResponse{ + res := &operations.CreateSourceCloseComResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3194,16 +3414,27 @@ func (s *Sources) CreateSourceConfluence(ctx context.Context, request *shared.So } -// CreateSourceConvex - Create a source +// CreateSourceCoda - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceConvex(ctx context.Context, request *shared.SourceConvexCreateRequest) (*operations.CreateSourceConvexResponse, error) { +func (s *Sources) CreateSourceCoda(ctx context.Context, request *shared.SourceCodaCreateRequest, opts ...operations.Option) (*operations.CreateSourceCodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceConvex", + OperationID: "createSourceCoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3215,6 +3446,17 @@ func (s *Sources) CreateSourceConvex(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3256,7 +3498,7 @@ func (s *Sources) CreateSourceConvex(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceConvexResponse{ + res := &operations.CreateSourceCodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3293,16 +3535,27 @@ func (s *Sources) CreateSourceConvex(ctx context.Context, request *shared.Source } -// CreateSourceCustom - Create a source +// CreateSourceCoinAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceCustom(ctx context.Context, request *shared.SourceCustomCreateRequest) (*operations.CreateSourceCustomResponse, error) { +func (s *Sources) CreateSourceCoinAPI(ctx context.Context, request *shared.SourceCoinAPICreateRequest, opts ...operations.Option) (*operations.CreateSourceCoinAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceCustom", + OperationID: "createSourceCoinApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3314,6 +3567,17 @@ func (s *Sources) CreateSourceCustom(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3355,7 +3619,7 @@ func (s *Sources) CreateSourceCustom(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceCustomResponse{ + res := &operations.CreateSourceCoinAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3392,16 +3656,27 @@ func (s *Sources) CreateSourceCustom(ctx context.Context, request *shared.Source } -// CreateSourceDatascope - Create a source +// CreateSourceCoinmarketcap - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDatascope(ctx context.Context, request *shared.SourceDatascopeCreateRequest) (*operations.CreateSourceDatascopeResponse, error) { +func (s *Sources) CreateSourceCoinmarketcap(ctx context.Context, request *shared.SourceCoinmarketcapCreateRequest, opts ...operations.Option) (*operations.CreateSourceCoinmarketcapResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDatascope", + OperationID: "createSourceCoinmarketcap", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3413,6 +3688,17 @@ func (s *Sources) CreateSourceDatascope(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3454,7 +3740,7 @@ func (s *Sources) CreateSourceDatascope(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceDatascopeResponse{ + res := &operations.CreateSourceCoinmarketcapResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3491,16 +3777,27 @@ func (s *Sources) CreateSourceDatascope(ctx context.Context, request *shared.Sou } -// CreateSourceDelighted - Create a source +// CreateSourceConfigcat - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDelighted(ctx context.Context, request *shared.SourceDelightedCreateRequest) (*operations.CreateSourceDelightedResponse, error) { +func (s *Sources) CreateSourceConfigcat(ctx context.Context, request *shared.SourceConfigcatCreateRequest, opts ...operations.Option) (*operations.CreateSourceConfigcatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDelighted", + OperationID: "createSourceConfigcat", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3512,6 +3809,17 @@ func (s *Sources) CreateSourceDelighted(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3553,7 +3861,7 @@ func (s *Sources) CreateSourceDelighted(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceDelightedResponse{ + res := &operations.CreateSourceConfigcatResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3590,16 +3898,27 @@ func (s *Sources) CreateSourceDelighted(ctx context.Context, request *shared.Sou } -// CreateSourceDixa - Create a source +// CreateSourceConfluence - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDixa(ctx context.Context, request *shared.SourceDixaCreateRequest) (*operations.CreateSourceDixaResponse, error) { +func (s *Sources) CreateSourceConfluence(ctx context.Context, request *shared.SourceConfluenceCreateRequest, opts ...operations.Option) (*operations.CreateSourceConfluenceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDixa", + OperationID: "createSourceConfluence", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3611,6 +3930,17 @@ func (s *Sources) CreateSourceDixa(ctx context.Context, request *shared.SourceDi return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3652,7 +3982,7 @@ func (s *Sources) CreateSourceDixa(ctx context.Context, request *shared.SourceDi } } - res := &operations.CreateSourceDixaResponse{ + res := &operations.CreateSourceConfluenceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3689,16 +4019,27 @@ func (s *Sources) CreateSourceDixa(ctx context.Context, request *shared.SourceDi } -// CreateSourceDockerhub - Create a source +// CreateSourceConvex - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDockerhub(ctx context.Context, request *shared.SourceDockerhubCreateRequest) (*operations.CreateSourceDockerhubResponse, error) { +func (s *Sources) CreateSourceConvex(ctx context.Context, request *shared.SourceConvexCreateRequest, opts ...operations.Option) (*operations.CreateSourceConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDockerhub", + OperationID: "createSourceConvex", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3710,6 +4051,17 @@ func (s *Sources) CreateSourceDockerhub(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3751,7 +4103,7 @@ func (s *Sources) CreateSourceDockerhub(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceDockerhubResponse{ + res := &operations.CreateSourceConvexResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3788,16 +4140,27 @@ func (s *Sources) CreateSourceDockerhub(ctx context.Context, request *shared.Sou } -// CreateSourceDremio - Create a source +// CreateSourceCustom - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDremio(ctx context.Context, request *shared.SourceDremioCreateRequest) (*operations.CreateSourceDremioResponse, error) { +func (s *Sources) CreateSourceCustom(ctx context.Context, request *shared.SourceCustomCreateRequest, opts ...operations.Option) (*operations.CreateSourceCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDremio", + OperationID: "createSourceCustom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3809,6 +4172,17 @@ func (s *Sources) CreateSourceDremio(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3850,7 +4224,7 @@ func (s *Sources) CreateSourceDremio(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceDremioResponse{ + res := &operations.CreateSourceCustomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3887,16 +4261,27 @@ func (s *Sources) CreateSourceDremio(ctx context.Context, request *shared.Source } -// CreateSourceDynamodb - Create a source +// CreateSourceDatadog - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceDynamodb(ctx context.Context, request *shared.SourceDynamodbCreateRequest) (*operations.CreateSourceDynamodbResponse, error) { +func (s *Sources) CreateSourceDatadog(ctx context.Context, request *shared.SourceDatadogCreateRequest, opts ...operations.Option) (*operations.CreateSourceDatadogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceDynamodb", + OperationID: "createSourceDatadog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -3908,6 +4293,17 @@ func (s *Sources) CreateSourceDynamodb(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -3949,7 +4345,7 @@ func (s *Sources) CreateSourceDynamodb(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceDynamodbResponse{ + res := &operations.CreateSourceDatadogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -3986,16 +4382,27 @@ func (s *Sources) CreateSourceDynamodb(ctx context.Context, request *shared.Sour } -// CreateSourceEmailoctopus - Create a source +// CreateSourceDatascope - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceEmailoctopus(ctx context.Context, request *shared.SourceEmailoctopusCreateRequest) (*operations.CreateSourceEmailoctopusResponse, error) { +func (s *Sources) CreateSourceDatascope(ctx context.Context, request *shared.SourceDatascopeCreateRequest, opts ...operations.Option) (*operations.CreateSourceDatascopeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceEmailoctopus", + OperationID: "createSourceDatascope", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4007,6 +4414,17 @@ func (s *Sources) CreateSourceEmailoctopus(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4048,7 +4466,7 @@ func (s *Sources) CreateSourceEmailoctopus(ctx context.Context, request *shared. } } - res := &operations.CreateSourceEmailoctopusResponse{ + res := &operations.CreateSourceDatascopeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4085,16 +4503,27 @@ func (s *Sources) CreateSourceEmailoctopus(ctx context.Context, request *shared. } -// CreateSourceExchangeRates - Create a source +// CreateSourceDelighted - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceExchangeRates(ctx context.Context, request *shared.SourceExchangeRatesCreateRequest) (*operations.CreateSourceExchangeRatesResponse, error) { +func (s *Sources) CreateSourceDelighted(ctx context.Context, request *shared.SourceDelightedCreateRequest, opts ...operations.Option) (*operations.CreateSourceDelightedResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceExchangeRates", + OperationID: "createSourceDelighted", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4106,6 +4535,17 @@ func (s *Sources) CreateSourceExchangeRates(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4147,7 +4587,7 @@ func (s *Sources) CreateSourceExchangeRates(ctx context.Context, request *shared } } - res := &operations.CreateSourceExchangeRatesResponse{ + res := &operations.CreateSourceDelightedResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4184,16 +4624,27 @@ func (s *Sources) CreateSourceExchangeRates(ctx context.Context, request *shared } -// CreateSourceFacebookMarketing - Create a source +// CreateSourceDixa - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFacebookMarketing(ctx context.Context, request *shared.SourceFacebookMarketingCreateRequest) (*operations.CreateSourceFacebookMarketingResponse, error) { +func (s *Sources) CreateSourceDixa(ctx context.Context, request *shared.SourceDixaCreateRequest, opts ...operations.Option) (*operations.CreateSourceDixaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFacebookMarketing", + OperationID: "createSourceDixa", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4205,6 +4656,17 @@ func (s *Sources) CreateSourceFacebookMarketing(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4246,7 +4708,7 @@ func (s *Sources) CreateSourceFacebookMarketing(ctx context.Context, request *sh } } - res := &operations.CreateSourceFacebookMarketingResponse{ + res := &operations.CreateSourceDixaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4283,16 +4745,27 @@ func (s *Sources) CreateSourceFacebookMarketing(ctx context.Context, request *sh } -// CreateSourceFaker - Create a source +// CreateSourceDockerhub - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFaker(ctx context.Context, request *shared.SourceFakerCreateRequest) (*operations.CreateSourceFakerResponse, error) { +func (s *Sources) CreateSourceDockerhub(ctx context.Context, request *shared.SourceDockerhubCreateRequest, opts ...operations.Option) (*operations.CreateSourceDockerhubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFaker", + OperationID: "createSourceDockerhub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4304,6 +4777,17 @@ func (s *Sources) CreateSourceFaker(ctx context.Context, request *shared.SourceF return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4345,7 +4829,7 @@ func (s *Sources) CreateSourceFaker(ctx context.Context, request *shared.SourceF } } - res := &operations.CreateSourceFakerResponse{ + res := &operations.CreateSourceDockerhubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4382,16 +4866,27 @@ func (s *Sources) CreateSourceFaker(ctx context.Context, request *shared.SourceF } -// CreateSourceFauna - Create a source +// CreateSourceDremio - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFauna(ctx context.Context, request *shared.SourceFaunaCreateRequest) (*operations.CreateSourceFaunaResponse, error) { +func (s *Sources) CreateSourceDremio(ctx context.Context, request *shared.SourceDremioCreateRequest, opts ...operations.Option) (*operations.CreateSourceDremioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFauna", + OperationID: "createSourceDremio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4403,6 +4898,17 @@ func (s *Sources) CreateSourceFauna(ctx context.Context, request *shared.SourceF return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4444,7 +4950,7 @@ func (s *Sources) CreateSourceFauna(ctx context.Context, request *shared.SourceF } } - res := &operations.CreateSourceFaunaResponse{ + res := &operations.CreateSourceDremioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4481,16 +4987,27 @@ func (s *Sources) CreateSourceFauna(ctx context.Context, request *shared.SourceF } -// CreateSourceFile - Create a source +// CreateSourceDynamodb - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFile(ctx context.Context, request *shared.SourceFileCreateRequest) (*operations.CreateSourceFileResponse, error) { +func (s *Sources) CreateSourceDynamodb(ctx context.Context, request *shared.SourceDynamodbCreateRequest, opts ...operations.Option) (*operations.CreateSourceDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFile", + OperationID: "createSourceDynamodb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4502,6 +5019,17 @@ func (s *Sources) CreateSourceFile(ctx context.Context, request *shared.SourceFi return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4543,7 +5071,7 @@ func (s *Sources) CreateSourceFile(ctx context.Context, request *shared.SourceFi } } - res := &operations.CreateSourceFileResponse{ + res := &operations.CreateSourceDynamodbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4580,16 +5108,27 @@ func (s *Sources) CreateSourceFile(ctx context.Context, request *shared.SourceFi } -// CreateSourceFirebolt - Create a source +// CreateSourceEmailoctopus - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFirebolt(ctx context.Context, request *shared.SourceFireboltCreateRequest) (*operations.CreateSourceFireboltResponse, error) { +func (s *Sources) CreateSourceEmailoctopus(ctx context.Context, request *shared.SourceEmailoctopusCreateRequest, opts ...operations.Option) (*operations.CreateSourceEmailoctopusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFirebolt", + OperationID: "createSourceEmailoctopus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4601,6 +5140,17 @@ func (s *Sources) CreateSourceFirebolt(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4642,7 +5192,7 @@ func (s *Sources) CreateSourceFirebolt(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceFireboltResponse{ + res := &operations.CreateSourceEmailoctopusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4679,16 +5229,27 @@ func (s *Sources) CreateSourceFirebolt(ctx context.Context, request *shared.Sour } -// CreateSourceFleetio - Create a source +// CreateSourceExchangeRates - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFleetio(ctx context.Context, request *shared.SourceFleetioCreateRequest) (*operations.CreateSourceFleetioResponse, error) { +func (s *Sources) CreateSourceExchangeRates(ctx context.Context, request *shared.SourceExchangeRatesCreateRequest, opts ...operations.Option) (*operations.CreateSourceExchangeRatesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFleetio", + OperationID: "createSourceExchangeRates", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4700,6 +5261,17 @@ func (s *Sources) CreateSourceFleetio(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4741,7 +5313,7 @@ func (s *Sources) CreateSourceFleetio(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceFleetioResponse{ + res := &operations.CreateSourceExchangeRatesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4778,16 +5350,27 @@ func (s *Sources) CreateSourceFleetio(ctx context.Context, request *shared.Sourc } -// CreateSourceFreshcaller - Create a source +// CreateSourceFacebookMarketing - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFreshcaller(ctx context.Context, request *shared.SourceFreshcallerCreateRequest) (*operations.CreateSourceFreshcallerResponse, error) { +func (s *Sources) CreateSourceFacebookMarketing(ctx context.Context, request *shared.SourceFacebookMarketingCreateRequest, opts ...operations.Option) (*operations.CreateSourceFacebookMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFreshcaller", + OperationID: "createSourceFacebookMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4799,6 +5382,17 @@ func (s *Sources) CreateSourceFreshcaller(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4840,7 +5434,7 @@ func (s *Sources) CreateSourceFreshcaller(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceFreshcallerResponse{ + res := &operations.CreateSourceFacebookMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4877,16 +5471,27 @@ func (s *Sources) CreateSourceFreshcaller(ctx context.Context, request *shared.S } -// CreateSourceFreshdesk - Create a source +// CreateSourceFaker - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFreshdesk(ctx context.Context, request *shared.SourceFreshdeskCreateRequest) (*operations.CreateSourceFreshdeskResponse, error) { +func (s *Sources) CreateSourceFaker(ctx context.Context, request *shared.SourceFakerCreateRequest, opts ...operations.Option) (*operations.CreateSourceFakerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFreshdesk", + OperationID: "createSourceFaker", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4898,6 +5503,17 @@ func (s *Sources) CreateSourceFreshdesk(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -4939,7 +5555,7 @@ func (s *Sources) CreateSourceFreshdesk(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceFreshdeskResponse{ + res := &operations.CreateSourceFakerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -4976,16 +5592,27 @@ func (s *Sources) CreateSourceFreshdesk(ctx context.Context, request *shared.Sou } -// CreateSourceFreshsales - Create a source +// CreateSourceFauna - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceFreshsales(ctx context.Context, request *shared.SourceFreshsalesCreateRequest) (*operations.CreateSourceFreshsalesResponse, error) { +func (s *Sources) CreateSourceFauna(ctx context.Context, request *shared.SourceFaunaCreateRequest, opts ...operations.Option) (*operations.CreateSourceFaunaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceFreshsales", + OperationID: "createSourceFauna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -4997,6 +5624,17 @@ func (s *Sources) CreateSourceFreshsales(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5038,7 +5676,7 @@ func (s *Sources) CreateSourceFreshsales(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceFreshsalesResponse{ + res := &operations.CreateSourceFaunaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5075,16 +5713,27 @@ func (s *Sources) CreateSourceFreshsales(ctx context.Context, request *shared.So } -// CreateSourceGainsightPx - Create a source +// CreateSourceFile - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGainsightPx(ctx context.Context, request *shared.SourceGainsightPxCreateRequest) (*operations.CreateSourceGainsightPxResponse, error) { +func (s *Sources) CreateSourceFile(ctx context.Context, request *shared.SourceFileCreateRequest, opts ...operations.Option) (*operations.CreateSourceFileResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGainsightPx", + OperationID: "createSourceFile", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5096,6 +5745,17 @@ func (s *Sources) CreateSourceGainsightPx(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5137,7 +5797,7 @@ func (s *Sources) CreateSourceGainsightPx(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceGainsightPxResponse{ + res := &operations.CreateSourceFileResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5174,16 +5834,27 @@ func (s *Sources) CreateSourceGainsightPx(ctx context.Context, request *shared.S } -// CreateSourceGcs - Create a source +// CreateSourceFirebolt - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGcs(ctx context.Context, request *shared.SourceGcsCreateRequest) (*operations.CreateSourceGcsResponse, error) { +func (s *Sources) CreateSourceFirebolt(ctx context.Context, request *shared.SourceFireboltCreateRequest, opts ...operations.Option) (*operations.CreateSourceFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGcs", + OperationID: "createSourceFirebolt", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5195,6 +5866,17 @@ func (s *Sources) CreateSourceGcs(ctx context.Context, request *shared.SourceGcs return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5236,7 +5918,7 @@ func (s *Sources) CreateSourceGcs(ctx context.Context, request *shared.SourceGcs } } - res := &operations.CreateSourceGcsResponse{ + res := &operations.CreateSourceFireboltResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5273,16 +5955,27 @@ func (s *Sources) CreateSourceGcs(ctx context.Context, request *shared.SourceGcs } -// CreateSourceGetlago - Create a source +// CreateSourceFleetio - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGetlago(ctx context.Context, request *shared.SourceGetlagoCreateRequest) (*operations.CreateSourceGetlagoResponse, error) { +func (s *Sources) CreateSourceFleetio(ctx context.Context, request *shared.SourceFleetioCreateRequest, opts ...operations.Option) (*operations.CreateSourceFleetioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGetlago", + OperationID: "createSourceFleetio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5294,6 +5987,17 @@ func (s *Sources) CreateSourceGetlago(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5335,7 +6039,7 @@ func (s *Sources) CreateSourceGetlago(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceGetlagoResponse{ + res := &operations.CreateSourceFleetioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5372,16 +6076,27 @@ func (s *Sources) CreateSourceGetlago(ctx context.Context, request *shared.Sourc } -// CreateSourceGithub - Create a source +// CreateSourceFreshcaller - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGithub(ctx context.Context, request *shared.SourceGithubCreateRequest) (*operations.CreateSourceGithubResponse, error) { +func (s *Sources) CreateSourceFreshcaller(ctx context.Context, request *shared.SourceFreshcallerCreateRequest, opts ...operations.Option) (*operations.CreateSourceFreshcallerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGithub", + OperationID: "createSourceFreshcaller", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5393,6 +6108,17 @@ func (s *Sources) CreateSourceGithub(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5434,7 +6160,7 @@ func (s *Sources) CreateSourceGithub(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceGithubResponse{ + res := &operations.CreateSourceFreshcallerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5471,16 +6197,27 @@ func (s *Sources) CreateSourceGithub(ctx context.Context, request *shared.Source } -// CreateSourceGitlab - Create a source +// CreateSourceFreshdesk - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGitlab(ctx context.Context, request *shared.SourceGitlabCreateRequest) (*operations.CreateSourceGitlabResponse, error) { +func (s *Sources) CreateSourceFreshdesk(ctx context.Context, request *shared.SourceFreshdeskCreateRequest, opts ...operations.Option) (*operations.CreateSourceFreshdeskResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGitlab", + OperationID: "createSourceFreshdesk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5492,6 +6229,17 @@ func (s *Sources) CreateSourceGitlab(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5533,7 +6281,7 @@ func (s *Sources) CreateSourceGitlab(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceGitlabResponse{ + res := &operations.CreateSourceFreshdeskResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5570,16 +6318,27 @@ func (s *Sources) CreateSourceGitlab(ctx context.Context, request *shared.Source } -// CreateSourceGlassfrog - Create a source +// CreateSourceFreshsales - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGlassfrog(ctx context.Context, request *shared.SourceGlassfrogCreateRequest) (*operations.CreateSourceGlassfrogResponse, error) { +func (s *Sources) CreateSourceFreshsales(ctx context.Context, request *shared.SourceFreshsalesCreateRequest, opts ...operations.Option) (*operations.CreateSourceFreshsalesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGlassfrog", + OperationID: "createSourceFreshsales", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5591,6 +6350,17 @@ func (s *Sources) CreateSourceGlassfrog(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5632,7 +6402,7 @@ func (s *Sources) CreateSourceGlassfrog(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceGlassfrogResponse{ + res := &operations.CreateSourceFreshsalesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5669,16 +6439,27 @@ func (s *Sources) CreateSourceGlassfrog(ctx context.Context, request *shared.Sou } -// CreateSourceGnews - Create a source +// CreateSourceGainsightPx - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGnews(ctx context.Context, request *shared.SourceGnewsCreateRequest) (*operations.CreateSourceGnewsResponse, error) { +func (s *Sources) CreateSourceGainsightPx(ctx context.Context, request *shared.SourceGainsightPxCreateRequest, opts ...operations.Option) (*operations.CreateSourceGainsightPxResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGnews", + OperationID: "createSourceGainsightPx", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5690,6 +6471,17 @@ func (s *Sources) CreateSourceGnews(ctx context.Context, request *shared.SourceG return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5731,7 +6523,7 @@ func (s *Sources) CreateSourceGnews(ctx context.Context, request *shared.SourceG } } - res := &operations.CreateSourceGnewsResponse{ + res := &operations.CreateSourceGainsightPxResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5768,113 +6560,25 @@ func (s *Sources) CreateSourceGnews(ctx context.Context, request *shared.SourceG } -// CreateSourceGoogleAds - Create a source +// CreateSourceGcs - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleAds(ctx context.Context, request *shared.SourceGoogleAdsCreateRequest) (*operations.CreateSourceGoogleAdsResponse, error) { +func (s *Sources) CreateSourceGcs(ctx context.Context, request *shared.SourceGcsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleAds", + OperationID: "createSourceGcs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceGoogleAdsResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceGoogleAnalyticsDataAPI - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleAnalyticsDataAPI(ctx context.Context, request *shared.SourceGoogleAnalyticsDataAPICreateRequest) (*operations.CreateSourceGoogleAnalyticsDataAPIResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceGoogleAnalyticsDataApi", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -5888,6 +6592,17 @@ func (s *Sources) CreateSourceGoogleAnalyticsDataAPI(ctx context.Context, reques return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -5929,7 +6644,7 @@ func (s *Sources) CreateSourceGoogleAnalyticsDataAPI(ctx context.Context, reques } } - res := &operations.CreateSourceGoogleAnalyticsDataAPIResponse{ + res := &operations.CreateSourceGcsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -5966,16 +6681,27 @@ func (s *Sources) CreateSourceGoogleAnalyticsDataAPI(ctx context.Context, reques } -// CreateSourceGoogleAnalyticsV4ServiceAccountOnly - Create a source +// CreateSourceGetlago - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Context, request *shared.SourceGoogleAnalyticsV4ServiceAccountOnlyCreateRequest) (*operations.CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse, error) { +func (s *Sources) CreateSourceGetlago(ctx context.Context, request *shared.SourceGetlagoCreateRequest, opts ...operations.Option) (*operations.CreateSourceGetlagoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleAnalyticsV4ServiceAccountOnly", + OperationID: "createSourceGetlago", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -5987,6 +6713,17 @@ func (s *Sources) CreateSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Co return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6028,7 +6765,7 @@ func (s *Sources) CreateSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Co } } - res := &operations.CreateSourceGoogleAnalyticsV4ServiceAccountOnlyResponse{ + res := &operations.CreateSourceGetlagoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6065,16 +6802,27 @@ func (s *Sources) CreateSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Co } -// CreateSourceGoogleDirectory - Create a source +// CreateSourceGithub - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleDirectory(ctx context.Context, request *shared.SourceGoogleDirectoryCreateRequest) (*operations.CreateSourceGoogleDirectoryResponse, error) { +func (s *Sources) CreateSourceGithub(ctx context.Context, request *shared.SourceGithubCreateRequest, opts ...operations.Option) (*operations.CreateSourceGithubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleDirectory", + OperationID: "createSourceGithub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6086,6 +6834,17 @@ func (s *Sources) CreateSourceGoogleDirectory(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6127,7 +6886,7 @@ func (s *Sources) CreateSourceGoogleDirectory(ctx context.Context, request *shar } } - res := &operations.CreateSourceGoogleDirectoryResponse{ + res := &operations.CreateSourceGithubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6164,16 +6923,27 @@ func (s *Sources) CreateSourceGoogleDirectory(ctx context.Context, request *shar } -// CreateSourceGoogleDrive - Create a source +// CreateSourceGitlab - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleDrive(ctx context.Context, request *shared.SourceGoogleDriveCreateRequest) (*operations.CreateSourceGoogleDriveResponse, error) { +func (s *Sources) CreateSourceGitlab(ctx context.Context, request *shared.SourceGitlabCreateRequest, opts ...operations.Option) (*operations.CreateSourceGitlabResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleDrive", + OperationID: "createSourceGitlab", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6185,6 +6955,17 @@ func (s *Sources) CreateSourceGoogleDrive(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6226,7 +7007,7 @@ func (s *Sources) CreateSourceGoogleDrive(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceGoogleDriveResponse{ + res := &operations.CreateSourceGitlabResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6263,16 +7044,27 @@ func (s *Sources) CreateSourceGoogleDrive(ctx context.Context, request *shared.S } -// CreateSourceGooglePagespeedInsights - Create a source +// CreateSourceGlassfrog - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGooglePagespeedInsights(ctx context.Context, request *shared.SourceGooglePagespeedInsightsCreateRequest) (*operations.CreateSourceGooglePagespeedInsightsResponse, error) { +func (s *Sources) CreateSourceGlassfrog(ctx context.Context, request *shared.SourceGlassfrogCreateRequest, opts ...operations.Option) (*operations.CreateSourceGlassfrogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGooglePagespeedInsights", + OperationID: "createSourceGlassfrog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6284,6 +7076,17 @@ func (s *Sources) CreateSourceGooglePagespeedInsights(ctx context.Context, reque return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6325,7 +7128,7 @@ func (s *Sources) CreateSourceGooglePagespeedInsights(ctx context.Context, reque } } - res := &operations.CreateSourceGooglePagespeedInsightsResponse{ + res := &operations.CreateSourceGlassfrogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6362,16 +7165,27 @@ func (s *Sources) CreateSourceGooglePagespeedInsights(ctx context.Context, reque } -// CreateSourceGoogleSearchConsole - Create a source +// CreateSourceGnews - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleSearchConsole(ctx context.Context, request *shared.SourceGoogleSearchConsoleCreateRequest) (*operations.CreateSourceGoogleSearchConsoleResponse, error) { +func (s *Sources) CreateSourceGnews(ctx context.Context, request *shared.SourceGnewsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGnewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleSearchConsole", + OperationID: "createSourceGnews", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6383,6 +7197,17 @@ func (s *Sources) CreateSourceGoogleSearchConsole(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6424,7 +7249,7 @@ func (s *Sources) CreateSourceGoogleSearchConsole(ctx context.Context, request * } } - res := &operations.CreateSourceGoogleSearchConsoleResponse{ + res := &operations.CreateSourceGnewsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6461,16 +7286,27 @@ func (s *Sources) CreateSourceGoogleSearchConsole(ctx context.Context, request * } -// CreateSourceGoogleSheets - Create a source +// CreateSourceGoldcast - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleSheets(ctx context.Context, request *shared.SourceGoogleSheetsCreateRequest) (*operations.CreateSourceGoogleSheetsResponse, error) { +func (s *Sources) CreateSourceGoldcast(ctx context.Context, request *shared.SourceGoldcastCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoldcastResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleSheets", + OperationID: "createSourceGoldcast", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6482,6 +7318,17 @@ func (s *Sources) CreateSourceGoogleSheets(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6523,7 +7370,7 @@ func (s *Sources) CreateSourceGoogleSheets(ctx context.Context, request *shared. } } - res := &operations.CreateSourceGoogleSheetsResponse{ + res := &operations.CreateSourceGoldcastResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6560,16 +7407,27 @@ func (s *Sources) CreateSourceGoogleSheets(ctx context.Context, request *shared. } -// CreateSourceGoogleWebfonts - Create a source +// CreateSourceGoogleAds - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGoogleWebfonts(ctx context.Context, request *shared.SourceGoogleWebfontsCreateRequest) (*operations.CreateSourceGoogleWebfontsResponse, error) { +func (s *Sources) CreateSourceGoogleAds(ctx context.Context, request *shared.SourceGoogleAdsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGoogleWebfonts", + OperationID: "createSourceGoogleAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6581,6 +7439,17 @@ func (s *Sources) CreateSourceGoogleWebfonts(ctx context.Context, request *share return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6622,7 +7491,7 @@ func (s *Sources) CreateSourceGoogleWebfonts(ctx context.Context, request *share } } - res := &operations.CreateSourceGoogleWebfontsResponse{ + res := &operations.CreateSourceGoogleAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6659,16 +7528,27 @@ func (s *Sources) CreateSourceGoogleWebfonts(ctx context.Context, request *share } -// CreateSourceGreenhouse - Create a source +// CreateSourceGoogleAnalyticsDataAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGreenhouse(ctx context.Context, request *shared.SourceGreenhouseCreateRequest) (*operations.CreateSourceGreenhouseResponse, error) { +func (s *Sources) CreateSourceGoogleAnalyticsDataAPI(ctx context.Context, request *shared.SourceGoogleAnalyticsDataAPICreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleAnalyticsDataAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGreenhouse", + OperationID: "createSourceGoogleAnalyticsDataApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6680,6 +7560,17 @@ func (s *Sources) CreateSourceGreenhouse(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6721,7 +7612,7 @@ func (s *Sources) CreateSourceGreenhouse(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceGreenhouseResponse{ + res := &operations.CreateSourceGoogleAnalyticsDataAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6758,16 +7649,27 @@ func (s *Sources) CreateSourceGreenhouse(ctx context.Context, request *shared.So } -// CreateSourceGridly - Create a source +// CreateSourceGoogleDirectory - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceGridly(ctx context.Context, request *shared.SourceGridlyCreateRequest) (*operations.CreateSourceGridlyResponse, error) { +func (s *Sources) CreateSourceGoogleDirectory(ctx context.Context, request *shared.SourceGoogleDirectoryCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleDirectoryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceGridly", + OperationID: "createSourceGoogleDirectory", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6779,6 +7681,17 @@ func (s *Sources) CreateSourceGridly(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6820,7 +7733,7 @@ func (s *Sources) CreateSourceGridly(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceGridlyResponse{ + res := &operations.CreateSourceGoogleDirectoryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6857,16 +7770,27 @@ func (s *Sources) CreateSourceGridly(ctx context.Context, request *shared.Source } -// CreateSourceHarvest - Create a source +// CreateSourceGoogleDrive - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceHarvest(ctx context.Context, request *shared.SourceHarvestCreateRequest) (*operations.CreateSourceHarvestResponse, error) { +func (s *Sources) CreateSourceGoogleDrive(ctx context.Context, request *shared.SourceGoogleDriveCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleDriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceHarvest", + OperationID: "createSourceGoogleDrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6878,6 +7802,17 @@ func (s *Sources) CreateSourceHarvest(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -6919,7 +7854,7 @@ func (s *Sources) CreateSourceHarvest(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceHarvestResponse{ + res := &operations.CreateSourceGoogleDriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -6956,16 +7891,27 @@ func (s *Sources) CreateSourceHarvest(ctx context.Context, request *shared.Sourc } -// CreateSourceHubplanner - Create a source +// CreateSourceGooglePagespeedInsights - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceHubplanner(ctx context.Context, request *shared.SourceHubplannerCreateRequest) (*operations.CreateSourceHubplannerResponse, error) { +func (s *Sources) CreateSourceGooglePagespeedInsights(ctx context.Context, request *shared.SourceGooglePagespeedInsightsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGooglePagespeedInsightsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceHubplanner", + OperationID: "createSourceGooglePagespeedInsights", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -6977,6 +7923,17 @@ func (s *Sources) CreateSourceHubplanner(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7018,7 +7975,7 @@ func (s *Sources) CreateSourceHubplanner(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceHubplannerResponse{ + res := &operations.CreateSourceGooglePagespeedInsightsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7055,16 +8012,27 @@ func (s *Sources) CreateSourceHubplanner(ctx context.Context, request *shared.So } -// CreateSourceHubspot - Create a source +// CreateSourceGoogleSearchConsole - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceHubspot(ctx context.Context, request *shared.SourceHubspotCreateRequest) (*operations.CreateSourceHubspotResponse, error) { +func (s *Sources) CreateSourceGoogleSearchConsole(ctx context.Context, request *shared.SourceGoogleSearchConsoleCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleSearchConsoleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceHubspot", + OperationID: "createSourceGoogleSearchConsole", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7076,6 +8044,17 @@ func (s *Sources) CreateSourceHubspot(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7117,7 +8096,7 @@ func (s *Sources) CreateSourceHubspot(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceHubspotResponse{ + res := &operations.CreateSourceGoogleSearchConsoleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7154,16 +8133,27 @@ func (s *Sources) CreateSourceHubspot(ctx context.Context, request *shared.Sourc } -// CreateSourceInsightly - Create a source +// CreateSourceGoogleSheets - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceInsightly(ctx context.Context, request *shared.SourceInsightlyCreateRequest) (*operations.CreateSourceInsightlyResponse, error) { +func (s *Sources) CreateSourceGoogleSheets(ctx context.Context, request *shared.SourceGoogleSheetsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceInsightly", + OperationID: "createSourceGoogleSheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7175,6 +8165,17 @@ func (s *Sources) CreateSourceInsightly(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7216,7 +8217,7 @@ func (s *Sources) CreateSourceInsightly(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceInsightlyResponse{ + res := &operations.CreateSourceGoogleSheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7253,16 +8254,27 @@ func (s *Sources) CreateSourceInsightly(ctx context.Context, request *shared.Sou } -// CreateSourceInstagram - Create a source +// CreateSourceGoogleWebfonts - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceInstagram(ctx context.Context, request *shared.SourceInstagramCreateRequest) (*operations.CreateSourceInstagramResponse, error) { +func (s *Sources) CreateSourceGoogleWebfonts(ctx context.Context, request *shared.SourceGoogleWebfontsCreateRequest, opts ...operations.Option) (*operations.CreateSourceGoogleWebfontsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceInstagram", + OperationID: "createSourceGoogleWebfonts", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7274,6 +8286,17 @@ func (s *Sources) CreateSourceInstagram(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7315,7 +8338,7 @@ func (s *Sources) CreateSourceInstagram(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceInstagramResponse{ + res := &operations.CreateSourceGoogleWebfontsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7352,16 +8375,27 @@ func (s *Sources) CreateSourceInstagram(ctx context.Context, request *shared.Sou } -// CreateSourceInstatus - Create a source +// CreateSourceGreenhouse - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceInstatus(ctx context.Context, request *shared.SourceInstatusCreateRequest) (*operations.CreateSourceInstatusResponse, error) { +func (s *Sources) CreateSourceGreenhouse(ctx context.Context, request *shared.SourceGreenhouseCreateRequest, opts ...operations.Option) (*operations.CreateSourceGreenhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceInstatus", + OperationID: "createSourceGreenhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7373,6 +8407,17 @@ func (s *Sources) CreateSourceInstatus(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7414,7 +8459,7 @@ func (s *Sources) CreateSourceInstatus(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceInstatusResponse{ + res := &operations.CreateSourceGreenhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7451,16 +8496,27 @@ func (s *Sources) CreateSourceInstatus(ctx context.Context, request *shared.Sour } -// CreateSourceIntercom - Create a source +// CreateSourceGridly - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceIntercom(ctx context.Context, request *shared.SourceIntercomCreateRequest) (*operations.CreateSourceIntercomResponse, error) { +func (s *Sources) CreateSourceGridly(ctx context.Context, request *shared.SourceGridlyCreateRequest, opts ...operations.Option) (*operations.CreateSourceGridlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceIntercom", + OperationID: "createSourceGridly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7472,6 +8528,17 @@ func (s *Sources) CreateSourceIntercom(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7513,7 +8580,7 @@ func (s *Sources) CreateSourceIntercom(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceIntercomResponse{ + res := &operations.CreateSourceGridlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7550,16 +8617,27 @@ func (s *Sources) CreateSourceIntercom(ctx context.Context, request *shared.Sour } -// CreateSourceIp2whois - Create a source +// CreateSourceHarvest - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceIp2whois(ctx context.Context, request *shared.SourceIp2whoisCreateRequest) (*operations.CreateSourceIp2whoisResponse, error) { +func (s *Sources) CreateSourceHarvest(ctx context.Context, request *shared.SourceHarvestCreateRequest, opts ...operations.Option) (*operations.CreateSourceHarvestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceIp2whois", + OperationID: "createSourceHarvest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7571,6 +8649,17 @@ func (s *Sources) CreateSourceIp2whois(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7612,7 +8701,7 @@ func (s *Sources) CreateSourceIp2whois(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceIp2whoisResponse{ + res := &operations.CreateSourceHarvestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7649,16 +8738,27 @@ func (s *Sources) CreateSourceIp2whois(ctx context.Context, request *shared.Sour } -// CreateSourceIterable - Create a source +// CreateSourceHubplanner - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceIterable(ctx context.Context, request *shared.SourceIterableCreateRequest) (*operations.CreateSourceIterableResponse, error) { +func (s *Sources) CreateSourceHubplanner(ctx context.Context, request *shared.SourceHubplannerCreateRequest, opts ...operations.Option) (*operations.CreateSourceHubplannerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceIterable", + OperationID: "createSourceHubplanner", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7670,6 +8770,17 @@ func (s *Sources) CreateSourceIterable(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7711,7 +8822,7 @@ func (s *Sources) CreateSourceIterable(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceIterableResponse{ + res := &operations.CreateSourceHubplannerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7748,16 +8859,27 @@ func (s *Sources) CreateSourceIterable(ctx context.Context, request *shared.Sour } -// CreateSourceJira - Create a source +// CreateSourceHubspot - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceJira(ctx context.Context, request *shared.SourceJiraCreateRequest) (*operations.CreateSourceJiraResponse, error) { +func (s *Sources) CreateSourceHubspot(ctx context.Context, request *shared.SourceHubspotCreateRequest, opts ...operations.Option) (*operations.CreateSourceHubspotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceJira", + OperationID: "createSourceHubspot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7769,6 +8891,17 @@ func (s *Sources) CreateSourceJira(ctx context.Context, request *shared.SourceJi return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7810,7 +8943,7 @@ func (s *Sources) CreateSourceJira(ctx context.Context, request *shared.SourceJi } } - res := &operations.CreateSourceJiraResponse{ + res := &operations.CreateSourceHubspotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7847,16 +8980,27 @@ func (s *Sources) CreateSourceJira(ctx context.Context, request *shared.SourceJi } -// CreateSourceK6Cloud - Create a source +// CreateSourceInsightly - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceK6Cloud(ctx context.Context, request *shared.SourceK6CloudCreateRequest) (*operations.CreateSourceK6CloudResponse, error) { +func (s *Sources) CreateSourceInsightly(ctx context.Context, request *shared.SourceInsightlyCreateRequest, opts ...operations.Option) (*operations.CreateSourceInsightlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceK6Cloud", + OperationID: "createSourceInsightly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7868,6 +9012,17 @@ func (s *Sources) CreateSourceK6Cloud(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -7909,7 +9064,7 @@ func (s *Sources) CreateSourceK6Cloud(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceK6CloudResponse{ + res := &operations.CreateSourceInsightlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -7946,16 +9101,27 @@ func (s *Sources) CreateSourceK6Cloud(ctx context.Context, request *shared.Sourc } -// CreateSourceKlarna - Create a source +// CreateSourceInstagram - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceKlarna(ctx context.Context, request *shared.SourceKlarnaCreateRequest) (*operations.CreateSourceKlarnaResponse, error) { +func (s *Sources) CreateSourceInstagram(ctx context.Context, request *shared.SourceInstagramCreateRequest, opts ...operations.Option) (*operations.CreateSourceInstagramResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceKlarna", + OperationID: "createSourceInstagram", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -7967,6 +9133,17 @@ func (s *Sources) CreateSourceKlarna(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8008,7 +9185,7 @@ func (s *Sources) CreateSourceKlarna(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceKlarnaResponse{ + res := &operations.CreateSourceInstagramResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8045,16 +9222,27 @@ func (s *Sources) CreateSourceKlarna(ctx context.Context, request *shared.Source } -// CreateSourceKlaviyo - Create a source +// CreateSourceInstatus - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceKlaviyo(ctx context.Context, request *shared.SourceKlaviyoCreateRequest) (*operations.CreateSourceKlaviyoResponse, error) { +func (s *Sources) CreateSourceInstatus(ctx context.Context, request *shared.SourceInstatusCreateRequest, opts ...operations.Option) (*operations.CreateSourceInstatusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceKlaviyo", + OperationID: "createSourceInstatus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8066,6 +9254,17 @@ func (s *Sources) CreateSourceKlaviyo(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8107,7 +9306,7 @@ func (s *Sources) CreateSourceKlaviyo(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceKlaviyoResponse{ + res := &operations.CreateSourceInstatusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8144,16 +9343,27 @@ func (s *Sources) CreateSourceKlaviyo(ctx context.Context, request *shared.Sourc } -// CreateSourceKyve - Create a source +// CreateSourceIntercom - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceKyve(ctx context.Context, request *shared.SourceKyveCreateRequest) (*operations.CreateSourceKyveResponse, error) { +func (s *Sources) CreateSourceIntercom(ctx context.Context, request *shared.SourceIntercomCreateRequest, opts ...operations.Option) (*operations.CreateSourceIntercomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceKyve", + OperationID: "createSourceIntercom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8165,6 +9375,17 @@ func (s *Sources) CreateSourceKyve(ctx context.Context, request *shared.SourceKy return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8206,7 +9427,7 @@ func (s *Sources) CreateSourceKyve(ctx context.Context, request *shared.SourceKy } } - res := &operations.CreateSourceKyveResponse{ + res := &operations.CreateSourceIntercomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8243,16 +9464,27 @@ func (s *Sources) CreateSourceKyve(ctx context.Context, request *shared.SourceKy } -// CreateSourceLaunchdarkly - Create a source +// CreateSourceIp2whois - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLaunchdarkly(ctx context.Context, request *shared.SourceLaunchdarklyCreateRequest) (*operations.CreateSourceLaunchdarklyResponse, error) { +func (s *Sources) CreateSourceIp2whois(ctx context.Context, request *shared.SourceIp2whoisCreateRequest, opts ...operations.Option) (*operations.CreateSourceIp2whoisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLaunchdarkly", + OperationID: "createSourceIp2whois", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8264,6 +9496,17 @@ func (s *Sources) CreateSourceLaunchdarkly(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8305,7 +9548,7 @@ func (s *Sources) CreateSourceLaunchdarkly(ctx context.Context, request *shared. } } - res := &operations.CreateSourceLaunchdarklyResponse{ + res := &operations.CreateSourceIp2whoisResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8342,16 +9585,27 @@ func (s *Sources) CreateSourceLaunchdarkly(ctx context.Context, request *shared. } -// CreateSourceLemlist - Create a source +// CreateSourceIterable - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLemlist(ctx context.Context, request *shared.SourceLemlistCreateRequest) (*operations.CreateSourceLemlistResponse, error) { +func (s *Sources) CreateSourceIterable(ctx context.Context, request *shared.SourceIterableCreateRequest, opts ...operations.Option) (*operations.CreateSourceIterableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLemlist", + OperationID: "createSourceIterable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8363,6 +9617,17 @@ func (s *Sources) CreateSourceLemlist(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8404,7 +9669,7 @@ func (s *Sources) CreateSourceLemlist(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceLemlistResponse{ + res := &operations.CreateSourceIterableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8441,16 +9706,27 @@ func (s *Sources) CreateSourceLemlist(ctx context.Context, request *shared.Sourc } -// CreateSourceLeverHiring - Create a source +// CreateSourceJira - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLeverHiring(ctx context.Context, request *shared.SourceLeverHiringCreateRequest) (*operations.CreateSourceLeverHiringResponse, error) { +func (s *Sources) CreateSourceJira(ctx context.Context, request *shared.SourceJiraCreateRequest, opts ...operations.Option) (*operations.CreateSourceJiraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLeverHiring", + OperationID: "createSourceJira", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8462,6 +9738,17 @@ func (s *Sources) CreateSourceLeverHiring(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8503,7 +9790,7 @@ func (s *Sources) CreateSourceLeverHiring(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceLeverHiringResponse{ + res := &operations.CreateSourceJiraResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8540,16 +9827,27 @@ func (s *Sources) CreateSourceLeverHiring(ctx context.Context, request *shared.S } -// CreateSourceLinkedinAds - Create a source +// CreateSourceK6Cloud - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLinkedinAds(ctx context.Context, request *shared.SourceLinkedinAdsCreateRequest) (*operations.CreateSourceLinkedinAdsResponse, error) { +func (s *Sources) CreateSourceK6Cloud(ctx context.Context, request *shared.SourceK6CloudCreateRequest, opts ...operations.Option) (*operations.CreateSourceK6CloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLinkedinAds", + OperationID: "createSourceK6Cloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8561,6 +9859,17 @@ func (s *Sources) CreateSourceLinkedinAds(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8602,7 +9911,7 @@ func (s *Sources) CreateSourceLinkedinAds(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceLinkedinAdsResponse{ + res := &operations.CreateSourceK6CloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8639,16 +9948,27 @@ func (s *Sources) CreateSourceLinkedinAds(ctx context.Context, request *shared.S } -// CreateSourceLinkedinPages - Create a source +// CreateSourceKlarna - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLinkedinPages(ctx context.Context, request *shared.SourceLinkedinPagesCreateRequest) (*operations.CreateSourceLinkedinPagesResponse, error) { +func (s *Sources) CreateSourceKlarna(ctx context.Context, request *shared.SourceKlarnaCreateRequest, opts ...operations.Option) (*operations.CreateSourceKlarnaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLinkedinPages", + OperationID: "createSourceKlarna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -8660,6 +9980,17 @@ func (s *Sources) CreateSourceLinkedinPages(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8701,7 +10032,7 @@ func (s *Sources) CreateSourceLinkedinPages(ctx context.Context, request *shared } } - res := &operations.CreateSourceLinkedinPagesResponse{ + res := &operations.CreateSourceKlarnaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8738,113 +10069,25 @@ func (s *Sources) CreateSourceLinkedinPages(ctx context.Context, request *shared } -// CreateSourceLinnworks - Create a source +// CreateSourceKlaviyo - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLinnworks(ctx context.Context, request *shared.SourceLinnworksCreateRequest) (*operations.CreateSourceLinnworksResponse, error) { +func (s *Sources) CreateSourceKlaviyo(ctx context.Context, request *shared.SourceKlaviyoCreateRequest, opts ...operations.Option) (*operations.CreateSourceKlaviyoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceLinnworks", + OperationID: "createSourceKlaviyo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceLinnworksResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceLokalise - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceLokalise(ctx context.Context, request *shared.SourceLokaliseCreateRequest) (*operations.CreateSourceLokaliseResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceLokalise", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -8858,6 +10101,17 @@ func (s *Sources) CreateSourceLokalise(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -8899,7 +10153,7 @@ func (s *Sources) CreateSourceLokalise(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceLokaliseResponse{ + res := &operations.CreateSourceKlaviyoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -8936,113 +10190,25 @@ func (s *Sources) CreateSourceLokalise(ctx context.Context, request *shared.Sour } -// CreateSourceMailchimp - Create a source +// CreateSourceKyve - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMailchimp(ctx context.Context, request *shared.SourceMailchimpCreateRequest) (*operations.CreateSourceMailchimpResponse, error) { +func (s *Sources) CreateSourceKyve(ctx context.Context, request *shared.SourceKyveCreateRequest, opts ...operations.Option) (*operations.CreateSourceKyveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMailchimp", + OperationID: "createSourceKyve", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceMailchimpResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceMailgun - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMailgun(ctx context.Context, request *shared.SourceMailgunCreateRequest) (*operations.CreateSourceMailgunResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceMailgun", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -9056,6 +10222,17 @@ func (s *Sources) CreateSourceMailgun(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9097,7 +10274,7 @@ func (s *Sources) CreateSourceMailgun(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceMailgunResponse{ + res := &operations.CreateSourceKyveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9134,16 +10311,27 @@ func (s *Sources) CreateSourceMailgun(ctx context.Context, request *shared.Sourc } -// CreateSourceMailjetSms - Create a source +// CreateSourceLaunchdarkly - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMailjetSms(ctx context.Context, request *shared.SourceMailjetSmsCreateRequest) (*operations.CreateSourceMailjetSmsResponse, error) { +func (s *Sources) CreateSourceLaunchdarkly(ctx context.Context, request *shared.SourceLaunchdarklyCreateRequest, opts ...operations.Option) (*operations.CreateSourceLaunchdarklyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMailjetSms", + OperationID: "createSourceLaunchdarkly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9155,6 +10343,17 @@ func (s *Sources) CreateSourceMailjetSms(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9196,7 +10395,7 @@ func (s *Sources) CreateSourceMailjetSms(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceMailjetSmsResponse{ + res := &operations.CreateSourceLaunchdarklyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9233,16 +10432,27 @@ func (s *Sources) CreateSourceMailjetSms(ctx context.Context, request *shared.So } -// CreateSourceMarketo - Create a source +// CreateSourceLemlist - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMarketo(ctx context.Context, request *shared.SourceMarketoCreateRequest) (*operations.CreateSourceMarketoResponse, error) { +func (s *Sources) CreateSourceLemlist(ctx context.Context, request *shared.SourceLemlistCreateRequest, opts ...operations.Option) (*operations.CreateSourceLemlistResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMarketo", + OperationID: "createSourceLemlist", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9254,6 +10464,17 @@ func (s *Sources) CreateSourceMarketo(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9295,7 +10516,7 @@ func (s *Sources) CreateSourceMarketo(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceMarketoResponse{ + res := &operations.CreateSourceLemlistResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9332,16 +10553,27 @@ func (s *Sources) CreateSourceMarketo(ctx context.Context, request *shared.Sourc } -// CreateSourceMetabase - Create a source +// CreateSourceLeverHiring - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMetabase(ctx context.Context, request *shared.SourceMetabaseCreateRequest) (*operations.CreateSourceMetabaseResponse, error) { +func (s *Sources) CreateSourceLeverHiring(ctx context.Context, request *shared.SourceLeverHiringCreateRequest, opts ...operations.Option) (*operations.CreateSourceLeverHiringResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMetabase", + OperationID: "createSourceLeverHiring", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9353,6 +10585,17 @@ func (s *Sources) CreateSourceMetabase(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9394,7 +10637,7 @@ func (s *Sources) CreateSourceMetabase(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceMetabaseResponse{ + res := &operations.CreateSourceLeverHiringResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9431,16 +10674,27 @@ func (s *Sources) CreateSourceMetabase(ctx context.Context, request *shared.Sour } -// CreateSourceMicrosoftOnedrive - Create a source +// CreateSourceLinkedinAds - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMicrosoftOnedrive(ctx context.Context, request *shared.SourceMicrosoftOnedriveCreateRequest) (*operations.CreateSourceMicrosoftOnedriveResponse, error) { +func (s *Sources) CreateSourceLinkedinAds(ctx context.Context, request *shared.SourceLinkedinAdsCreateRequest, opts ...operations.Option) (*operations.CreateSourceLinkedinAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMicrosoftOnedrive", + OperationID: "createSourceLinkedinAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9452,6 +10706,17 @@ func (s *Sources) CreateSourceMicrosoftOnedrive(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9493,7 +10758,7 @@ func (s *Sources) CreateSourceMicrosoftOnedrive(ctx context.Context, request *sh } } - res := &operations.CreateSourceMicrosoftOnedriveResponse{ + res := &operations.CreateSourceLinkedinAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9530,16 +10795,27 @@ func (s *Sources) CreateSourceMicrosoftOnedrive(ctx context.Context, request *sh } -// CreateSourceMicrosoftSharepoint - Create a source +// CreateSourceLinkedinPages - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMicrosoftSharepoint(ctx context.Context, request *shared.SourceMicrosoftSharepointCreateRequest) (*operations.CreateSourceMicrosoftSharepointResponse, error) { +func (s *Sources) CreateSourceLinkedinPages(ctx context.Context, request *shared.SourceLinkedinPagesCreateRequest, opts ...operations.Option) (*operations.CreateSourceLinkedinPagesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMicrosoftSharepoint", + OperationID: "createSourceLinkedinPages", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9551,6 +10827,17 @@ func (s *Sources) CreateSourceMicrosoftSharepoint(ctx context.Context, request * return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9592,7 +10879,7 @@ func (s *Sources) CreateSourceMicrosoftSharepoint(ctx context.Context, request * } } - res := &operations.CreateSourceMicrosoftSharepointResponse{ + res := &operations.CreateSourceLinkedinPagesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9629,16 +10916,27 @@ func (s *Sources) CreateSourceMicrosoftSharepoint(ctx context.Context, request * } -// CreateSourceMicrosoftTeams - Create a source +// CreateSourceLinnworks - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMicrosoftTeams(ctx context.Context, request *shared.SourceMicrosoftTeamsCreateRequest) (*operations.CreateSourceMicrosoftTeamsResponse, error) { +func (s *Sources) CreateSourceLinnworks(ctx context.Context, request *shared.SourceLinnworksCreateRequest, opts ...operations.Option) (*operations.CreateSourceLinnworksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMicrosoftTeams", + OperationID: "createSourceLinnworks", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9650,6 +10948,17 @@ func (s *Sources) CreateSourceMicrosoftTeams(ctx context.Context, request *share return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9691,7 +11000,7 @@ func (s *Sources) CreateSourceMicrosoftTeams(ctx context.Context, request *share } } - res := &operations.CreateSourceMicrosoftTeamsResponse{ + res := &operations.CreateSourceLinnworksResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9728,16 +11037,27 @@ func (s *Sources) CreateSourceMicrosoftTeams(ctx context.Context, request *share } -// CreateSourceMixpanel - Create a source +// CreateSourceLokalise - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMixpanel(ctx context.Context, request *shared.SourceMixpanelCreateRequest) (*operations.CreateSourceMixpanelResponse, error) { +func (s *Sources) CreateSourceLokalise(ctx context.Context, request *shared.SourceLokaliseCreateRequest, opts ...operations.Option) (*operations.CreateSourceLokaliseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMixpanel", + OperationID: "createSourceLokalise", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9749,6 +11069,17 @@ func (s *Sources) CreateSourceMixpanel(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9790,7 +11121,7 @@ func (s *Sources) CreateSourceMixpanel(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceMixpanelResponse{ + res := &operations.CreateSourceLokaliseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9827,16 +11158,27 @@ func (s *Sources) CreateSourceMixpanel(ctx context.Context, request *shared.Sour } -// CreateSourceMonday - Create a source +// CreateSourceMailchimp - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMonday(ctx context.Context, request *shared.SourceMondayCreateRequest) (*operations.CreateSourceMondayResponse, error) { +func (s *Sources) CreateSourceMailchimp(ctx context.Context, request *shared.SourceMailchimpCreateRequest, opts ...operations.Option) (*operations.CreateSourceMailchimpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMonday", + OperationID: "createSourceMailchimp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9848,6 +11190,17 @@ func (s *Sources) CreateSourceMonday(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9889,7 +11242,7 @@ func (s *Sources) CreateSourceMonday(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceMondayResponse{ + res := &operations.CreateSourceMailchimpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -9926,16 +11279,27 @@ func (s *Sources) CreateSourceMonday(ctx context.Context, request *shared.Source } -// CreateSourceMongodbInternalPoc - Create a source +// CreateSourceMailgun - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMongodbInternalPoc(ctx context.Context, request *shared.SourceMongodbInternalPocCreateRequest) (*operations.CreateSourceMongodbInternalPocResponse, error) { +func (s *Sources) CreateSourceMailgun(ctx context.Context, request *shared.SourceMailgunCreateRequest, opts ...operations.Option) (*operations.CreateSourceMailgunResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMongodbInternalPoc", + OperationID: "createSourceMailgun", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -9947,6 +11311,17 @@ func (s *Sources) CreateSourceMongodbInternalPoc(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -9988,7 +11363,7 @@ func (s *Sources) CreateSourceMongodbInternalPoc(ctx context.Context, request *s } } - res := &operations.CreateSourceMongodbInternalPocResponse{ + res := &operations.CreateSourceMailgunResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10025,16 +11400,27 @@ func (s *Sources) CreateSourceMongodbInternalPoc(ctx context.Context, request *s } -// CreateSourceMongodbV2 - Create a source +// CreateSourceMailjetSms - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMongodbV2(ctx context.Context, request *shared.SourceMongodbV2CreateRequest) (*operations.CreateSourceMongodbV2Response, error) { +func (s *Sources) CreateSourceMailjetSms(ctx context.Context, request *shared.SourceMailjetSmsCreateRequest, opts ...operations.Option) (*operations.CreateSourceMailjetSmsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMongodbV2", + OperationID: "createSourceMailjetSms", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10046,6 +11432,17 @@ func (s *Sources) CreateSourceMongodbV2(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10087,7 +11484,7 @@ func (s *Sources) CreateSourceMongodbV2(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceMongodbV2Response{ + res := &operations.CreateSourceMailjetSmsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10124,16 +11521,27 @@ func (s *Sources) CreateSourceMongodbV2(ctx context.Context, request *shared.Sou } -// CreateSourceMssql - Create a source +// CreateSourceMarketo - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMssql(ctx context.Context, request *shared.SourceMssqlCreateRequest) (*operations.CreateSourceMssqlResponse, error) { +func (s *Sources) CreateSourceMarketo(ctx context.Context, request *shared.SourceMarketoCreateRequest, opts ...operations.Option) (*operations.CreateSourceMarketoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMssql", + OperationID: "createSourceMarketo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10145,6 +11553,17 @@ func (s *Sources) CreateSourceMssql(ctx context.Context, request *shared.SourceM return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10186,7 +11605,7 @@ func (s *Sources) CreateSourceMssql(ctx context.Context, request *shared.SourceM } } - res := &operations.CreateSourceMssqlResponse{ + res := &operations.CreateSourceMarketoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10223,16 +11642,27 @@ func (s *Sources) CreateSourceMssql(ctx context.Context, request *shared.SourceM } -// CreateSourceMyHours - Create a source +// CreateSourceMetabase - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMyHours(ctx context.Context, request *shared.SourceMyHoursCreateRequest) (*operations.CreateSourceMyHoursResponse, error) { +func (s *Sources) CreateSourceMetabase(ctx context.Context, request *shared.SourceMetabaseCreateRequest, opts ...operations.Option) (*operations.CreateSourceMetabaseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMyHours", + OperationID: "createSourceMetabase", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10244,6 +11674,17 @@ func (s *Sources) CreateSourceMyHours(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10285,7 +11726,7 @@ func (s *Sources) CreateSourceMyHours(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceMyHoursResponse{ + res := &operations.CreateSourceMetabaseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10322,16 +11763,27 @@ func (s *Sources) CreateSourceMyHours(ctx context.Context, request *shared.Sourc } -// CreateSourceMysql - Create a source +// CreateSourceMicrosoftOnedrive - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceMysql(ctx context.Context, request *shared.SourceMysqlCreateRequest) (*operations.CreateSourceMysqlResponse, error) { +func (s *Sources) CreateSourceMicrosoftOnedrive(ctx context.Context, request *shared.SourceMicrosoftOnedriveCreateRequest, opts ...operations.Option) (*operations.CreateSourceMicrosoftOnedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceMysql", + OperationID: "createSourceMicrosoftOnedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10343,6 +11795,17 @@ func (s *Sources) CreateSourceMysql(ctx context.Context, request *shared.SourceM return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10384,7 +11847,7 @@ func (s *Sources) CreateSourceMysql(ctx context.Context, request *shared.SourceM } } - res := &operations.CreateSourceMysqlResponse{ + res := &operations.CreateSourceMicrosoftOnedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10421,16 +11884,27 @@ func (s *Sources) CreateSourceMysql(ctx context.Context, request *shared.SourceM } -// CreateSourceNetsuite - Create a source +// CreateSourceMicrosoftSharepoint - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceNetsuite(ctx context.Context, request *shared.SourceNetsuiteCreateRequest) (*operations.CreateSourceNetsuiteResponse, error) { +func (s *Sources) CreateSourceMicrosoftSharepoint(ctx context.Context, request *shared.SourceMicrosoftSharepointCreateRequest, opts ...operations.Option) (*operations.CreateSourceMicrosoftSharepointResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceNetsuite", + OperationID: "createSourceMicrosoftSharepoint", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10442,6 +11916,17 @@ func (s *Sources) CreateSourceNetsuite(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10483,7 +11968,7 @@ func (s *Sources) CreateSourceNetsuite(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceNetsuiteResponse{ + res := &operations.CreateSourceMicrosoftSharepointResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10520,16 +12005,27 @@ func (s *Sources) CreateSourceNetsuite(ctx context.Context, request *shared.Sour } -// CreateSourceNotion - Create a source +// CreateSourceMicrosoftTeams - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceNotion(ctx context.Context, request *shared.SourceNotionCreateRequest) (*operations.CreateSourceNotionResponse, error) { +func (s *Sources) CreateSourceMicrosoftTeams(ctx context.Context, request *shared.SourceMicrosoftTeamsCreateRequest, opts ...operations.Option) (*operations.CreateSourceMicrosoftTeamsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceNotion", + OperationID: "createSourceMicrosoftTeams", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10541,6 +12037,17 @@ func (s *Sources) CreateSourceNotion(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10582,7 +12089,7 @@ func (s *Sources) CreateSourceNotion(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceNotionResponse{ + res := &operations.CreateSourceMicrosoftTeamsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10619,16 +12126,27 @@ func (s *Sources) CreateSourceNotion(ctx context.Context, request *shared.Source } -// CreateSourceNytimes - Create a source +// CreateSourceMixpanel - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceNytimes(ctx context.Context, request *shared.SourceNytimesCreateRequest) (*operations.CreateSourceNytimesResponse, error) { +func (s *Sources) CreateSourceMixpanel(ctx context.Context, request *shared.SourceMixpanelCreateRequest, opts ...operations.Option) (*operations.CreateSourceMixpanelResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceNytimes", + OperationID: "createSourceMixpanel", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10640,6 +12158,17 @@ func (s *Sources) CreateSourceNytimes(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10681,7 +12210,7 @@ func (s *Sources) CreateSourceNytimes(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceNytimesResponse{ + res := &operations.CreateSourceMixpanelResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10718,16 +12247,27 @@ func (s *Sources) CreateSourceNytimes(ctx context.Context, request *shared.Sourc } -// CreateSourceOkta - Create a source +// CreateSourceMonday - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOkta(ctx context.Context, request *shared.SourceOktaCreateRequest) (*operations.CreateSourceOktaResponse, error) { +func (s *Sources) CreateSourceMonday(ctx context.Context, request *shared.SourceMondayCreateRequest, opts ...operations.Option) (*operations.CreateSourceMondayResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOkta", + OperationID: "createSourceMonday", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10739,6 +12279,17 @@ func (s *Sources) CreateSourceOkta(ctx context.Context, request *shared.SourceOk return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10780,7 +12331,7 @@ func (s *Sources) CreateSourceOkta(ctx context.Context, request *shared.SourceOk } } - res := &operations.CreateSourceOktaResponse{ + res := &operations.CreateSourceMondayResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10817,16 +12368,27 @@ func (s *Sources) CreateSourceOkta(ctx context.Context, request *shared.SourceOk } -// CreateSourceOmnisend - Create a source +// CreateSourceMongodbInternalPoc - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOmnisend(ctx context.Context, request *shared.SourceOmnisendCreateRequest) (*operations.CreateSourceOmnisendResponse, error) { +func (s *Sources) CreateSourceMongodbInternalPoc(ctx context.Context, request *shared.SourceMongodbInternalPocCreateRequest, opts ...operations.Option) (*operations.CreateSourceMongodbInternalPocResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOmnisend", + OperationID: "createSourceMongodbInternalPoc", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10838,6 +12400,17 @@ func (s *Sources) CreateSourceOmnisend(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10879,7 +12452,7 @@ func (s *Sources) CreateSourceOmnisend(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceOmnisendResponse{ + res := &operations.CreateSourceMongodbInternalPocResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -10916,16 +12489,27 @@ func (s *Sources) CreateSourceOmnisend(ctx context.Context, request *shared.Sour } -// CreateSourceOnesignal - Create a source +// CreateSourceMongodbV2 - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOnesignal(ctx context.Context, request *shared.SourceOnesignalCreateRequest) (*operations.CreateSourceOnesignalResponse, error) { +func (s *Sources) CreateSourceMongodbV2(ctx context.Context, request *shared.SourceMongodbV2CreateRequest, opts ...operations.Option) (*operations.CreateSourceMongodbV2Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOnesignal", + OperationID: "createSourceMongodbV2", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -10937,6 +12521,17 @@ func (s *Sources) CreateSourceOnesignal(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -10978,7 +12573,7 @@ func (s *Sources) CreateSourceOnesignal(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceOnesignalResponse{ + res := &operations.CreateSourceMongodbV2Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11015,16 +12610,27 @@ func (s *Sources) CreateSourceOnesignal(ctx context.Context, request *shared.Sou } -// CreateSourceOracle - Create a source +// CreateSourceMssql - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOracle(ctx context.Context, request *shared.SourceOracleCreateRequest) (*operations.CreateSourceOracleResponse, error) { +func (s *Sources) CreateSourceMssql(ctx context.Context, request *shared.SourceMssqlCreateRequest, opts ...operations.Option) (*operations.CreateSourceMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOracle", + OperationID: "createSourceMssql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11036,6 +12642,17 @@ func (s *Sources) CreateSourceOracle(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11077,7 +12694,7 @@ func (s *Sources) CreateSourceOracle(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceOracleResponse{ + res := &operations.CreateSourceMssqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11114,16 +12731,27 @@ func (s *Sources) CreateSourceOracle(ctx context.Context, request *shared.Source } -// CreateSourceOrb - Create a source +// CreateSourceMyHours - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOrb(ctx context.Context, request *shared.SourceOrbCreateRequest) (*operations.CreateSourceOrbResponse, error) { +func (s *Sources) CreateSourceMyHours(ctx context.Context, request *shared.SourceMyHoursCreateRequest, opts ...operations.Option) (*operations.CreateSourceMyHoursResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOrb", + OperationID: "createSourceMyHours", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11135,6 +12763,17 @@ func (s *Sources) CreateSourceOrb(ctx context.Context, request *shared.SourceOrb return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11176,7 +12815,7 @@ func (s *Sources) CreateSourceOrb(ctx context.Context, request *shared.SourceOrb } } - res := &operations.CreateSourceOrbResponse{ + res := &operations.CreateSourceMyHoursResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11213,113 +12852,25 @@ func (s *Sources) CreateSourceOrb(ctx context.Context, request *shared.SourceOrb } -// CreateSourceOrbit - Create a source +// CreateSourceMysql - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOrbit(ctx context.Context, request *shared.SourceOrbitCreateRequest) (*operations.CreateSourceOrbitResponse, error) { +func (s *Sources) CreateSourceMysql(ctx context.Context, request *shared.SourceMysqlCreateRequest, opts ...operations.Option) (*operations.CreateSourceMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOrbit", + OperationID: "createSourceMysql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceOrbitResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceOutbrainAmplify - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOutbrainAmplify(ctx context.Context, request *shared.SourceOutbrainAmplifyCreateRequest) (*operations.CreateSourceOutbrainAmplifyResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceOutbrainAmplify", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -11333,6 +12884,17 @@ func (s *Sources) CreateSourceOutbrainAmplify(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11374,7 +12936,7 @@ func (s *Sources) CreateSourceOutbrainAmplify(ctx context.Context, request *shar } } - res := &operations.CreateSourceOutbrainAmplifyResponse{ + res := &operations.CreateSourceMysqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11411,113 +12973,25 @@ func (s *Sources) CreateSourceOutbrainAmplify(ctx context.Context, request *shar } -// CreateSourceOutreach - Create a source +// CreateSourceNetsuite - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceOutreach(ctx context.Context, request *shared.SourceOutreachCreateRequest) (*operations.CreateSourceOutreachResponse, error) { +func (s *Sources) CreateSourceNetsuite(ctx context.Context, request *shared.SourceNetsuiteCreateRequest, opts ...operations.Option) (*operations.CreateSourceNetsuiteResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceOutreach", + OperationID: "createSourceNetsuite", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceOutreachResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourcePaypalTransaction - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePaypalTransaction(ctx context.Context, request *shared.SourcePaypalTransactionCreateRequest) (*operations.CreateSourcePaypalTransactionResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourcePaypalTransaction", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -11531,6 +13005,17 @@ func (s *Sources) CreateSourcePaypalTransaction(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11572,7 +13057,7 @@ func (s *Sources) CreateSourcePaypalTransaction(ctx context.Context, request *sh } } - res := &operations.CreateSourcePaypalTransactionResponse{ + res := &operations.CreateSourceNetsuiteResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11609,16 +13094,27 @@ func (s *Sources) CreateSourcePaypalTransaction(ctx context.Context, request *sh } -// CreateSourcePaystack - Create a source +// CreateSourceNotion - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePaystack(ctx context.Context, request *shared.SourcePaystackCreateRequest) (*operations.CreateSourcePaystackResponse, error) { +func (s *Sources) CreateSourceNotion(ctx context.Context, request *shared.SourceNotionCreateRequest, opts ...operations.Option) (*operations.CreateSourceNotionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePaystack", + OperationID: "createSourceNotion", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11630,6 +13126,17 @@ func (s *Sources) CreateSourcePaystack(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11671,7 +13178,7 @@ func (s *Sources) CreateSourcePaystack(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourcePaystackResponse{ + res := &operations.CreateSourceNotionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11708,16 +13215,27 @@ func (s *Sources) CreateSourcePaystack(ctx context.Context, request *shared.Sour } -// CreateSourcePendo - Create a source +// CreateSourceNytimes - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePendo(ctx context.Context, request *shared.SourcePendoCreateRequest) (*operations.CreateSourcePendoResponse, error) { +func (s *Sources) CreateSourceNytimes(ctx context.Context, request *shared.SourceNytimesCreateRequest, opts ...operations.Option) (*operations.CreateSourceNytimesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePendo", + OperationID: "createSourceNytimes", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11729,6 +13247,17 @@ func (s *Sources) CreateSourcePendo(ctx context.Context, request *shared.SourceP return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11770,7 +13299,7 @@ func (s *Sources) CreateSourcePendo(ctx context.Context, request *shared.SourceP } } - res := &operations.CreateSourcePendoResponse{ + res := &operations.CreateSourceNytimesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11807,16 +13336,27 @@ func (s *Sources) CreateSourcePendo(ctx context.Context, request *shared.SourceP } -// CreateSourcePersistiq - Create a source +// CreateSourceOkta - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePersistiq(ctx context.Context, request *shared.SourcePersistiqCreateRequest) (*operations.CreateSourcePersistiqResponse, error) { +func (s *Sources) CreateSourceOkta(ctx context.Context, request *shared.SourceOktaCreateRequest, opts ...operations.Option) (*operations.CreateSourceOktaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePersistiq", + OperationID: "createSourceOkta", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11828,6 +13368,17 @@ func (s *Sources) CreateSourcePersistiq(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11869,7 +13420,7 @@ func (s *Sources) CreateSourcePersistiq(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourcePersistiqResponse{ + res := &operations.CreateSourceOktaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -11906,16 +13457,27 @@ func (s *Sources) CreateSourcePersistiq(ctx context.Context, request *shared.Sou } -// CreateSourcePexelsAPI - Create a source +// CreateSourceOmnisend - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePexelsAPI(ctx context.Context, request *shared.SourcePexelsAPICreateRequest) (*operations.CreateSourcePexelsAPIResponse, error) { +func (s *Sources) CreateSourceOmnisend(ctx context.Context, request *shared.SourceOmnisendCreateRequest, opts ...operations.Option) (*operations.CreateSourceOmnisendResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePexelsApi", + OperationID: "createSourceOmnisend", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -11927,6 +13489,17 @@ func (s *Sources) CreateSourcePexelsAPI(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -11968,7 +13541,7 @@ func (s *Sources) CreateSourcePexelsAPI(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourcePexelsAPIResponse{ + res := &operations.CreateSourceOmnisendResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12005,113 +13578,25 @@ func (s *Sources) CreateSourcePexelsAPI(ctx context.Context, request *shared.Sou } -// CreateSourcePinterest - Create a source +// CreateSourceOnesignal - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePinterest(ctx context.Context, request *shared.SourcePinterestCreateRequest) (*operations.CreateSourcePinterestResponse, error) { +func (s *Sources) CreateSourceOnesignal(ctx context.Context, request *shared.SourceOnesignalCreateRequest, opts ...operations.Option) (*operations.CreateSourceOnesignalResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePinterest", + OperationID: "createSourceOnesignal", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourcePinterestResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourcePipedrive - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePipedrive(ctx context.Context, request *shared.SourcePipedriveCreateRequest) (*operations.CreateSourcePipedriveResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourcePipedrive", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -12125,6 +13610,17 @@ func (s *Sources) CreateSourcePipedrive(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12166,7 +13662,7 @@ func (s *Sources) CreateSourcePipedrive(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourcePipedriveResponse{ + res := &operations.CreateSourceOnesignalResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12203,16 +13699,27 @@ func (s *Sources) CreateSourcePipedrive(ctx context.Context, request *shared.Sou } -// CreateSourcePocket - Create a source +// CreateSourceOracle - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePocket(ctx context.Context, request *shared.SourcePocketCreateRequest) (*operations.CreateSourcePocketResponse, error) { +func (s *Sources) CreateSourceOracle(ctx context.Context, request *shared.SourceOracleCreateRequest, opts ...operations.Option) (*operations.CreateSourceOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePocket", + OperationID: "createSourceOracle", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12224,6 +13731,17 @@ func (s *Sources) CreateSourcePocket(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12265,7 +13783,7 @@ func (s *Sources) CreateSourcePocket(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourcePocketResponse{ + res := &operations.CreateSourceOracleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12302,16 +13820,27 @@ func (s *Sources) CreateSourcePocket(ctx context.Context, request *shared.Source } -// CreateSourcePokeapi - Create a source +// CreateSourceOrb - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePokeapi(ctx context.Context, request *shared.SourcePokeapiCreateRequest) (*operations.CreateSourcePokeapiResponse, error) { +func (s *Sources) CreateSourceOrb(ctx context.Context, request *shared.SourceOrbCreateRequest, opts ...operations.Option) (*operations.CreateSourceOrbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePokeapi", + OperationID: "createSourceOrb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12323,6 +13852,17 @@ func (s *Sources) CreateSourcePokeapi(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12364,7 +13904,7 @@ func (s *Sources) CreateSourcePokeapi(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourcePokeapiResponse{ + res := &operations.CreateSourceOrbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12401,16 +13941,27 @@ func (s *Sources) CreateSourcePokeapi(ctx context.Context, request *shared.Sourc } -// CreateSourcePolygonStockAPI - Create a source +// CreateSourceOrbit - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePolygonStockAPI(ctx context.Context, request *shared.SourcePolygonStockAPICreateRequest) (*operations.CreateSourcePolygonStockAPIResponse, error) { +func (s *Sources) CreateSourceOrbit(ctx context.Context, request *shared.SourceOrbitCreateRequest, opts ...operations.Option) (*operations.CreateSourceOrbitResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePolygonStockApi", + OperationID: "createSourceOrbit", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12422,6 +13973,17 @@ func (s *Sources) CreateSourcePolygonStockAPI(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12463,7 +14025,7 @@ func (s *Sources) CreateSourcePolygonStockAPI(ctx context.Context, request *shar } } - res := &operations.CreateSourcePolygonStockAPIResponse{ + res := &operations.CreateSourceOrbitResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12500,16 +14062,27 @@ func (s *Sources) CreateSourcePolygonStockAPI(ctx context.Context, request *shar } -// CreateSourcePostgres - Create a source +// CreateSourceOutbrainAmplify - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePostgres(ctx context.Context, request *shared.SourcePostgresCreateRequest) (*operations.CreateSourcePostgresResponse, error) { +func (s *Sources) CreateSourceOutbrainAmplify(ctx context.Context, request *shared.SourceOutbrainAmplifyCreateRequest, opts ...operations.Option) (*operations.CreateSourceOutbrainAmplifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePostgres", + OperationID: "createSourceOutbrainAmplify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12521,6 +14094,17 @@ func (s *Sources) CreateSourcePostgres(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12562,7 +14146,7 @@ func (s *Sources) CreateSourcePostgres(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourcePostgresResponse{ + res := &operations.CreateSourceOutbrainAmplifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12599,16 +14183,27 @@ func (s *Sources) CreateSourcePostgres(ctx context.Context, request *shared.Sour } -// CreateSourcePosthog - Create a source +// CreateSourceOutreach - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePosthog(ctx context.Context, request *shared.SourcePosthogCreateRequest) (*operations.CreateSourcePosthogResponse, error) { +func (s *Sources) CreateSourceOutreach(ctx context.Context, request *shared.SourceOutreachCreateRequest, opts ...operations.Option) (*operations.CreateSourceOutreachResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePosthog", + OperationID: "createSourceOutreach", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12620,6 +14215,17 @@ func (s *Sources) CreateSourcePosthog(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12661,7 +14267,7 @@ func (s *Sources) CreateSourcePosthog(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourcePosthogResponse{ + res := &operations.CreateSourceOutreachResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12698,16 +14304,27 @@ func (s *Sources) CreateSourcePosthog(ctx context.Context, request *shared.Sourc } -// CreateSourcePostmarkapp - Create a source +// CreateSourcePaypalTransaction - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePostmarkapp(ctx context.Context, request *shared.SourcePostmarkappCreateRequest) (*operations.CreateSourcePostmarkappResponse, error) { +func (s *Sources) CreateSourcePaypalTransaction(ctx context.Context, request *shared.SourcePaypalTransactionCreateRequest, opts ...operations.Option) (*operations.CreateSourcePaypalTransactionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePostmarkapp", + OperationID: "createSourcePaypalTransaction", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12719,6 +14336,17 @@ func (s *Sources) CreateSourcePostmarkapp(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12760,7 +14388,7 @@ func (s *Sources) CreateSourcePostmarkapp(ctx context.Context, request *shared.S } } - res := &operations.CreateSourcePostmarkappResponse{ + res := &operations.CreateSourcePaypalTransactionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12797,16 +14425,27 @@ func (s *Sources) CreateSourcePostmarkapp(ctx context.Context, request *shared.S } -// CreateSourcePrestashop - Create a source +// CreateSourcePaystack - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePrestashop(ctx context.Context, request *shared.SourcePrestashopCreateRequest) (*operations.CreateSourcePrestashopResponse, error) { +func (s *Sources) CreateSourcePaystack(ctx context.Context, request *shared.SourcePaystackCreateRequest, opts ...operations.Option) (*operations.CreateSourcePaystackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePrestashop", + OperationID: "createSourcePaystack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12818,6 +14457,17 @@ func (s *Sources) CreateSourcePrestashop(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12859,7 +14509,7 @@ func (s *Sources) CreateSourcePrestashop(ctx context.Context, request *shared.So } } - res := &operations.CreateSourcePrestashopResponse{ + res := &operations.CreateSourcePaystackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12896,16 +14546,27 @@ func (s *Sources) CreateSourcePrestashop(ctx context.Context, request *shared.So } -// CreateSourcePunkAPI - Create a source +// CreateSourcePendo - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePunkAPI(ctx context.Context, request *shared.SourcePunkAPICreateRequest) (*operations.CreateSourcePunkAPIResponse, error) { +func (s *Sources) CreateSourcePendo(ctx context.Context, request *shared.SourcePendoCreateRequest, opts ...operations.Option) (*operations.CreateSourcePendoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePunkApi", + OperationID: "createSourcePendo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -12917,6 +14578,17 @@ func (s *Sources) CreateSourcePunkAPI(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -12958,7 +14630,7 @@ func (s *Sources) CreateSourcePunkAPI(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourcePunkAPIResponse{ + res := &operations.CreateSourcePendoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -12995,16 +14667,27 @@ func (s *Sources) CreateSourcePunkAPI(ctx context.Context, request *shared.Sourc } -// CreateSourcePypi - Create a source +// CreateSourcePersistiq - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourcePypi(ctx context.Context, request *shared.SourcePypiCreateRequest) (*operations.CreateSourcePypiResponse, error) { +func (s *Sources) CreateSourcePersistiq(ctx context.Context, request *shared.SourcePersistiqCreateRequest, opts ...operations.Option) (*operations.CreateSourcePersistiqResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourcePypi", + OperationID: "createSourcePersistiq", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13016,6 +14699,17 @@ func (s *Sources) CreateSourcePypi(ctx context.Context, request *shared.SourcePy return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13057,7 +14751,7 @@ func (s *Sources) CreateSourcePypi(ctx context.Context, request *shared.SourcePy } } - res := &operations.CreateSourcePypiResponse{ + res := &operations.CreateSourcePersistiqResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13094,16 +14788,27 @@ func (s *Sources) CreateSourcePypi(ctx context.Context, request *shared.SourcePy } -// CreateSourceQualaroo - Create a source +// CreateSourcePexelsAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceQualaroo(ctx context.Context, request *shared.SourceQualarooCreateRequest) (*operations.CreateSourceQualarooResponse, error) { +func (s *Sources) CreateSourcePexelsAPI(ctx context.Context, request *shared.SourcePexelsAPICreateRequest, opts ...operations.Option) (*operations.CreateSourcePexelsAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceQualaroo", + OperationID: "createSourcePexelsApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13115,6 +14820,17 @@ func (s *Sources) CreateSourceQualaroo(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13156,7 +14872,7 @@ func (s *Sources) CreateSourceQualaroo(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceQualarooResponse{ + res := &operations.CreateSourcePexelsAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13193,16 +14909,27 @@ func (s *Sources) CreateSourceQualaroo(ctx context.Context, request *shared.Sour } -// CreateSourceRailz - Create a source +// CreateSourcePinterest - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRailz(ctx context.Context, request *shared.SourceRailzCreateRequest) (*operations.CreateSourceRailzResponse, error) { +func (s *Sources) CreateSourcePinterest(ctx context.Context, request *shared.SourcePinterestCreateRequest, opts ...operations.Option) (*operations.CreateSourcePinterestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRailz", + OperationID: "createSourcePinterest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13214,6 +14941,17 @@ func (s *Sources) CreateSourceRailz(ctx context.Context, request *shared.SourceR return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13255,7 +14993,7 @@ func (s *Sources) CreateSourceRailz(ctx context.Context, request *shared.SourceR } } - res := &operations.CreateSourceRailzResponse{ + res := &operations.CreateSourcePinterestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13292,16 +15030,27 @@ func (s *Sources) CreateSourceRailz(ctx context.Context, request *shared.SourceR } -// CreateSourceRecharge - Create a source +// CreateSourcePipedrive - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRecharge(ctx context.Context, request *shared.SourceRechargeCreateRequest) (*operations.CreateSourceRechargeResponse, error) { +func (s *Sources) CreateSourcePipedrive(ctx context.Context, request *shared.SourcePipedriveCreateRequest, opts ...operations.Option) (*operations.CreateSourcePipedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRecharge", + OperationID: "createSourcePipedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13313,6 +15062,17 @@ func (s *Sources) CreateSourceRecharge(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13354,7 +15114,7 @@ func (s *Sources) CreateSourceRecharge(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceRechargeResponse{ + res := &operations.CreateSourcePipedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13391,16 +15151,27 @@ func (s *Sources) CreateSourceRecharge(ctx context.Context, request *shared.Sour } -// CreateSourceRecreation - Create a source +// CreateSourcePocket - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRecreation(ctx context.Context, request *shared.SourceRecreationCreateRequest) (*operations.CreateSourceRecreationResponse, error) { +func (s *Sources) CreateSourcePocket(ctx context.Context, request *shared.SourcePocketCreateRequest, opts ...operations.Option) (*operations.CreateSourcePocketResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRecreation", + OperationID: "createSourcePocket", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13412,6 +15183,17 @@ func (s *Sources) CreateSourceRecreation(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13453,7 +15235,7 @@ func (s *Sources) CreateSourceRecreation(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceRecreationResponse{ + res := &operations.CreateSourcePocketResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13490,16 +15272,27 @@ func (s *Sources) CreateSourceRecreation(ctx context.Context, request *shared.So } -// CreateSourceRecruitee - Create a source +// CreateSourcePokeapi - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRecruitee(ctx context.Context, request *shared.SourceRecruiteeCreateRequest) (*operations.CreateSourceRecruiteeResponse, error) { +func (s *Sources) CreateSourcePokeapi(ctx context.Context, request *shared.SourcePokeapiCreateRequest, opts ...operations.Option) (*operations.CreateSourcePokeapiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRecruitee", + OperationID: "createSourcePokeapi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13511,6 +15304,17 @@ func (s *Sources) CreateSourceRecruitee(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13552,7 +15356,7 @@ func (s *Sources) CreateSourceRecruitee(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceRecruiteeResponse{ + res := &operations.CreateSourcePokeapiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13589,16 +15393,27 @@ func (s *Sources) CreateSourceRecruitee(ctx context.Context, request *shared.Sou } -// CreateSourceRecurly - Create a source +// CreateSourcePolygonStockAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRecurly(ctx context.Context, request *shared.SourceRecurlyCreateRequest) (*operations.CreateSourceRecurlyResponse, error) { +func (s *Sources) CreateSourcePolygonStockAPI(ctx context.Context, request *shared.SourcePolygonStockAPICreateRequest, opts ...operations.Option) (*operations.CreateSourcePolygonStockAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRecurly", + OperationID: "createSourcePolygonStockApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13610,6 +15425,17 @@ func (s *Sources) CreateSourceRecurly(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13651,7 +15477,7 @@ func (s *Sources) CreateSourceRecurly(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceRecurlyResponse{ + res := &operations.CreateSourcePolygonStockAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13688,16 +15514,27 @@ func (s *Sources) CreateSourceRecurly(ctx context.Context, request *shared.Sourc } -// CreateSourceRedshift - Create a source +// CreateSourcePostgres - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRedshift(ctx context.Context, request *shared.SourceRedshiftCreateRequest) (*operations.CreateSourceRedshiftResponse, error) { +func (s *Sources) CreateSourcePostgres(ctx context.Context, request *shared.SourcePostgresCreateRequest, opts ...operations.Option) (*operations.CreateSourcePostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRedshift", + OperationID: "createSourcePostgres", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13709,6 +15546,17 @@ func (s *Sources) CreateSourceRedshift(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13750,7 +15598,7 @@ func (s *Sources) CreateSourceRedshift(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceRedshiftResponse{ + res := &operations.CreateSourcePostgresResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13787,16 +15635,27 @@ func (s *Sources) CreateSourceRedshift(ctx context.Context, request *shared.Sour } -// CreateSourceRetently - Create a source +// CreateSourcePosthog - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRetently(ctx context.Context, request *shared.SourceRetentlyCreateRequest) (*operations.CreateSourceRetentlyResponse, error) { +func (s *Sources) CreateSourcePosthog(ctx context.Context, request *shared.SourcePosthogCreateRequest, opts ...operations.Option) (*operations.CreateSourcePosthogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRetently", + OperationID: "createSourcePosthog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13808,6 +15667,17 @@ func (s *Sources) CreateSourceRetently(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13849,7 +15719,7 @@ func (s *Sources) CreateSourceRetently(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceRetentlyResponse{ + res := &operations.CreateSourcePosthogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13886,16 +15756,27 @@ func (s *Sources) CreateSourceRetently(ctx context.Context, request *shared.Sour } -// CreateSourceRkiCovid - Create a source +// CreateSourcePostmarkapp - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRkiCovid(ctx context.Context, request *shared.SourceRkiCovidCreateRequest) (*operations.CreateSourceRkiCovidResponse, error) { +func (s *Sources) CreateSourcePostmarkapp(ctx context.Context, request *shared.SourcePostmarkappCreateRequest, opts ...operations.Option) (*operations.CreateSourcePostmarkappResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRkiCovid", + OperationID: "createSourcePostmarkapp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -13907,6 +15788,17 @@ func (s *Sources) CreateSourceRkiCovid(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -13948,7 +15840,7 @@ func (s *Sources) CreateSourceRkiCovid(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceRkiCovidResponse{ + res := &operations.CreateSourcePostmarkappResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -13985,16 +15877,27 @@ func (s *Sources) CreateSourceRkiCovid(ctx context.Context, request *shared.Sour } -// CreateSourceRss - Create a source +// CreateSourcePrestashop - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceRss(ctx context.Context, request *shared.SourceRssCreateRequest) (*operations.CreateSourceRssResponse, error) { +func (s *Sources) CreateSourcePrestashop(ctx context.Context, request *shared.SourcePrestashopCreateRequest, opts ...operations.Option) (*operations.CreateSourcePrestashopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceRss", + OperationID: "createSourcePrestashop", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14006,6 +15909,17 @@ func (s *Sources) CreateSourceRss(ctx context.Context, request *shared.SourceRss return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14047,7 +15961,7 @@ func (s *Sources) CreateSourceRss(ctx context.Context, request *shared.SourceRss } } - res := &operations.CreateSourceRssResponse{ + res := &operations.CreateSourcePrestashopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14084,16 +15998,27 @@ func (s *Sources) CreateSourceRss(ctx context.Context, request *shared.SourceRss } -// CreateSourceS3 - Create a source +// CreateSourcePypi - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceS3(ctx context.Context, request *shared.SourceS3CreateRequest) (*operations.CreateSourceS3Response, error) { +func (s *Sources) CreateSourcePypi(ctx context.Context, request *shared.SourcePypiCreateRequest, opts ...operations.Option) (*operations.CreateSourcePypiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceS3", + OperationID: "createSourcePypi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14105,6 +16030,17 @@ func (s *Sources) CreateSourceS3(ctx context.Context, request *shared.SourceS3Cr return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14146,7 +16082,7 @@ func (s *Sources) CreateSourceS3(ctx context.Context, request *shared.SourceS3Cr } } - res := &operations.CreateSourceS3Response{ + res := &operations.CreateSourcePypiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14183,16 +16119,27 @@ func (s *Sources) CreateSourceS3(ctx context.Context, request *shared.SourceS3Cr } -// CreateSourceSalesforce - Create a source +// CreateSourceQualaroo - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSalesforce(ctx context.Context, request *shared.SourceSalesforceCreateRequest) (*operations.CreateSourceSalesforceResponse, error) { +func (s *Sources) CreateSourceQualaroo(ctx context.Context, request *shared.SourceQualarooCreateRequest, opts ...operations.Option) (*operations.CreateSourceQualarooResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSalesforce", + OperationID: "createSourceQualaroo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14204,6 +16151,17 @@ func (s *Sources) CreateSourceSalesforce(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14245,7 +16203,7 @@ func (s *Sources) CreateSourceSalesforce(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceSalesforceResponse{ + res := &operations.CreateSourceQualarooResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14282,16 +16240,27 @@ func (s *Sources) CreateSourceSalesforce(ctx context.Context, request *shared.So } -// CreateSourceSalesloft - Create a source +// CreateSourceRailz - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSalesloft(ctx context.Context, request *shared.SourceSalesloftCreateRequest) (*operations.CreateSourceSalesloftResponse, error) { +func (s *Sources) CreateSourceRailz(ctx context.Context, request *shared.SourceRailzCreateRequest, opts ...operations.Option) (*operations.CreateSourceRailzResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSalesloft", + OperationID: "createSourceRailz", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14303,6 +16272,17 @@ func (s *Sources) CreateSourceSalesloft(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14344,7 +16324,7 @@ func (s *Sources) CreateSourceSalesloft(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceSalesloftResponse{ + res := &operations.CreateSourceRailzResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14381,16 +16361,27 @@ func (s *Sources) CreateSourceSalesloft(ctx context.Context, request *shared.Sou } -// CreateSourceSapFieldglass - Create a source +// CreateSourceRecharge - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSapFieldglass(ctx context.Context, request *shared.SourceSapFieldglassCreateRequest) (*operations.CreateSourceSapFieldglassResponse, error) { +func (s *Sources) CreateSourceRecharge(ctx context.Context, request *shared.SourceRechargeCreateRequest, opts ...operations.Option) (*operations.CreateSourceRechargeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSapFieldglass", + OperationID: "createSourceRecharge", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14402,6 +16393,17 @@ func (s *Sources) CreateSourceSapFieldglass(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14443,7 +16445,7 @@ func (s *Sources) CreateSourceSapFieldglass(ctx context.Context, request *shared } } - res := &operations.CreateSourceSapFieldglassResponse{ + res := &operations.CreateSourceRechargeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14480,16 +16482,27 @@ func (s *Sources) CreateSourceSapFieldglass(ctx context.Context, request *shared } -// CreateSourceSecoda - Create a source +// CreateSourceRecreation - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSecoda(ctx context.Context, request *shared.SourceSecodaCreateRequest) (*operations.CreateSourceSecodaResponse, error) { +func (s *Sources) CreateSourceRecreation(ctx context.Context, request *shared.SourceRecreationCreateRequest, opts ...operations.Option) (*operations.CreateSourceRecreationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSecoda", + OperationID: "createSourceRecreation", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14501,6 +16514,17 @@ func (s *Sources) CreateSourceSecoda(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14542,7 +16566,7 @@ func (s *Sources) CreateSourceSecoda(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceSecodaResponse{ + res := &operations.CreateSourceRecreationResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14579,16 +16603,27 @@ func (s *Sources) CreateSourceSecoda(ctx context.Context, request *shared.Source } -// CreateSourceSendgrid - Create a source +// CreateSourceRecruitee - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSendgrid(ctx context.Context, request *shared.SourceSendgridCreateRequest) (*operations.CreateSourceSendgridResponse, error) { +func (s *Sources) CreateSourceRecruitee(ctx context.Context, request *shared.SourceRecruiteeCreateRequest, opts ...operations.Option) (*operations.CreateSourceRecruiteeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSendgrid", + OperationID: "createSourceRecruitee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14600,6 +16635,17 @@ func (s *Sources) CreateSourceSendgrid(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14641,7 +16687,7 @@ func (s *Sources) CreateSourceSendgrid(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceSendgridResponse{ + res := &operations.CreateSourceRecruiteeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14678,16 +16724,27 @@ func (s *Sources) CreateSourceSendgrid(ctx context.Context, request *shared.Sour } -// CreateSourceSendinblue - Create a source +// CreateSourceRecurly - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSendinblue(ctx context.Context, request *shared.SourceSendinblueCreateRequest) (*operations.CreateSourceSendinblueResponse, error) { +func (s *Sources) CreateSourceRecurly(ctx context.Context, request *shared.SourceRecurlyCreateRequest, opts ...operations.Option) (*operations.CreateSourceRecurlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSendinblue", + OperationID: "createSourceRecurly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14699,6 +16756,17 @@ func (s *Sources) CreateSourceSendinblue(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14740,7 +16808,7 @@ func (s *Sources) CreateSourceSendinblue(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceSendinblueResponse{ + res := &operations.CreateSourceRecurlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14777,16 +16845,27 @@ func (s *Sources) CreateSourceSendinblue(ctx context.Context, request *shared.So } -// CreateSourceSenseforce - Create a source +// CreateSourceRedshift - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSenseforce(ctx context.Context, request *shared.SourceSenseforceCreateRequest) (*operations.CreateSourceSenseforceResponse, error) { +func (s *Sources) CreateSourceRedshift(ctx context.Context, request *shared.SourceRedshiftCreateRequest, opts ...operations.Option) (*operations.CreateSourceRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSenseforce", + OperationID: "createSourceRedshift", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14798,6 +16877,17 @@ func (s *Sources) CreateSourceSenseforce(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14839,7 +16929,7 @@ func (s *Sources) CreateSourceSenseforce(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceSenseforceResponse{ + res := &operations.CreateSourceRedshiftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14876,16 +16966,27 @@ func (s *Sources) CreateSourceSenseforce(ctx context.Context, request *shared.So } -// CreateSourceSentry - Create a source +// CreateSourceRetently - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSentry(ctx context.Context, request *shared.SourceSentryCreateRequest) (*operations.CreateSourceSentryResponse, error) { +func (s *Sources) CreateSourceRetently(ctx context.Context, request *shared.SourceRetentlyCreateRequest, opts ...operations.Option) (*operations.CreateSourceRetentlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSentry", + OperationID: "createSourceRetently", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -14897,6 +16998,17 @@ func (s *Sources) CreateSourceSentry(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -14938,7 +17050,7 @@ func (s *Sources) CreateSourceSentry(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceSentryResponse{ + res := &operations.CreateSourceRetentlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -14975,113 +17087,25 @@ func (s *Sources) CreateSourceSentry(ctx context.Context, request *shared.Source } -// CreateSourceSftp - Create a source +// CreateSourceRkiCovid - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSftp(ctx context.Context, request *shared.SourceSftpCreateRequest) (*operations.CreateSourceSftpResponse, error) { +func (s *Sources) CreateSourceRkiCovid(ctx context.Context, request *shared.SourceRkiCovidCreateRequest, opts ...operations.Option) (*operations.CreateSourceRkiCovidResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSftp", + OperationID: "createSourceRkiCovid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceSftpResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceSftpBulk - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSftpBulk(ctx context.Context, request *shared.SourceSftpBulkCreateRequest) (*operations.CreateSourceSftpBulkResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceSftpBulk", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -15095,6 +17119,17 @@ func (s *Sources) CreateSourceSftpBulk(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15136,7 +17171,7 @@ func (s *Sources) CreateSourceSftpBulk(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceSftpBulkResponse{ + res := &operations.CreateSourceRkiCovidResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15173,113 +17208,25 @@ func (s *Sources) CreateSourceSftpBulk(ctx context.Context, request *shared.Sour } -// CreateSourceShopify - Create a source +// CreateSourceRss - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceShopify(ctx context.Context, request *shared.SourceShopifyCreateRequest) (*operations.CreateSourceShopifyResponse, error) { +func (s *Sources) CreateSourceRss(ctx context.Context, request *shared.SourceRssCreateRequest, opts ...operations.Option) (*operations.CreateSourceRssResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceShopify", + OperationID: "createSourceRss", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceShopifyResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceShortio - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceShortio(ctx context.Context, request *shared.SourceShortioCreateRequest) (*operations.CreateSourceShortioResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceShortio", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -15293,6 +17240,17 @@ func (s *Sources) CreateSourceShortio(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15334,7 +17292,7 @@ func (s *Sources) CreateSourceShortio(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceShortioResponse{ + res := &operations.CreateSourceRssResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15371,16 +17329,27 @@ func (s *Sources) CreateSourceShortio(ctx context.Context, request *shared.Sourc } -// CreateSourceSlack - Create a source +// CreateSourceS3 - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSlack(ctx context.Context, request *shared.SourceSlackCreateRequest) (*operations.CreateSourceSlackResponse, error) { +func (s *Sources) CreateSourceS3(ctx context.Context, request *shared.SourceS3CreateRequest, opts ...operations.Option) (*operations.CreateSourceS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSlack", + OperationID: "createSourceS3", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15392,6 +17361,17 @@ func (s *Sources) CreateSourceSlack(ctx context.Context, request *shared.SourceS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15433,7 +17413,7 @@ func (s *Sources) CreateSourceSlack(ctx context.Context, request *shared.SourceS } } - res := &operations.CreateSourceSlackResponse{ + res := &operations.CreateSourceS3Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15470,16 +17450,27 @@ func (s *Sources) CreateSourceSlack(ctx context.Context, request *shared.SourceS } -// CreateSourceSmaily - Create a source +// CreateSourceSalesforce - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSmaily(ctx context.Context, request *shared.SourceSmailyCreateRequest) (*operations.CreateSourceSmailyResponse, error) { +func (s *Sources) CreateSourceSalesforce(ctx context.Context, request *shared.SourceSalesforceCreateRequest, opts ...operations.Option) (*operations.CreateSourceSalesforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSmaily", + OperationID: "createSourceSalesforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15491,6 +17482,17 @@ func (s *Sources) CreateSourceSmaily(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15532,7 +17534,7 @@ func (s *Sources) CreateSourceSmaily(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceSmailyResponse{ + res := &operations.CreateSourceSalesforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15569,16 +17571,27 @@ func (s *Sources) CreateSourceSmaily(ctx context.Context, request *shared.Source } -// CreateSourceSmartengage - Create a source +// CreateSourceSalesloft - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSmartengage(ctx context.Context, request *shared.SourceSmartengageCreateRequest) (*operations.CreateSourceSmartengageResponse, error) { +func (s *Sources) CreateSourceSalesloft(ctx context.Context, request *shared.SourceSalesloftCreateRequest, opts ...operations.Option) (*operations.CreateSourceSalesloftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSmartengage", + OperationID: "createSourceSalesloft", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15590,6 +17603,17 @@ func (s *Sources) CreateSourceSmartengage(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15631,7 +17655,7 @@ func (s *Sources) CreateSourceSmartengage(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceSmartengageResponse{ + res := &operations.CreateSourceSalesloftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15668,16 +17692,27 @@ func (s *Sources) CreateSourceSmartengage(ctx context.Context, request *shared.S } -// CreateSourceSmartsheets - Create a source +// CreateSourceSapFieldglass - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSmartsheets(ctx context.Context, request *shared.SourceSmartsheetsCreateRequest) (*operations.CreateSourceSmartsheetsResponse, error) { +func (s *Sources) CreateSourceSapFieldglass(ctx context.Context, request *shared.SourceSapFieldglassCreateRequest, opts ...operations.Option) (*operations.CreateSourceSapFieldglassResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSmartsheets", + OperationID: "createSourceSapFieldglass", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15689,6 +17724,17 @@ func (s *Sources) CreateSourceSmartsheets(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15730,7 +17776,7 @@ func (s *Sources) CreateSourceSmartsheets(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceSmartsheetsResponse{ + res := &operations.CreateSourceSapFieldglassResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15767,16 +17813,27 @@ func (s *Sources) CreateSourceSmartsheets(ctx context.Context, request *shared.S } -// CreateSourceSnapchatMarketing - Create a source +// CreateSourceSecoda - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSnapchatMarketing(ctx context.Context, request *shared.SourceSnapchatMarketingCreateRequest) (*operations.CreateSourceSnapchatMarketingResponse, error) { +func (s *Sources) CreateSourceSecoda(ctx context.Context, request *shared.SourceSecodaCreateRequest, opts ...operations.Option) (*operations.CreateSourceSecodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSnapchatMarketing", + OperationID: "createSourceSecoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15788,6 +17845,17 @@ func (s *Sources) CreateSourceSnapchatMarketing(ctx context.Context, request *sh return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15829,7 +17897,7 @@ func (s *Sources) CreateSourceSnapchatMarketing(ctx context.Context, request *sh } } - res := &operations.CreateSourceSnapchatMarketingResponse{ + res := &operations.CreateSourceSecodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15866,16 +17934,27 @@ func (s *Sources) CreateSourceSnapchatMarketing(ctx context.Context, request *sh } -// CreateSourceSnowflake - Create a source +// CreateSourceSendgrid - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSnowflake(ctx context.Context, request *shared.SourceSnowflakeCreateRequest) (*operations.CreateSourceSnowflakeResponse, error) { +func (s *Sources) CreateSourceSendgrid(ctx context.Context, request *shared.SourceSendgridCreateRequest, opts ...operations.Option) (*operations.CreateSourceSendgridResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSnowflake", + OperationID: "createSourceSendgrid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15887,6 +17966,17 @@ func (s *Sources) CreateSourceSnowflake(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -15928,7 +18018,7 @@ func (s *Sources) CreateSourceSnowflake(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceSnowflakeResponse{ + res := &operations.CreateSourceSendgridResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -15965,16 +18055,27 @@ func (s *Sources) CreateSourceSnowflake(ctx context.Context, request *shared.Sou } -// CreateSourceSonarCloud - Create a source +// CreateSourceSendinblue - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSonarCloud(ctx context.Context, request *shared.SourceSonarCloudCreateRequest) (*operations.CreateSourceSonarCloudResponse, error) { +func (s *Sources) CreateSourceSendinblue(ctx context.Context, request *shared.SourceSendinblueCreateRequest, opts ...operations.Option) (*operations.CreateSourceSendinblueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSonarCloud", + OperationID: "createSourceSendinblue", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -15986,6 +18087,17 @@ func (s *Sources) CreateSourceSonarCloud(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16027,7 +18139,7 @@ func (s *Sources) CreateSourceSonarCloud(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceSonarCloudResponse{ + res := &operations.CreateSourceSendinblueResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16064,16 +18176,27 @@ func (s *Sources) CreateSourceSonarCloud(ctx context.Context, request *shared.So } -// CreateSourceSpacexAPI - Create a source +// CreateSourceSenseforce - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSpacexAPI(ctx context.Context, request *shared.SourceSpacexAPICreateRequest) (*operations.CreateSourceSpacexAPIResponse, error) { +func (s *Sources) CreateSourceSenseforce(ctx context.Context, request *shared.SourceSenseforceCreateRequest, opts ...operations.Option) (*operations.CreateSourceSenseforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSpacexApi", + OperationID: "createSourceSenseforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16085,6 +18208,17 @@ func (s *Sources) CreateSourceSpacexAPI(ctx context.Context, request *shared.Sou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16126,7 +18260,7 @@ func (s *Sources) CreateSourceSpacexAPI(ctx context.Context, request *shared.Sou } } - res := &operations.CreateSourceSpacexAPIResponse{ + res := &operations.CreateSourceSenseforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16163,16 +18297,27 @@ func (s *Sources) CreateSourceSpacexAPI(ctx context.Context, request *shared.Sou } -// CreateSourceSquare - Create a source +// CreateSourceSentry - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSquare(ctx context.Context, request *shared.SourceSquareCreateRequest) (*operations.CreateSourceSquareResponse, error) { +func (s *Sources) CreateSourceSentry(ctx context.Context, request *shared.SourceSentryCreateRequest, opts ...operations.Option) (*operations.CreateSourceSentryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSquare", + OperationID: "createSourceSentry", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16184,6 +18329,17 @@ func (s *Sources) CreateSourceSquare(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16225,7 +18381,7 @@ func (s *Sources) CreateSourceSquare(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceSquareResponse{ + res := &operations.CreateSourceSentryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16262,16 +18418,27 @@ func (s *Sources) CreateSourceSquare(ctx context.Context, request *shared.Source } -// CreateSourceStrava - Create a source +// CreateSourceSftp - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceStrava(ctx context.Context, request *shared.SourceStravaCreateRequest) (*operations.CreateSourceStravaResponse, error) { +func (s *Sources) CreateSourceSftp(ctx context.Context, request *shared.SourceSftpCreateRequest, opts ...operations.Option) (*operations.CreateSourceSftpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceStrava", + OperationID: "createSourceSftp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16283,6 +18450,17 @@ func (s *Sources) CreateSourceStrava(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16324,7 +18502,7 @@ func (s *Sources) CreateSourceStrava(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceStravaResponse{ + res := &operations.CreateSourceSftpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16361,16 +18539,27 @@ func (s *Sources) CreateSourceStrava(ctx context.Context, request *shared.Source } -// CreateSourceStripe - Create a source +// CreateSourceSftpBulk - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceStripe(ctx context.Context, request *shared.SourceStripeCreateRequest) (*operations.CreateSourceStripeResponse, error) { +func (s *Sources) CreateSourceSftpBulk(ctx context.Context, request *shared.SourceSftpBulkCreateRequest, opts ...operations.Option) (*operations.CreateSourceSftpBulkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceStripe", + OperationID: "createSourceSftpBulk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16382,6 +18571,17 @@ func (s *Sources) CreateSourceStripe(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16423,7 +18623,7 @@ func (s *Sources) CreateSourceStripe(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceStripeResponse{ + res := &operations.CreateSourceSftpBulkResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16460,16 +18660,27 @@ func (s *Sources) CreateSourceStripe(ctx context.Context, request *shared.Source } -// CreateSourceSurveySparrow - Create a source +// CreateSourceShopify - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSurveySparrow(ctx context.Context, request *shared.SourceSurveySparrowCreateRequest) (*operations.CreateSourceSurveySparrowResponse, error) { +func (s *Sources) CreateSourceShopify(ctx context.Context, request *shared.SourceShopifyCreateRequest, opts ...operations.Option) (*operations.CreateSourceShopifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSurveySparrow", + OperationID: "createSourceShopify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16481,6 +18692,17 @@ func (s *Sources) CreateSourceSurveySparrow(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16522,7 +18744,7 @@ func (s *Sources) CreateSourceSurveySparrow(ctx context.Context, request *shared } } - res := &operations.CreateSourceSurveySparrowResponse{ + res := &operations.CreateSourceShopifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16559,16 +18781,27 @@ func (s *Sources) CreateSourceSurveySparrow(ctx context.Context, request *shared } -// CreateSourceSurveymonkey - Create a source +// CreateSourceShortio - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceSurveymonkey(ctx context.Context, request *shared.SourceSurveymonkeyCreateRequest) (*operations.CreateSourceSurveymonkeyResponse, error) { +func (s *Sources) CreateSourceShortio(ctx context.Context, request *shared.SourceShortioCreateRequest, opts ...operations.Option) (*operations.CreateSourceShortioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceSurveymonkey", + OperationID: "createSourceShortio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16580,6 +18813,17 @@ func (s *Sources) CreateSourceSurveymonkey(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16621,7 +18865,7 @@ func (s *Sources) CreateSourceSurveymonkey(ctx context.Context, request *shared. } } - res := &operations.CreateSourceSurveymonkeyResponse{ + res := &operations.CreateSourceShortioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16658,16 +18902,27 @@ func (s *Sources) CreateSourceSurveymonkey(ctx context.Context, request *shared. } -// CreateSourceTempo - Create a source +// CreateSourceSlack - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTempo(ctx context.Context, request *shared.SourceTempoCreateRequest) (*operations.CreateSourceTempoResponse, error) { +func (s *Sources) CreateSourceSlack(ctx context.Context, request *shared.SourceSlackCreateRequest, opts ...operations.Option) (*operations.CreateSourceSlackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTempo", + OperationID: "createSourceSlack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16679,6 +18934,17 @@ func (s *Sources) CreateSourceTempo(ctx context.Context, request *shared.SourceT return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16720,7 +18986,7 @@ func (s *Sources) CreateSourceTempo(ctx context.Context, request *shared.SourceT } } - res := &operations.CreateSourceTempoResponse{ + res := &operations.CreateSourceSlackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16757,16 +19023,27 @@ func (s *Sources) CreateSourceTempo(ctx context.Context, request *shared.SourceT } -// CreateSourceTheGuardianAPI - Create a source +// CreateSourceSmaily - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTheGuardianAPI(ctx context.Context, request *shared.SourceTheGuardianAPICreateRequest) (*operations.CreateSourceTheGuardianAPIResponse, error) { +func (s *Sources) CreateSourceSmaily(ctx context.Context, request *shared.SourceSmailyCreateRequest, opts ...operations.Option) (*operations.CreateSourceSmailyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTheGuardianApi", + OperationID: "createSourceSmaily", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16778,6 +19055,17 @@ func (s *Sources) CreateSourceTheGuardianAPI(ctx context.Context, request *share return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16819,7 +19107,7 @@ func (s *Sources) CreateSourceTheGuardianAPI(ctx context.Context, request *share } } - res := &operations.CreateSourceTheGuardianAPIResponse{ + res := &operations.CreateSourceSmailyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16856,16 +19144,27 @@ func (s *Sources) CreateSourceTheGuardianAPI(ctx context.Context, request *share } -// CreateSourceTiktokMarketing - Create a source +// CreateSourceSmartengage - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTiktokMarketing(ctx context.Context, request *shared.SourceTiktokMarketingCreateRequest) (*operations.CreateSourceTiktokMarketingResponse, error) { +func (s *Sources) CreateSourceSmartengage(ctx context.Context, request *shared.SourceSmartengageCreateRequest, opts ...operations.Option) (*operations.CreateSourceSmartengageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTiktokMarketing", + OperationID: "createSourceSmartengage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16877,6 +19176,17 @@ func (s *Sources) CreateSourceTiktokMarketing(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -16918,7 +19228,7 @@ func (s *Sources) CreateSourceTiktokMarketing(ctx context.Context, request *shar } } - res := &operations.CreateSourceTiktokMarketingResponse{ + res := &operations.CreateSourceSmartengageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -16955,16 +19265,27 @@ func (s *Sources) CreateSourceTiktokMarketing(ctx context.Context, request *shar } -// CreateSourceTrello - Create a source +// CreateSourceSmartsheets - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTrello(ctx context.Context, request *shared.SourceTrelloCreateRequest) (*operations.CreateSourceTrelloResponse, error) { +func (s *Sources) CreateSourceSmartsheets(ctx context.Context, request *shared.SourceSmartsheetsCreateRequest, opts ...operations.Option) (*operations.CreateSourceSmartsheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTrello", + OperationID: "createSourceSmartsheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -16976,6 +19297,17 @@ func (s *Sources) CreateSourceTrello(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17017,7 +19349,7 @@ func (s *Sources) CreateSourceTrello(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceTrelloResponse{ + res := &operations.CreateSourceSmartsheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17054,16 +19386,27 @@ func (s *Sources) CreateSourceTrello(ctx context.Context, request *shared.Source } -// CreateSourceTrustpilot - Create a source +// CreateSourceSnapchatMarketing - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTrustpilot(ctx context.Context, request *shared.SourceTrustpilotCreateRequest) (*operations.CreateSourceTrustpilotResponse, error) { +func (s *Sources) CreateSourceSnapchatMarketing(ctx context.Context, request *shared.SourceSnapchatMarketingCreateRequest, opts ...operations.Option) (*operations.CreateSourceSnapchatMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTrustpilot", + OperationID: "createSourceSnapchatMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17075,6 +19418,17 @@ func (s *Sources) CreateSourceTrustpilot(ctx context.Context, request *shared.So return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17116,7 +19470,7 @@ func (s *Sources) CreateSourceTrustpilot(ctx context.Context, request *shared.So } } - res := &operations.CreateSourceTrustpilotResponse{ + res := &operations.CreateSourceSnapchatMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17153,16 +19507,27 @@ func (s *Sources) CreateSourceTrustpilot(ctx context.Context, request *shared.So } -// CreateSourceTvmazeSchedule - Create a source +// CreateSourceSnowflake - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTvmazeSchedule(ctx context.Context, request *shared.SourceTvmazeScheduleCreateRequest) (*operations.CreateSourceTvmazeScheduleResponse, error) { +func (s *Sources) CreateSourceSnowflake(ctx context.Context, request *shared.SourceSnowflakeCreateRequest, opts ...operations.Option) (*operations.CreateSourceSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTvmazeSchedule", + OperationID: "createSourceSnowflake", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17174,6 +19539,17 @@ func (s *Sources) CreateSourceTvmazeSchedule(ctx context.Context, request *share return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17215,7 +19591,7 @@ func (s *Sources) CreateSourceTvmazeSchedule(ctx context.Context, request *share } } - res := &operations.CreateSourceTvmazeScheduleResponse{ + res := &operations.CreateSourceSnowflakeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17252,16 +19628,27 @@ func (s *Sources) CreateSourceTvmazeSchedule(ctx context.Context, request *share } -// CreateSourceTwilio - Create a source +// CreateSourceSonarCloud - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTwilio(ctx context.Context, request *shared.SourceTwilioCreateRequest) (*operations.CreateSourceTwilioResponse, error) { +func (s *Sources) CreateSourceSonarCloud(ctx context.Context, request *shared.SourceSonarCloudCreateRequest, opts ...operations.Option) (*operations.CreateSourceSonarCloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTwilio", + OperationID: "createSourceSonarCloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17273,6 +19660,17 @@ func (s *Sources) CreateSourceTwilio(ctx context.Context, request *shared.Source return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17314,7 +19712,7 @@ func (s *Sources) CreateSourceTwilio(ctx context.Context, request *shared.Source } } - res := &operations.CreateSourceTwilioResponse{ + res := &operations.CreateSourceSonarCloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17351,16 +19749,27 @@ func (s *Sources) CreateSourceTwilio(ctx context.Context, request *shared.Source } -// CreateSourceTwilioTaskrouter - Create a source +// CreateSourceSpacexAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTwilioTaskrouter(ctx context.Context, request *shared.SourceTwilioTaskrouterCreateRequest) (*operations.CreateSourceTwilioTaskrouterResponse, error) { +func (s *Sources) CreateSourceSpacexAPI(ctx context.Context, request *shared.SourceSpacexAPICreateRequest, opts ...operations.Option) (*operations.CreateSourceSpacexAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTwilioTaskrouter", + OperationID: "createSourceSpacexApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17372,6 +19781,17 @@ func (s *Sources) CreateSourceTwilioTaskrouter(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17413,7 +19833,7 @@ func (s *Sources) CreateSourceTwilioTaskrouter(ctx context.Context, request *sha } } - res := &operations.CreateSourceTwilioTaskrouterResponse{ + res := &operations.CreateSourceSpacexAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17450,113 +19870,25 @@ func (s *Sources) CreateSourceTwilioTaskrouter(ctx context.Context, request *sha } -// CreateSourceTwitter - Create a source +// CreateSourceSquare - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTwitter(ctx context.Context, request *shared.SourceTwitterCreateRequest) (*operations.CreateSourceTwitterResponse, error) { +func (s *Sources) CreateSourceSquare(ctx context.Context, request *shared.SourceSquareCreateRequest, opts ...operations.Option) (*operations.CreateSourceSquareResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceTwitter", + OperationID: "createSourceSquare", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceTwitterResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceTypeform - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceTypeform(ctx context.Context, request *shared.SourceTypeformCreateRequest) (*operations.CreateSourceTypeformResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceTypeform", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -17570,6 +19902,17 @@ func (s *Sources) CreateSourceTypeform(ctx context.Context, request *shared.Sour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17611,7 +19954,7 @@ func (s *Sources) CreateSourceTypeform(ctx context.Context, request *shared.Sour } } - res := &operations.CreateSourceTypeformResponse{ + res := &operations.CreateSourceSquareResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17648,113 +19991,25 @@ func (s *Sources) CreateSourceTypeform(ctx context.Context, request *shared.Sour } -// CreateSourceUsCensus - Create a source +// CreateSourceStrava - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceUsCensus(ctx context.Context, request *shared.SourceUsCensusCreateRequest) (*operations.CreateSourceUsCensusResponse, error) { +func (s *Sources) CreateSourceStrava(ctx context.Context, request *shared.SourceStravaCreateRequest, opts ...operations.Option) (*operations.CreateSourceStravaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceUsCensus", + OperationID: "createSourceStrava", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceUsCensusResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceVantage - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceVantage(ctx context.Context, request *shared.SourceVantageCreateRequest) (*operations.CreateSourceVantageResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceVantage", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -17768,6 +20023,17 @@ func (s *Sources) CreateSourceVantage(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17809,7 +20075,7 @@ func (s *Sources) CreateSourceVantage(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceVantageResponse{ + res := &operations.CreateSourceStravaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17846,16 +20112,27 @@ func (s *Sources) CreateSourceVantage(ctx context.Context, request *shared.Sourc } -// CreateSourceWebflow - Create a source +// CreateSourceStripe - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceWebflow(ctx context.Context, request *shared.SourceWebflowCreateRequest) (*operations.CreateSourceWebflowResponse, error) { +func (s *Sources) CreateSourceStripe(ctx context.Context, request *shared.SourceStripeCreateRequest, opts ...operations.Option) (*operations.CreateSourceStripeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceWebflow", + OperationID: "createSourceStripe", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17867,6 +20144,17 @@ func (s *Sources) CreateSourceWebflow(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -17908,7 +20196,7 @@ func (s *Sources) CreateSourceWebflow(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceWebflowResponse{ + res := &operations.CreateSourceStripeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -17945,16 +20233,27 @@ func (s *Sources) CreateSourceWebflow(ctx context.Context, request *shared.Sourc } -// CreateSourceWhiskyHunter - Create a source +// CreateSourceSurveySparrow - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceWhiskyHunter(ctx context.Context, request *shared.SourceWhiskyHunterCreateRequest) (*operations.CreateSourceWhiskyHunterResponse, error) { +func (s *Sources) CreateSourceSurveySparrow(ctx context.Context, request *shared.SourceSurveySparrowCreateRequest, opts ...operations.Option) (*operations.CreateSourceSurveySparrowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceWhiskyHunter", + OperationID: "createSourceSurveySparrow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -17966,6 +20265,17 @@ func (s *Sources) CreateSourceWhiskyHunter(ctx context.Context, request *shared. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18007,7 +20317,7 @@ func (s *Sources) CreateSourceWhiskyHunter(ctx context.Context, request *shared. } } - res := &operations.CreateSourceWhiskyHunterResponse{ + res := &operations.CreateSourceSurveySparrowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18044,16 +20354,27 @@ func (s *Sources) CreateSourceWhiskyHunter(ctx context.Context, request *shared. } -// CreateSourceWikipediaPageviews - Create a source +// CreateSourceSurveymonkey - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceWikipediaPageviews(ctx context.Context, request *shared.SourceWikipediaPageviewsCreateRequest) (*operations.CreateSourceWikipediaPageviewsResponse, error) { +func (s *Sources) CreateSourceSurveymonkey(ctx context.Context, request *shared.SourceSurveymonkeyCreateRequest, opts ...operations.Option) (*operations.CreateSourceSurveymonkeyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceWikipediaPageviews", + OperationID: "createSourceSurveymonkey", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18065,6 +20386,17 @@ func (s *Sources) CreateSourceWikipediaPageviews(ctx context.Context, request *s return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18106,7 +20438,7 @@ func (s *Sources) CreateSourceWikipediaPageviews(ctx context.Context, request *s } } - res := &operations.CreateSourceWikipediaPageviewsResponse{ + res := &operations.CreateSourceSurveymonkeyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18143,16 +20475,27 @@ func (s *Sources) CreateSourceWikipediaPageviews(ctx context.Context, request *s } -// CreateSourceWoocommerce - Create a source +// CreateSourceTempo - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceWoocommerce(ctx context.Context, request *shared.SourceWoocommerceCreateRequest) (*operations.CreateSourceWoocommerceResponse, error) { +func (s *Sources) CreateSourceTempo(ctx context.Context, request *shared.SourceTempoCreateRequest, opts ...operations.Option) (*operations.CreateSourceTempoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceWoocommerce", + OperationID: "createSourceTempo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18164,6 +20507,17 @@ func (s *Sources) CreateSourceWoocommerce(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18205,7 +20559,7 @@ func (s *Sources) CreateSourceWoocommerce(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceWoocommerceResponse{ + res := &operations.CreateSourceTempoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18242,113 +20596,25 @@ func (s *Sources) CreateSourceWoocommerce(ctx context.Context, request *shared.S } -// CreateSourceXkcd - Create a source +// CreateSourceTheGuardianAPI - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceXkcd(ctx context.Context, request *shared.SourceXkcdCreateRequest) (*operations.CreateSourceXkcdResponse, error) { +func (s *Sources) CreateSourceTheGuardianAPI(ctx context.Context, request *shared.SourceTheGuardianAPICreateRequest, opts ...operations.Option) (*operations.CreateSourceTheGuardianAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceXkcd", + OperationID: "createSourceTheGuardianApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceXkcdResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceYandexMetrica - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceYandexMetrica(ctx context.Context, request *shared.SourceYandexMetricaCreateRequest) (*operations.CreateSourceYandexMetricaResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceYandexMetrica", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -18362,6 +20628,17 @@ func (s *Sources) CreateSourceYandexMetrica(ctx context.Context, request *shared return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18403,7 +20680,7 @@ func (s *Sources) CreateSourceYandexMetrica(ctx context.Context, request *shared } } - res := &operations.CreateSourceYandexMetricaResponse{ + res := &operations.CreateSourceTheGuardianAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18440,113 +20717,25 @@ func (s *Sources) CreateSourceYandexMetrica(ctx context.Context, request *shared } -// CreateSourceYotpo - Create a source +// CreateSourceTiktokMarketing - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceYotpo(ctx context.Context, request *shared.SourceYotpoCreateRequest) (*operations.CreateSourceYotpoResponse, error) { +func (s *Sources) CreateSourceTiktokMarketing(ctx context.Context, request *shared.SourceTiktokMarketingCreateRequest, opts ...operations.Option) (*operations.CreateSourceTiktokMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceYotpo", + OperationID: "createSourceTiktokMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.CreateSourceYotpoResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - case httpRes.StatusCode == 400: - fallthrough - case httpRes.StatusCode == 403: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// CreateSourceYoutubeAnalytics - Create a source -// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceYoutubeAnalytics(ctx context.Context, request *shared.SourceYoutubeAnalyticsCreateRequest) (*operations.CreateSourceYoutubeAnalyticsResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "createSourceYoutubeAnalytics", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -18560,6 +20749,17 @@ func (s *Sources) CreateSourceYoutubeAnalytics(ctx context.Context, request *sha return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18601,7 +20801,7 @@ func (s *Sources) CreateSourceYoutubeAnalytics(ctx context.Context, request *sha } } - res := &operations.CreateSourceYoutubeAnalyticsResponse{ + res := &operations.CreateSourceTiktokMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18638,16 +20838,27 @@ func (s *Sources) CreateSourceYoutubeAnalytics(ctx context.Context, request *sha } -// CreateSourceZendeskChat - Create a source +// CreateSourceTrello - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZendeskChat(ctx context.Context, request *shared.SourceZendeskChatCreateRequest) (*operations.CreateSourceZendeskChatResponse, error) { +func (s *Sources) CreateSourceTrello(ctx context.Context, request *shared.SourceTrelloCreateRequest, opts ...operations.Option) (*operations.CreateSourceTrelloResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZendeskChat", + OperationID: "createSourceTrello", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18659,6 +20870,17 @@ func (s *Sources) CreateSourceZendeskChat(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18700,7 +20922,7 @@ func (s *Sources) CreateSourceZendeskChat(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceZendeskChatResponse{ + res := &operations.CreateSourceTrelloResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18737,16 +20959,27 @@ func (s *Sources) CreateSourceZendeskChat(ctx context.Context, request *shared.S } -// CreateSourceZendeskSell - Create a source +// CreateSourceTrustpilot - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZendeskSell(ctx context.Context, request *shared.SourceZendeskSellCreateRequest) (*operations.CreateSourceZendeskSellResponse, error) { +func (s *Sources) CreateSourceTrustpilot(ctx context.Context, request *shared.SourceTrustpilotCreateRequest, opts ...operations.Option) (*operations.CreateSourceTrustpilotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZendeskSell", + OperationID: "createSourceTrustpilot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18758,6 +20991,17 @@ func (s *Sources) CreateSourceZendeskSell(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18799,7 +21043,7 @@ func (s *Sources) CreateSourceZendeskSell(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceZendeskSellResponse{ + res := &operations.CreateSourceTrustpilotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18836,16 +21080,27 @@ func (s *Sources) CreateSourceZendeskSell(ctx context.Context, request *shared.S } -// CreateSourceZendeskSunshine - Create a source +// CreateSourceTvmazeSchedule - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZendeskSunshine(ctx context.Context, request *shared.SourceZendeskSunshineCreateRequest) (*operations.CreateSourceZendeskSunshineResponse, error) { +func (s *Sources) CreateSourceTvmazeSchedule(ctx context.Context, request *shared.SourceTvmazeScheduleCreateRequest, opts ...operations.Option) (*operations.CreateSourceTvmazeScheduleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZendeskSunshine", + OperationID: "createSourceTvmazeSchedule", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18857,6 +21112,17 @@ func (s *Sources) CreateSourceZendeskSunshine(ctx context.Context, request *shar return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18898,7 +21164,7 @@ func (s *Sources) CreateSourceZendeskSunshine(ctx context.Context, request *shar } } - res := &operations.CreateSourceZendeskSunshineResponse{ + res := &operations.CreateSourceTvmazeScheduleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -18935,16 +21201,27 @@ func (s *Sources) CreateSourceZendeskSunshine(ctx context.Context, request *shar } -// CreateSourceZendeskSupport - Create a source +// CreateSourceTwilio - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZendeskSupport(ctx context.Context, request *shared.SourceZendeskSupportCreateRequest) (*operations.CreateSourceZendeskSupportResponse, error) { +func (s *Sources) CreateSourceTwilio(ctx context.Context, request *shared.SourceTwilioCreateRequest, opts ...operations.Option) (*operations.CreateSourceTwilioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZendeskSupport", + OperationID: "createSourceTwilio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -18956,6 +21233,17 @@ func (s *Sources) CreateSourceZendeskSupport(ctx context.Context, request *share return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -18997,7 +21285,7 @@ func (s *Sources) CreateSourceZendeskSupport(ctx context.Context, request *share } } - res := &operations.CreateSourceZendeskSupportResponse{ + res := &operations.CreateSourceTwilioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19034,16 +21322,27 @@ func (s *Sources) CreateSourceZendeskSupport(ctx context.Context, request *share } -// CreateSourceZendeskTalk - Create a source +// CreateSourceTwilioTaskrouter - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZendeskTalk(ctx context.Context, request *shared.SourceZendeskTalkCreateRequest) (*operations.CreateSourceZendeskTalkResponse, error) { +func (s *Sources) CreateSourceTwilioTaskrouter(ctx context.Context, request *shared.SourceTwilioTaskrouterCreateRequest, opts ...operations.Option) (*operations.CreateSourceTwilioTaskrouterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZendeskTalk", + OperationID: "createSourceTwilioTaskrouter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -19055,6 +21354,17 @@ func (s *Sources) CreateSourceZendeskTalk(ctx context.Context, request *shared.S return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -19096,7 +21406,7 @@ func (s *Sources) CreateSourceZendeskTalk(ctx context.Context, request *shared.S } } - res := &operations.CreateSourceZendeskTalkResponse{ + res := &operations.CreateSourceTwilioTaskrouterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19133,16 +21443,27 @@ func (s *Sources) CreateSourceZendeskTalk(ctx context.Context, request *shared.S } -// CreateSourceZenloop - Create a source +// CreateSourceTwitter - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZenloop(ctx context.Context, request *shared.SourceZenloopCreateRequest) (*operations.CreateSourceZenloopResponse, error) { +func (s *Sources) CreateSourceTwitter(ctx context.Context, request *shared.SourceTwitterCreateRequest, opts ...operations.Option) (*operations.CreateSourceTwitterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZenloop", + OperationID: "createSourceTwitter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -19154,6 +21475,17 @@ func (s *Sources) CreateSourceZenloop(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -19195,7 +21527,7 @@ func (s *Sources) CreateSourceZenloop(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceZenloopResponse{ + res := &operations.CreateSourceTwitterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19232,16 +21564,27 @@ func (s *Sources) CreateSourceZenloop(ctx context.Context, request *shared.Sourc } -// CreateSourceZohoCrm - Create a source +// CreateSourceTypeform - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZohoCrm(ctx context.Context, request *shared.SourceZohoCrmCreateRequest) (*operations.CreateSourceZohoCrmResponse, error) { +func (s *Sources) CreateSourceTypeform(ctx context.Context, request *shared.SourceTypeformCreateRequest, opts ...operations.Option) (*operations.CreateSourceTypeformResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZohoCrm", + OperationID: "createSourceTypeform", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -19253,6 +21596,17 @@ func (s *Sources) CreateSourceZohoCrm(ctx context.Context, request *shared.Sourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -19294,7 +21648,7 @@ func (s *Sources) CreateSourceZohoCrm(ctx context.Context, request *shared.Sourc } } - res := &operations.CreateSourceZohoCrmResponse{ + res := &operations.CreateSourceTypeformResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19331,16 +21685,27 @@ func (s *Sources) CreateSourceZohoCrm(ctx context.Context, request *shared.Sourc } -// CreateSourceZoom - Create a source +// CreateSourceUsCensus - Create a source // Creates a source given a name, workspace id, and a json blob containing the configuration for the source. -func (s *Sources) CreateSourceZoom(ctx context.Context, request *shared.SourceZoomCreateRequest) (*operations.CreateSourceZoomResponse, error) { +func (s *Sources) CreateSourceUsCensus(ctx context.Context, request *shared.SourceUsCensusCreateRequest, opts ...operations.Option) (*operations.CreateSourceUsCensusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "createSourceZoom", + OperationID: "createSourceUsCensus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { @@ -19352,6 +21717,17 @@ func (s *Sources) CreateSourceZoom(ctx context.Context, request *shared.SourceZo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -19393,7 +21769,7 @@ func (s *Sources) CreateSourceZoom(ctx context.Context, request *shared.SourceZo } } - res := &operations.CreateSourceZoomResponse{ + res := &operations.CreateSourceUsCensusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19430,109 +21806,56 @@ func (s *Sources) CreateSourceZoom(ctx context.Context, request *shared.SourceZo } -// DeleteSource - Delete a Source -func (s *Sources) DeleteSource(ctx context.Context, request operations.DeleteSourceRequest) (*operations.DeleteSourceResponse, error) { +// CreateSourceVantage - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceVantage(ctx context.Context, request *shared.SourceVantageCreateRequest, opts ...operations.Option) (*operations.CreateSourceVantageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSource", + OperationID: "createSourceVantage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err } - return res, nil - -} - -// DeleteSourceAha - Delete a Source -func (s *Sources) DeleteSourceAha(ctx context.Context, request operations.DeleteSourceAhaRequest) (*operations.DeleteSourceAhaResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceAha", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -19567,7 +21890,7 @@ func (s *Sources) DeleteSourceAha(ctx context.Context, request operations.Delete } } - res := &operations.DeleteSourceAhaResponse{ + res := &operations.CreateSourceVantageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19581,11 +21904,21 @@ func (s *Sources) DeleteSourceAha(ctx context.Context, request operations.Delete httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: fallthrough case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: default: return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -19594,108 +21927,2296 @@ func (s *Sources) DeleteSourceAha(ctx context.Context, request operations.Delete } -// DeleteSourceAircall - Delete a Source -func (s *Sources) DeleteSourceAircall(ctx context.Context, request operations.DeleteSourceAircallRequest) (*operations.DeleteSourceAircallResponse, error) { +// CreateSourceWebflow - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceWebflow(ctx context.Context, request *shared.SourceWebflowCreateRequest, opts ...operations.Option) (*operations.CreateSourceWebflowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAircall", + OperationID: "createSourceWebflow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceAircallResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err } - return res, nil - -} - -// DeleteSourceAirtable - Delete a Source -func (s *Sources) DeleteSourceAirtable(ctx context.Context, request operations.DeleteSourceAirtableRequest) (*operations.DeleteSourceAirtableResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceAirtable", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceWebflowResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceWhiskyHunter - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceWhiskyHunter(ctx context.Context, request *shared.SourceWhiskyHunterCreateRequest, opts ...operations.Option) (*operations.CreateSourceWhiskyHunterResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceWhiskyHunter", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceWhiskyHunterResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceWikipediaPageviews - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceWikipediaPageviews(ctx context.Context, request *shared.SourceWikipediaPageviewsCreateRequest, opts ...operations.Option) (*operations.CreateSourceWikipediaPageviewsResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceWikipediaPageviews", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceWikipediaPageviewsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceWoocommerce - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceWoocommerce(ctx context.Context, request *shared.SourceWoocommerceCreateRequest, opts ...operations.Option) (*operations.CreateSourceWoocommerceResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceWoocommerce", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceWoocommerceResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceXkcd - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceXkcd(ctx context.Context, request *shared.SourceXkcdCreateRequest, opts ...operations.Option) (*operations.CreateSourceXkcdResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceXkcd", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceXkcdResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceYandexMetrica - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceYandexMetrica(ctx context.Context, request *shared.SourceYandexMetricaCreateRequest, opts ...operations.Option) (*operations.CreateSourceYandexMetricaResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceYandexMetrica", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceYandexMetricaResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceYotpo - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceYotpo(ctx context.Context, request *shared.SourceYotpoCreateRequest, opts ...operations.Option) (*operations.CreateSourceYotpoResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceYotpo", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceYotpoResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceYoutubeAnalytics - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceYoutubeAnalytics(ctx context.Context, request *shared.SourceYoutubeAnalyticsCreateRequest, opts ...operations.Option) (*operations.CreateSourceYoutubeAnalyticsResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceYoutubeAnalytics", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceYoutubeAnalyticsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZendeskChat - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZendeskChat(ctx context.Context, request *shared.SourceZendeskChatCreateRequest, opts ...operations.Option) (*operations.CreateSourceZendeskChatResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZendeskChat", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZendeskChatResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZendeskSell - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZendeskSell(ctx context.Context, request *shared.SourceZendeskSellCreateRequest, opts ...operations.Option) (*operations.CreateSourceZendeskSellResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZendeskSell", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZendeskSellResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZendeskSunshine - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZendeskSunshine(ctx context.Context, request *shared.SourceZendeskSunshineCreateRequest, opts ...operations.Option) (*operations.CreateSourceZendeskSunshineResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZendeskSunshine", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZendeskSunshineResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZendeskSupport - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZendeskSupport(ctx context.Context, request *shared.SourceZendeskSupportCreateRequest, opts ...operations.Option) (*operations.CreateSourceZendeskSupportResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZendeskSupport", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZendeskSupportResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZendeskTalk - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZendeskTalk(ctx context.Context, request *shared.SourceZendeskTalkCreateRequest, opts ...operations.Option) (*operations.CreateSourceZendeskTalkResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZendeskTalk", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZendeskTalkResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZenloop - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZenloop(ctx context.Context, request *shared.SourceZenloopCreateRequest, opts ...operations.Option) (*operations.CreateSourceZenloopResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZenloop", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZenloopResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZohoCrm - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZohoCrm(ctx context.Context, request *shared.SourceZohoCrmCreateRequest, opts ...operations.Option) (*operations.CreateSourceZohoCrmResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZohoCrm", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZohoCrmResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// CreateSourceZoom - Create a source +// Creates a source given a name, workspace id, and a json blob containing the configuration for the source. +func (s *Sources) CreateSourceZoom(ctx context.Context, request *shared.SourceZoomCreateRequest, opts ...operations.Option) (*operations.CreateSourceZoomResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "createSourceZoom", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := url.JoinPath(baseURL, "/sources") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.CreateSourceZoomResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSource - Delete a Source +func (s *Sources) DeleteSource(ctx context.Context, request operations.DeleteSourceRequest, opts ...operations.Option) (*operations.DeleteSourceResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSource", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAha - Delete a Source +func (s *Sources) DeleteSourceAha(ctx context.Context, request operations.DeleteSourceAhaRequest, opts ...operations.Option) (*operations.DeleteSourceAhaResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAha", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAhaResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAircall - Delete a Source +func (s *Sources) DeleteSourceAircall(ctx context.Context, request operations.DeleteSourceAircallRequest, opts ...operations.Option) (*operations.DeleteSourceAircallResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAircall", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAircallResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAirtable - Delete a Source +func (s *Sources) DeleteSourceAirtable(ctx context.Context, request operations.DeleteSourceAirtableRequest, opts ...operations.Option) (*operations.DeleteSourceAirtableResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAirtable", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -19758,101 +24279,4201 @@ func (s *Sources) DeleteSourceAirtable(ctx context.Context, request operations.D } -// DeleteSourceAmazonAds - Delete a Source -func (s *Sources) DeleteSourceAmazonAds(ctx context.Context, request operations.DeleteSourceAmazonAdsRequest) (*operations.DeleteSourceAmazonAdsResponse, error) { +// DeleteSourceAmazonAds - Delete a Source +func (s *Sources) DeleteSourceAmazonAds(ctx context.Context, request operations.DeleteSourceAmazonAdsRequest, opts ...operations.Option) (*operations.DeleteSourceAmazonAdsResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAmazonAds", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAmazonAdsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAmazonSellerPartner - Delete a Source +func (s *Sources) DeleteSourceAmazonSellerPartner(ctx context.Context, request operations.DeleteSourceAmazonSellerPartnerRequest, opts ...operations.Option) (*operations.DeleteSourceAmazonSellerPartnerResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAmazonSellerPartner", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAmazonSellerPartnerResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAmazonSqs - Delete a Source +func (s *Sources) DeleteSourceAmazonSqs(ctx context.Context, request operations.DeleteSourceAmazonSqsRequest, opts ...operations.Option) (*operations.DeleteSourceAmazonSqsResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAmazonSqs", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAmazonSqsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAmplitude - Delete a Source +func (s *Sources) DeleteSourceAmplitude(ctx context.Context, request operations.DeleteSourceAmplitudeRequest, opts ...operations.Option) (*operations.DeleteSourceAmplitudeResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAmplitude", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAmplitudeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceApifyDataset - Delete a Source +func (s *Sources) DeleteSourceApifyDataset(ctx context.Context, request operations.DeleteSourceApifyDatasetRequest, opts ...operations.Option) (*operations.DeleteSourceApifyDatasetResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceApifyDataset", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceApifyDatasetResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAppfollow - Delete a Source +func (s *Sources) DeleteSourceAppfollow(ctx context.Context, request operations.DeleteSourceAppfollowRequest, opts ...operations.Option) (*operations.DeleteSourceAppfollowResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAppfollow", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAppfollowResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAsana - Delete a Source +func (s *Sources) DeleteSourceAsana(ctx context.Context, request operations.DeleteSourceAsanaRequest, opts ...operations.Option) (*operations.DeleteSourceAsanaResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAsana", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAsanaResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAuth0 - Delete a Source +func (s *Sources) DeleteSourceAuth0(ctx context.Context, request operations.DeleteSourceAuth0Request, opts ...operations.Option) (*operations.DeleteSourceAuth0Response, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAuth0", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAuth0Response{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAwsCloudtrail - Delete a Source +func (s *Sources) DeleteSourceAwsCloudtrail(ctx context.Context, request operations.DeleteSourceAwsCloudtrailRequest, opts ...operations.Option) (*operations.DeleteSourceAwsCloudtrailResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAwsCloudtrail", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAwsCloudtrailResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAzureBlobStorage - Delete a Source +func (s *Sources) DeleteSourceAzureBlobStorage(ctx context.Context, request operations.DeleteSourceAzureBlobStorageRequest, opts ...operations.Option) (*operations.DeleteSourceAzureBlobStorageResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAzureBlobStorage", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAzureBlobStorageResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceAzureTable - Delete a Source +func (s *Sources) DeleteSourceAzureTable(ctx context.Context, request operations.DeleteSourceAzureTableRequest, opts ...operations.Option) (*operations.DeleteSourceAzureTableResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceAzureTable", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceAzureTableResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceBambooHr - Delete a Source +func (s *Sources) DeleteSourceBambooHr(ctx context.Context, request operations.DeleteSourceBambooHrRequest, opts ...operations.Option) (*operations.DeleteSourceBambooHrResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceBambooHr", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceBambooHrResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceBigquery - Delete a Source +func (s *Sources) DeleteSourceBigquery(ctx context.Context, request operations.DeleteSourceBigqueryRequest, opts ...operations.Option) (*operations.DeleteSourceBigqueryResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceBigquery", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceBigqueryResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceBingAds - Delete a Source +func (s *Sources) DeleteSourceBingAds(ctx context.Context, request operations.DeleteSourceBingAdsRequest, opts ...operations.Option) (*operations.DeleteSourceBingAdsResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceBingAds", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceBingAdsResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceBraintree - Delete a Source +func (s *Sources) DeleteSourceBraintree(ctx context.Context, request operations.DeleteSourceBraintreeRequest, opts ...operations.Option) (*operations.DeleteSourceBraintreeResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceBraintree", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceBraintreeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceBraze - Delete a Source +func (s *Sources) DeleteSourceBraze(ctx context.Context, request operations.DeleteSourceBrazeRequest, opts ...operations.Option) (*operations.DeleteSourceBrazeResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceBraze", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceBrazeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCart - Delete a Source +func (s *Sources) DeleteSourceCart(ctx context.Context, request operations.DeleteSourceCartRequest, opts ...operations.Option) (*operations.DeleteSourceCartResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCart", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCartResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceChargebee - Delete a Source +func (s *Sources) DeleteSourceChargebee(ctx context.Context, request operations.DeleteSourceChargebeeRequest, opts ...operations.Option) (*operations.DeleteSourceChargebeeResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceChargebee", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceChargebeeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceChartmogul - Delete a Source +func (s *Sources) DeleteSourceChartmogul(ctx context.Context, request operations.DeleteSourceChartmogulRequest, opts ...operations.Option) (*operations.DeleteSourceChartmogulResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceChartmogul", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceChartmogulResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceClazar - Delete a Source +func (s *Sources) DeleteSourceClazar(ctx context.Context, request operations.DeleteSourceClazarRequest, opts ...operations.Option) (*operations.DeleteSourceClazarResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceClazar", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceClazarResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceClickhouse - Delete a Source +func (s *Sources) DeleteSourceClickhouse(ctx context.Context, request operations.DeleteSourceClickhouseRequest, opts ...operations.Option) (*operations.DeleteSourceClickhouseResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceClickhouse", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceClickhouseResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceClickupAPI - Delete a Source +func (s *Sources) DeleteSourceClickupAPI(ctx context.Context, request operations.DeleteSourceClickupAPIRequest, opts ...operations.Option) (*operations.DeleteSourceClickupAPIResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceClickupApi", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceClickupAPIResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceClockify - Delete a Source +func (s *Sources) DeleteSourceClockify(ctx context.Context, request operations.DeleteSourceClockifyRequest, opts ...operations.Option) (*operations.DeleteSourceClockifyResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceClockify", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceClockifyResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCloseCom - Delete a Source +func (s *Sources) DeleteSourceCloseCom(ctx context.Context, request operations.DeleteSourceCloseComRequest, opts ...operations.Option) (*operations.DeleteSourceCloseComResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCloseCom", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCloseComResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCoda - Delete a Source +func (s *Sources) DeleteSourceCoda(ctx context.Context, request operations.DeleteSourceCodaRequest, opts ...operations.Option) (*operations.DeleteSourceCodaResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCoda", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCodaResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCoinAPI - Delete a Source +func (s *Sources) DeleteSourceCoinAPI(ctx context.Context, request operations.DeleteSourceCoinAPIRequest, opts ...operations.Option) (*operations.DeleteSourceCoinAPIResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCoinApi", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCoinAPIResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCoinmarketcap - Delete a Source +func (s *Sources) DeleteSourceCoinmarketcap(ctx context.Context, request operations.DeleteSourceCoinmarketcapRequest, opts ...operations.Option) (*operations.DeleteSourceCoinmarketcapResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCoinmarketcap", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCoinmarketcapResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceConfigcat - Delete a Source +func (s *Sources) DeleteSourceConfigcat(ctx context.Context, request operations.DeleteSourceConfigcatRequest, opts ...operations.Option) (*operations.DeleteSourceConfigcatResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceConfigcat", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceConfigcatResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceConfluence - Delete a Source +func (s *Sources) DeleteSourceConfluence(ctx context.Context, request operations.DeleteSourceConfluenceRequest, opts ...operations.Option) (*operations.DeleteSourceConfluenceResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceConfluence", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceConfluenceResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceConvex - Delete a Source +func (s *Sources) DeleteSourceConvex(ctx context.Context, request operations.DeleteSourceConvexRequest, opts ...operations.Option) (*operations.DeleteSourceConvexResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceConvex", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceConvexResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceCustom - Delete a Source +func (s *Sources) DeleteSourceCustom(ctx context.Context, request operations.DeleteSourceCustomRequest, opts ...operations.Option) (*operations.DeleteSourceCustomResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceCustom", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceCustomResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDatadog - Delete a Source +func (s *Sources) DeleteSourceDatadog(ctx context.Context, request operations.DeleteSourceDatadogRequest, opts ...operations.Option) (*operations.DeleteSourceDatadogResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDatadog", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDatadogResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDatascope - Delete a Source +func (s *Sources) DeleteSourceDatascope(ctx context.Context, request operations.DeleteSourceDatascopeRequest, opts ...operations.Option) (*operations.DeleteSourceDatascopeResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDatascope", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDatascopeResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDelighted - Delete a Source +func (s *Sources) DeleteSourceDelighted(ctx context.Context, request operations.DeleteSourceDelightedRequest, opts ...operations.Option) (*operations.DeleteSourceDelightedResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDelighted", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDelightedResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDixa - Delete a Source +func (s *Sources) DeleteSourceDixa(ctx context.Context, request operations.DeleteSourceDixaRequest, opts ...operations.Option) (*operations.DeleteSourceDixaResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDixa", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDixaResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDockerhub - Delete a Source +func (s *Sources) DeleteSourceDockerhub(ctx context.Context, request operations.DeleteSourceDockerhubRequest, opts ...operations.Option) (*operations.DeleteSourceDockerhubResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDockerhub", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDockerhubResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDremio - Delete a Source +func (s *Sources) DeleteSourceDremio(ctx context.Context, request operations.DeleteSourceDremioRequest, opts ...operations.Option) (*operations.DeleteSourceDremioResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDremio", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDremioResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceDynamodb - Delete a Source +func (s *Sources) DeleteSourceDynamodb(ctx context.Context, request operations.DeleteSourceDynamodbRequest, opts ...operations.Option) (*operations.DeleteSourceDynamodbResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceDynamodb", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceDynamodbResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceEmailoctopus - Delete a Source +func (s *Sources) DeleteSourceEmailoctopus(ctx context.Context, request operations.DeleteSourceEmailoctopusRequest, opts ...operations.Option) (*operations.DeleteSourceEmailoctopusResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceEmailoctopus", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceEmailoctopusResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceExchangeRates - Delete a Source +func (s *Sources) DeleteSourceExchangeRates(ctx context.Context, request operations.DeleteSourceExchangeRatesRequest, opts ...operations.Option) (*operations.DeleteSourceExchangeRatesResponse, error) { + hookCtx := hooks.HookContext{ + Context: ctx, + OperationID: "deleteSourceExchangeRates", + OAuth2Scopes: []string{}, + SecuritySource: s.sdkConfiguration.Security, + } + + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { + _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + + res := &operations.DeleteSourceExchangeRatesResponse{ + StatusCode: httpRes.StatusCode, + ContentType: httpRes.Header.Get("Content-Type"), + RawResponse: httpRes, + } + + rawBody, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + httpRes.Body.Close() + httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) + + switch { + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough + case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: + default: + return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// DeleteSourceFacebookMarketing - Delete a Source +func (s *Sources) DeleteSourceFacebookMarketing(ctx context.Context, request operations.DeleteSourceFacebookMarketingRequest, opts ...operations.Option) (*operations.DeleteSourceFacebookMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAmazonAds", + OperationID: "deleteSourceFacebookMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceAmazonAdsResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceAmazonSellerPartner - Delete a Source -func (s *Sources) DeleteSourceAmazonSellerPartner(ctx context.Context, request operations.DeleteSourceAmazonSellerPartnerRequest) (*operations.DeleteSourceAmazonSellerPartnerResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceAmazonSellerPartner", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -19895,7 +28516,7 @@ func (s *Sources) DeleteSourceAmazonSellerPartner(ctx context.Context, request o } } - res := &operations.DeleteSourceAmazonSellerPartnerResponse{ + res := &operations.DeleteSourceFacebookMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -19922,101 +28543,41 @@ func (s *Sources) DeleteSourceAmazonSellerPartner(ctx context.Context, request o } -// DeleteSourceAmazonSqs - Delete a Source -func (s *Sources) DeleteSourceAmazonSqs(ctx context.Context, request operations.DeleteSourceAmazonSqsRequest) (*operations.DeleteSourceAmazonSqsResponse, error) { +// DeleteSourceFaker - Delete a Source +func (s *Sources) DeleteSourceFaker(ctx context.Context, request operations.DeleteSourceFakerRequest, opts ...operations.Option) (*operations.DeleteSourceFakerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAmazonSqs", + OperationID: "deleteSourceFaker", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceAmazonSqsResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceAmplitude - Delete a Source -func (s *Sources) DeleteSourceAmplitude(ctx context.Context, request operations.DeleteSourceAmplitudeRequest) (*operations.DeleteSourceAmplitudeResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceAmplitude", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -20059,7 +28620,7 @@ func (s *Sources) DeleteSourceAmplitude(ctx context.Context, request operations. } } - res := &operations.DeleteSourceAmplitudeResponse{ + res := &operations.DeleteSourceFakerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20086,21 +28647,43 @@ func (s *Sources) DeleteSourceAmplitude(ctx context.Context, request operations. } -// DeleteSourceApifyDataset - Delete a Source -func (s *Sources) DeleteSourceApifyDataset(ctx context.Context, request operations.DeleteSourceApifyDatasetRequest) (*operations.DeleteSourceApifyDatasetResponse, error) { +// DeleteSourceFauna - Delete a Source +func (s *Sources) DeleteSourceFauna(ctx context.Context, request operations.DeleteSourceFaunaRequest, opts ...operations.Option) (*operations.DeleteSourceFaunaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceApifyDataset", + OperationID: "deleteSourceFauna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20141,7 +28724,7 @@ func (s *Sources) DeleteSourceApifyDataset(ctx context.Context, request operatio } } - res := &operations.DeleteSourceApifyDatasetResponse{ + res := &operations.DeleteSourceFaunaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20168,21 +28751,43 @@ func (s *Sources) DeleteSourceApifyDataset(ctx context.Context, request operatio } -// DeleteSourceAppfollow - Delete a Source -func (s *Sources) DeleteSourceAppfollow(ctx context.Context, request operations.DeleteSourceAppfollowRequest) (*operations.DeleteSourceAppfollowResponse, error) { +// DeleteSourceFile - Delete a Source +func (s *Sources) DeleteSourceFile(ctx context.Context, request operations.DeleteSourceFileRequest, opts ...operations.Option) (*operations.DeleteSourceFileResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAppfollow", + OperationID: "deleteSourceFile", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20223,7 +28828,7 @@ func (s *Sources) DeleteSourceAppfollow(ctx context.Context, request operations. } } - res := &operations.DeleteSourceAppfollowResponse{ + res := &operations.DeleteSourceFileResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20250,21 +28855,43 @@ func (s *Sources) DeleteSourceAppfollow(ctx context.Context, request operations. } -// DeleteSourceAsana - Delete a Source -func (s *Sources) DeleteSourceAsana(ctx context.Context, request operations.DeleteSourceAsanaRequest) (*operations.DeleteSourceAsanaResponse, error) { +// DeleteSourceFirebolt - Delete a Source +func (s *Sources) DeleteSourceFirebolt(ctx context.Context, request operations.DeleteSourceFireboltRequest, opts ...operations.Option) (*operations.DeleteSourceFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAsana", + OperationID: "deleteSourceFirebolt", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20305,7 +28932,7 @@ func (s *Sources) DeleteSourceAsana(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceAsanaResponse{ + res := &operations.DeleteSourceFireboltResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20332,21 +28959,43 @@ func (s *Sources) DeleteSourceAsana(ctx context.Context, request operations.Dele } -// DeleteSourceAuth0 - Delete a Source -func (s *Sources) DeleteSourceAuth0(ctx context.Context, request operations.DeleteSourceAuth0Request) (*operations.DeleteSourceAuth0Response, error) { +// DeleteSourceFleetio - Delete a Source +func (s *Sources) DeleteSourceFleetio(ctx context.Context, request operations.DeleteSourceFleetioRequest, opts ...operations.Option) (*operations.DeleteSourceFleetioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAuth0", + OperationID: "deleteSourceFleetio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20387,7 +29036,7 @@ func (s *Sources) DeleteSourceAuth0(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceAuth0Response{ + res := &operations.DeleteSourceFleetioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20414,21 +29063,43 @@ func (s *Sources) DeleteSourceAuth0(ctx context.Context, request operations.Dele } -// DeleteSourceAwsCloudtrail - Delete a Source -func (s *Sources) DeleteSourceAwsCloudtrail(ctx context.Context, request operations.DeleteSourceAwsCloudtrailRequest) (*operations.DeleteSourceAwsCloudtrailResponse, error) { +// DeleteSourceFreshcaller - Delete a Source +func (s *Sources) DeleteSourceFreshcaller(ctx context.Context, request operations.DeleteSourceFreshcallerRequest, opts ...operations.Option) (*operations.DeleteSourceFreshcallerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAwsCloudtrail", + OperationID: "deleteSourceFreshcaller", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20469,7 +29140,7 @@ func (s *Sources) DeleteSourceAwsCloudtrail(ctx context.Context, request operati } } - res := &operations.DeleteSourceAwsCloudtrailResponse{ + res := &operations.DeleteSourceFreshcallerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20496,21 +29167,43 @@ func (s *Sources) DeleteSourceAwsCloudtrail(ctx context.Context, request operati } -// DeleteSourceAzureBlobStorage - Delete a Source -func (s *Sources) DeleteSourceAzureBlobStorage(ctx context.Context, request operations.DeleteSourceAzureBlobStorageRequest) (*operations.DeleteSourceAzureBlobStorageResponse, error) { +// DeleteSourceFreshdesk - Delete a Source +func (s *Sources) DeleteSourceFreshdesk(ctx context.Context, request operations.DeleteSourceFreshdeskRequest, opts ...operations.Option) (*operations.DeleteSourceFreshdeskResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAzureBlobStorage", + OperationID: "deleteSourceFreshdesk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20551,7 +29244,7 @@ func (s *Sources) DeleteSourceAzureBlobStorage(ctx context.Context, request oper } } - res := &operations.DeleteSourceAzureBlobStorageResponse{ + res := &operations.DeleteSourceFreshdeskResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20578,101 +29271,41 @@ func (s *Sources) DeleteSourceAzureBlobStorage(ctx context.Context, request oper } -// DeleteSourceAzureTable - Delete a Source -func (s *Sources) DeleteSourceAzureTable(ctx context.Context, request operations.DeleteSourceAzureTableRequest) (*operations.DeleteSourceAzureTableResponse, error) { +// DeleteSourceFreshsales - Delete a Source +func (s *Sources) DeleteSourceFreshsales(ctx context.Context, request operations.DeleteSourceFreshsalesRequest, opts ...operations.Option) (*operations.DeleteSourceFreshsalesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceAzureTable", + OperationID: "deleteSourceFreshsales", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceAzureTableResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceBambooHr - Delete a Source -func (s *Sources) DeleteSourceBambooHr(ctx context.Context, request operations.DeleteSourceBambooHrRequest) (*operations.DeleteSourceBambooHrResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceBambooHr", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -20715,7 +29348,7 @@ func (s *Sources) DeleteSourceBambooHr(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceBambooHrResponse{ + res := &operations.DeleteSourceFreshsalesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20742,21 +29375,43 @@ func (s *Sources) DeleteSourceBambooHr(ctx context.Context, request operations.D } -// DeleteSourceBigquery - Delete a Source -func (s *Sources) DeleteSourceBigquery(ctx context.Context, request operations.DeleteSourceBigqueryRequest) (*operations.DeleteSourceBigqueryResponse, error) { +// DeleteSourceGainsightPx - Delete a Source +func (s *Sources) DeleteSourceGainsightPx(ctx context.Context, request operations.DeleteSourceGainsightPxRequest, opts ...operations.Option) (*operations.DeleteSourceGainsightPxResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceBigquery", + OperationID: "deleteSourceGainsightPx", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20797,7 +29452,7 @@ func (s *Sources) DeleteSourceBigquery(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceBigqueryResponse{ + res := &operations.DeleteSourceGainsightPxResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20824,21 +29479,43 @@ func (s *Sources) DeleteSourceBigquery(ctx context.Context, request operations.D } -// DeleteSourceBingAds - Delete a Source -func (s *Sources) DeleteSourceBingAds(ctx context.Context, request operations.DeleteSourceBingAdsRequest) (*operations.DeleteSourceBingAdsResponse, error) { +// DeleteSourceGcs - Delete a Source +func (s *Sources) DeleteSourceGcs(ctx context.Context, request operations.DeleteSourceGcsRequest, opts ...operations.Option) (*operations.DeleteSourceGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceBingAds", + OperationID: "deleteSourceGcs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20879,7 +29556,7 @@ func (s *Sources) DeleteSourceBingAds(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceBingAdsResponse{ + res := &operations.DeleteSourceGcsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20906,21 +29583,43 @@ func (s *Sources) DeleteSourceBingAds(ctx context.Context, request operations.De } -// DeleteSourceBraintree - Delete a Source -func (s *Sources) DeleteSourceBraintree(ctx context.Context, request operations.DeleteSourceBraintreeRequest) (*operations.DeleteSourceBraintreeResponse, error) { +// DeleteSourceGetlago - Delete a Source +func (s *Sources) DeleteSourceGetlago(ctx context.Context, request operations.DeleteSourceGetlagoRequest, opts ...operations.Option) (*operations.DeleteSourceGetlagoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceBraintree", + OperationID: "deleteSourceGetlago", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -20961,7 +29660,7 @@ func (s *Sources) DeleteSourceBraintree(ctx context.Context, request operations. } } - res := &operations.DeleteSourceBraintreeResponse{ + res := &operations.DeleteSourceGetlagoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -20988,21 +29687,43 @@ func (s *Sources) DeleteSourceBraintree(ctx context.Context, request operations. } -// DeleteSourceBraze - Delete a Source -func (s *Sources) DeleteSourceBraze(ctx context.Context, request operations.DeleteSourceBrazeRequest) (*operations.DeleteSourceBrazeResponse, error) { +// DeleteSourceGithub - Delete a Source +func (s *Sources) DeleteSourceGithub(ctx context.Context, request operations.DeleteSourceGithubRequest, opts ...operations.Option) (*operations.DeleteSourceGithubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceBraze", + OperationID: "deleteSourceGithub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21043,7 +29764,7 @@ func (s *Sources) DeleteSourceBraze(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceBrazeResponse{ + res := &operations.DeleteSourceGithubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21070,21 +29791,43 @@ func (s *Sources) DeleteSourceBraze(ctx context.Context, request operations.Dele } -// DeleteSourceCart - Delete a Source -func (s *Sources) DeleteSourceCart(ctx context.Context, request operations.DeleteSourceCartRequest) (*operations.DeleteSourceCartResponse, error) { +// DeleteSourceGitlab - Delete a Source +func (s *Sources) DeleteSourceGitlab(ctx context.Context, request operations.DeleteSourceGitlabRequest, opts ...operations.Option) (*operations.DeleteSourceGitlabResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceCart", + OperationID: "deleteSourceGitlab", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21125,7 +29868,7 @@ func (s *Sources) DeleteSourceCart(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceCartResponse{ + res := &operations.DeleteSourceGitlabResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21152,21 +29895,43 @@ func (s *Sources) DeleteSourceCart(ctx context.Context, request operations.Delet } -// DeleteSourceChargebee - Delete a Source -func (s *Sources) DeleteSourceChargebee(ctx context.Context, request operations.DeleteSourceChargebeeRequest) (*operations.DeleteSourceChargebeeResponse, error) { +// DeleteSourceGlassfrog - Delete a Source +func (s *Sources) DeleteSourceGlassfrog(ctx context.Context, request operations.DeleteSourceGlassfrogRequest, opts ...operations.Option) (*operations.DeleteSourceGlassfrogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceChargebee", + OperationID: "deleteSourceGlassfrog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21207,7 +29972,7 @@ func (s *Sources) DeleteSourceChargebee(ctx context.Context, request operations. } } - res := &operations.DeleteSourceChargebeeResponse{ + res := &operations.DeleteSourceGlassfrogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21234,21 +29999,43 @@ func (s *Sources) DeleteSourceChargebee(ctx context.Context, request operations. } -// DeleteSourceChartmogul - Delete a Source -func (s *Sources) DeleteSourceChartmogul(ctx context.Context, request operations.DeleteSourceChartmogulRequest) (*operations.DeleteSourceChartmogulResponse, error) { +// DeleteSourceGnews - Delete a Source +func (s *Sources) DeleteSourceGnews(ctx context.Context, request operations.DeleteSourceGnewsRequest, opts ...operations.Option) (*operations.DeleteSourceGnewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceChartmogul", + OperationID: "deleteSourceGnews", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21289,7 +30076,7 @@ func (s *Sources) DeleteSourceChartmogul(ctx context.Context, request operations } } - res := &operations.DeleteSourceChartmogulResponse{ + res := &operations.DeleteSourceGnewsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21316,21 +30103,43 @@ func (s *Sources) DeleteSourceChartmogul(ctx context.Context, request operations } -// DeleteSourceClickhouse - Delete a Source -func (s *Sources) DeleteSourceClickhouse(ctx context.Context, request operations.DeleteSourceClickhouseRequest) (*operations.DeleteSourceClickhouseResponse, error) { +// DeleteSourceGoldcast - Delete a Source +func (s *Sources) DeleteSourceGoldcast(ctx context.Context, request operations.DeleteSourceGoldcastRequest, opts ...operations.Option) (*operations.DeleteSourceGoldcastResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceClickhouse", + OperationID: "deleteSourceGoldcast", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21371,7 +30180,7 @@ func (s *Sources) DeleteSourceClickhouse(ctx context.Context, request operations } } - res := &operations.DeleteSourceClickhouseResponse{ + res := &operations.DeleteSourceGoldcastResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21398,21 +30207,43 @@ func (s *Sources) DeleteSourceClickhouse(ctx context.Context, request operations } -// DeleteSourceClickupAPI - Delete a Source -func (s *Sources) DeleteSourceClickupAPI(ctx context.Context, request operations.DeleteSourceClickupAPIRequest) (*operations.DeleteSourceClickupAPIResponse, error) { +// DeleteSourceGoogleAds - Delete a Source +func (s *Sources) DeleteSourceGoogleAds(ctx context.Context, request operations.DeleteSourceGoogleAdsRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceClickupApi", + OperationID: "deleteSourceGoogleAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21453,7 +30284,7 @@ func (s *Sources) DeleteSourceClickupAPI(ctx context.Context, request operations } } - res := &operations.DeleteSourceClickupAPIResponse{ + res := &operations.DeleteSourceGoogleAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21480,21 +30311,43 @@ func (s *Sources) DeleteSourceClickupAPI(ctx context.Context, request operations } -// DeleteSourceClockify - Delete a Source -func (s *Sources) DeleteSourceClockify(ctx context.Context, request operations.DeleteSourceClockifyRequest) (*operations.DeleteSourceClockifyResponse, error) { +// DeleteSourceGoogleAnalyticsDataAPI - Delete a Source +func (s *Sources) DeleteSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.DeleteSourceGoogleAnalyticsDataAPIRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleAnalyticsDataAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceClockify", + OperationID: "deleteSourceGoogleAnalyticsDataApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21535,7 +30388,7 @@ func (s *Sources) DeleteSourceClockify(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceClockifyResponse{ + res := &operations.DeleteSourceGoogleAnalyticsDataAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21562,21 +30415,43 @@ func (s *Sources) DeleteSourceClockify(ctx context.Context, request operations.D } -// DeleteSourceCloseCom - Delete a Source -func (s *Sources) DeleteSourceCloseCom(ctx context.Context, request operations.DeleteSourceCloseComRequest) (*operations.DeleteSourceCloseComResponse, error) { +// DeleteSourceGoogleDirectory - Delete a Source +func (s *Sources) DeleteSourceGoogleDirectory(ctx context.Context, request operations.DeleteSourceGoogleDirectoryRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleDirectoryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceCloseCom", + OperationID: "deleteSourceGoogleDirectory", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21617,7 +30492,7 @@ func (s *Sources) DeleteSourceCloseCom(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceCloseComResponse{ + res := &operations.DeleteSourceGoogleDirectoryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21644,21 +30519,43 @@ func (s *Sources) DeleteSourceCloseCom(ctx context.Context, request operations.D } -// DeleteSourceCoda - Delete a Source -func (s *Sources) DeleteSourceCoda(ctx context.Context, request operations.DeleteSourceCodaRequest) (*operations.DeleteSourceCodaResponse, error) { +// DeleteSourceGoogleDrive - Delete a Source +func (s *Sources) DeleteSourceGoogleDrive(ctx context.Context, request operations.DeleteSourceGoogleDriveRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleDriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceCoda", + OperationID: "deleteSourceGoogleDrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -21699,7 +30596,7 @@ func (s *Sources) DeleteSourceCoda(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceCodaResponse{ + res := &operations.DeleteSourceGoogleDriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21726,101 +30623,41 @@ func (s *Sources) DeleteSourceCoda(ctx context.Context, request operations.Delet } -// DeleteSourceCoinAPI - Delete a Source -func (s *Sources) DeleteSourceCoinAPI(ctx context.Context, request operations.DeleteSourceCoinAPIRequest) (*operations.DeleteSourceCoinAPIResponse, error) { +// DeleteSourceGooglePagespeedInsights - Delete a Source +func (s *Sources) DeleteSourceGooglePagespeedInsights(ctx context.Context, request operations.DeleteSourceGooglePagespeedInsightsRequest, opts ...operations.Option) (*operations.DeleteSourceGooglePagespeedInsightsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceCoinApi", + OperationID: "deleteSourceGooglePagespeedInsights", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceCoinAPIResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceCoinmarketcap - Delete a Source -func (s *Sources) DeleteSourceCoinmarketcap(ctx context.Context, request operations.DeleteSourceCoinmarketcapRequest) (*operations.DeleteSourceCoinmarketcapResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceCoinmarketcap", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -21863,7 +30700,7 @@ func (s *Sources) DeleteSourceCoinmarketcap(ctx context.Context, request operati } } - res := &operations.DeleteSourceCoinmarketcapResponse{ + res := &operations.DeleteSourceGooglePagespeedInsightsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -21890,101 +30727,41 @@ func (s *Sources) DeleteSourceCoinmarketcap(ctx context.Context, request operati } -// DeleteSourceConfigcat - Delete a Source -func (s *Sources) DeleteSourceConfigcat(ctx context.Context, request operations.DeleteSourceConfigcatRequest) (*operations.DeleteSourceConfigcatResponse, error) { +// DeleteSourceGoogleSearchConsole - Delete a Source +func (s *Sources) DeleteSourceGoogleSearchConsole(ctx context.Context, request operations.DeleteSourceGoogleSearchConsoleRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleSearchConsoleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceConfigcat", + OperationID: "deleteSourceGoogleSearchConsole", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceConfigcatResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceConfluence - Delete a Source -func (s *Sources) DeleteSourceConfluence(ctx context.Context, request operations.DeleteSourceConfluenceRequest) (*operations.DeleteSourceConfluenceResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceConfluence", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -22027,7 +30804,7 @@ func (s *Sources) DeleteSourceConfluence(ctx context.Context, request operations } } - res := &operations.DeleteSourceConfluenceResponse{ + res := &operations.DeleteSourceGoogleSearchConsoleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22054,21 +30831,43 @@ func (s *Sources) DeleteSourceConfluence(ctx context.Context, request operations } -// DeleteSourceConvex - Delete a Source -func (s *Sources) DeleteSourceConvex(ctx context.Context, request operations.DeleteSourceConvexRequest) (*operations.DeleteSourceConvexResponse, error) { +// DeleteSourceGoogleSheets - Delete a Source +func (s *Sources) DeleteSourceGoogleSheets(ctx context.Context, request operations.DeleteSourceGoogleSheetsRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceConvex", + OperationID: "deleteSourceGoogleSheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22109,7 +30908,7 @@ func (s *Sources) DeleteSourceConvex(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceConvexResponse{ + res := &operations.DeleteSourceGoogleSheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22136,21 +30935,43 @@ func (s *Sources) DeleteSourceConvex(ctx context.Context, request operations.Del } -// DeleteSourceCustom - Delete a Source -func (s *Sources) DeleteSourceCustom(ctx context.Context, request operations.DeleteSourceCustomRequest) (*operations.DeleteSourceCustomResponse, error) { +// DeleteSourceGoogleWebfonts - Delete a Source +func (s *Sources) DeleteSourceGoogleWebfonts(ctx context.Context, request operations.DeleteSourceGoogleWebfontsRequest, opts ...operations.Option) (*operations.DeleteSourceGoogleWebfontsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceCustom", + OperationID: "deleteSourceGoogleWebfonts", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22191,7 +31012,7 @@ func (s *Sources) DeleteSourceCustom(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceCustomResponse{ + res := &operations.DeleteSourceGoogleWebfontsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22218,21 +31039,43 @@ func (s *Sources) DeleteSourceCustom(ctx context.Context, request operations.Del } -// DeleteSourceDatascope - Delete a Source -func (s *Sources) DeleteSourceDatascope(ctx context.Context, request operations.DeleteSourceDatascopeRequest) (*operations.DeleteSourceDatascopeResponse, error) { +// DeleteSourceGreenhouse - Delete a Source +func (s *Sources) DeleteSourceGreenhouse(ctx context.Context, request operations.DeleteSourceGreenhouseRequest, opts ...operations.Option) (*operations.DeleteSourceGreenhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDatascope", + OperationID: "deleteSourceGreenhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22273,7 +31116,7 @@ func (s *Sources) DeleteSourceDatascope(ctx context.Context, request operations. } } - res := &operations.DeleteSourceDatascopeResponse{ + res := &operations.DeleteSourceGreenhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22300,21 +31143,43 @@ func (s *Sources) DeleteSourceDatascope(ctx context.Context, request operations. } -// DeleteSourceDelighted - Delete a Source -func (s *Sources) DeleteSourceDelighted(ctx context.Context, request operations.DeleteSourceDelightedRequest) (*operations.DeleteSourceDelightedResponse, error) { +// DeleteSourceGridly - Delete a Source +func (s *Sources) DeleteSourceGridly(ctx context.Context, request operations.DeleteSourceGridlyRequest, opts ...operations.Option) (*operations.DeleteSourceGridlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDelighted", + OperationID: "deleteSourceGridly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22355,7 +31220,7 @@ func (s *Sources) DeleteSourceDelighted(ctx context.Context, request operations. } } - res := &operations.DeleteSourceDelightedResponse{ + res := &operations.DeleteSourceGridlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22382,21 +31247,43 @@ func (s *Sources) DeleteSourceDelighted(ctx context.Context, request operations. } -// DeleteSourceDixa - Delete a Source -func (s *Sources) DeleteSourceDixa(ctx context.Context, request operations.DeleteSourceDixaRequest) (*operations.DeleteSourceDixaResponse, error) { +// DeleteSourceHarvest - Delete a Source +func (s *Sources) DeleteSourceHarvest(ctx context.Context, request operations.DeleteSourceHarvestRequest, opts ...operations.Option) (*operations.DeleteSourceHarvestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDixa", + OperationID: "deleteSourceHarvest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22437,7 +31324,7 @@ func (s *Sources) DeleteSourceDixa(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceDixaResponse{ + res := &operations.DeleteSourceHarvestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22464,21 +31351,43 @@ func (s *Sources) DeleteSourceDixa(ctx context.Context, request operations.Delet } -// DeleteSourceDockerhub - Delete a Source -func (s *Sources) DeleteSourceDockerhub(ctx context.Context, request operations.DeleteSourceDockerhubRequest) (*operations.DeleteSourceDockerhubResponse, error) { +// DeleteSourceHubplanner - Delete a Source +func (s *Sources) DeleteSourceHubplanner(ctx context.Context, request operations.DeleteSourceHubplannerRequest, opts ...operations.Option) (*operations.DeleteSourceHubplannerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDockerhub", + OperationID: "deleteSourceHubplanner", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22519,7 +31428,7 @@ func (s *Sources) DeleteSourceDockerhub(ctx context.Context, request operations. } } - res := &operations.DeleteSourceDockerhubResponse{ + res := &operations.DeleteSourceHubplannerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22546,21 +31455,43 @@ func (s *Sources) DeleteSourceDockerhub(ctx context.Context, request operations. } -// DeleteSourceDremio - Delete a Source -func (s *Sources) DeleteSourceDremio(ctx context.Context, request operations.DeleteSourceDremioRequest) (*operations.DeleteSourceDremioResponse, error) { +// DeleteSourceHubspot - Delete a Source +func (s *Sources) DeleteSourceHubspot(ctx context.Context, request operations.DeleteSourceHubspotRequest, opts ...operations.Option) (*operations.DeleteSourceHubspotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDremio", + OperationID: "deleteSourceHubspot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22601,7 +31532,7 @@ func (s *Sources) DeleteSourceDremio(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceDremioResponse{ + res := &operations.DeleteSourceHubspotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22628,21 +31559,43 @@ func (s *Sources) DeleteSourceDremio(ctx context.Context, request operations.Del } -// DeleteSourceDynamodb - Delete a Source -func (s *Sources) DeleteSourceDynamodb(ctx context.Context, request operations.DeleteSourceDynamodbRequest) (*operations.DeleteSourceDynamodbResponse, error) { +// DeleteSourceInsightly - Delete a Source +func (s *Sources) DeleteSourceInsightly(ctx context.Context, request operations.DeleteSourceInsightlyRequest, opts ...operations.Option) (*operations.DeleteSourceInsightlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceDynamodb", + OperationID: "deleteSourceInsightly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22683,7 +31636,7 @@ func (s *Sources) DeleteSourceDynamodb(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceDynamodbResponse{ + res := &operations.DeleteSourceInsightlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22710,21 +31663,43 @@ func (s *Sources) DeleteSourceDynamodb(ctx context.Context, request operations.D } -// DeleteSourceEmailoctopus - Delete a Source -func (s *Sources) DeleteSourceEmailoctopus(ctx context.Context, request operations.DeleteSourceEmailoctopusRequest) (*operations.DeleteSourceEmailoctopusResponse, error) { +// DeleteSourceInstagram - Delete a Source +func (s *Sources) DeleteSourceInstagram(ctx context.Context, request operations.DeleteSourceInstagramRequest, opts ...operations.Option) (*operations.DeleteSourceInstagramResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceEmailoctopus", + OperationID: "deleteSourceInstagram", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22765,7 +31740,7 @@ func (s *Sources) DeleteSourceEmailoctopus(ctx context.Context, request operatio } } - res := &operations.DeleteSourceEmailoctopusResponse{ + res := &operations.DeleteSourceInstagramResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22792,21 +31767,43 @@ func (s *Sources) DeleteSourceEmailoctopus(ctx context.Context, request operatio } -// DeleteSourceExchangeRates - Delete a Source -func (s *Sources) DeleteSourceExchangeRates(ctx context.Context, request operations.DeleteSourceExchangeRatesRequest) (*operations.DeleteSourceExchangeRatesResponse, error) { +// DeleteSourceInstatus - Delete a Source +func (s *Sources) DeleteSourceInstatus(ctx context.Context, request operations.DeleteSourceInstatusRequest, opts ...operations.Option) (*operations.DeleteSourceInstatusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceExchangeRates", + OperationID: "deleteSourceInstatus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22847,7 +31844,7 @@ func (s *Sources) DeleteSourceExchangeRates(ctx context.Context, request operati } } - res := &operations.DeleteSourceExchangeRatesResponse{ + res := &operations.DeleteSourceInstatusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22874,21 +31871,43 @@ func (s *Sources) DeleteSourceExchangeRates(ctx context.Context, request operati } -// DeleteSourceFacebookMarketing - Delete a Source -func (s *Sources) DeleteSourceFacebookMarketing(ctx context.Context, request operations.DeleteSourceFacebookMarketingRequest) (*operations.DeleteSourceFacebookMarketingResponse, error) { +// DeleteSourceIntercom - Delete a Source +func (s *Sources) DeleteSourceIntercom(ctx context.Context, request operations.DeleteSourceIntercomRequest, opts ...operations.Option) (*operations.DeleteSourceIntercomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFacebookMarketing", + OperationID: "deleteSourceIntercom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -22929,7 +31948,7 @@ func (s *Sources) DeleteSourceFacebookMarketing(ctx context.Context, request ope } } - res := &operations.DeleteSourceFacebookMarketingResponse{ + res := &operations.DeleteSourceIntercomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -22956,21 +31975,43 @@ func (s *Sources) DeleteSourceFacebookMarketing(ctx context.Context, request ope } -// DeleteSourceFaker - Delete a Source -func (s *Sources) DeleteSourceFaker(ctx context.Context, request operations.DeleteSourceFakerRequest) (*operations.DeleteSourceFakerResponse, error) { +// DeleteSourceIp2whois - Delete a Source +func (s *Sources) DeleteSourceIp2whois(ctx context.Context, request operations.DeleteSourceIp2whoisRequest, opts ...operations.Option) (*operations.DeleteSourceIp2whoisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFaker", + OperationID: "deleteSourceIp2whois", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23011,7 +32052,7 @@ func (s *Sources) DeleteSourceFaker(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceFakerResponse{ + res := &operations.DeleteSourceIp2whoisResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23038,21 +32079,43 @@ func (s *Sources) DeleteSourceFaker(ctx context.Context, request operations.Dele } -// DeleteSourceFauna - Delete a Source -func (s *Sources) DeleteSourceFauna(ctx context.Context, request operations.DeleteSourceFaunaRequest) (*operations.DeleteSourceFaunaResponse, error) { +// DeleteSourceIterable - Delete a Source +func (s *Sources) DeleteSourceIterable(ctx context.Context, request operations.DeleteSourceIterableRequest, opts ...operations.Option) (*operations.DeleteSourceIterableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFauna", + OperationID: "deleteSourceIterable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23093,7 +32156,7 @@ func (s *Sources) DeleteSourceFauna(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceFaunaResponse{ + res := &operations.DeleteSourceIterableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23120,21 +32183,43 @@ func (s *Sources) DeleteSourceFauna(ctx context.Context, request operations.Dele } -// DeleteSourceFile - Delete a Source -func (s *Sources) DeleteSourceFile(ctx context.Context, request operations.DeleteSourceFileRequest) (*operations.DeleteSourceFileResponse, error) { +// DeleteSourceJira - Delete a Source +func (s *Sources) DeleteSourceJira(ctx context.Context, request operations.DeleteSourceJiraRequest, opts ...operations.Option) (*operations.DeleteSourceJiraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFile", + OperationID: "deleteSourceJira", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23175,7 +32260,7 @@ func (s *Sources) DeleteSourceFile(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceFileResponse{ + res := &operations.DeleteSourceJiraResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23202,21 +32287,43 @@ func (s *Sources) DeleteSourceFile(ctx context.Context, request operations.Delet } -// DeleteSourceFirebolt - Delete a Source -func (s *Sources) DeleteSourceFirebolt(ctx context.Context, request operations.DeleteSourceFireboltRequest) (*operations.DeleteSourceFireboltResponse, error) { +// DeleteSourceK6Cloud - Delete a Source +func (s *Sources) DeleteSourceK6Cloud(ctx context.Context, request operations.DeleteSourceK6CloudRequest, opts ...operations.Option) (*operations.DeleteSourceK6CloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFirebolt", + OperationID: "deleteSourceK6Cloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23257,7 +32364,7 @@ func (s *Sources) DeleteSourceFirebolt(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceFireboltResponse{ + res := &operations.DeleteSourceK6CloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23284,21 +32391,43 @@ func (s *Sources) DeleteSourceFirebolt(ctx context.Context, request operations.D } -// DeleteSourceFleetio - Delete a Source -func (s *Sources) DeleteSourceFleetio(ctx context.Context, request operations.DeleteSourceFleetioRequest) (*operations.DeleteSourceFleetioResponse, error) { +// DeleteSourceKlarna - Delete a Source +func (s *Sources) DeleteSourceKlarna(ctx context.Context, request operations.DeleteSourceKlarnaRequest, opts ...operations.Option) (*operations.DeleteSourceKlarnaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFleetio", + OperationID: "deleteSourceKlarna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23339,7 +32468,7 @@ func (s *Sources) DeleteSourceFleetio(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceFleetioResponse{ + res := &operations.DeleteSourceKlarnaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23366,21 +32495,43 @@ func (s *Sources) DeleteSourceFleetio(ctx context.Context, request operations.De } -// DeleteSourceFreshcaller - Delete a Source -func (s *Sources) DeleteSourceFreshcaller(ctx context.Context, request operations.DeleteSourceFreshcallerRequest) (*operations.DeleteSourceFreshcallerResponse, error) { +// DeleteSourceKlaviyo - Delete a Source +func (s *Sources) DeleteSourceKlaviyo(ctx context.Context, request operations.DeleteSourceKlaviyoRequest, opts ...operations.Option) (*operations.DeleteSourceKlaviyoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFreshcaller", + OperationID: "deleteSourceKlaviyo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23421,7 +32572,7 @@ func (s *Sources) DeleteSourceFreshcaller(ctx context.Context, request operation } } - res := &operations.DeleteSourceFreshcallerResponse{ + res := &operations.DeleteSourceKlaviyoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23448,21 +32599,43 @@ func (s *Sources) DeleteSourceFreshcaller(ctx context.Context, request operation } -// DeleteSourceFreshdesk - Delete a Source -func (s *Sources) DeleteSourceFreshdesk(ctx context.Context, request operations.DeleteSourceFreshdeskRequest) (*operations.DeleteSourceFreshdeskResponse, error) { +// DeleteSourceKyve - Delete a Source +func (s *Sources) DeleteSourceKyve(ctx context.Context, request operations.DeleteSourceKyveRequest, opts ...operations.Option) (*operations.DeleteSourceKyveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFreshdesk", + OperationID: "deleteSourceKyve", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23503,7 +32676,7 @@ func (s *Sources) DeleteSourceFreshdesk(ctx context.Context, request operations. } } - res := &operations.DeleteSourceFreshdeskResponse{ + res := &operations.DeleteSourceKyveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23530,21 +32703,43 @@ func (s *Sources) DeleteSourceFreshdesk(ctx context.Context, request operations. } -// DeleteSourceFreshsales - Delete a Source -func (s *Sources) DeleteSourceFreshsales(ctx context.Context, request operations.DeleteSourceFreshsalesRequest) (*operations.DeleteSourceFreshsalesResponse, error) { +// DeleteSourceLaunchdarkly - Delete a Source +func (s *Sources) DeleteSourceLaunchdarkly(ctx context.Context, request operations.DeleteSourceLaunchdarklyRequest, opts ...operations.Option) (*operations.DeleteSourceLaunchdarklyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceFreshsales", + OperationID: "deleteSourceLaunchdarkly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23585,7 +32780,7 @@ func (s *Sources) DeleteSourceFreshsales(ctx context.Context, request operations } } - res := &operations.DeleteSourceFreshsalesResponse{ + res := &operations.DeleteSourceLaunchdarklyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23612,21 +32807,43 @@ func (s *Sources) DeleteSourceFreshsales(ctx context.Context, request operations } -// DeleteSourceGainsightPx - Delete a Source -func (s *Sources) DeleteSourceGainsightPx(ctx context.Context, request operations.DeleteSourceGainsightPxRequest) (*operations.DeleteSourceGainsightPxResponse, error) { +// DeleteSourceLemlist - Delete a Source +func (s *Sources) DeleteSourceLemlist(ctx context.Context, request operations.DeleteSourceLemlistRequest, opts ...operations.Option) (*operations.DeleteSourceLemlistResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGainsightPx", + OperationID: "deleteSourceLemlist", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23667,7 +32884,7 @@ func (s *Sources) DeleteSourceGainsightPx(ctx context.Context, request operation } } - res := &operations.DeleteSourceGainsightPxResponse{ + res := &operations.DeleteSourceLemlistResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23694,21 +32911,43 @@ func (s *Sources) DeleteSourceGainsightPx(ctx context.Context, request operation } -// DeleteSourceGcs - Delete a Source -func (s *Sources) DeleteSourceGcs(ctx context.Context, request operations.DeleteSourceGcsRequest) (*operations.DeleteSourceGcsResponse, error) { +// DeleteSourceLeverHiring - Delete a Source +func (s *Sources) DeleteSourceLeverHiring(ctx context.Context, request operations.DeleteSourceLeverHiringRequest, opts ...operations.Option) (*operations.DeleteSourceLeverHiringResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGcs", + OperationID: "deleteSourceLeverHiring", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23749,7 +32988,7 @@ func (s *Sources) DeleteSourceGcs(ctx context.Context, request operations.Delete } } - res := &operations.DeleteSourceGcsResponse{ + res := &operations.DeleteSourceLeverHiringResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23776,21 +33015,43 @@ func (s *Sources) DeleteSourceGcs(ctx context.Context, request operations.Delete } -// DeleteSourceGetlago - Delete a Source -func (s *Sources) DeleteSourceGetlago(ctx context.Context, request operations.DeleteSourceGetlagoRequest) (*operations.DeleteSourceGetlagoResponse, error) { +// DeleteSourceLinkedinAds - Delete a Source +func (s *Sources) DeleteSourceLinkedinAds(ctx context.Context, request operations.DeleteSourceLinkedinAdsRequest, opts ...operations.Option) (*operations.DeleteSourceLinkedinAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGetlago", + OperationID: "deleteSourceLinkedinAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23831,7 +33092,7 @@ func (s *Sources) DeleteSourceGetlago(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceGetlagoResponse{ + res := &operations.DeleteSourceLinkedinAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23858,21 +33119,43 @@ func (s *Sources) DeleteSourceGetlago(ctx context.Context, request operations.De } -// DeleteSourceGithub - Delete a Source -func (s *Sources) DeleteSourceGithub(ctx context.Context, request operations.DeleteSourceGithubRequest) (*operations.DeleteSourceGithubResponse, error) { +// DeleteSourceLinkedinPages - Delete a Source +func (s *Sources) DeleteSourceLinkedinPages(ctx context.Context, request operations.DeleteSourceLinkedinPagesRequest, opts ...operations.Option) (*operations.DeleteSourceLinkedinPagesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGithub", + OperationID: "deleteSourceLinkedinPages", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -23913,7 +33196,7 @@ func (s *Sources) DeleteSourceGithub(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceGithubResponse{ + res := &operations.DeleteSourceLinkedinPagesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -23940,101 +33223,41 @@ func (s *Sources) DeleteSourceGithub(ctx context.Context, request operations.Del } -// DeleteSourceGitlab - Delete a Source -func (s *Sources) DeleteSourceGitlab(ctx context.Context, request operations.DeleteSourceGitlabRequest) (*operations.DeleteSourceGitlabResponse, error) { +// DeleteSourceLinnworks - Delete a Source +func (s *Sources) DeleteSourceLinnworks(ctx context.Context, request operations.DeleteSourceLinnworksRequest, opts ...operations.Option) (*operations.DeleteSourceLinnworksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGitlab", + OperationID: "deleteSourceLinnworks", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceGitlabResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceGlassfrog - Delete a Source -func (s *Sources) DeleteSourceGlassfrog(ctx context.Context, request operations.DeleteSourceGlassfrogRequest) (*operations.DeleteSourceGlassfrogResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceGlassfrog", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -24077,7 +33300,7 @@ func (s *Sources) DeleteSourceGlassfrog(ctx context.Context, request operations. } } - res := &operations.DeleteSourceGlassfrogResponse{ + res := &operations.DeleteSourceLinnworksResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24104,21 +33327,43 @@ func (s *Sources) DeleteSourceGlassfrog(ctx context.Context, request operations. } -// DeleteSourceGnews - Delete a Source -func (s *Sources) DeleteSourceGnews(ctx context.Context, request operations.DeleteSourceGnewsRequest) (*operations.DeleteSourceGnewsResponse, error) { +// DeleteSourceLokalise - Delete a Source +func (s *Sources) DeleteSourceLokalise(ctx context.Context, request operations.DeleteSourceLokaliseRequest, opts ...operations.Option) (*operations.DeleteSourceLokaliseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGnews", + OperationID: "deleteSourceLokalise", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24159,7 +33404,7 @@ func (s *Sources) DeleteSourceGnews(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceGnewsResponse{ + res := &operations.DeleteSourceLokaliseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24186,21 +33431,43 @@ func (s *Sources) DeleteSourceGnews(ctx context.Context, request operations.Dele } -// DeleteSourceGoogleAds - Delete a Source -func (s *Sources) DeleteSourceGoogleAds(ctx context.Context, request operations.DeleteSourceGoogleAdsRequest) (*operations.DeleteSourceGoogleAdsResponse, error) { +// DeleteSourceMailchimp - Delete a Source +func (s *Sources) DeleteSourceMailchimp(ctx context.Context, request operations.DeleteSourceMailchimpRequest, opts ...operations.Option) (*operations.DeleteSourceMailchimpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleAds", + OperationID: "deleteSourceMailchimp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24241,7 +33508,7 @@ func (s *Sources) DeleteSourceGoogleAds(ctx context.Context, request operations. } } - res := &operations.DeleteSourceGoogleAdsResponse{ + res := &operations.DeleteSourceMailchimpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24268,21 +33535,43 @@ func (s *Sources) DeleteSourceGoogleAds(ctx context.Context, request operations. } -// DeleteSourceGoogleAnalyticsDataAPI - Delete a Source -func (s *Sources) DeleteSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.DeleteSourceGoogleAnalyticsDataAPIRequest) (*operations.DeleteSourceGoogleAnalyticsDataAPIResponse, error) { +// DeleteSourceMailgun - Delete a Source +func (s *Sources) DeleteSourceMailgun(ctx context.Context, request operations.DeleteSourceMailgunRequest, opts ...operations.Option) (*operations.DeleteSourceMailgunResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleAnalyticsDataApi", + OperationID: "deleteSourceMailgun", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24323,7 +33612,7 @@ func (s *Sources) DeleteSourceGoogleAnalyticsDataAPI(ctx context.Context, reques } } - res := &operations.DeleteSourceGoogleAnalyticsDataAPIResponse{ + res := &operations.DeleteSourceMailgunResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24350,21 +33639,43 @@ func (s *Sources) DeleteSourceGoogleAnalyticsDataAPI(ctx context.Context, reques } -// DeleteSourceGoogleAnalyticsV4ServiceAccountOnly - Delete a Source -func (s *Sources) DeleteSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Context, request operations.DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) (*operations.DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse, error) { +// DeleteSourceMailjetSms - Delete a Source +func (s *Sources) DeleteSourceMailjetSms(ctx context.Context, request operations.DeleteSourceMailjetSmsRequest, opts ...operations.Option) (*operations.DeleteSourceMailjetSmsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleAnalyticsV4ServiceAccountOnly", + OperationID: "deleteSourceMailjetSms", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24405,7 +33716,7 @@ func (s *Sources) DeleteSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Co } } - res := &operations.DeleteSourceGoogleAnalyticsV4ServiceAccountOnlyResponse{ + res := &operations.DeleteSourceMailjetSmsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24432,21 +33743,43 @@ func (s *Sources) DeleteSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Co } -// DeleteSourceGoogleDirectory - Delete a Source -func (s *Sources) DeleteSourceGoogleDirectory(ctx context.Context, request operations.DeleteSourceGoogleDirectoryRequest) (*operations.DeleteSourceGoogleDirectoryResponse, error) { +// DeleteSourceMarketo - Delete a Source +func (s *Sources) DeleteSourceMarketo(ctx context.Context, request operations.DeleteSourceMarketoRequest, opts ...operations.Option) (*operations.DeleteSourceMarketoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleDirectory", + OperationID: "deleteSourceMarketo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24487,7 +33820,7 @@ func (s *Sources) DeleteSourceGoogleDirectory(ctx context.Context, request opera } } - res := &operations.DeleteSourceGoogleDirectoryResponse{ + res := &operations.DeleteSourceMarketoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24514,21 +33847,43 @@ func (s *Sources) DeleteSourceGoogleDirectory(ctx context.Context, request opera } -// DeleteSourceGoogleDrive - Delete a Source -func (s *Sources) DeleteSourceGoogleDrive(ctx context.Context, request operations.DeleteSourceGoogleDriveRequest) (*operations.DeleteSourceGoogleDriveResponse, error) { +// DeleteSourceMetabase - Delete a Source +func (s *Sources) DeleteSourceMetabase(ctx context.Context, request operations.DeleteSourceMetabaseRequest, opts ...operations.Option) (*operations.DeleteSourceMetabaseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleDrive", + OperationID: "deleteSourceMetabase", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24569,7 +33924,7 @@ func (s *Sources) DeleteSourceGoogleDrive(ctx context.Context, request operation } } - res := &operations.DeleteSourceGoogleDriveResponse{ + res := &operations.DeleteSourceMetabaseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24596,21 +33951,43 @@ func (s *Sources) DeleteSourceGoogleDrive(ctx context.Context, request operation } -// DeleteSourceGooglePagespeedInsights - Delete a Source -func (s *Sources) DeleteSourceGooglePagespeedInsights(ctx context.Context, request operations.DeleteSourceGooglePagespeedInsightsRequest) (*operations.DeleteSourceGooglePagespeedInsightsResponse, error) { +// DeleteSourceMicrosoftOnedrive - Delete a Source +func (s *Sources) DeleteSourceMicrosoftOnedrive(ctx context.Context, request operations.DeleteSourceMicrosoftOnedriveRequest, opts ...operations.Option) (*operations.DeleteSourceMicrosoftOnedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGooglePagespeedInsights", + OperationID: "deleteSourceMicrosoftOnedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24651,7 +34028,7 @@ func (s *Sources) DeleteSourceGooglePagespeedInsights(ctx context.Context, reque } } - res := &operations.DeleteSourceGooglePagespeedInsightsResponse{ + res := &operations.DeleteSourceMicrosoftOnedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24678,21 +34055,43 @@ func (s *Sources) DeleteSourceGooglePagespeedInsights(ctx context.Context, reque } -// DeleteSourceGoogleSearchConsole - Delete a Source -func (s *Sources) DeleteSourceGoogleSearchConsole(ctx context.Context, request operations.DeleteSourceGoogleSearchConsoleRequest) (*operations.DeleteSourceGoogleSearchConsoleResponse, error) { +// DeleteSourceMicrosoftSharepoint - Delete a Source +func (s *Sources) DeleteSourceMicrosoftSharepoint(ctx context.Context, request operations.DeleteSourceMicrosoftSharepointRequest, opts ...operations.Option) (*operations.DeleteSourceMicrosoftSharepointResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleSearchConsole", + OperationID: "deleteSourceMicrosoftSharepoint", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24733,7 +34132,7 @@ func (s *Sources) DeleteSourceGoogleSearchConsole(ctx context.Context, request o } } - res := &operations.DeleteSourceGoogleSearchConsoleResponse{ + res := &operations.DeleteSourceMicrosoftSharepointResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24760,21 +34159,43 @@ func (s *Sources) DeleteSourceGoogleSearchConsole(ctx context.Context, request o } -// DeleteSourceGoogleSheets - Delete a Source -func (s *Sources) DeleteSourceGoogleSheets(ctx context.Context, request operations.DeleteSourceGoogleSheetsRequest) (*operations.DeleteSourceGoogleSheetsResponse, error) { +// DeleteSourceMicrosoftTeams - Delete a Source +func (s *Sources) DeleteSourceMicrosoftTeams(ctx context.Context, request operations.DeleteSourceMicrosoftTeamsRequest, opts ...operations.Option) (*operations.DeleteSourceMicrosoftTeamsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleSheets", + OperationID: "deleteSourceMicrosoftTeams", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24815,7 +34236,7 @@ func (s *Sources) DeleteSourceGoogleSheets(ctx context.Context, request operatio } } - res := &operations.DeleteSourceGoogleSheetsResponse{ + res := &operations.DeleteSourceMicrosoftTeamsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24842,21 +34263,43 @@ func (s *Sources) DeleteSourceGoogleSheets(ctx context.Context, request operatio } -// DeleteSourceGoogleWebfonts - Delete a Source -func (s *Sources) DeleteSourceGoogleWebfonts(ctx context.Context, request operations.DeleteSourceGoogleWebfontsRequest) (*operations.DeleteSourceGoogleWebfontsResponse, error) { +// DeleteSourceMixpanel - Delete a Source +func (s *Sources) DeleteSourceMixpanel(ctx context.Context, request operations.DeleteSourceMixpanelRequest, opts ...operations.Option) (*operations.DeleteSourceMixpanelResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGoogleWebfonts", + OperationID: "deleteSourceMixpanel", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24897,7 +34340,7 @@ func (s *Sources) DeleteSourceGoogleWebfonts(ctx context.Context, request operat } } - res := &operations.DeleteSourceGoogleWebfontsResponse{ + res := &operations.DeleteSourceMixpanelResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -24924,21 +34367,43 @@ func (s *Sources) DeleteSourceGoogleWebfonts(ctx context.Context, request operat } -// DeleteSourceGreenhouse - Delete a Source -func (s *Sources) DeleteSourceGreenhouse(ctx context.Context, request operations.DeleteSourceGreenhouseRequest) (*operations.DeleteSourceGreenhouseResponse, error) { +// DeleteSourceMonday - Delete a Source +func (s *Sources) DeleteSourceMonday(ctx context.Context, request operations.DeleteSourceMondayRequest, opts ...operations.Option) (*operations.DeleteSourceMondayResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGreenhouse", + OperationID: "deleteSourceMonday", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -24979,7 +34444,7 @@ func (s *Sources) DeleteSourceGreenhouse(ctx context.Context, request operations } } - res := &operations.DeleteSourceGreenhouseResponse{ + res := &operations.DeleteSourceMondayResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25006,21 +34471,43 @@ func (s *Sources) DeleteSourceGreenhouse(ctx context.Context, request operations } -// DeleteSourceGridly - Delete a Source -func (s *Sources) DeleteSourceGridly(ctx context.Context, request operations.DeleteSourceGridlyRequest) (*operations.DeleteSourceGridlyResponse, error) { +// DeleteSourceMongodbInternalPoc - Delete a Source +func (s *Sources) DeleteSourceMongodbInternalPoc(ctx context.Context, request operations.DeleteSourceMongodbInternalPocRequest, opts ...operations.Option) (*operations.DeleteSourceMongodbInternalPocResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceGridly", + OperationID: "deleteSourceMongodbInternalPoc", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25061,7 +34548,7 @@ func (s *Sources) DeleteSourceGridly(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceGridlyResponse{ + res := &operations.DeleteSourceMongodbInternalPocResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25088,101 +34575,41 @@ func (s *Sources) DeleteSourceGridly(ctx context.Context, request operations.Del } -// DeleteSourceHarvest - Delete a Source -func (s *Sources) DeleteSourceHarvest(ctx context.Context, request operations.DeleteSourceHarvestRequest) (*operations.DeleteSourceHarvestResponse, error) { +// DeleteSourceMongodbV2 - Delete a Source +func (s *Sources) DeleteSourceMongodbV2(ctx context.Context, request operations.DeleteSourceMongodbV2Request, opts ...operations.Option) (*operations.DeleteSourceMongodbV2Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceHarvest", + OperationID: "deleteSourceMongodbV2", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceHarvestResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceHubplanner - Delete a Source -func (s *Sources) DeleteSourceHubplanner(ctx context.Context, request operations.DeleteSourceHubplannerRequest) (*operations.DeleteSourceHubplannerResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceHubplanner", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -25225,7 +34652,7 @@ func (s *Sources) DeleteSourceHubplanner(ctx context.Context, request operations } } - res := &operations.DeleteSourceHubplannerResponse{ + res := &operations.DeleteSourceMongodbV2Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25252,101 +34679,41 @@ func (s *Sources) DeleteSourceHubplanner(ctx context.Context, request operations } -// DeleteSourceHubspot - Delete a Source -func (s *Sources) DeleteSourceHubspot(ctx context.Context, request operations.DeleteSourceHubspotRequest) (*operations.DeleteSourceHubspotResponse, error) { +// DeleteSourceMssql - Delete a Source +func (s *Sources) DeleteSourceMssql(ctx context.Context, request operations.DeleteSourceMssqlRequest, opts ...operations.Option) (*operations.DeleteSourceMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceHubspot", + OperationID: "deleteSourceMssql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceHubspotResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceInsightly - Delete a Source -func (s *Sources) DeleteSourceInsightly(ctx context.Context, request operations.DeleteSourceInsightlyRequest) (*operations.DeleteSourceInsightlyResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceInsightly", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -25389,7 +34756,7 @@ func (s *Sources) DeleteSourceInsightly(ctx context.Context, request operations. } } - res := &operations.DeleteSourceInsightlyResponse{ + res := &operations.DeleteSourceMssqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25416,21 +34783,43 @@ func (s *Sources) DeleteSourceInsightly(ctx context.Context, request operations. } -// DeleteSourceInstagram - Delete a Source -func (s *Sources) DeleteSourceInstagram(ctx context.Context, request operations.DeleteSourceInstagramRequest) (*operations.DeleteSourceInstagramResponse, error) { +// DeleteSourceMyHours - Delete a Source +func (s *Sources) DeleteSourceMyHours(ctx context.Context, request operations.DeleteSourceMyHoursRequest, opts ...operations.Option) (*operations.DeleteSourceMyHoursResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceInstagram", + OperationID: "deleteSourceMyHours", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25471,7 +34860,7 @@ func (s *Sources) DeleteSourceInstagram(ctx context.Context, request operations. } } - res := &operations.DeleteSourceInstagramResponse{ + res := &operations.DeleteSourceMyHoursResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25498,21 +34887,43 @@ func (s *Sources) DeleteSourceInstagram(ctx context.Context, request operations. } -// DeleteSourceInstatus - Delete a Source -func (s *Sources) DeleteSourceInstatus(ctx context.Context, request operations.DeleteSourceInstatusRequest) (*operations.DeleteSourceInstatusResponse, error) { +// DeleteSourceMysql - Delete a Source +func (s *Sources) DeleteSourceMysql(ctx context.Context, request operations.DeleteSourceMysqlRequest, opts ...operations.Option) (*operations.DeleteSourceMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceInstatus", + OperationID: "deleteSourceMysql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25553,7 +34964,7 @@ func (s *Sources) DeleteSourceInstatus(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceInstatusResponse{ + res := &operations.DeleteSourceMysqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25580,21 +34991,43 @@ func (s *Sources) DeleteSourceInstatus(ctx context.Context, request operations.D } -// DeleteSourceIntercom - Delete a Source -func (s *Sources) DeleteSourceIntercom(ctx context.Context, request operations.DeleteSourceIntercomRequest) (*operations.DeleteSourceIntercomResponse, error) { +// DeleteSourceNetsuite - Delete a Source +func (s *Sources) DeleteSourceNetsuite(ctx context.Context, request operations.DeleteSourceNetsuiteRequest, opts ...operations.Option) (*operations.DeleteSourceNetsuiteResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceIntercom", + OperationID: "deleteSourceNetsuite", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25635,7 +35068,7 @@ func (s *Sources) DeleteSourceIntercom(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceIntercomResponse{ + res := &operations.DeleteSourceNetsuiteResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25662,21 +35095,43 @@ func (s *Sources) DeleteSourceIntercom(ctx context.Context, request operations.D } -// DeleteSourceIp2whois - Delete a Source -func (s *Sources) DeleteSourceIp2whois(ctx context.Context, request operations.DeleteSourceIp2whoisRequest) (*operations.DeleteSourceIp2whoisResponse, error) { +// DeleteSourceNotion - Delete a Source +func (s *Sources) DeleteSourceNotion(ctx context.Context, request operations.DeleteSourceNotionRequest, opts ...operations.Option) (*operations.DeleteSourceNotionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceIp2whois", + OperationID: "deleteSourceNotion", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25717,7 +35172,7 @@ func (s *Sources) DeleteSourceIp2whois(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceIp2whoisResponse{ + res := &operations.DeleteSourceNotionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25744,21 +35199,43 @@ func (s *Sources) DeleteSourceIp2whois(ctx context.Context, request operations.D } -// DeleteSourceIterable - Delete a Source -func (s *Sources) DeleteSourceIterable(ctx context.Context, request operations.DeleteSourceIterableRequest) (*operations.DeleteSourceIterableResponse, error) { +// DeleteSourceNytimes - Delete a Source +func (s *Sources) DeleteSourceNytimes(ctx context.Context, request operations.DeleteSourceNytimesRequest, opts ...operations.Option) (*operations.DeleteSourceNytimesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceIterable", + OperationID: "deleteSourceNytimes", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25799,7 +35276,7 @@ func (s *Sources) DeleteSourceIterable(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceIterableResponse{ + res := &operations.DeleteSourceNytimesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25826,21 +35303,43 @@ func (s *Sources) DeleteSourceIterable(ctx context.Context, request operations.D } -// DeleteSourceJira - Delete a Source -func (s *Sources) DeleteSourceJira(ctx context.Context, request operations.DeleteSourceJiraRequest) (*operations.DeleteSourceJiraResponse, error) { +// DeleteSourceOkta - Delete a Source +func (s *Sources) DeleteSourceOkta(ctx context.Context, request operations.DeleteSourceOktaRequest, opts ...operations.Option) (*operations.DeleteSourceOktaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceJira", + OperationID: "deleteSourceOkta", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -25881,7 +35380,7 @@ func (s *Sources) DeleteSourceJira(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceJiraResponse{ + res := &operations.DeleteSourceOktaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -25908,101 +35407,41 @@ func (s *Sources) DeleteSourceJira(ctx context.Context, request operations.Delet } -// DeleteSourceK6Cloud - Delete a Source -func (s *Sources) DeleteSourceK6Cloud(ctx context.Context, request operations.DeleteSourceK6CloudRequest) (*operations.DeleteSourceK6CloudResponse, error) { +// DeleteSourceOmnisend - Delete a Source +func (s *Sources) DeleteSourceOmnisend(ctx context.Context, request operations.DeleteSourceOmnisendRequest, opts ...operations.Option) (*operations.DeleteSourceOmnisendResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceK6Cloud", + OperationID: "deleteSourceOmnisend", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceK6CloudResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceKlarna - Delete a Source -func (s *Sources) DeleteSourceKlarna(ctx context.Context, request operations.DeleteSourceKlarnaRequest) (*operations.DeleteSourceKlarnaResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceKlarna", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -26045,7 +35484,7 @@ func (s *Sources) DeleteSourceKlarna(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceKlarnaResponse{ + res := &operations.DeleteSourceOmnisendResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26072,101 +35511,41 @@ func (s *Sources) DeleteSourceKlarna(ctx context.Context, request operations.Del } -// DeleteSourceKlaviyo - Delete a Source -func (s *Sources) DeleteSourceKlaviyo(ctx context.Context, request operations.DeleteSourceKlaviyoRequest) (*operations.DeleteSourceKlaviyoResponse, error) { +// DeleteSourceOnesignal - Delete a Source +func (s *Sources) DeleteSourceOnesignal(ctx context.Context, request operations.DeleteSourceOnesignalRequest, opts ...operations.Option) (*operations.DeleteSourceOnesignalResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceKlaviyo", + OperationID: "deleteSourceOnesignal", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceKlaviyoResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceKyve - Delete a Source -func (s *Sources) DeleteSourceKyve(ctx context.Context, request operations.DeleteSourceKyveRequest) (*operations.DeleteSourceKyveResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceKyve", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -26209,7 +35588,7 @@ func (s *Sources) DeleteSourceKyve(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceKyveResponse{ + res := &operations.DeleteSourceOnesignalResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26236,21 +35615,43 @@ func (s *Sources) DeleteSourceKyve(ctx context.Context, request operations.Delet } -// DeleteSourceLaunchdarkly - Delete a Source -func (s *Sources) DeleteSourceLaunchdarkly(ctx context.Context, request operations.DeleteSourceLaunchdarklyRequest) (*operations.DeleteSourceLaunchdarklyResponse, error) { +// DeleteSourceOracle - Delete a Source +func (s *Sources) DeleteSourceOracle(ctx context.Context, request operations.DeleteSourceOracleRequest, opts ...operations.Option) (*operations.DeleteSourceOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLaunchdarkly", + OperationID: "deleteSourceOracle", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26291,7 +35692,7 @@ func (s *Sources) DeleteSourceLaunchdarkly(ctx context.Context, request operatio } } - res := &operations.DeleteSourceLaunchdarklyResponse{ + res := &operations.DeleteSourceOracleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26318,21 +35719,43 @@ func (s *Sources) DeleteSourceLaunchdarkly(ctx context.Context, request operatio } -// DeleteSourceLemlist - Delete a Source -func (s *Sources) DeleteSourceLemlist(ctx context.Context, request operations.DeleteSourceLemlistRequest) (*operations.DeleteSourceLemlistResponse, error) { +// DeleteSourceOrb - Delete a Source +func (s *Sources) DeleteSourceOrb(ctx context.Context, request operations.DeleteSourceOrbRequest, opts ...operations.Option) (*operations.DeleteSourceOrbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLemlist", + OperationID: "deleteSourceOrb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26373,7 +35796,7 @@ func (s *Sources) DeleteSourceLemlist(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceLemlistResponse{ + res := &operations.DeleteSourceOrbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26400,21 +35823,43 @@ func (s *Sources) DeleteSourceLemlist(ctx context.Context, request operations.De } -// DeleteSourceLeverHiring - Delete a Source -func (s *Sources) DeleteSourceLeverHiring(ctx context.Context, request operations.DeleteSourceLeverHiringRequest) (*operations.DeleteSourceLeverHiringResponse, error) { +// DeleteSourceOrbit - Delete a Source +func (s *Sources) DeleteSourceOrbit(ctx context.Context, request operations.DeleteSourceOrbitRequest, opts ...operations.Option) (*operations.DeleteSourceOrbitResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLeverHiring", + OperationID: "deleteSourceOrbit", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26455,7 +35900,7 @@ func (s *Sources) DeleteSourceLeverHiring(ctx context.Context, request operation } } - res := &operations.DeleteSourceLeverHiringResponse{ + res := &operations.DeleteSourceOrbitResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26482,21 +35927,43 @@ func (s *Sources) DeleteSourceLeverHiring(ctx context.Context, request operation } -// DeleteSourceLinkedinAds - Delete a Source -func (s *Sources) DeleteSourceLinkedinAds(ctx context.Context, request operations.DeleteSourceLinkedinAdsRequest) (*operations.DeleteSourceLinkedinAdsResponse, error) { +// DeleteSourceOutbrainAmplify - Delete a Source +func (s *Sources) DeleteSourceOutbrainAmplify(ctx context.Context, request operations.DeleteSourceOutbrainAmplifyRequest, opts ...operations.Option) (*operations.DeleteSourceOutbrainAmplifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLinkedinAds", + OperationID: "deleteSourceOutbrainAmplify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26537,7 +36004,7 @@ func (s *Sources) DeleteSourceLinkedinAds(ctx context.Context, request operation } } - res := &operations.DeleteSourceLinkedinAdsResponse{ + res := &operations.DeleteSourceOutbrainAmplifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26564,21 +36031,43 @@ func (s *Sources) DeleteSourceLinkedinAds(ctx context.Context, request operation } -// DeleteSourceLinkedinPages - Delete a Source -func (s *Sources) DeleteSourceLinkedinPages(ctx context.Context, request operations.DeleteSourceLinkedinPagesRequest) (*operations.DeleteSourceLinkedinPagesResponse, error) { +// DeleteSourceOutreach - Delete a Source +func (s *Sources) DeleteSourceOutreach(ctx context.Context, request operations.DeleteSourceOutreachRequest, opts ...operations.Option) (*operations.DeleteSourceOutreachResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLinkedinPages", + OperationID: "deleteSourceOutreach", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26619,7 +36108,7 @@ func (s *Sources) DeleteSourceLinkedinPages(ctx context.Context, request operati } } - res := &operations.DeleteSourceLinkedinPagesResponse{ + res := &operations.DeleteSourceOutreachResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26646,21 +36135,43 @@ func (s *Sources) DeleteSourceLinkedinPages(ctx context.Context, request operati } -// DeleteSourceLinnworks - Delete a Source -func (s *Sources) DeleteSourceLinnworks(ctx context.Context, request operations.DeleteSourceLinnworksRequest) (*operations.DeleteSourceLinnworksResponse, error) { +// DeleteSourcePaypalTransaction - Delete a Source +func (s *Sources) DeleteSourcePaypalTransaction(ctx context.Context, request operations.DeleteSourcePaypalTransactionRequest, opts ...operations.Option) (*operations.DeleteSourcePaypalTransactionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLinnworks", + OperationID: "deleteSourcePaypalTransaction", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -26701,7 +36212,7 @@ func (s *Sources) DeleteSourceLinnworks(ctx context.Context, request operations. } } - res := &operations.DeleteSourceLinnworksResponse{ + res := &operations.DeleteSourcePaypalTransactionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26728,101 +36239,41 @@ func (s *Sources) DeleteSourceLinnworks(ctx context.Context, request operations. } -// DeleteSourceLokalise - Delete a Source -func (s *Sources) DeleteSourceLokalise(ctx context.Context, request operations.DeleteSourceLokaliseRequest) (*operations.DeleteSourceLokaliseResponse, error) { +// DeleteSourcePaystack - Delete a Source +func (s *Sources) DeleteSourcePaystack(ctx context.Context, request operations.DeleteSourcePaystackRequest, opts ...operations.Option) (*operations.DeleteSourcePaystackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceLokalise", + OperationID: "deleteSourcePaystack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceLokaliseResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceMailchimp - Delete a Source -func (s *Sources) DeleteSourceMailchimp(ctx context.Context, request operations.DeleteSourceMailchimpRequest) (*operations.DeleteSourceMailchimpResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceMailchimp", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -26865,7 +36316,7 @@ func (s *Sources) DeleteSourceMailchimp(ctx context.Context, request operations. } } - res := &operations.DeleteSourceMailchimpResponse{ + res := &operations.DeleteSourcePaystackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -26892,101 +36343,41 @@ func (s *Sources) DeleteSourceMailchimp(ctx context.Context, request operations. } -// DeleteSourceMailgun - Delete a Source -func (s *Sources) DeleteSourceMailgun(ctx context.Context, request operations.DeleteSourceMailgunRequest) (*operations.DeleteSourceMailgunResponse, error) { +// DeleteSourcePendo - Delete a Source +func (s *Sources) DeleteSourcePendo(ctx context.Context, request operations.DeleteSourcePendoRequest, opts ...operations.Option) (*operations.DeleteSourcePendoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMailgun", + OperationID: "deleteSourcePendo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceMailgunResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceMailjetSms - Delete a Source -func (s *Sources) DeleteSourceMailjetSms(ctx context.Context, request operations.DeleteSourceMailjetSmsRequest) (*operations.DeleteSourceMailjetSmsResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceMailjetSms", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -27029,7 +36420,7 @@ func (s *Sources) DeleteSourceMailjetSms(ctx context.Context, request operations } } - res := &operations.DeleteSourceMailjetSmsResponse{ + res := &operations.DeleteSourcePendoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27056,21 +36447,43 @@ func (s *Sources) DeleteSourceMailjetSms(ctx context.Context, request operations } -// DeleteSourceMarketo - Delete a Source -func (s *Sources) DeleteSourceMarketo(ctx context.Context, request operations.DeleteSourceMarketoRequest) (*operations.DeleteSourceMarketoResponse, error) { +// DeleteSourcePersistiq - Delete a Source +func (s *Sources) DeleteSourcePersistiq(ctx context.Context, request operations.DeleteSourcePersistiqRequest, opts ...operations.Option) (*operations.DeleteSourcePersistiqResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMarketo", + OperationID: "deleteSourcePersistiq", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27111,7 +36524,7 @@ func (s *Sources) DeleteSourceMarketo(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceMarketoResponse{ + res := &operations.DeleteSourcePersistiqResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27138,21 +36551,43 @@ func (s *Sources) DeleteSourceMarketo(ctx context.Context, request operations.De } -// DeleteSourceMetabase - Delete a Source -func (s *Sources) DeleteSourceMetabase(ctx context.Context, request operations.DeleteSourceMetabaseRequest) (*operations.DeleteSourceMetabaseResponse, error) { +// DeleteSourcePexelsAPI - Delete a Source +func (s *Sources) DeleteSourcePexelsAPI(ctx context.Context, request operations.DeleteSourcePexelsAPIRequest, opts ...operations.Option) (*operations.DeleteSourcePexelsAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMetabase", + OperationID: "deleteSourcePexelsApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27193,7 +36628,7 @@ func (s *Sources) DeleteSourceMetabase(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceMetabaseResponse{ + res := &operations.DeleteSourcePexelsAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27220,21 +36655,43 @@ func (s *Sources) DeleteSourceMetabase(ctx context.Context, request operations.D } -// DeleteSourceMicrosoftOnedrive - Delete a Source -func (s *Sources) DeleteSourceMicrosoftOnedrive(ctx context.Context, request operations.DeleteSourceMicrosoftOnedriveRequest) (*operations.DeleteSourceMicrosoftOnedriveResponse, error) { +// DeleteSourcePinterest - Delete a Source +func (s *Sources) DeleteSourcePinterest(ctx context.Context, request operations.DeleteSourcePinterestRequest, opts ...operations.Option) (*operations.DeleteSourcePinterestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMicrosoftOnedrive", + OperationID: "deleteSourcePinterest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27275,7 +36732,7 @@ func (s *Sources) DeleteSourceMicrosoftOnedrive(ctx context.Context, request ope } } - res := &operations.DeleteSourceMicrosoftOnedriveResponse{ + res := &operations.DeleteSourcePinterestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27302,21 +36759,43 @@ func (s *Sources) DeleteSourceMicrosoftOnedrive(ctx context.Context, request ope } -// DeleteSourceMicrosoftSharepoint - Delete a Source -func (s *Sources) DeleteSourceMicrosoftSharepoint(ctx context.Context, request operations.DeleteSourceMicrosoftSharepointRequest) (*operations.DeleteSourceMicrosoftSharepointResponse, error) { +// DeleteSourcePipedrive - Delete a Source +func (s *Sources) DeleteSourcePipedrive(ctx context.Context, request operations.DeleteSourcePipedriveRequest, opts ...operations.Option) (*operations.DeleteSourcePipedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMicrosoftSharepoint", + OperationID: "deleteSourcePipedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27357,7 +36836,7 @@ func (s *Sources) DeleteSourceMicrosoftSharepoint(ctx context.Context, request o } } - res := &operations.DeleteSourceMicrosoftSharepointResponse{ + res := &operations.DeleteSourcePipedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27384,21 +36863,43 @@ func (s *Sources) DeleteSourceMicrosoftSharepoint(ctx context.Context, request o } -// DeleteSourceMicrosoftTeams - Delete a Source -func (s *Sources) DeleteSourceMicrosoftTeams(ctx context.Context, request operations.DeleteSourceMicrosoftTeamsRequest) (*operations.DeleteSourceMicrosoftTeamsResponse, error) { +// DeleteSourcePocket - Delete a Source +func (s *Sources) DeleteSourcePocket(ctx context.Context, request operations.DeleteSourcePocketRequest, opts ...operations.Option) (*operations.DeleteSourcePocketResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMicrosoftTeams", + OperationID: "deleteSourcePocket", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27439,7 +36940,7 @@ func (s *Sources) DeleteSourceMicrosoftTeams(ctx context.Context, request operat } } - res := &operations.DeleteSourceMicrosoftTeamsResponse{ + res := &operations.DeleteSourcePocketResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27466,21 +36967,43 @@ func (s *Sources) DeleteSourceMicrosoftTeams(ctx context.Context, request operat } -// DeleteSourceMixpanel - Delete a Source -func (s *Sources) DeleteSourceMixpanel(ctx context.Context, request operations.DeleteSourceMixpanelRequest) (*operations.DeleteSourceMixpanelResponse, error) { +// DeleteSourcePokeapi - Delete a Source +func (s *Sources) DeleteSourcePokeapi(ctx context.Context, request operations.DeleteSourcePokeapiRequest, opts ...operations.Option) (*operations.DeleteSourcePokeapiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMixpanel", + OperationID: "deleteSourcePokeapi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27521,7 +37044,7 @@ func (s *Sources) DeleteSourceMixpanel(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceMixpanelResponse{ + res := &operations.DeleteSourcePokeapiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27548,101 +37071,41 @@ func (s *Sources) DeleteSourceMixpanel(ctx context.Context, request operations.D } -// DeleteSourceMonday - Delete a Source -func (s *Sources) DeleteSourceMonday(ctx context.Context, request operations.DeleteSourceMondayRequest) (*operations.DeleteSourceMondayResponse, error) { +// DeleteSourcePolygonStockAPI - Delete a Source +func (s *Sources) DeleteSourcePolygonStockAPI(ctx context.Context, request operations.DeleteSourcePolygonStockAPIRequest, opts ...operations.Option) (*operations.DeleteSourcePolygonStockAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMonday", + OperationID: "deleteSourcePolygonStockApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceMondayResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceMongodbInternalPoc - Delete a Source -func (s *Sources) DeleteSourceMongodbInternalPoc(ctx context.Context, request operations.DeleteSourceMongodbInternalPocRequest) (*operations.DeleteSourceMongodbInternalPocResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceMongodbInternalPoc", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -27685,7 +37148,7 @@ func (s *Sources) DeleteSourceMongodbInternalPoc(ctx context.Context, request op } } - res := &operations.DeleteSourceMongodbInternalPocResponse{ + res := &operations.DeleteSourcePolygonStockAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27712,101 +37175,41 @@ func (s *Sources) DeleteSourceMongodbInternalPoc(ctx context.Context, request op } -// DeleteSourceMongodbV2 - Delete a Source -func (s *Sources) DeleteSourceMongodbV2(ctx context.Context, request operations.DeleteSourceMongodbV2Request) (*operations.DeleteSourceMongodbV2Response, error) { +// DeleteSourcePostgres - Delete a Source +func (s *Sources) DeleteSourcePostgres(ctx context.Context, request operations.DeleteSourcePostgresRequest, opts ...operations.Option) (*operations.DeleteSourcePostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMongodbV2", + OperationID: "deleteSourcePostgres", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceMongodbV2Response{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceMssql - Delete a Source -func (s *Sources) DeleteSourceMssql(ctx context.Context, request operations.DeleteSourceMssqlRequest) (*operations.DeleteSourceMssqlResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceMssql", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -27849,7 +37252,7 @@ func (s *Sources) DeleteSourceMssql(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceMssqlResponse{ + res := &operations.DeleteSourcePostgresResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27876,21 +37279,43 @@ func (s *Sources) DeleteSourceMssql(ctx context.Context, request operations.Dele } -// DeleteSourceMyHours - Delete a Source -func (s *Sources) DeleteSourceMyHours(ctx context.Context, request operations.DeleteSourceMyHoursRequest) (*operations.DeleteSourceMyHoursResponse, error) { +// DeleteSourcePosthog - Delete a Source +func (s *Sources) DeleteSourcePosthog(ctx context.Context, request operations.DeleteSourcePosthogRequest, opts ...operations.Option) (*operations.DeleteSourcePosthogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMyHours", + OperationID: "deleteSourcePosthog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -27931,7 +37356,7 @@ func (s *Sources) DeleteSourceMyHours(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceMyHoursResponse{ + res := &operations.DeleteSourcePosthogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -27958,21 +37383,43 @@ func (s *Sources) DeleteSourceMyHours(ctx context.Context, request operations.De } -// DeleteSourceMysql - Delete a Source -func (s *Sources) DeleteSourceMysql(ctx context.Context, request operations.DeleteSourceMysqlRequest) (*operations.DeleteSourceMysqlResponse, error) { +// DeleteSourcePostmarkapp - Delete a Source +func (s *Sources) DeleteSourcePostmarkapp(ctx context.Context, request operations.DeleteSourcePostmarkappRequest, opts ...operations.Option) (*operations.DeleteSourcePostmarkappResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceMysql", + OperationID: "deleteSourcePostmarkapp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28013,7 +37460,7 @@ func (s *Sources) DeleteSourceMysql(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceMysqlResponse{ + res := &operations.DeleteSourcePostmarkappResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28040,21 +37487,43 @@ func (s *Sources) DeleteSourceMysql(ctx context.Context, request operations.Dele } -// DeleteSourceNetsuite - Delete a Source -func (s *Sources) DeleteSourceNetsuite(ctx context.Context, request operations.DeleteSourceNetsuiteRequest) (*operations.DeleteSourceNetsuiteResponse, error) { +// DeleteSourcePrestashop - Delete a Source +func (s *Sources) DeleteSourcePrestashop(ctx context.Context, request operations.DeleteSourcePrestashopRequest, opts ...operations.Option) (*operations.DeleteSourcePrestashopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceNetsuite", + OperationID: "deleteSourcePrestashop", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28095,7 +37564,7 @@ func (s *Sources) DeleteSourceNetsuite(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceNetsuiteResponse{ + res := &operations.DeleteSourcePrestashopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28122,21 +37591,43 @@ func (s *Sources) DeleteSourceNetsuite(ctx context.Context, request operations.D } -// DeleteSourceNotion - Delete a Source -func (s *Sources) DeleteSourceNotion(ctx context.Context, request operations.DeleteSourceNotionRequest) (*operations.DeleteSourceNotionResponse, error) { +// DeleteSourcePypi - Delete a Source +func (s *Sources) DeleteSourcePypi(ctx context.Context, request operations.DeleteSourcePypiRequest, opts ...operations.Option) (*operations.DeleteSourcePypiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceNotion", + OperationID: "deleteSourcePypi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28177,7 +37668,7 @@ func (s *Sources) DeleteSourceNotion(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceNotionResponse{ + res := &operations.DeleteSourcePypiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28204,21 +37695,43 @@ func (s *Sources) DeleteSourceNotion(ctx context.Context, request operations.Del } -// DeleteSourceNytimes - Delete a Source -func (s *Sources) DeleteSourceNytimes(ctx context.Context, request operations.DeleteSourceNytimesRequest) (*operations.DeleteSourceNytimesResponse, error) { +// DeleteSourceQualaroo - Delete a Source +func (s *Sources) DeleteSourceQualaroo(ctx context.Context, request operations.DeleteSourceQualarooRequest, opts ...operations.Option) (*operations.DeleteSourceQualarooResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceNytimes", + OperationID: "deleteSourceQualaroo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28259,7 +37772,7 @@ func (s *Sources) DeleteSourceNytimes(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceNytimesResponse{ + res := &operations.DeleteSourceQualarooResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28286,21 +37799,43 @@ func (s *Sources) DeleteSourceNytimes(ctx context.Context, request operations.De } -// DeleteSourceOkta - Delete a Source -func (s *Sources) DeleteSourceOkta(ctx context.Context, request operations.DeleteSourceOktaRequest) (*operations.DeleteSourceOktaResponse, error) { +// DeleteSourceRailz - Delete a Source +func (s *Sources) DeleteSourceRailz(ctx context.Context, request operations.DeleteSourceRailzRequest, opts ...operations.Option) (*operations.DeleteSourceRailzResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOkta", + OperationID: "deleteSourceRailz", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28341,7 +37876,7 @@ func (s *Sources) DeleteSourceOkta(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceOktaResponse{ + res := &operations.DeleteSourceRailzResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28368,21 +37903,43 @@ func (s *Sources) DeleteSourceOkta(ctx context.Context, request operations.Delet } -// DeleteSourceOmnisend - Delete a Source -func (s *Sources) DeleteSourceOmnisend(ctx context.Context, request operations.DeleteSourceOmnisendRequest) (*operations.DeleteSourceOmnisendResponse, error) { +// DeleteSourceRecharge - Delete a Source +func (s *Sources) DeleteSourceRecharge(ctx context.Context, request operations.DeleteSourceRechargeRequest, opts ...operations.Option) (*operations.DeleteSourceRechargeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOmnisend", + OperationID: "deleteSourceRecharge", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28423,7 +37980,7 @@ func (s *Sources) DeleteSourceOmnisend(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceOmnisendResponse{ + res := &operations.DeleteSourceRechargeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28450,21 +38007,43 @@ func (s *Sources) DeleteSourceOmnisend(ctx context.Context, request operations.D } -// DeleteSourceOnesignal - Delete a Source -func (s *Sources) DeleteSourceOnesignal(ctx context.Context, request operations.DeleteSourceOnesignalRequest) (*operations.DeleteSourceOnesignalResponse, error) { +// DeleteSourceRecreation - Delete a Source +func (s *Sources) DeleteSourceRecreation(ctx context.Context, request operations.DeleteSourceRecreationRequest, opts ...operations.Option) (*operations.DeleteSourceRecreationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOnesignal", + OperationID: "deleteSourceRecreation", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28505,7 +38084,7 @@ func (s *Sources) DeleteSourceOnesignal(ctx context.Context, request operations. } } - res := &operations.DeleteSourceOnesignalResponse{ + res := &operations.DeleteSourceRecreationResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28532,21 +38111,43 @@ func (s *Sources) DeleteSourceOnesignal(ctx context.Context, request operations. } -// DeleteSourceOracle - Delete a Source -func (s *Sources) DeleteSourceOracle(ctx context.Context, request operations.DeleteSourceOracleRequest) (*operations.DeleteSourceOracleResponse, error) { +// DeleteSourceRecruitee - Delete a Source +func (s *Sources) DeleteSourceRecruitee(ctx context.Context, request operations.DeleteSourceRecruiteeRequest, opts ...operations.Option) (*operations.DeleteSourceRecruiteeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOracle", + OperationID: "deleteSourceRecruitee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28587,7 +38188,7 @@ func (s *Sources) DeleteSourceOracle(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceOracleResponse{ + res := &operations.DeleteSourceRecruiteeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28614,21 +38215,43 @@ func (s *Sources) DeleteSourceOracle(ctx context.Context, request operations.Del } -// DeleteSourceOrb - Delete a Source -func (s *Sources) DeleteSourceOrb(ctx context.Context, request operations.DeleteSourceOrbRequest) (*operations.DeleteSourceOrbResponse, error) { +// DeleteSourceRecurly - Delete a Source +func (s *Sources) DeleteSourceRecurly(ctx context.Context, request operations.DeleteSourceRecurlyRequest, opts ...operations.Option) (*operations.DeleteSourceRecurlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOrb", + OperationID: "deleteSourceRecurly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28669,7 +38292,7 @@ func (s *Sources) DeleteSourceOrb(ctx context.Context, request operations.Delete } } - res := &operations.DeleteSourceOrbResponse{ + res := &operations.DeleteSourceRecurlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28696,21 +38319,43 @@ func (s *Sources) DeleteSourceOrb(ctx context.Context, request operations.Delete } -// DeleteSourceOrbit - Delete a Source -func (s *Sources) DeleteSourceOrbit(ctx context.Context, request operations.DeleteSourceOrbitRequest) (*operations.DeleteSourceOrbitResponse, error) { +// DeleteSourceRedshift - Delete a Source +func (s *Sources) DeleteSourceRedshift(ctx context.Context, request operations.DeleteSourceRedshiftRequest, opts ...operations.Option) (*operations.DeleteSourceRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOrbit", + OperationID: "deleteSourceRedshift", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28751,7 +38396,7 @@ func (s *Sources) DeleteSourceOrbit(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceOrbitResponse{ + res := &operations.DeleteSourceRedshiftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28778,21 +38423,43 @@ func (s *Sources) DeleteSourceOrbit(ctx context.Context, request operations.Dele } -// DeleteSourceOutbrainAmplify - Delete a Source -func (s *Sources) DeleteSourceOutbrainAmplify(ctx context.Context, request operations.DeleteSourceOutbrainAmplifyRequest) (*operations.DeleteSourceOutbrainAmplifyResponse, error) { +// DeleteSourceRetently - Delete a Source +func (s *Sources) DeleteSourceRetently(ctx context.Context, request operations.DeleteSourceRetentlyRequest, opts ...operations.Option) (*operations.DeleteSourceRetentlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOutbrainAmplify", + OperationID: "deleteSourceRetently", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28833,7 +38500,7 @@ func (s *Sources) DeleteSourceOutbrainAmplify(ctx context.Context, request opera } } - res := &operations.DeleteSourceOutbrainAmplifyResponse{ + res := &operations.DeleteSourceRetentlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28860,21 +38527,43 @@ func (s *Sources) DeleteSourceOutbrainAmplify(ctx context.Context, request opera } -// DeleteSourceOutreach - Delete a Source -func (s *Sources) DeleteSourceOutreach(ctx context.Context, request operations.DeleteSourceOutreachRequest) (*operations.DeleteSourceOutreachResponse, error) { +// DeleteSourceRkiCovid - Delete a Source +func (s *Sources) DeleteSourceRkiCovid(ctx context.Context, request operations.DeleteSourceRkiCovidRequest, opts ...operations.Option) (*operations.DeleteSourceRkiCovidResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceOutreach", + OperationID: "deleteSourceRkiCovid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28915,7 +38604,7 @@ func (s *Sources) DeleteSourceOutreach(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceOutreachResponse{ + res := &operations.DeleteSourceRkiCovidResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -28942,21 +38631,43 @@ func (s *Sources) DeleteSourceOutreach(ctx context.Context, request operations.D } -// DeleteSourcePaypalTransaction - Delete a Source -func (s *Sources) DeleteSourcePaypalTransaction(ctx context.Context, request operations.DeleteSourcePaypalTransactionRequest) (*operations.DeleteSourcePaypalTransactionResponse, error) { +// DeleteSourceRss - Delete a Source +func (s *Sources) DeleteSourceRss(ctx context.Context, request operations.DeleteSourceRssRequest, opts ...operations.Option) (*operations.DeleteSourceRssResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePaypalTransaction", + OperationID: "deleteSourceRss", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -28997,7 +38708,7 @@ func (s *Sources) DeleteSourcePaypalTransaction(ctx context.Context, request ope } } - res := &operations.DeleteSourcePaypalTransactionResponse{ + res := &operations.DeleteSourceRssResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29024,21 +38735,43 @@ func (s *Sources) DeleteSourcePaypalTransaction(ctx context.Context, request ope } -// DeleteSourcePaystack - Delete a Source -func (s *Sources) DeleteSourcePaystack(ctx context.Context, request operations.DeleteSourcePaystackRequest) (*operations.DeleteSourcePaystackResponse, error) { +// DeleteSourceS3 - Delete a Source +func (s *Sources) DeleteSourceS3(ctx context.Context, request operations.DeleteSourceS3Request, opts ...operations.Option) (*operations.DeleteSourceS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePaystack", + OperationID: "deleteSourceS3", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29079,7 +38812,7 @@ func (s *Sources) DeleteSourcePaystack(ctx context.Context, request operations.D } } - res := &operations.DeleteSourcePaystackResponse{ + res := &operations.DeleteSourceS3Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29106,21 +38839,43 @@ func (s *Sources) DeleteSourcePaystack(ctx context.Context, request operations.D } -// DeleteSourcePendo - Delete a Source -func (s *Sources) DeleteSourcePendo(ctx context.Context, request operations.DeleteSourcePendoRequest) (*operations.DeleteSourcePendoResponse, error) { +// DeleteSourceSalesforce - Delete a Source +func (s *Sources) DeleteSourceSalesforce(ctx context.Context, request operations.DeleteSourceSalesforceRequest, opts ...operations.Option) (*operations.DeleteSourceSalesforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePendo", + OperationID: "deleteSourceSalesforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29161,7 +38916,7 @@ func (s *Sources) DeleteSourcePendo(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourcePendoResponse{ + res := &operations.DeleteSourceSalesforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29188,21 +38943,43 @@ func (s *Sources) DeleteSourcePendo(ctx context.Context, request operations.Dele } -// DeleteSourcePersistiq - Delete a Source -func (s *Sources) DeleteSourcePersistiq(ctx context.Context, request operations.DeleteSourcePersistiqRequest) (*operations.DeleteSourcePersistiqResponse, error) { +// DeleteSourceSalesloft - Delete a Source +func (s *Sources) DeleteSourceSalesloft(ctx context.Context, request operations.DeleteSourceSalesloftRequest, opts ...operations.Option) (*operations.DeleteSourceSalesloftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePersistiq", + OperationID: "deleteSourceSalesloft", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29243,7 +39020,7 @@ func (s *Sources) DeleteSourcePersistiq(ctx context.Context, request operations. } } - res := &operations.DeleteSourcePersistiqResponse{ + res := &operations.DeleteSourceSalesloftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29270,21 +39047,43 @@ func (s *Sources) DeleteSourcePersistiq(ctx context.Context, request operations. } -// DeleteSourcePexelsAPI - Delete a Source -func (s *Sources) DeleteSourcePexelsAPI(ctx context.Context, request operations.DeleteSourcePexelsAPIRequest) (*operations.DeleteSourcePexelsAPIResponse, error) { +// DeleteSourceSapFieldglass - Delete a Source +func (s *Sources) DeleteSourceSapFieldglass(ctx context.Context, request operations.DeleteSourceSapFieldglassRequest, opts ...operations.Option) (*operations.DeleteSourceSapFieldglassResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePexelsApi", + OperationID: "deleteSourceSapFieldglass", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29325,7 +39124,7 @@ func (s *Sources) DeleteSourcePexelsAPI(ctx context.Context, request operations. } } - res := &operations.DeleteSourcePexelsAPIResponse{ + res := &operations.DeleteSourceSapFieldglassResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29352,21 +39151,43 @@ func (s *Sources) DeleteSourcePexelsAPI(ctx context.Context, request operations. } -// DeleteSourcePinterest - Delete a Source -func (s *Sources) DeleteSourcePinterest(ctx context.Context, request operations.DeleteSourcePinterestRequest) (*operations.DeleteSourcePinterestResponse, error) { +// DeleteSourceSecoda - Delete a Source +func (s *Sources) DeleteSourceSecoda(ctx context.Context, request operations.DeleteSourceSecodaRequest, opts ...operations.Option) (*operations.DeleteSourceSecodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePinterest", + OperationID: "deleteSourceSecoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29407,7 +39228,7 @@ func (s *Sources) DeleteSourcePinterest(ctx context.Context, request operations. } } - res := &operations.DeleteSourcePinterestResponse{ + res := &operations.DeleteSourceSecodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29434,21 +39255,43 @@ func (s *Sources) DeleteSourcePinterest(ctx context.Context, request operations. } -// DeleteSourcePipedrive - Delete a Source -func (s *Sources) DeleteSourcePipedrive(ctx context.Context, request operations.DeleteSourcePipedriveRequest) (*operations.DeleteSourcePipedriveResponse, error) { +// DeleteSourceSendgrid - Delete a Source +func (s *Sources) DeleteSourceSendgrid(ctx context.Context, request operations.DeleteSourceSendgridRequest, opts ...operations.Option) (*operations.DeleteSourceSendgridResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePipedrive", + OperationID: "deleteSourceSendgrid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29489,7 +39332,7 @@ func (s *Sources) DeleteSourcePipedrive(ctx context.Context, request operations. } } - res := &operations.DeleteSourcePipedriveResponse{ + res := &operations.DeleteSourceSendgridResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29516,21 +39359,43 @@ func (s *Sources) DeleteSourcePipedrive(ctx context.Context, request operations. } -// DeleteSourcePocket - Delete a Source -func (s *Sources) DeleteSourcePocket(ctx context.Context, request operations.DeleteSourcePocketRequest) (*operations.DeleteSourcePocketResponse, error) { +// DeleteSourceSendinblue - Delete a Source +func (s *Sources) DeleteSourceSendinblue(ctx context.Context, request operations.DeleteSourceSendinblueRequest, opts ...operations.Option) (*operations.DeleteSourceSendinblueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePocket", + OperationID: "deleteSourceSendinblue", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29571,7 +39436,7 @@ func (s *Sources) DeleteSourcePocket(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourcePocketResponse{ + res := &operations.DeleteSourceSendinblueResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29598,21 +39463,43 @@ func (s *Sources) DeleteSourcePocket(ctx context.Context, request operations.Del } -// DeleteSourcePokeapi - Delete a Source -func (s *Sources) DeleteSourcePokeapi(ctx context.Context, request operations.DeleteSourcePokeapiRequest) (*operations.DeleteSourcePokeapiResponse, error) { +// DeleteSourceSenseforce - Delete a Source +func (s *Sources) DeleteSourceSenseforce(ctx context.Context, request operations.DeleteSourceSenseforceRequest, opts ...operations.Option) (*operations.DeleteSourceSenseforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePokeapi", + OperationID: "deleteSourceSenseforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29653,7 +39540,7 @@ func (s *Sources) DeleteSourcePokeapi(ctx context.Context, request operations.De } } - res := &operations.DeleteSourcePokeapiResponse{ + res := &operations.DeleteSourceSenseforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29680,21 +39567,43 @@ func (s *Sources) DeleteSourcePokeapi(ctx context.Context, request operations.De } -// DeleteSourcePolygonStockAPI - Delete a Source -func (s *Sources) DeleteSourcePolygonStockAPI(ctx context.Context, request operations.DeleteSourcePolygonStockAPIRequest) (*operations.DeleteSourcePolygonStockAPIResponse, error) { +// DeleteSourceSentry - Delete a Source +func (s *Sources) DeleteSourceSentry(ctx context.Context, request operations.DeleteSourceSentryRequest, opts ...operations.Option) (*operations.DeleteSourceSentryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePolygonStockApi", + OperationID: "deleteSourceSentry", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29735,7 +39644,7 @@ func (s *Sources) DeleteSourcePolygonStockAPI(ctx context.Context, request opera } } - res := &operations.DeleteSourcePolygonStockAPIResponse{ + res := &operations.DeleteSourceSentryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29762,101 +39671,41 @@ func (s *Sources) DeleteSourcePolygonStockAPI(ctx context.Context, request opera } -// DeleteSourcePostgres - Delete a Source -func (s *Sources) DeleteSourcePostgres(ctx context.Context, request operations.DeleteSourcePostgresRequest) (*operations.DeleteSourcePostgresResponse, error) { +// DeleteSourceSftp - Delete a Source +func (s *Sources) DeleteSourceSftp(ctx context.Context, request operations.DeleteSourceSftpRequest, opts ...operations.Option) (*operations.DeleteSourceSftpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePostgres", + OperationID: "deleteSourceSftp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourcePostgresResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourcePosthog - Delete a Source -func (s *Sources) DeleteSourcePosthog(ctx context.Context, request operations.DeleteSourcePosthogRequest) (*operations.DeleteSourcePosthogResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourcePosthog", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -29899,7 +39748,7 @@ func (s *Sources) DeleteSourcePosthog(ctx context.Context, request operations.De } } - res := &operations.DeleteSourcePosthogResponse{ + res := &operations.DeleteSourceSftpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -29926,21 +39775,43 @@ func (s *Sources) DeleteSourcePosthog(ctx context.Context, request operations.De } -// DeleteSourcePostmarkapp - Delete a Source -func (s *Sources) DeleteSourcePostmarkapp(ctx context.Context, request operations.DeleteSourcePostmarkappRequest) (*operations.DeleteSourcePostmarkappResponse, error) { +// DeleteSourceSftpBulk - Delete a Source +func (s *Sources) DeleteSourceSftpBulk(ctx context.Context, request operations.DeleteSourceSftpBulkRequest, opts ...operations.Option) (*operations.DeleteSourceSftpBulkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePostmarkapp", + OperationID: "deleteSourceSftpBulk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -29981,7 +39852,7 @@ func (s *Sources) DeleteSourcePostmarkapp(ctx context.Context, request operation } } - res := &operations.DeleteSourcePostmarkappResponse{ + res := &operations.DeleteSourceSftpBulkResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30008,21 +39879,43 @@ func (s *Sources) DeleteSourcePostmarkapp(ctx context.Context, request operation } -// DeleteSourcePrestashop - Delete a Source -func (s *Sources) DeleteSourcePrestashop(ctx context.Context, request operations.DeleteSourcePrestashopRequest) (*operations.DeleteSourcePrestashopResponse, error) { +// DeleteSourceShopify - Delete a Source +func (s *Sources) DeleteSourceShopify(ctx context.Context, request operations.DeleteSourceShopifyRequest, opts ...operations.Option) (*operations.DeleteSourceShopifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePrestashop", + OperationID: "deleteSourceShopify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30063,7 +39956,7 @@ func (s *Sources) DeleteSourcePrestashop(ctx context.Context, request operations } } - res := &operations.DeleteSourcePrestashopResponse{ + res := &operations.DeleteSourceShopifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30090,21 +39983,43 @@ func (s *Sources) DeleteSourcePrestashop(ctx context.Context, request operations } -// DeleteSourcePunkAPI - Delete a Source -func (s *Sources) DeleteSourcePunkAPI(ctx context.Context, request operations.DeleteSourcePunkAPIRequest) (*operations.DeleteSourcePunkAPIResponse, error) { +// DeleteSourceShortio - Delete a Source +func (s *Sources) DeleteSourceShortio(ctx context.Context, request operations.DeleteSourceShortioRequest, opts ...operations.Option) (*operations.DeleteSourceShortioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePunkApi", + OperationID: "deleteSourceShortio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30145,7 +40060,7 @@ func (s *Sources) DeleteSourcePunkAPI(ctx context.Context, request operations.De } } - res := &operations.DeleteSourcePunkAPIResponse{ + res := &operations.DeleteSourceShortioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30172,21 +40087,43 @@ func (s *Sources) DeleteSourcePunkAPI(ctx context.Context, request operations.De } -// DeleteSourcePypi - Delete a Source -func (s *Sources) DeleteSourcePypi(ctx context.Context, request operations.DeleteSourcePypiRequest) (*operations.DeleteSourcePypiResponse, error) { +// DeleteSourceSlack - Delete a Source +func (s *Sources) DeleteSourceSlack(ctx context.Context, request operations.DeleteSourceSlackRequest, opts ...operations.Option) (*operations.DeleteSourceSlackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourcePypi", + OperationID: "deleteSourceSlack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30227,7 +40164,7 @@ func (s *Sources) DeleteSourcePypi(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourcePypiResponse{ + res := &operations.DeleteSourceSlackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30254,21 +40191,43 @@ func (s *Sources) DeleteSourcePypi(ctx context.Context, request operations.Delet } -// DeleteSourceQualaroo - Delete a Source -func (s *Sources) DeleteSourceQualaroo(ctx context.Context, request operations.DeleteSourceQualarooRequest) (*operations.DeleteSourceQualarooResponse, error) { +// DeleteSourceSmaily - Delete a Source +func (s *Sources) DeleteSourceSmaily(ctx context.Context, request operations.DeleteSourceSmailyRequest, opts ...operations.Option) (*operations.DeleteSourceSmailyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceQualaroo", + OperationID: "deleteSourceSmaily", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30309,7 +40268,7 @@ func (s *Sources) DeleteSourceQualaroo(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceQualarooResponse{ + res := &operations.DeleteSourceSmailyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30336,21 +40295,43 @@ func (s *Sources) DeleteSourceQualaroo(ctx context.Context, request operations.D } -// DeleteSourceRailz - Delete a Source -func (s *Sources) DeleteSourceRailz(ctx context.Context, request operations.DeleteSourceRailzRequest) (*operations.DeleteSourceRailzResponse, error) { +// DeleteSourceSmartengage - Delete a Source +func (s *Sources) DeleteSourceSmartengage(ctx context.Context, request operations.DeleteSourceSmartengageRequest, opts ...operations.Option) (*operations.DeleteSourceSmartengageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRailz", + OperationID: "deleteSourceSmartengage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30391,7 +40372,7 @@ func (s *Sources) DeleteSourceRailz(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceRailzResponse{ + res := &operations.DeleteSourceSmartengageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30418,21 +40399,43 @@ func (s *Sources) DeleteSourceRailz(ctx context.Context, request operations.Dele } -// DeleteSourceRecharge - Delete a Source -func (s *Sources) DeleteSourceRecharge(ctx context.Context, request operations.DeleteSourceRechargeRequest) (*operations.DeleteSourceRechargeResponse, error) { +// DeleteSourceSmartsheets - Delete a Source +func (s *Sources) DeleteSourceSmartsheets(ctx context.Context, request operations.DeleteSourceSmartsheetsRequest, opts ...operations.Option) (*operations.DeleteSourceSmartsheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRecharge", + OperationID: "deleteSourceSmartsheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30473,7 +40476,7 @@ func (s *Sources) DeleteSourceRecharge(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceRechargeResponse{ + res := &operations.DeleteSourceSmartsheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30500,21 +40503,43 @@ func (s *Sources) DeleteSourceRecharge(ctx context.Context, request operations.D } -// DeleteSourceRecreation - Delete a Source -func (s *Sources) DeleteSourceRecreation(ctx context.Context, request operations.DeleteSourceRecreationRequest) (*operations.DeleteSourceRecreationResponse, error) { +// DeleteSourceSnapchatMarketing - Delete a Source +func (s *Sources) DeleteSourceSnapchatMarketing(ctx context.Context, request operations.DeleteSourceSnapchatMarketingRequest, opts ...operations.Option) (*operations.DeleteSourceSnapchatMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRecreation", + OperationID: "deleteSourceSnapchatMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30555,7 +40580,7 @@ func (s *Sources) DeleteSourceRecreation(ctx context.Context, request operations } } - res := &operations.DeleteSourceRecreationResponse{ + res := &operations.DeleteSourceSnapchatMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30582,21 +40607,43 @@ func (s *Sources) DeleteSourceRecreation(ctx context.Context, request operations } -// DeleteSourceRecruitee - Delete a Source -func (s *Sources) DeleteSourceRecruitee(ctx context.Context, request operations.DeleteSourceRecruiteeRequest) (*operations.DeleteSourceRecruiteeResponse, error) { +// DeleteSourceSnowflake - Delete a Source +func (s *Sources) DeleteSourceSnowflake(ctx context.Context, request operations.DeleteSourceSnowflakeRequest, opts ...operations.Option) (*operations.DeleteSourceSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRecruitee", + OperationID: "deleteSourceSnowflake", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30637,7 +40684,7 @@ func (s *Sources) DeleteSourceRecruitee(ctx context.Context, request operations. } } - res := &operations.DeleteSourceRecruiteeResponse{ + res := &operations.DeleteSourceSnowflakeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30664,21 +40711,43 @@ func (s *Sources) DeleteSourceRecruitee(ctx context.Context, request operations. } -// DeleteSourceRecurly - Delete a Source -func (s *Sources) DeleteSourceRecurly(ctx context.Context, request operations.DeleteSourceRecurlyRequest) (*operations.DeleteSourceRecurlyResponse, error) { +// DeleteSourceSonarCloud - Delete a Source +func (s *Sources) DeleteSourceSonarCloud(ctx context.Context, request operations.DeleteSourceSonarCloudRequest, opts ...operations.Option) (*operations.DeleteSourceSonarCloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRecurly", + OperationID: "deleteSourceSonarCloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30719,7 +40788,7 @@ func (s *Sources) DeleteSourceRecurly(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceRecurlyResponse{ + res := &operations.DeleteSourceSonarCloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30746,21 +40815,43 @@ func (s *Sources) DeleteSourceRecurly(ctx context.Context, request operations.De } -// DeleteSourceRedshift - Delete a Source -func (s *Sources) DeleteSourceRedshift(ctx context.Context, request operations.DeleteSourceRedshiftRequest) (*operations.DeleteSourceRedshiftResponse, error) { +// DeleteSourceSpacexAPI - Delete a Source +func (s *Sources) DeleteSourceSpacexAPI(ctx context.Context, request operations.DeleteSourceSpacexAPIRequest, opts ...operations.Option) (*operations.DeleteSourceSpacexAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRedshift", + OperationID: "deleteSourceSpacexApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30801,7 +40892,7 @@ func (s *Sources) DeleteSourceRedshift(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceRedshiftResponse{ + res := &operations.DeleteSourceSpacexAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30828,21 +40919,43 @@ func (s *Sources) DeleteSourceRedshift(ctx context.Context, request operations.D } -// DeleteSourceRetently - Delete a Source -func (s *Sources) DeleteSourceRetently(ctx context.Context, request operations.DeleteSourceRetentlyRequest) (*operations.DeleteSourceRetentlyResponse, error) { +// DeleteSourceSquare - Delete a Source +func (s *Sources) DeleteSourceSquare(ctx context.Context, request operations.DeleteSourceSquareRequest, opts ...operations.Option) (*operations.DeleteSourceSquareResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRetently", + OperationID: "deleteSourceSquare", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -30883,7 +40996,7 @@ func (s *Sources) DeleteSourceRetently(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceRetentlyResponse{ + res := &operations.DeleteSourceSquareResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -30910,101 +41023,41 @@ func (s *Sources) DeleteSourceRetently(ctx context.Context, request operations.D } -// DeleteSourceRkiCovid - Delete a Source -func (s *Sources) DeleteSourceRkiCovid(ctx context.Context, request operations.DeleteSourceRkiCovidRequest) (*operations.DeleteSourceRkiCovidResponse, error) { +// DeleteSourceStrava - Delete a Source +func (s *Sources) DeleteSourceStrava(ctx context.Context, request operations.DeleteSourceStravaRequest, opts ...operations.Option) (*operations.DeleteSourceStravaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceRkiCovid", + OperationID: "deleteSourceStrava", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceRkiCovidResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceRss - Delete a Source -func (s *Sources) DeleteSourceRss(ctx context.Context, request operations.DeleteSourceRssRequest) (*operations.DeleteSourceRssResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceRss", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -31047,7 +41100,7 @@ func (s *Sources) DeleteSourceRss(ctx context.Context, request operations.Delete } } - res := &operations.DeleteSourceRssResponse{ + res := &operations.DeleteSourceStravaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31074,101 +41127,41 @@ func (s *Sources) DeleteSourceRss(ctx context.Context, request operations.Delete } -// DeleteSourceS3 - Delete a Source -func (s *Sources) DeleteSourceS3(ctx context.Context, request operations.DeleteSourceS3Request) (*operations.DeleteSourceS3Response, error) { +// DeleteSourceStripe - Delete a Source +func (s *Sources) DeleteSourceStripe(ctx context.Context, request operations.DeleteSourceStripeRequest, opts ...operations.Option) (*operations.DeleteSourceStripeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceS3", + OperationID: "deleteSourceStripe", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceS3Response{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) + return nil, fmt.Errorf("error generating URL: %w", err) } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - return res, nil - -} - -// DeleteSourceSalesforce - Delete a Source -func (s *Sources) DeleteSourceSalesforce(ctx context.Context, request operations.DeleteSourceSalesforceRequest) (*operations.DeleteSourceSalesforceResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceSalesforce", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -31211,7 +41204,7 @@ func (s *Sources) DeleteSourceSalesforce(ctx context.Context, request operations } } - res := &operations.DeleteSourceSalesforceResponse{ + res := &operations.DeleteSourceStripeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31238,21 +41231,43 @@ func (s *Sources) DeleteSourceSalesforce(ctx context.Context, request operations } -// DeleteSourceSalesloft - Delete a Source -func (s *Sources) DeleteSourceSalesloft(ctx context.Context, request operations.DeleteSourceSalesloftRequest) (*operations.DeleteSourceSalesloftResponse, error) { +// DeleteSourceSurveySparrow - Delete a Source +func (s *Sources) DeleteSourceSurveySparrow(ctx context.Context, request operations.DeleteSourceSurveySparrowRequest, opts ...operations.Option) (*operations.DeleteSourceSurveySparrowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSalesloft", + OperationID: "deleteSourceSurveySparrow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31293,7 +41308,7 @@ func (s *Sources) DeleteSourceSalesloft(ctx context.Context, request operations. } } - res := &operations.DeleteSourceSalesloftResponse{ + res := &operations.DeleteSourceSurveySparrowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31320,21 +41335,43 @@ func (s *Sources) DeleteSourceSalesloft(ctx context.Context, request operations. } -// DeleteSourceSapFieldglass - Delete a Source -func (s *Sources) DeleteSourceSapFieldglass(ctx context.Context, request operations.DeleteSourceSapFieldglassRequest) (*operations.DeleteSourceSapFieldglassResponse, error) { +// DeleteSourceSurveymonkey - Delete a Source +func (s *Sources) DeleteSourceSurveymonkey(ctx context.Context, request operations.DeleteSourceSurveymonkeyRequest, opts ...operations.Option) (*operations.DeleteSourceSurveymonkeyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSapFieldglass", + OperationID: "deleteSourceSurveymonkey", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31375,7 +41412,7 @@ func (s *Sources) DeleteSourceSapFieldglass(ctx context.Context, request operati } } - res := &operations.DeleteSourceSapFieldglassResponse{ + res := &operations.DeleteSourceSurveymonkeyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31402,21 +41439,43 @@ func (s *Sources) DeleteSourceSapFieldglass(ctx context.Context, request operati } -// DeleteSourceSecoda - Delete a Source -func (s *Sources) DeleteSourceSecoda(ctx context.Context, request operations.DeleteSourceSecodaRequest) (*operations.DeleteSourceSecodaResponse, error) { +// DeleteSourceTempo - Delete a Source +func (s *Sources) DeleteSourceTempo(ctx context.Context, request operations.DeleteSourceTempoRequest, opts ...operations.Option) (*operations.DeleteSourceTempoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSecoda", + OperationID: "deleteSourceTempo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31457,7 +41516,7 @@ func (s *Sources) DeleteSourceSecoda(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceSecodaResponse{ + res := &operations.DeleteSourceTempoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31484,21 +41543,43 @@ func (s *Sources) DeleteSourceSecoda(ctx context.Context, request operations.Del } -// DeleteSourceSendgrid - Delete a Source -func (s *Sources) DeleteSourceSendgrid(ctx context.Context, request operations.DeleteSourceSendgridRequest) (*operations.DeleteSourceSendgridResponse, error) { +// DeleteSourceTheGuardianAPI - Delete a Source +func (s *Sources) DeleteSourceTheGuardianAPI(ctx context.Context, request operations.DeleteSourceTheGuardianAPIRequest, opts ...operations.Option) (*operations.DeleteSourceTheGuardianAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSendgrid", + OperationID: "deleteSourceTheGuardianApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31539,7 +41620,7 @@ func (s *Sources) DeleteSourceSendgrid(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceSendgridResponse{ + res := &operations.DeleteSourceTheGuardianAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31566,21 +41647,43 @@ func (s *Sources) DeleteSourceSendgrid(ctx context.Context, request operations.D } -// DeleteSourceSendinblue - Delete a Source -func (s *Sources) DeleteSourceSendinblue(ctx context.Context, request operations.DeleteSourceSendinblueRequest) (*operations.DeleteSourceSendinblueResponse, error) { +// DeleteSourceTiktokMarketing - Delete a Source +func (s *Sources) DeleteSourceTiktokMarketing(ctx context.Context, request operations.DeleteSourceTiktokMarketingRequest, opts ...operations.Option) (*operations.DeleteSourceTiktokMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSendinblue", + OperationID: "deleteSourceTiktokMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31621,7 +41724,7 @@ func (s *Sources) DeleteSourceSendinblue(ctx context.Context, request operations } } - res := &operations.DeleteSourceSendinblueResponse{ + res := &operations.DeleteSourceTiktokMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31648,21 +41751,43 @@ func (s *Sources) DeleteSourceSendinblue(ctx context.Context, request operations } -// DeleteSourceSenseforce - Delete a Source -func (s *Sources) DeleteSourceSenseforce(ctx context.Context, request operations.DeleteSourceSenseforceRequest) (*operations.DeleteSourceSenseforceResponse, error) { +// DeleteSourceTrello - Delete a Source +func (s *Sources) DeleteSourceTrello(ctx context.Context, request operations.DeleteSourceTrelloRequest, opts ...operations.Option) (*operations.DeleteSourceTrelloResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSenseforce", + OperationID: "deleteSourceTrello", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31703,7 +41828,7 @@ func (s *Sources) DeleteSourceSenseforce(ctx context.Context, request operations } } - res := &operations.DeleteSourceSenseforceResponse{ + res := &operations.DeleteSourceTrelloResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31730,21 +41855,43 @@ func (s *Sources) DeleteSourceSenseforce(ctx context.Context, request operations } -// DeleteSourceSentry - Delete a Source -func (s *Sources) DeleteSourceSentry(ctx context.Context, request operations.DeleteSourceSentryRequest) (*operations.DeleteSourceSentryResponse, error) { +// DeleteSourceTrustpilot - Delete a Source +func (s *Sources) DeleteSourceTrustpilot(ctx context.Context, request operations.DeleteSourceTrustpilotRequest, opts ...operations.Option) (*operations.DeleteSourceTrustpilotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSentry", + OperationID: "deleteSourceTrustpilot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31785,7 +41932,7 @@ func (s *Sources) DeleteSourceSentry(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceSentryResponse{ + res := &operations.DeleteSourceTrustpilotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31812,21 +41959,43 @@ func (s *Sources) DeleteSourceSentry(ctx context.Context, request operations.Del } -// DeleteSourceSftp - Delete a Source -func (s *Sources) DeleteSourceSftp(ctx context.Context, request operations.DeleteSourceSftpRequest) (*operations.DeleteSourceSftpResponse, error) { +// DeleteSourceTvmazeSchedule - Delete a Source +func (s *Sources) DeleteSourceTvmazeSchedule(ctx context.Context, request operations.DeleteSourceTvmazeScheduleRequest, opts ...operations.Option) (*operations.DeleteSourceTvmazeScheduleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSftp", + OperationID: "deleteSourceTvmazeSchedule", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31867,7 +42036,7 @@ func (s *Sources) DeleteSourceSftp(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceSftpResponse{ + res := &operations.DeleteSourceTvmazeScheduleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31894,21 +42063,43 @@ func (s *Sources) DeleteSourceSftp(ctx context.Context, request operations.Delet } -// DeleteSourceSftpBulk - Delete a Source -func (s *Sources) DeleteSourceSftpBulk(ctx context.Context, request operations.DeleteSourceSftpBulkRequest) (*operations.DeleteSourceSftpBulkResponse, error) { +// DeleteSourceTwilio - Delete a Source +func (s *Sources) DeleteSourceTwilio(ctx context.Context, request operations.DeleteSourceTwilioRequest, opts ...operations.Option) (*operations.DeleteSourceTwilioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSftpBulk", + OperationID: "deleteSourceTwilio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -31949,7 +42140,7 @@ func (s *Sources) DeleteSourceSftpBulk(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceSftpBulkResponse{ + res := &operations.DeleteSourceTwilioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -31976,21 +42167,43 @@ func (s *Sources) DeleteSourceSftpBulk(ctx context.Context, request operations.D } -// DeleteSourceShopify - Delete a Source -func (s *Sources) DeleteSourceShopify(ctx context.Context, request operations.DeleteSourceShopifyRequest) (*operations.DeleteSourceShopifyResponse, error) { +// DeleteSourceTwilioTaskrouter - Delete a Source +func (s *Sources) DeleteSourceTwilioTaskrouter(ctx context.Context, request operations.DeleteSourceTwilioTaskrouterRequest, opts ...operations.Option) (*operations.DeleteSourceTwilioTaskrouterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceShopify", + OperationID: "deleteSourceTwilioTaskrouter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32031,7 +42244,7 @@ func (s *Sources) DeleteSourceShopify(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceShopifyResponse{ + res := &operations.DeleteSourceTwilioTaskrouterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32058,21 +42271,43 @@ func (s *Sources) DeleteSourceShopify(ctx context.Context, request operations.De } -// DeleteSourceShortio - Delete a Source -func (s *Sources) DeleteSourceShortio(ctx context.Context, request operations.DeleteSourceShortioRequest) (*operations.DeleteSourceShortioResponse, error) { +// DeleteSourceTwitter - Delete a Source +func (s *Sources) DeleteSourceTwitter(ctx context.Context, request operations.DeleteSourceTwitterRequest, opts ...operations.Option) (*operations.DeleteSourceTwitterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceShortio", + OperationID: "deleteSourceTwitter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32113,7 +42348,7 @@ func (s *Sources) DeleteSourceShortio(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceShortioResponse{ + res := &operations.DeleteSourceTwitterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32140,21 +42375,43 @@ func (s *Sources) DeleteSourceShortio(ctx context.Context, request operations.De } -// DeleteSourceSlack - Delete a Source -func (s *Sources) DeleteSourceSlack(ctx context.Context, request operations.DeleteSourceSlackRequest) (*operations.DeleteSourceSlackResponse, error) { +// DeleteSourceTypeform - Delete a Source +func (s *Sources) DeleteSourceTypeform(ctx context.Context, request operations.DeleteSourceTypeformRequest, opts ...operations.Option) (*operations.DeleteSourceTypeformResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSlack", + OperationID: "deleteSourceTypeform", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32195,7 +42452,7 @@ func (s *Sources) DeleteSourceSlack(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceSlackResponse{ + res := &operations.DeleteSourceTypeformResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32222,21 +42479,43 @@ func (s *Sources) DeleteSourceSlack(ctx context.Context, request operations.Dele } -// DeleteSourceSmaily - Delete a Source -func (s *Sources) DeleteSourceSmaily(ctx context.Context, request operations.DeleteSourceSmailyRequest) (*operations.DeleteSourceSmailyResponse, error) { +// DeleteSourceUsCensus - Delete a Source +func (s *Sources) DeleteSourceUsCensus(ctx context.Context, request operations.DeleteSourceUsCensusRequest, opts ...operations.Option) (*operations.DeleteSourceUsCensusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSmaily", + OperationID: "deleteSourceUsCensus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32277,7 +42556,7 @@ func (s *Sources) DeleteSourceSmaily(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceSmailyResponse{ + res := &operations.DeleteSourceUsCensusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32304,21 +42583,43 @@ func (s *Sources) DeleteSourceSmaily(ctx context.Context, request operations.Del } -// DeleteSourceSmartengage - Delete a Source -func (s *Sources) DeleteSourceSmartengage(ctx context.Context, request operations.DeleteSourceSmartengageRequest) (*operations.DeleteSourceSmartengageResponse, error) { +// DeleteSourceVantage - Delete a Source +func (s *Sources) DeleteSourceVantage(ctx context.Context, request operations.DeleteSourceVantageRequest, opts ...operations.Option) (*operations.DeleteSourceVantageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSmartengage", + OperationID: "deleteSourceVantage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32359,7 +42660,7 @@ func (s *Sources) DeleteSourceSmartengage(ctx context.Context, request operation } } - res := &operations.DeleteSourceSmartengageResponse{ + res := &operations.DeleteSourceVantageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32386,21 +42687,43 @@ func (s *Sources) DeleteSourceSmartengage(ctx context.Context, request operation } -// DeleteSourceSmartsheets - Delete a Source -func (s *Sources) DeleteSourceSmartsheets(ctx context.Context, request operations.DeleteSourceSmartsheetsRequest) (*operations.DeleteSourceSmartsheetsResponse, error) { +// DeleteSourceWebflow - Delete a Source +func (s *Sources) DeleteSourceWebflow(ctx context.Context, request operations.DeleteSourceWebflowRequest, opts ...operations.Option) (*operations.DeleteSourceWebflowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSmartsheets", + OperationID: "deleteSourceWebflow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32441,7 +42764,7 @@ func (s *Sources) DeleteSourceSmartsheets(ctx context.Context, request operation } } - res := &operations.DeleteSourceSmartsheetsResponse{ + res := &operations.DeleteSourceWebflowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32468,21 +42791,43 @@ func (s *Sources) DeleteSourceSmartsheets(ctx context.Context, request operation } -// DeleteSourceSnapchatMarketing - Delete a Source -func (s *Sources) DeleteSourceSnapchatMarketing(ctx context.Context, request operations.DeleteSourceSnapchatMarketingRequest) (*operations.DeleteSourceSnapchatMarketingResponse, error) { +// DeleteSourceWhiskyHunter - Delete a Source +func (s *Sources) DeleteSourceWhiskyHunter(ctx context.Context, request operations.DeleteSourceWhiskyHunterRequest, opts ...operations.Option) (*operations.DeleteSourceWhiskyHunterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSnapchatMarketing", + OperationID: "deleteSourceWhiskyHunter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32523,7 +42868,7 @@ func (s *Sources) DeleteSourceSnapchatMarketing(ctx context.Context, request ope } } - res := &operations.DeleteSourceSnapchatMarketingResponse{ + res := &operations.DeleteSourceWhiskyHunterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32550,21 +42895,43 @@ func (s *Sources) DeleteSourceSnapchatMarketing(ctx context.Context, request ope } -// DeleteSourceSnowflake - Delete a Source -func (s *Sources) DeleteSourceSnowflake(ctx context.Context, request operations.DeleteSourceSnowflakeRequest) (*operations.DeleteSourceSnowflakeResponse, error) { +// DeleteSourceWikipediaPageviews - Delete a Source +func (s *Sources) DeleteSourceWikipediaPageviews(ctx context.Context, request operations.DeleteSourceWikipediaPageviewsRequest, opts ...operations.Option) (*operations.DeleteSourceWikipediaPageviewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSnowflake", + OperationID: "deleteSourceWikipediaPageviews", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32605,7 +42972,7 @@ func (s *Sources) DeleteSourceSnowflake(ctx context.Context, request operations. } } - res := &operations.DeleteSourceSnowflakeResponse{ + res := &operations.DeleteSourceWikipediaPageviewsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32632,21 +42999,43 @@ func (s *Sources) DeleteSourceSnowflake(ctx context.Context, request operations. } -// DeleteSourceSonarCloud - Delete a Source -func (s *Sources) DeleteSourceSonarCloud(ctx context.Context, request operations.DeleteSourceSonarCloudRequest) (*operations.DeleteSourceSonarCloudResponse, error) { +// DeleteSourceWoocommerce - Delete a Source +func (s *Sources) DeleteSourceWoocommerce(ctx context.Context, request operations.DeleteSourceWoocommerceRequest, opts ...operations.Option) (*operations.DeleteSourceWoocommerceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSonarCloud", + OperationID: "deleteSourceWoocommerce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32687,7 +43076,7 @@ func (s *Sources) DeleteSourceSonarCloud(ctx context.Context, request operations } } - res := &operations.DeleteSourceSonarCloudResponse{ + res := &operations.DeleteSourceWoocommerceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32714,21 +43103,43 @@ func (s *Sources) DeleteSourceSonarCloud(ctx context.Context, request operations } -// DeleteSourceSpacexAPI - Delete a Source -func (s *Sources) DeleteSourceSpacexAPI(ctx context.Context, request operations.DeleteSourceSpacexAPIRequest) (*operations.DeleteSourceSpacexAPIResponse, error) { +// DeleteSourceXkcd - Delete a Source +func (s *Sources) DeleteSourceXkcd(ctx context.Context, request operations.DeleteSourceXkcdRequest, opts ...operations.Option) (*operations.DeleteSourceXkcdResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSpacexApi", + OperationID: "deleteSourceXkcd", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32769,7 +43180,7 @@ func (s *Sources) DeleteSourceSpacexAPI(ctx context.Context, request operations. } } - res := &operations.DeleteSourceSpacexAPIResponse{ + res := &operations.DeleteSourceXkcdResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32796,21 +43207,43 @@ func (s *Sources) DeleteSourceSpacexAPI(ctx context.Context, request operations. } -// DeleteSourceSquare - Delete a Source -func (s *Sources) DeleteSourceSquare(ctx context.Context, request operations.DeleteSourceSquareRequest) (*operations.DeleteSourceSquareResponse, error) { +// DeleteSourceYandexMetrica - Delete a Source +func (s *Sources) DeleteSourceYandexMetrica(ctx context.Context, request operations.DeleteSourceYandexMetricaRequest, opts ...operations.Option) (*operations.DeleteSourceYandexMetricaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSquare", + OperationID: "deleteSourceYandexMetrica", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32851,7 +43284,7 @@ func (s *Sources) DeleteSourceSquare(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceSquareResponse{ + res := &operations.DeleteSourceYandexMetricaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32878,21 +43311,43 @@ func (s *Sources) DeleteSourceSquare(ctx context.Context, request operations.Del } -// DeleteSourceStrava - Delete a Source -func (s *Sources) DeleteSourceStrava(ctx context.Context, request operations.DeleteSourceStravaRequest) (*operations.DeleteSourceStravaResponse, error) { +// DeleteSourceYotpo - Delete a Source +func (s *Sources) DeleteSourceYotpo(ctx context.Context, request operations.DeleteSourceYotpoRequest, opts ...operations.Option) (*operations.DeleteSourceYotpoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceStrava", + OperationID: "deleteSourceYotpo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -32933,7 +43388,7 @@ func (s *Sources) DeleteSourceStrava(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceStravaResponse{ + res := &operations.DeleteSourceYotpoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -32960,21 +43415,43 @@ func (s *Sources) DeleteSourceStrava(ctx context.Context, request operations.Del } -// DeleteSourceStripe - Delete a Source -func (s *Sources) DeleteSourceStripe(ctx context.Context, request operations.DeleteSourceStripeRequest) (*operations.DeleteSourceStripeResponse, error) { +// DeleteSourceYoutubeAnalytics - Delete a Source +func (s *Sources) DeleteSourceYoutubeAnalytics(ctx context.Context, request operations.DeleteSourceYoutubeAnalyticsRequest, opts ...operations.Option) (*operations.DeleteSourceYoutubeAnalyticsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceStripe", + OperationID: "deleteSourceYoutubeAnalytics", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33015,7 +43492,7 @@ func (s *Sources) DeleteSourceStripe(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceStripeResponse{ + res := &operations.DeleteSourceYoutubeAnalyticsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33042,21 +43519,43 @@ func (s *Sources) DeleteSourceStripe(ctx context.Context, request operations.Del } -// DeleteSourceSurveySparrow - Delete a Source -func (s *Sources) DeleteSourceSurveySparrow(ctx context.Context, request operations.DeleteSourceSurveySparrowRequest) (*operations.DeleteSourceSurveySparrowResponse, error) { +// DeleteSourceZendeskChat - Delete a Source +func (s *Sources) DeleteSourceZendeskChat(ctx context.Context, request operations.DeleteSourceZendeskChatRequest, opts ...operations.Option) (*operations.DeleteSourceZendeskChatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSurveySparrow", + OperationID: "deleteSourceZendeskChat", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33097,7 +43596,7 @@ func (s *Sources) DeleteSourceSurveySparrow(ctx context.Context, request operati } } - res := &operations.DeleteSourceSurveySparrowResponse{ + res := &operations.DeleteSourceZendeskChatResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33124,101 +43623,41 @@ func (s *Sources) DeleteSourceSurveySparrow(ctx context.Context, request operati } -// DeleteSourceSurveymonkey - Delete a Source -func (s *Sources) DeleteSourceSurveymonkey(ctx context.Context, request operations.DeleteSourceSurveymonkeyRequest) (*operations.DeleteSourceSurveymonkeyResponse, error) { +// DeleteSourceZendeskSell - Delete a Source +func (s *Sources) DeleteSourceZendeskSell(ctx context.Context, request operations.DeleteSourceZendeskSellRequest, opts ...operations.Option) (*operations.DeleteSourceZendeskSellResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceSurveymonkey", + OperationID: "deleteSourceZendeskSell", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceSurveymonkeyResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// DeleteSourceTempo - Delete a Source -func (s *Sources) DeleteSourceTempo(ctx context.Context, request operations.DeleteSourceTempoRequest) (*operations.DeleteSourceTempoResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceTempo", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) @@ -33261,7 +43700,7 @@ func (s *Sources) DeleteSourceTempo(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceTempoResponse{ + res := &operations.DeleteSourceZendeskSellResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33288,21 +43727,43 @@ func (s *Sources) DeleteSourceTempo(ctx context.Context, request operations.Dele } -// DeleteSourceTheGuardianAPI - Delete a Source -func (s *Sources) DeleteSourceTheGuardianAPI(ctx context.Context, request operations.DeleteSourceTheGuardianAPIRequest) (*operations.DeleteSourceTheGuardianAPIResponse, error) { +// DeleteSourceZendeskSunshine - Delete a Source +func (s *Sources) DeleteSourceZendeskSunshine(ctx context.Context, request operations.DeleteSourceZendeskSunshineRequest, opts ...operations.Option) (*operations.DeleteSourceZendeskSunshineResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTheGuardianApi", + OperationID: "deleteSourceZendeskSunshine", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33343,7 +43804,7 @@ func (s *Sources) DeleteSourceTheGuardianAPI(ctx context.Context, request operat } } - res := &operations.DeleteSourceTheGuardianAPIResponse{ + res := &operations.DeleteSourceZendeskSunshineResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33370,21 +43831,43 @@ func (s *Sources) DeleteSourceTheGuardianAPI(ctx context.Context, request operat } -// DeleteSourceTiktokMarketing - Delete a Source -func (s *Sources) DeleteSourceTiktokMarketing(ctx context.Context, request operations.DeleteSourceTiktokMarketingRequest) (*operations.DeleteSourceTiktokMarketingResponse, error) { +// DeleteSourceZendeskSupport - Delete a Source +func (s *Sources) DeleteSourceZendeskSupport(ctx context.Context, request operations.DeleteSourceZendeskSupportRequest, opts ...operations.Option) (*operations.DeleteSourceZendeskSupportResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTiktokMarketing", + OperationID: "deleteSourceZendeskSupport", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33425,7 +43908,7 @@ func (s *Sources) DeleteSourceTiktokMarketing(ctx context.Context, request opera } } - res := &operations.DeleteSourceTiktokMarketingResponse{ + res := &operations.DeleteSourceZendeskSupportResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33452,21 +43935,43 @@ func (s *Sources) DeleteSourceTiktokMarketing(ctx context.Context, request opera } -// DeleteSourceTrello - Delete a Source -func (s *Sources) DeleteSourceTrello(ctx context.Context, request operations.DeleteSourceTrelloRequest) (*operations.DeleteSourceTrelloResponse, error) { +// DeleteSourceZendeskTalk - Delete a Source +func (s *Sources) DeleteSourceZendeskTalk(ctx context.Context, request operations.DeleteSourceZendeskTalkRequest, opts ...operations.Option) (*operations.DeleteSourceZendeskTalkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTrello", + OperationID: "deleteSourceZendeskTalk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33507,7 +44012,7 @@ func (s *Sources) DeleteSourceTrello(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceTrelloResponse{ + res := &operations.DeleteSourceZendeskTalkResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33534,21 +44039,43 @@ func (s *Sources) DeleteSourceTrello(ctx context.Context, request operations.Del } -// DeleteSourceTrustpilot - Delete a Source -func (s *Sources) DeleteSourceTrustpilot(ctx context.Context, request operations.DeleteSourceTrustpilotRequest) (*operations.DeleteSourceTrustpilotResponse, error) { +// DeleteSourceZenloop - Delete a Source +func (s *Sources) DeleteSourceZenloop(ctx context.Context, request operations.DeleteSourceZenloopRequest, opts ...operations.Option) (*operations.DeleteSourceZenloopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTrustpilot", + OperationID: "deleteSourceZenloop", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33589,7 +44116,7 @@ func (s *Sources) DeleteSourceTrustpilot(ctx context.Context, request operations } } - res := &operations.DeleteSourceTrustpilotResponse{ + res := &operations.DeleteSourceZenloopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33616,21 +44143,43 @@ func (s *Sources) DeleteSourceTrustpilot(ctx context.Context, request operations } -// DeleteSourceTvmazeSchedule - Delete a Source -func (s *Sources) DeleteSourceTvmazeSchedule(ctx context.Context, request operations.DeleteSourceTvmazeScheduleRequest) (*operations.DeleteSourceTvmazeScheduleResponse, error) { +// DeleteSourceZohoCrm - Delete a Source +func (s *Sources) DeleteSourceZohoCrm(ctx context.Context, request operations.DeleteSourceZohoCrmRequest, opts ...operations.Option) (*operations.DeleteSourceZohoCrmResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTvmazeSchedule", + OperationID: "deleteSourceZohoCrm", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33671,7 +44220,7 @@ func (s *Sources) DeleteSourceTvmazeSchedule(ctx context.Context, request operat } } - res := &operations.DeleteSourceTvmazeScheduleResponse{ + res := &operations.DeleteSourceZohoCrmResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33698,21 +44247,43 @@ func (s *Sources) DeleteSourceTvmazeSchedule(ctx context.Context, request operat } -// DeleteSourceTwilio - Delete a Source -func (s *Sources) DeleteSourceTwilio(ctx context.Context, request operations.DeleteSourceTwilioRequest) (*operations.DeleteSourceTwilioResponse, error) { +// DeleteSourceZoom - Delete a Source +func (s *Sources) DeleteSourceZoom(ctx context.Context, request operations.DeleteSourceZoomRequest, opts ...operations.Option) (*operations.DeleteSourceZoomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTwilio", + OperationID: "deleteSourceZoom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -33753,7 +44324,7 @@ func (s *Sources) DeleteSourceTwilio(ctx context.Context, request operations.Del } } - res := &operations.DeleteSourceTwilioResponse{ + res := &operations.DeleteSourceZoomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33780,26 +44351,48 @@ func (s *Sources) DeleteSourceTwilio(ctx context.Context, request operations.Del } -// DeleteSourceTwilioTaskrouter - Delete a Source -func (s *Sources) DeleteSourceTwilioTaskrouter(ctx context.Context, request operations.DeleteSourceTwilioTaskrouterRequest) (*operations.DeleteSourceTwilioTaskrouterResponse, error) { +// GetSource - Get Source details +func (s *Sources) GetSource(ctx context.Context, request operations.GetSourceRequest, opts ...operations.Option) (*operations.GetSourceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTwilioTaskrouter", + OperationID: "getSource", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -33835,7 +44428,7 @@ func (s *Sources) DeleteSourceTwilioTaskrouter(ctx context.Context, request oper } } - res := &operations.DeleteSourceTwilioTaskrouterResponse{ + res := &operations.GetSourceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33849,8 +44442,18 @@ func (s *Sources) DeleteSourceTwilioTaskrouter(ctx context.Context, request oper httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -33862,26 +44465,48 @@ func (s *Sources) DeleteSourceTwilioTaskrouter(ctx context.Context, request oper } -// DeleteSourceTwitter - Delete a Source -func (s *Sources) DeleteSourceTwitter(ctx context.Context, request operations.DeleteSourceTwitterRequest) (*operations.DeleteSourceTwitterResponse, error) { +// GetSourceAha - Get Source details +func (s *Sources) GetSourceAha(ctx context.Context, request operations.GetSourceAhaRequest, opts ...operations.Option) (*operations.GetSourceAhaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTwitter", + OperationID: "getSourceAha", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -33917,7 +44542,7 @@ func (s *Sources) DeleteSourceTwitter(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceTwitterResponse{ + res := &operations.GetSourceAhaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -33931,8 +44556,18 @@ func (s *Sources) DeleteSourceTwitter(ctx context.Context, request operations.De httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -33944,26 +44579,48 @@ func (s *Sources) DeleteSourceTwitter(ctx context.Context, request operations.De } -// DeleteSourceTypeform - Delete a Source -func (s *Sources) DeleteSourceTypeform(ctx context.Context, request operations.DeleteSourceTypeformRequest) (*operations.DeleteSourceTypeformResponse, error) { +// GetSourceAircall - Get Source details +func (s *Sources) GetSourceAircall(ctx context.Context, request operations.GetSourceAircallRequest, opts ...operations.Option) (*operations.GetSourceAircallResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceTypeform", + OperationID: "getSourceAircall", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -33999,7 +44656,7 @@ func (s *Sources) DeleteSourceTypeform(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceTypeformResponse{ + res := &operations.GetSourceAircallResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34013,8 +44670,18 @@ func (s *Sources) DeleteSourceTypeform(ctx context.Context, request operations.D httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34026,26 +44693,48 @@ func (s *Sources) DeleteSourceTypeform(ctx context.Context, request operations.D } -// DeleteSourceUsCensus - Delete a Source -func (s *Sources) DeleteSourceUsCensus(ctx context.Context, request operations.DeleteSourceUsCensusRequest) (*operations.DeleteSourceUsCensusResponse, error) { +// GetSourceAirtable - Get Source details +func (s *Sources) GetSourceAirtable(ctx context.Context, request operations.GetSourceAirtableRequest, opts ...operations.Option) (*operations.GetSourceAirtableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceUsCensus", + OperationID: "getSourceAirtable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34081,7 +44770,7 @@ func (s *Sources) DeleteSourceUsCensus(ctx context.Context, request operations.D } } - res := &operations.DeleteSourceUsCensusResponse{ + res := &operations.GetSourceAirtableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34095,8 +44784,18 @@ func (s *Sources) DeleteSourceUsCensus(ctx context.Context, request operations.D httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34108,26 +44807,48 @@ func (s *Sources) DeleteSourceUsCensus(ctx context.Context, request operations.D } -// DeleteSourceVantage - Delete a Source -func (s *Sources) DeleteSourceVantage(ctx context.Context, request operations.DeleteSourceVantageRequest) (*operations.DeleteSourceVantageResponse, error) { +// GetSourceAmazonAds - Get Source details +func (s *Sources) GetSourceAmazonAds(ctx context.Context, request operations.GetSourceAmazonAdsRequest, opts ...operations.Option) (*operations.GetSourceAmazonAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceVantage", + OperationID: "getSourceAmazonAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34163,7 +44884,7 @@ func (s *Sources) DeleteSourceVantage(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceVantageResponse{ + res := &operations.GetSourceAmazonAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34177,8 +44898,18 @@ func (s *Sources) DeleteSourceVantage(ctx context.Context, request operations.De httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34190,26 +44921,48 @@ func (s *Sources) DeleteSourceVantage(ctx context.Context, request operations.De } -// DeleteSourceWebflow - Delete a Source -func (s *Sources) DeleteSourceWebflow(ctx context.Context, request operations.DeleteSourceWebflowRequest) (*operations.DeleteSourceWebflowResponse, error) { +// GetSourceAmazonSellerPartner - Get Source details +func (s *Sources) GetSourceAmazonSellerPartner(ctx context.Context, request operations.GetSourceAmazonSellerPartnerRequest, opts ...operations.Option) (*operations.GetSourceAmazonSellerPartnerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceWebflow", + OperationID: "getSourceAmazonSellerPartner", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34245,7 +44998,7 @@ func (s *Sources) DeleteSourceWebflow(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceWebflowResponse{ + res := &operations.GetSourceAmazonSellerPartnerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34259,8 +45012,18 @@ func (s *Sources) DeleteSourceWebflow(ctx context.Context, request operations.De httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34272,26 +45035,48 @@ func (s *Sources) DeleteSourceWebflow(ctx context.Context, request operations.De } -// DeleteSourceWhiskyHunter - Delete a Source -func (s *Sources) DeleteSourceWhiskyHunter(ctx context.Context, request operations.DeleteSourceWhiskyHunterRequest) (*operations.DeleteSourceWhiskyHunterResponse, error) { +// GetSourceAmazonSqs - Get Source details +func (s *Sources) GetSourceAmazonSqs(ctx context.Context, request operations.GetSourceAmazonSqsRequest, opts ...operations.Option) (*operations.GetSourceAmazonSqsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceWhiskyHunter", + OperationID: "getSourceAmazonSqs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34327,7 +45112,7 @@ func (s *Sources) DeleteSourceWhiskyHunter(ctx context.Context, request operatio } } - res := &operations.DeleteSourceWhiskyHunterResponse{ + res := &operations.GetSourceAmazonSqsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34341,8 +45126,18 @@ func (s *Sources) DeleteSourceWhiskyHunter(ctx context.Context, request operatio httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34354,26 +45149,48 @@ func (s *Sources) DeleteSourceWhiskyHunter(ctx context.Context, request operatio } -// DeleteSourceWikipediaPageviews - Delete a Source -func (s *Sources) DeleteSourceWikipediaPageviews(ctx context.Context, request operations.DeleteSourceWikipediaPageviewsRequest) (*operations.DeleteSourceWikipediaPageviewsResponse, error) { +// GetSourceAmplitude - Get Source details +func (s *Sources) GetSourceAmplitude(ctx context.Context, request operations.GetSourceAmplitudeRequest, opts ...operations.Option) (*operations.GetSourceAmplitudeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceWikipediaPageviews", + OperationID: "getSourceAmplitude", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34409,7 +45226,7 @@ func (s *Sources) DeleteSourceWikipediaPageviews(ctx context.Context, request op } } - res := &operations.DeleteSourceWikipediaPageviewsResponse{ + res := &operations.GetSourceAmplitudeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34423,8 +45240,18 @@ func (s *Sources) DeleteSourceWikipediaPageviews(ctx context.Context, request op httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34436,26 +45263,48 @@ func (s *Sources) DeleteSourceWikipediaPageviews(ctx context.Context, request op } -// DeleteSourceWoocommerce - Delete a Source -func (s *Sources) DeleteSourceWoocommerce(ctx context.Context, request operations.DeleteSourceWoocommerceRequest) (*operations.DeleteSourceWoocommerceResponse, error) { +// GetSourceApifyDataset - Get Source details +func (s *Sources) GetSourceApifyDataset(ctx context.Context, request operations.GetSourceApifyDatasetRequest, opts ...operations.Option) (*operations.GetSourceApifyDatasetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceWoocommerce", + OperationID: "getSourceApifyDataset", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34491,7 +45340,7 @@ func (s *Sources) DeleteSourceWoocommerce(ctx context.Context, request operation } } - res := &operations.DeleteSourceWoocommerceResponse{ + res := &operations.GetSourceApifyDatasetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34505,8 +45354,18 @@ func (s *Sources) DeleteSourceWoocommerce(ctx context.Context, request operation httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34518,26 +45377,48 @@ func (s *Sources) DeleteSourceWoocommerce(ctx context.Context, request operation } -// DeleteSourceXkcd - Delete a Source -func (s *Sources) DeleteSourceXkcd(ctx context.Context, request operations.DeleteSourceXkcdRequest) (*operations.DeleteSourceXkcdResponse, error) { +// GetSourceAppfollow - Get Source details +func (s *Sources) GetSourceAppfollow(ctx context.Context, request operations.GetSourceAppfollowRequest, opts ...operations.Option) (*operations.GetSourceAppfollowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceXkcd", + OperationID: "getSourceAppfollow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34573,7 +45454,7 @@ func (s *Sources) DeleteSourceXkcd(ctx context.Context, request operations.Delet } } - res := &operations.DeleteSourceXkcdResponse{ + res := &operations.GetSourceAppfollowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34587,8 +45468,18 @@ func (s *Sources) DeleteSourceXkcd(ctx context.Context, request operations.Delet httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34600,26 +45491,48 @@ func (s *Sources) DeleteSourceXkcd(ctx context.Context, request operations.Delet } -// DeleteSourceYandexMetrica - Delete a Source -func (s *Sources) DeleteSourceYandexMetrica(ctx context.Context, request operations.DeleteSourceYandexMetricaRequest) (*operations.DeleteSourceYandexMetricaResponse, error) { +// GetSourceAsana - Get Source details +func (s *Sources) GetSourceAsana(ctx context.Context, request operations.GetSourceAsanaRequest, opts ...operations.Option) (*operations.GetSourceAsanaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceYandexMetrica", + OperationID: "getSourceAsana", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34655,7 +45568,7 @@ func (s *Sources) DeleteSourceYandexMetrica(ctx context.Context, request operati } } - res := &operations.DeleteSourceYandexMetricaResponse{ + res := &operations.GetSourceAsanaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34669,8 +45582,18 @@ func (s *Sources) DeleteSourceYandexMetrica(ctx context.Context, request operati httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34682,26 +45605,48 @@ func (s *Sources) DeleteSourceYandexMetrica(ctx context.Context, request operati } -// DeleteSourceYotpo - Delete a Source -func (s *Sources) DeleteSourceYotpo(ctx context.Context, request operations.DeleteSourceYotpoRequest) (*operations.DeleteSourceYotpoResponse, error) { +// GetSourceAuth0 - Get Source details +func (s *Sources) GetSourceAuth0(ctx context.Context, request operations.GetSourceAuth0Request, opts ...operations.Option) (*operations.GetSourceAuth0Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceYotpo", + OperationID: "getSourceAuth0", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34737,7 +45682,7 @@ func (s *Sources) DeleteSourceYotpo(ctx context.Context, request operations.Dele } } - res := &operations.DeleteSourceYotpoResponse{ + res := &operations.GetSourceAuth0Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34751,8 +45696,18 @@ func (s *Sources) DeleteSourceYotpo(ctx context.Context, request operations.Dele httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34764,26 +45719,48 @@ func (s *Sources) DeleteSourceYotpo(ctx context.Context, request operations.Dele } -// DeleteSourceYoutubeAnalytics - Delete a Source -func (s *Sources) DeleteSourceYoutubeAnalytics(ctx context.Context, request operations.DeleteSourceYoutubeAnalyticsRequest) (*operations.DeleteSourceYoutubeAnalyticsResponse, error) { +// GetSourceAwsCloudtrail - Get Source details +func (s *Sources) GetSourceAwsCloudtrail(ctx context.Context, request operations.GetSourceAwsCloudtrailRequest, opts ...operations.Option) (*operations.GetSourceAwsCloudtrailResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceYoutubeAnalytics", + OperationID: "getSourceAwsCloudtrail", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34819,7 +45796,7 @@ func (s *Sources) DeleteSourceYoutubeAnalytics(ctx context.Context, request oper } } - res := &operations.DeleteSourceYoutubeAnalyticsResponse{ + res := &operations.GetSourceAwsCloudtrailResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34833,8 +45810,18 @@ func (s *Sources) DeleteSourceYoutubeAnalytics(ctx context.Context, request oper httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34846,26 +45833,48 @@ func (s *Sources) DeleteSourceYoutubeAnalytics(ctx context.Context, request oper } -// DeleteSourceZendeskChat - Delete a Source -func (s *Sources) DeleteSourceZendeskChat(ctx context.Context, request operations.DeleteSourceZendeskChatRequest) (*operations.DeleteSourceZendeskChatResponse, error) { +// GetSourceAzureBlobStorage - Get Source details +func (s *Sources) GetSourceAzureBlobStorage(ctx context.Context, request operations.GetSourceAzureBlobStorageRequest, opts ...operations.Option) (*operations.GetSourceAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZendeskChat", + OperationID: "getSourceAzureBlobStorage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34901,7 +45910,7 @@ func (s *Sources) DeleteSourceZendeskChat(ctx context.Context, request operation } } - res := &operations.DeleteSourceZendeskChatResponse{ + res := &operations.GetSourceAzureBlobStorageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34915,8 +45924,18 @@ func (s *Sources) DeleteSourceZendeskChat(ctx context.Context, request operation httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -34928,26 +45947,48 @@ func (s *Sources) DeleteSourceZendeskChat(ctx context.Context, request operation } -// DeleteSourceZendeskSell - Delete a Source -func (s *Sources) DeleteSourceZendeskSell(ctx context.Context, request operations.DeleteSourceZendeskSellRequest) (*operations.DeleteSourceZendeskSellResponse, error) { +// GetSourceAzureTable - Get Source details +func (s *Sources) GetSourceAzureTable(ctx context.Context, request operations.GetSourceAzureTableRequest, opts ...operations.Option) (*operations.GetSourceAzureTableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZendeskSell", + OperationID: "getSourceAzureTable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -34983,7 +46024,7 @@ func (s *Sources) DeleteSourceZendeskSell(ctx context.Context, request operation } } - res := &operations.DeleteSourceZendeskSellResponse{ + res := &operations.GetSourceAzureTableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -34997,8 +46038,18 @@ func (s *Sources) DeleteSourceZendeskSell(ctx context.Context, request operation httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -35010,26 +46061,48 @@ func (s *Sources) DeleteSourceZendeskSell(ctx context.Context, request operation } -// DeleteSourceZendeskSunshine - Delete a Source -func (s *Sources) DeleteSourceZendeskSunshine(ctx context.Context, request operations.DeleteSourceZendeskSunshineRequest) (*operations.DeleteSourceZendeskSunshineResponse, error) { +// GetSourceBambooHr - Get Source details +func (s *Sources) GetSourceBambooHr(ctx context.Context, request operations.GetSourceBambooHrRequest, opts ...operations.Option) (*operations.GetSourceBambooHrResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZendeskSunshine", + OperationID: "getSourceBambooHr", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -35065,7 +46138,7 @@ func (s *Sources) DeleteSourceZendeskSunshine(ctx context.Context, request opera } } - res := &operations.DeleteSourceZendeskSunshineResponse{ + res := &operations.GetSourceBambooHrResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35079,8 +46152,18 @@ func (s *Sources) DeleteSourceZendeskSunshine(ctx context.Context, request opera httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -35092,26 +46175,48 @@ func (s *Sources) DeleteSourceZendeskSunshine(ctx context.Context, request opera } -// DeleteSourceZendeskSupport - Delete a Source -func (s *Sources) DeleteSourceZendeskSupport(ctx context.Context, request operations.DeleteSourceZendeskSupportRequest) (*operations.DeleteSourceZendeskSupportResponse, error) { +// GetSourceBigquery - Get Source details +func (s *Sources) GetSourceBigquery(ctx context.Context, request operations.GetSourceBigqueryRequest, opts ...operations.Option) (*operations.GetSourceBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZendeskSupport", + OperationID: "getSourceBigquery", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -35147,7 +46252,7 @@ func (s *Sources) DeleteSourceZendeskSupport(ctx context.Context, request operat } } - res := &operations.DeleteSourceZendeskSupportResponse{ + res := &operations.GetSourceBigqueryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35161,8 +46266,18 @@ func (s *Sources) DeleteSourceZendeskSupport(ctx context.Context, request operat httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -35174,26 +46289,48 @@ func (s *Sources) DeleteSourceZendeskSupport(ctx context.Context, request operat } -// DeleteSourceZendeskTalk - Delete a Source -func (s *Sources) DeleteSourceZendeskTalk(ctx context.Context, request operations.DeleteSourceZendeskTalkRequest) (*operations.DeleteSourceZendeskTalkResponse, error) { +// GetSourceBingAds - Get Source details +func (s *Sources) GetSourceBingAds(ctx context.Context, request operations.GetSourceBingAdsRequest, opts ...operations.Option) (*operations.GetSourceBingAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZendeskTalk", + OperationID: "getSourceBingAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -35229,7 +46366,7 @@ func (s *Sources) DeleteSourceZendeskTalk(ctx context.Context, request operation } } - res := &operations.DeleteSourceZendeskTalkResponse{ + res := &operations.GetSourceBingAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35243,8 +46380,18 @@ func (s *Sources) DeleteSourceZendeskTalk(ctx context.Context, request operation httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -35256,26 +46403,48 @@ func (s *Sources) DeleteSourceZendeskTalk(ctx context.Context, request operation } -// DeleteSourceZenloop - Delete a Source -func (s *Sources) DeleteSourceZenloop(ctx context.Context, request operations.DeleteSourceZenloopRequest) (*operations.DeleteSourceZenloopResponse, error) { +// GetSourceBraintree - Get Source details +func (s *Sources) GetSourceBraintree(ctx context.Context, request operations.GetSourceBraintreeRequest, opts ...operations.Option) (*operations.GetSourceBraintreeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZenloop", + OperationID: "getSourceBraintree", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { @@ -35311,7 +46480,7 @@ func (s *Sources) DeleteSourceZenloop(ctx context.Context, request operations.De } } - res := &operations.DeleteSourceZenloopResponse{ + res := &operations.GetSourceBraintreeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35325,8 +46494,18 @@ func (s *Sources) DeleteSourceZenloop(ctx context.Context, request operations.De httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + var out shared.SourceResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.SourceResponse = &out + default: + return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -35338,183 +46517,41 @@ func (s *Sources) DeleteSourceZenloop(ctx context.Context, request operations.De } -// DeleteSourceZohoCrm - Delete a Source -func (s *Sources) DeleteSourceZohoCrm(ctx context.Context, request operations.DeleteSourceZohoCrmRequest) (*operations.DeleteSourceZohoCrmResponse, error) { +// GetSourceBraze - Get Source details +func (s *Sources) GetSourceBraze(ctx context.Context, request operations.GetSourceBrazeRequest, opts ...operations.Option) (*operations.GetSourceBrazeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "deleteSourceZohoCrm", + OperationID: "getSourceBraze", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.DeleteSourceZohoCrmResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// DeleteSourceZoom - Delete a Source -func (s *Sources) DeleteSourceZoom(ctx context.Context, request operations.DeleteSourceZoomRequest) (*operations.DeleteSourceZoomResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "deleteSourceZoom", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.DeleteSourceZoomResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// GetSource - Get Source details -func (s *Sources) GetSource(ctx context.Context, request operations.GetSourceRequest) (*operations.GetSourceResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSource", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -35557,7 +46594,7 @@ func (s *Sources) GetSource(ctx context.Context, request operations.GetSourceReq } } - res := &operations.GetSourceResponse{ + res := &operations.GetSourceBrazeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35594,21 +46631,43 @@ func (s *Sources) GetSource(ctx context.Context, request operations.GetSourceReq } -// GetSourceAha - Get Source details -func (s *Sources) GetSourceAha(ctx context.Context, request operations.GetSourceAhaRequest) (*operations.GetSourceAhaResponse, error) { +// GetSourceCart - Get Source details +func (s *Sources) GetSourceCart(ctx context.Context, request operations.GetSourceCartRequest, opts ...operations.Option) (*operations.GetSourceCartResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAha", + OperationID: "getSourceCart", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -35649,7 +46708,7 @@ func (s *Sources) GetSourceAha(ctx context.Context, request operations.GetSource } } - res := &operations.GetSourceAhaResponse{ + res := &operations.GetSourceCartResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35686,21 +46745,43 @@ func (s *Sources) GetSourceAha(ctx context.Context, request operations.GetSource } -// GetSourceAircall - Get Source details -func (s *Sources) GetSourceAircall(ctx context.Context, request operations.GetSourceAircallRequest) (*operations.GetSourceAircallResponse, error) { +// GetSourceChargebee - Get Source details +func (s *Sources) GetSourceChargebee(ctx context.Context, request operations.GetSourceChargebeeRequest, opts ...operations.Option) (*operations.GetSourceChargebeeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAircall", + OperationID: "getSourceChargebee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -35741,7 +46822,7 @@ func (s *Sources) GetSourceAircall(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceAircallResponse{ + res := &operations.GetSourceChargebeeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35778,21 +46859,43 @@ func (s *Sources) GetSourceAircall(ctx context.Context, request operations.GetSo } -// GetSourceAirtable - Get Source details -func (s *Sources) GetSourceAirtable(ctx context.Context, request operations.GetSourceAirtableRequest) (*operations.GetSourceAirtableResponse, error) { +// GetSourceChartmogul - Get Source details +func (s *Sources) GetSourceChartmogul(ctx context.Context, request operations.GetSourceChartmogulRequest, opts ...operations.Option) (*operations.GetSourceChartmogulResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAirtable", + OperationID: "getSourceChartmogul", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -35833,7 +46936,7 @@ func (s *Sources) GetSourceAirtable(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceAirtableResponse{ + res := &operations.GetSourceChartmogulResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35870,21 +46973,43 @@ func (s *Sources) GetSourceAirtable(ctx context.Context, request operations.GetS } -// GetSourceAmazonAds - Get Source details -func (s *Sources) GetSourceAmazonAds(ctx context.Context, request operations.GetSourceAmazonAdsRequest) (*operations.GetSourceAmazonAdsResponse, error) { +// GetSourceClazar - Get Source details +func (s *Sources) GetSourceClazar(ctx context.Context, request operations.GetSourceClazarRequest, opts ...operations.Option) (*operations.GetSourceClazarResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAmazonAds", + OperationID: "getSourceClazar", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -35925,7 +47050,7 @@ func (s *Sources) GetSourceAmazonAds(ctx context.Context, request operations.Get } } - res := &operations.GetSourceAmazonAdsResponse{ + res := &operations.GetSourceClazarResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -35962,21 +47087,43 @@ func (s *Sources) GetSourceAmazonAds(ctx context.Context, request operations.Get } -// GetSourceAmazonSellerPartner - Get Source details -func (s *Sources) GetSourceAmazonSellerPartner(ctx context.Context, request operations.GetSourceAmazonSellerPartnerRequest) (*operations.GetSourceAmazonSellerPartnerResponse, error) { +// GetSourceClickhouse - Get Source details +func (s *Sources) GetSourceClickhouse(ctx context.Context, request operations.GetSourceClickhouseRequest, opts ...operations.Option) (*operations.GetSourceClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAmazonSellerPartner", + OperationID: "getSourceClickhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36017,7 +47164,7 @@ func (s *Sources) GetSourceAmazonSellerPartner(ctx context.Context, request oper } } - res := &operations.GetSourceAmazonSellerPartnerResponse{ + res := &operations.GetSourceClickhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36054,21 +47201,43 @@ func (s *Sources) GetSourceAmazonSellerPartner(ctx context.Context, request oper } -// GetSourceAmazonSqs - Get Source details -func (s *Sources) GetSourceAmazonSqs(ctx context.Context, request operations.GetSourceAmazonSqsRequest) (*operations.GetSourceAmazonSqsResponse, error) { +// GetSourceClickupAPI - Get Source details +func (s *Sources) GetSourceClickupAPI(ctx context.Context, request operations.GetSourceClickupAPIRequest, opts ...operations.Option) (*operations.GetSourceClickupAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAmazonSqs", + OperationID: "getSourceClickupApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36109,7 +47278,7 @@ func (s *Sources) GetSourceAmazonSqs(ctx context.Context, request operations.Get } } - res := &operations.GetSourceAmazonSqsResponse{ + res := &operations.GetSourceClickupAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36146,111 +47315,41 @@ func (s *Sources) GetSourceAmazonSqs(ctx context.Context, request operations.Get } -// GetSourceAmplitude - Get Source details -func (s *Sources) GetSourceAmplitude(ctx context.Context, request operations.GetSourceAmplitudeRequest) (*operations.GetSourceAmplitudeResponse, error) { +// GetSourceClockify - Get Source details +func (s *Sources) GetSourceClockify(ctx context.Context, request operations.GetSourceClockifyRequest, opts ...operations.Option) (*operations.GetSourceClockifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAmplitude", + OperationID: "getSourceClockify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceAmplitudeResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceApifyDataset - Get Source details -func (s *Sources) GetSourceApifyDataset(ctx context.Context, request operations.GetSourceApifyDatasetRequest) (*operations.GetSourceApifyDatasetResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceApifyDataset", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -36293,7 +47392,7 @@ func (s *Sources) GetSourceApifyDataset(ctx context.Context, request operations. } } - res := &operations.GetSourceApifyDatasetResponse{ + res := &operations.GetSourceClockifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36330,21 +47429,43 @@ func (s *Sources) GetSourceApifyDataset(ctx context.Context, request operations. } -// GetSourceAppfollow - Get Source details -func (s *Sources) GetSourceAppfollow(ctx context.Context, request operations.GetSourceAppfollowRequest) (*operations.GetSourceAppfollowResponse, error) { +// GetSourceCloseCom - Get Source details +func (s *Sources) GetSourceCloseCom(ctx context.Context, request operations.GetSourceCloseComRequest, opts ...operations.Option) (*operations.GetSourceCloseComResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAppfollow", + OperationID: "getSourceCloseCom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36385,7 +47506,7 @@ func (s *Sources) GetSourceAppfollow(ctx context.Context, request operations.Get } } - res := &operations.GetSourceAppfollowResponse{ + res := &operations.GetSourceCloseComResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36422,21 +47543,43 @@ func (s *Sources) GetSourceAppfollow(ctx context.Context, request operations.Get } -// GetSourceAsana - Get Source details -func (s *Sources) GetSourceAsana(ctx context.Context, request operations.GetSourceAsanaRequest) (*operations.GetSourceAsanaResponse, error) { +// GetSourceCoda - Get Source details +func (s *Sources) GetSourceCoda(ctx context.Context, request operations.GetSourceCodaRequest, opts ...operations.Option) (*operations.GetSourceCodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAsana", + OperationID: "getSourceCoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36477,7 +47620,7 @@ func (s *Sources) GetSourceAsana(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceAsanaResponse{ + res := &operations.GetSourceCodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36514,21 +47657,43 @@ func (s *Sources) GetSourceAsana(ctx context.Context, request operations.GetSour } -// GetSourceAuth0 - Get Source details -func (s *Sources) GetSourceAuth0(ctx context.Context, request operations.GetSourceAuth0Request) (*operations.GetSourceAuth0Response, error) { +// GetSourceCoinAPI - Get Source details +func (s *Sources) GetSourceCoinAPI(ctx context.Context, request operations.GetSourceCoinAPIRequest, opts ...operations.Option) (*operations.GetSourceCoinAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAuth0", + OperationID: "getSourceCoinApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36569,7 +47734,7 @@ func (s *Sources) GetSourceAuth0(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceAuth0Response{ + res := &operations.GetSourceCoinAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36606,21 +47771,43 @@ func (s *Sources) GetSourceAuth0(ctx context.Context, request operations.GetSour } -// GetSourceAwsCloudtrail - Get Source details -func (s *Sources) GetSourceAwsCloudtrail(ctx context.Context, request operations.GetSourceAwsCloudtrailRequest) (*operations.GetSourceAwsCloudtrailResponse, error) { +// GetSourceCoinmarketcap - Get Source details +func (s *Sources) GetSourceCoinmarketcap(ctx context.Context, request operations.GetSourceCoinmarketcapRequest, opts ...operations.Option) (*operations.GetSourceCoinmarketcapResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAwsCloudtrail", + OperationID: "getSourceCoinmarketcap", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36661,7 +47848,7 @@ func (s *Sources) GetSourceAwsCloudtrail(ctx context.Context, request operations } } - res := &operations.GetSourceAwsCloudtrailResponse{ + res := &operations.GetSourceCoinmarketcapResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36698,21 +47885,43 @@ func (s *Sources) GetSourceAwsCloudtrail(ctx context.Context, request operations } -// GetSourceAzureBlobStorage - Get Source details -func (s *Sources) GetSourceAzureBlobStorage(ctx context.Context, request operations.GetSourceAzureBlobStorageRequest) (*operations.GetSourceAzureBlobStorageResponse, error) { +// GetSourceConfigcat - Get Source details +func (s *Sources) GetSourceConfigcat(ctx context.Context, request operations.GetSourceConfigcatRequest, opts ...operations.Option) (*operations.GetSourceConfigcatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAzureBlobStorage", + OperationID: "getSourceConfigcat", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36753,7 +47962,7 @@ func (s *Sources) GetSourceAzureBlobStorage(ctx context.Context, request operati } } - res := &operations.GetSourceAzureBlobStorageResponse{ + res := &operations.GetSourceConfigcatResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36790,21 +47999,43 @@ func (s *Sources) GetSourceAzureBlobStorage(ctx context.Context, request operati } -// GetSourceAzureTable - Get Source details -func (s *Sources) GetSourceAzureTable(ctx context.Context, request operations.GetSourceAzureTableRequest) (*operations.GetSourceAzureTableResponse, error) { +// GetSourceConfluence - Get Source details +func (s *Sources) GetSourceConfluence(ctx context.Context, request operations.GetSourceConfluenceRequest, opts ...operations.Option) (*operations.GetSourceConfluenceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceAzureTable", + OperationID: "getSourceConfluence", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36845,7 +48076,7 @@ func (s *Sources) GetSourceAzureTable(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceAzureTableResponse{ + res := &operations.GetSourceConfluenceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36882,21 +48113,43 @@ func (s *Sources) GetSourceAzureTable(ctx context.Context, request operations.Ge } -// GetSourceBambooHr - Get Source details -func (s *Sources) GetSourceBambooHr(ctx context.Context, request operations.GetSourceBambooHrRequest) (*operations.GetSourceBambooHrResponse, error) { +// GetSourceConvex - Get Source details +func (s *Sources) GetSourceConvex(ctx context.Context, request operations.GetSourceConvexRequest, opts ...operations.Option) (*operations.GetSourceConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceBambooHr", + OperationID: "getSourceConvex", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -36937,7 +48190,7 @@ func (s *Sources) GetSourceBambooHr(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceBambooHrResponse{ + res := &operations.GetSourceConvexResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -36974,21 +48227,43 @@ func (s *Sources) GetSourceBambooHr(ctx context.Context, request operations.GetS } -// GetSourceBigquery - Get Source details -func (s *Sources) GetSourceBigquery(ctx context.Context, request operations.GetSourceBigqueryRequest) (*operations.GetSourceBigqueryResponse, error) { +// GetSourceCustom - Get Source details +func (s *Sources) GetSourceCustom(ctx context.Context, request operations.GetSourceCustomRequest, opts ...operations.Option) (*operations.GetSourceCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceBigquery", + OperationID: "getSourceCustom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37029,7 +48304,7 @@ func (s *Sources) GetSourceBigquery(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceBigqueryResponse{ + res := &operations.GetSourceCustomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37066,21 +48341,43 @@ func (s *Sources) GetSourceBigquery(ctx context.Context, request operations.GetS } -// GetSourceBingAds - Get Source details -func (s *Sources) GetSourceBingAds(ctx context.Context, request operations.GetSourceBingAdsRequest) (*operations.GetSourceBingAdsResponse, error) { +// GetSourceDatadog - Get Source details +func (s *Sources) GetSourceDatadog(ctx context.Context, request operations.GetSourceDatadogRequest, opts ...operations.Option) (*operations.GetSourceDatadogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceBingAds", + OperationID: "getSourceDatadog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37121,7 +48418,7 @@ func (s *Sources) GetSourceBingAds(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceBingAdsResponse{ + res := &operations.GetSourceDatadogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37158,21 +48455,43 @@ func (s *Sources) GetSourceBingAds(ctx context.Context, request operations.GetSo } -// GetSourceBraintree - Get Source details -func (s *Sources) GetSourceBraintree(ctx context.Context, request operations.GetSourceBraintreeRequest) (*operations.GetSourceBraintreeResponse, error) { +// GetSourceDatascope - Get Source details +func (s *Sources) GetSourceDatascope(ctx context.Context, request operations.GetSourceDatascopeRequest, opts ...operations.Option) (*operations.GetSourceDatascopeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceBraintree", + OperationID: "getSourceDatascope", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37213,7 +48532,7 @@ func (s *Sources) GetSourceBraintree(ctx context.Context, request operations.Get } } - res := &operations.GetSourceBraintreeResponse{ + res := &operations.GetSourceDatascopeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37250,21 +48569,43 @@ func (s *Sources) GetSourceBraintree(ctx context.Context, request operations.Get } -// GetSourceBraze - Get Source details -func (s *Sources) GetSourceBraze(ctx context.Context, request operations.GetSourceBrazeRequest) (*operations.GetSourceBrazeResponse, error) { +// GetSourceDelighted - Get Source details +func (s *Sources) GetSourceDelighted(ctx context.Context, request operations.GetSourceDelightedRequest, opts ...operations.Option) (*operations.GetSourceDelightedResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceBraze", + OperationID: "getSourceDelighted", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37305,7 +48646,7 @@ func (s *Sources) GetSourceBraze(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceBrazeResponse{ + res := &operations.GetSourceDelightedResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37342,111 +48683,41 @@ func (s *Sources) GetSourceBraze(ctx context.Context, request operations.GetSour } -// GetSourceCart - Get Source details -func (s *Sources) GetSourceCart(ctx context.Context, request operations.GetSourceCartRequest) (*operations.GetSourceCartResponse, error) { +// GetSourceDixa - Get Source details +func (s *Sources) GetSourceDixa(ctx context.Context, request operations.GetSourceDixaRequest, opts ...operations.Option) (*operations.GetSourceDixaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCart", + OperationID: "getSourceDixa", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceCartResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceChargebee - Get Source details -func (s *Sources) GetSourceChargebee(ctx context.Context, request operations.GetSourceChargebeeRequest) (*operations.GetSourceChargebeeResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceChargebee", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -37489,7 +48760,7 @@ func (s *Sources) GetSourceChargebee(ctx context.Context, request operations.Get } } - res := &operations.GetSourceChargebeeResponse{ + res := &operations.GetSourceDixaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37526,21 +48797,43 @@ func (s *Sources) GetSourceChargebee(ctx context.Context, request operations.Get } -// GetSourceChartmogul - Get Source details -func (s *Sources) GetSourceChartmogul(ctx context.Context, request operations.GetSourceChartmogulRequest) (*operations.GetSourceChartmogulResponse, error) { +// GetSourceDockerhub - Get Source details +func (s *Sources) GetSourceDockerhub(ctx context.Context, request operations.GetSourceDockerhubRequest, opts ...operations.Option) (*operations.GetSourceDockerhubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceChartmogul", + OperationID: "getSourceDockerhub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37581,7 +48874,7 @@ func (s *Sources) GetSourceChartmogul(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceChartmogulResponse{ + res := &operations.GetSourceDockerhubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37618,21 +48911,43 @@ func (s *Sources) GetSourceChartmogul(ctx context.Context, request operations.Ge } -// GetSourceClickhouse - Get Source details -func (s *Sources) GetSourceClickhouse(ctx context.Context, request operations.GetSourceClickhouseRequest) (*operations.GetSourceClickhouseResponse, error) { +// GetSourceDremio - Get Source details +func (s *Sources) GetSourceDremio(ctx context.Context, request operations.GetSourceDremioRequest, opts ...operations.Option) (*operations.GetSourceDremioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceClickhouse", + OperationID: "getSourceDremio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37673,7 +48988,7 @@ func (s *Sources) GetSourceClickhouse(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceClickhouseResponse{ + res := &operations.GetSourceDremioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37710,21 +49025,43 @@ func (s *Sources) GetSourceClickhouse(ctx context.Context, request operations.Ge } -// GetSourceClickupAPI - Get Source details -func (s *Sources) GetSourceClickupAPI(ctx context.Context, request operations.GetSourceClickupAPIRequest) (*operations.GetSourceClickupAPIResponse, error) { +// GetSourceDynamodb - Get Source details +func (s *Sources) GetSourceDynamodb(ctx context.Context, request operations.GetSourceDynamodbRequest, opts ...operations.Option) (*operations.GetSourceDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceClickupApi", + OperationID: "getSourceDynamodb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37765,7 +49102,7 @@ func (s *Sources) GetSourceClickupAPI(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceClickupAPIResponse{ + res := &operations.GetSourceDynamodbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37802,21 +49139,43 @@ func (s *Sources) GetSourceClickupAPI(ctx context.Context, request operations.Ge } -// GetSourceClockify - Get Source details -func (s *Sources) GetSourceClockify(ctx context.Context, request operations.GetSourceClockifyRequest) (*operations.GetSourceClockifyResponse, error) { +// GetSourceEmailoctopus - Get Source details +func (s *Sources) GetSourceEmailoctopus(ctx context.Context, request operations.GetSourceEmailoctopusRequest, opts ...operations.Option) (*operations.GetSourceEmailoctopusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceClockify", + OperationID: "getSourceEmailoctopus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37857,7 +49216,7 @@ func (s *Sources) GetSourceClockify(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceClockifyResponse{ + res := &operations.GetSourceEmailoctopusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37894,21 +49253,43 @@ func (s *Sources) GetSourceClockify(ctx context.Context, request operations.GetS } -// GetSourceCloseCom - Get Source details -func (s *Sources) GetSourceCloseCom(ctx context.Context, request operations.GetSourceCloseComRequest) (*operations.GetSourceCloseComResponse, error) { +// GetSourceExchangeRates - Get Source details +func (s *Sources) GetSourceExchangeRates(ctx context.Context, request operations.GetSourceExchangeRatesRequest, opts ...operations.Option) (*operations.GetSourceExchangeRatesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCloseCom", + OperationID: "getSourceExchangeRates", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -37949,7 +49330,7 @@ func (s *Sources) GetSourceCloseCom(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceCloseComResponse{ + res := &operations.GetSourceExchangeRatesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -37986,21 +49367,43 @@ func (s *Sources) GetSourceCloseCom(ctx context.Context, request operations.GetS } -// GetSourceCoda - Get Source details -func (s *Sources) GetSourceCoda(ctx context.Context, request operations.GetSourceCodaRequest) (*operations.GetSourceCodaResponse, error) { +// GetSourceFacebookMarketing - Get Source details +func (s *Sources) GetSourceFacebookMarketing(ctx context.Context, request operations.GetSourceFacebookMarketingRequest, opts ...operations.Option) (*operations.GetSourceFacebookMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCoda", + OperationID: "getSourceFacebookMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38041,7 +49444,7 @@ func (s *Sources) GetSourceCoda(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceCodaResponse{ + res := &operations.GetSourceFacebookMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38078,21 +49481,43 @@ func (s *Sources) GetSourceCoda(ctx context.Context, request operations.GetSourc } -// GetSourceCoinAPI - Get Source details -func (s *Sources) GetSourceCoinAPI(ctx context.Context, request operations.GetSourceCoinAPIRequest) (*operations.GetSourceCoinAPIResponse, error) { +// GetSourceFaker - Get Source details +func (s *Sources) GetSourceFaker(ctx context.Context, request operations.GetSourceFakerRequest, opts ...operations.Option) (*operations.GetSourceFakerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCoinApi", + OperationID: "getSourceFaker", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38133,7 +49558,7 @@ func (s *Sources) GetSourceCoinAPI(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceCoinAPIResponse{ + res := &operations.GetSourceFakerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38170,21 +49595,43 @@ func (s *Sources) GetSourceCoinAPI(ctx context.Context, request operations.GetSo } -// GetSourceCoinmarketcap - Get Source details -func (s *Sources) GetSourceCoinmarketcap(ctx context.Context, request operations.GetSourceCoinmarketcapRequest) (*operations.GetSourceCoinmarketcapResponse, error) { +// GetSourceFauna - Get Source details +func (s *Sources) GetSourceFauna(ctx context.Context, request operations.GetSourceFaunaRequest, opts ...operations.Option) (*operations.GetSourceFaunaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCoinmarketcap", + OperationID: "getSourceFauna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38225,7 +49672,7 @@ func (s *Sources) GetSourceCoinmarketcap(ctx context.Context, request operations } } - res := &operations.GetSourceCoinmarketcapResponse{ + res := &operations.GetSourceFaunaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38262,21 +49709,43 @@ func (s *Sources) GetSourceCoinmarketcap(ctx context.Context, request operations } -// GetSourceConfigcat - Get Source details -func (s *Sources) GetSourceConfigcat(ctx context.Context, request operations.GetSourceConfigcatRequest) (*operations.GetSourceConfigcatResponse, error) { +// GetSourceFile - Get Source details +func (s *Sources) GetSourceFile(ctx context.Context, request operations.GetSourceFileRequest, opts ...operations.Option) (*operations.GetSourceFileResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceConfigcat", + OperationID: "getSourceFile", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38317,7 +49786,7 @@ func (s *Sources) GetSourceConfigcat(ctx context.Context, request operations.Get } } - res := &operations.GetSourceConfigcatResponse{ + res := &operations.GetSourceFileResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38354,21 +49823,43 @@ func (s *Sources) GetSourceConfigcat(ctx context.Context, request operations.Get } -// GetSourceConfluence - Get Source details -func (s *Sources) GetSourceConfluence(ctx context.Context, request operations.GetSourceConfluenceRequest) (*operations.GetSourceConfluenceResponse, error) { +// GetSourceFirebolt - Get Source details +func (s *Sources) GetSourceFirebolt(ctx context.Context, request operations.GetSourceFireboltRequest, opts ...operations.Option) (*operations.GetSourceFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceConfluence", + OperationID: "getSourceFirebolt", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38409,7 +49900,7 @@ func (s *Sources) GetSourceConfluence(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceConfluenceResponse{ + res := &operations.GetSourceFireboltResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38446,21 +49937,43 @@ func (s *Sources) GetSourceConfluence(ctx context.Context, request operations.Ge } -// GetSourceConvex - Get Source details -func (s *Sources) GetSourceConvex(ctx context.Context, request operations.GetSourceConvexRequest) (*operations.GetSourceConvexResponse, error) { +// GetSourceFleetio - Get Source details +func (s *Sources) GetSourceFleetio(ctx context.Context, request operations.GetSourceFleetioRequest, opts ...operations.Option) (*operations.GetSourceFleetioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceConvex", + OperationID: "getSourceFleetio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38501,7 +50014,7 @@ func (s *Sources) GetSourceConvex(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceConvexResponse{ + res := &operations.GetSourceFleetioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38538,111 +50051,41 @@ func (s *Sources) GetSourceConvex(ctx context.Context, request operations.GetSou } -// GetSourceCustom - Get Source details -func (s *Sources) GetSourceCustom(ctx context.Context, request operations.GetSourceCustomRequest) (*operations.GetSourceCustomResponse, error) { +// GetSourceFreshcaller - Get Source details +func (s *Sources) GetSourceFreshcaller(ctx context.Context, request operations.GetSourceFreshcallerRequest, opts ...operations.Option) (*operations.GetSourceFreshcallerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceCustom", + OperationID: "getSourceFreshcaller", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceCustomResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceDatascope - Get Source details -func (s *Sources) GetSourceDatascope(ctx context.Context, request operations.GetSourceDatascopeRequest) (*operations.GetSourceDatascopeResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceDatascope", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -38685,7 +50128,7 @@ func (s *Sources) GetSourceDatascope(ctx context.Context, request operations.Get } } - res := &operations.GetSourceDatascopeResponse{ + res := &operations.GetSourceFreshcallerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38722,21 +50165,43 @@ func (s *Sources) GetSourceDatascope(ctx context.Context, request operations.Get } -// GetSourceDelighted - Get Source details -func (s *Sources) GetSourceDelighted(ctx context.Context, request operations.GetSourceDelightedRequest) (*operations.GetSourceDelightedResponse, error) { +// GetSourceFreshdesk - Get Source details +func (s *Sources) GetSourceFreshdesk(ctx context.Context, request operations.GetSourceFreshdeskRequest, opts ...operations.Option) (*operations.GetSourceFreshdeskResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceDelighted", + OperationID: "getSourceFreshdesk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38777,7 +50242,7 @@ func (s *Sources) GetSourceDelighted(ctx context.Context, request operations.Get } } - res := &operations.GetSourceDelightedResponse{ + res := &operations.GetSourceFreshdeskResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38814,21 +50279,43 @@ func (s *Sources) GetSourceDelighted(ctx context.Context, request operations.Get } -// GetSourceDixa - Get Source details -func (s *Sources) GetSourceDixa(ctx context.Context, request operations.GetSourceDixaRequest) (*operations.GetSourceDixaResponse, error) { +// GetSourceFreshsales - Get Source details +func (s *Sources) GetSourceFreshsales(ctx context.Context, request operations.GetSourceFreshsalesRequest, opts ...operations.Option) (*operations.GetSourceFreshsalesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceDixa", + OperationID: "getSourceFreshsales", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38869,7 +50356,7 @@ func (s *Sources) GetSourceDixa(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceDixaResponse{ + res := &operations.GetSourceFreshsalesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38906,21 +50393,43 @@ func (s *Sources) GetSourceDixa(ctx context.Context, request operations.GetSourc } -// GetSourceDockerhub - Get Source details -func (s *Sources) GetSourceDockerhub(ctx context.Context, request operations.GetSourceDockerhubRequest) (*operations.GetSourceDockerhubResponse, error) { +// GetSourceGainsightPx - Get Source details +func (s *Sources) GetSourceGainsightPx(ctx context.Context, request operations.GetSourceGainsightPxRequest, opts ...operations.Option) (*operations.GetSourceGainsightPxResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceDockerhub", + OperationID: "getSourceGainsightPx", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -38961,7 +50470,7 @@ func (s *Sources) GetSourceDockerhub(ctx context.Context, request operations.Get } } - res := &operations.GetSourceDockerhubResponse{ + res := &operations.GetSourceGainsightPxResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -38998,21 +50507,43 @@ func (s *Sources) GetSourceDockerhub(ctx context.Context, request operations.Get } -// GetSourceDremio - Get Source details -func (s *Sources) GetSourceDremio(ctx context.Context, request operations.GetSourceDremioRequest) (*operations.GetSourceDremioResponse, error) { +// GetSourceGcs - Get Source details +func (s *Sources) GetSourceGcs(ctx context.Context, request operations.GetSourceGcsRequest, opts ...operations.Option) (*operations.GetSourceGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceDremio", + OperationID: "getSourceGcs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39053,7 +50584,7 @@ func (s *Sources) GetSourceDremio(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceDremioResponse{ + res := &operations.GetSourceGcsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39090,21 +50621,43 @@ func (s *Sources) GetSourceDremio(ctx context.Context, request operations.GetSou } -// GetSourceDynamodb - Get Source details -func (s *Sources) GetSourceDynamodb(ctx context.Context, request operations.GetSourceDynamodbRequest) (*operations.GetSourceDynamodbResponse, error) { +// GetSourceGetlago - Get Source details +func (s *Sources) GetSourceGetlago(ctx context.Context, request operations.GetSourceGetlagoRequest, opts ...operations.Option) (*operations.GetSourceGetlagoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceDynamodb", + OperationID: "getSourceGetlago", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39145,7 +50698,7 @@ func (s *Sources) GetSourceDynamodb(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceDynamodbResponse{ + res := &operations.GetSourceGetlagoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39182,21 +50735,43 @@ func (s *Sources) GetSourceDynamodb(ctx context.Context, request operations.GetS } -// GetSourceEmailoctopus - Get Source details -func (s *Sources) GetSourceEmailoctopus(ctx context.Context, request operations.GetSourceEmailoctopusRequest) (*operations.GetSourceEmailoctopusResponse, error) { +// GetSourceGithub - Get Source details +func (s *Sources) GetSourceGithub(ctx context.Context, request operations.GetSourceGithubRequest, opts ...operations.Option) (*operations.GetSourceGithubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceEmailoctopus", + OperationID: "getSourceGithub", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39237,7 +50812,7 @@ func (s *Sources) GetSourceEmailoctopus(ctx context.Context, request operations. } } - res := &operations.GetSourceEmailoctopusResponse{ + res := &operations.GetSourceGithubResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39274,21 +50849,43 @@ func (s *Sources) GetSourceEmailoctopus(ctx context.Context, request operations. } -// GetSourceExchangeRates - Get Source details -func (s *Sources) GetSourceExchangeRates(ctx context.Context, request operations.GetSourceExchangeRatesRequest) (*operations.GetSourceExchangeRatesResponse, error) { +// GetSourceGitlab - Get Source details +func (s *Sources) GetSourceGitlab(ctx context.Context, request operations.GetSourceGitlabRequest, opts ...operations.Option) (*operations.GetSourceGitlabResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceExchangeRates", + OperationID: "getSourceGitlab", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39329,7 +50926,7 @@ func (s *Sources) GetSourceExchangeRates(ctx context.Context, request operations } } - res := &operations.GetSourceExchangeRatesResponse{ + res := &operations.GetSourceGitlabResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39366,21 +50963,43 @@ func (s *Sources) GetSourceExchangeRates(ctx context.Context, request operations } -// GetSourceFacebookMarketing - Get Source details -func (s *Sources) GetSourceFacebookMarketing(ctx context.Context, request operations.GetSourceFacebookMarketingRequest) (*operations.GetSourceFacebookMarketingResponse, error) { +// GetSourceGlassfrog - Get Source details +func (s *Sources) GetSourceGlassfrog(ctx context.Context, request operations.GetSourceGlassfrogRequest, opts ...operations.Option) (*operations.GetSourceGlassfrogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFacebookMarketing", + OperationID: "getSourceGlassfrog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39421,7 +51040,7 @@ func (s *Sources) GetSourceFacebookMarketing(ctx context.Context, request operat } } - res := &operations.GetSourceFacebookMarketingResponse{ + res := &operations.GetSourceGlassfrogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39458,21 +51077,43 @@ func (s *Sources) GetSourceFacebookMarketing(ctx context.Context, request operat } -// GetSourceFaker - Get Source details -func (s *Sources) GetSourceFaker(ctx context.Context, request operations.GetSourceFakerRequest) (*operations.GetSourceFakerResponse, error) { +// GetSourceGnews - Get Source details +func (s *Sources) GetSourceGnews(ctx context.Context, request operations.GetSourceGnewsRequest, opts ...operations.Option) (*operations.GetSourceGnewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFaker", + OperationID: "getSourceGnews", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39513,7 +51154,7 @@ func (s *Sources) GetSourceFaker(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceFakerResponse{ + res := &operations.GetSourceGnewsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39550,21 +51191,43 @@ func (s *Sources) GetSourceFaker(ctx context.Context, request operations.GetSour } -// GetSourceFauna - Get Source details -func (s *Sources) GetSourceFauna(ctx context.Context, request operations.GetSourceFaunaRequest) (*operations.GetSourceFaunaResponse, error) { +// GetSourceGoldcast - Get Source details +func (s *Sources) GetSourceGoldcast(ctx context.Context, request operations.GetSourceGoldcastRequest, opts ...operations.Option) (*operations.GetSourceGoldcastResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFauna", + OperationID: "getSourceGoldcast", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39605,7 +51268,7 @@ func (s *Sources) GetSourceFauna(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceFaunaResponse{ + res := &operations.GetSourceGoldcastResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39642,21 +51305,43 @@ func (s *Sources) GetSourceFauna(ctx context.Context, request operations.GetSour } -// GetSourceFile - Get Source details -func (s *Sources) GetSourceFile(ctx context.Context, request operations.GetSourceFileRequest) (*operations.GetSourceFileResponse, error) { +// GetSourceGoogleAds - Get Source details +func (s *Sources) GetSourceGoogleAds(ctx context.Context, request operations.GetSourceGoogleAdsRequest, opts ...operations.Option) (*operations.GetSourceGoogleAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFile", + OperationID: "getSourceGoogleAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39697,7 +51382,7 @@ func (s *Sources) GetSourceFile(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceFileResponse{ + res := &operations.GetSourceGoogleAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39734,111 +51419,41 @@ func (s *Sources) GetSourceFile(ctx context.Context, request operations.GetSourc } -// GetSourceFirebolt - Get Source details -func (s *Sources) GetSourceFirebolt(ctx context.Context, request operations.GetSourceFireboltRequest) (*operations.GetSourceFireboltResponse, error) { +// GetSourceGoogleAnalyticsDataAPI - Get Source details +func (s *Sources) GetSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.GetSourceGoogleAnalyticsDataAPIRequest, opts ...operations.Option) (*operations.GetSourceGoogleAnalyticsDataAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFirebolt", + OperationID: "getSourceGoogleAnalyticsDataApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceFireboltResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceFleetio - Get Source details -func (s *Sources) GetSourceFleetio(ctx context.Context, request operations.GetSourceFleetioRequest) (*operations.GetSourceFleetioResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceFleetio", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -39881,7 +51496,7 @@ func (s *Sources) GetSourceFleetio(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceFleetioResponse{ + res := &operations.GetSourceGoogleAnalyticsDataAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -39918,21 +51533,43 @@ func (s *Sources) GetSourceFleetio(ctx context.Context, request operations.GetSo } -// GetSourceFreshcaller - Get Source details -func (s *Sources) GetSourceFreshcaller(ctx context.Context, request operations.GetSourceFreshcallerRequest) (*operations.GetSourceFreshcallerResponse, error) { +// GetSourceGoogleDirectory - Get Source details +func (s *Sources) GetSourceGoogleDirectory(ctx context.Context, request operations.GetSourceGoogleDirectoryRequest, opts ...operations.Option) (*operations.GetSourceGoogleDirectoryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFreshcaller", + OperationID: "getSourceGoogleDirectory", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -39973,7 +51610,7 @@ func (s *Sources) GetSourceFreshcaller(ctx context.Context, request operations.G } } - res := &operations.GetSourceFreshcallerResponse{ + res := &operations.GetSourceGoogleDirectoryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40010,21 +51647,43 @@ func (s *Sources) GetSourceFreshcaller(ctx context.Context, request operations.G } -// GetSourceFreshdesk - Get Source details -func (s *Sources) GetSourceFreshdesk(ctx context.Context, request operations.GetSourceFreshdeskRequest) (*operations.GetSourceFreshdeskResponse, error) { +// GetSourceGoogleDrive - Get Source details +func (s *Sources) GetSourceGoogleDrive(ctx context.Context, request operations.GetSourceGoogleDriveRequest, opts ...operations.Option) (*operations.GetSourceGoogleDriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFreshdesk", + OperationID: "getSourceGoogleDrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40065,7 +51724,7 @@ func (s *Sources) GetSourceFreshdesk(ctx context.Context, request operations.Get } } - res := &operations.GetSourceFreshdeskResponse{ + res := &operations.GetSourceGoogleDriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40102,21 +51761,43 @@ func (s *Sources) GetSourceFreshdesk(ctx context.Context, request operations.Get } -// GetSourceFreshsales - Get Source details -func (s *Sources) GetSourceFreshsales(ctx context.Context, request operations.GetSourceFreshsalesRequest) (*operations.GetSourceFreshsalesResponse, error) { +// GetSourceGooglePagespeedInsights - Get Source details +func (s *Sources) GetSourceGooglePagespeedInsights(ctx context.Context, request operations.GetSourceGooglePagespeedInsightsRequest, opts ...operations.Option) (*operations.GetSourceGooglePagespeedInsightsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceFreshsales", + OperationID: "getSourceGooglePagespeedInsights", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40157,7 +51838,7 @@ func (s *Sources) GetSourceFreshsales(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceFreshsalesResponse{ + res := &operations.GetSourceGooglePagespeedInsightsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40194,21 +51875,43 @@ func (s *Sources) GetSourceFreshsales(ctx context.Context, request operations.Ge } -// GetSourceGainsightPx - Get Source details -func (s *Sources) GetSourceGainsightPx(ctx context.Context, request operations.GetSourceGainsightPxRequest) (*operations.GetSourceGainsightPxResponse, error) { +// GetSourceGoogleSearchConsole - Get Source details +func (s *Sources) GetSourceGoogleSearchConsole(ctx context.Context, request operations.GetSourceGoogleSearchConsoleRequest, opts ...operations.Option) (*operations.GetSourceGoogleSearchConsoleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGainsightPx", + OperationID: "getSourceGoogleSearchConsole", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40249,7 +51952,7 @@ func (s *Sources) GetSourceGainsightPx(ctx context.Context, request operations.G } } - res := &operations.GetSourceGainsightPxResponse{ + res := &operations.GetSourceGoogleSearchConsoleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40286,21 +51989,43 @@ func (s *Sources) GetSourceGainsightPx(ctx context.Context, request operations.G } -// GetSourceGcs - Get Source details -func (s *Sources) GetSourceGcs(ctx context.Context, request operations.GetSourceGcsRequest) (*operations.GetSourceGcsResponse, error) { +// GetSourceGoogleSheets - Get Source details +func (s *Sources) GetSourceGoogleSheets(ctx context.Context, request operations.GetSourceGoogleSheetsRequest, opts ...operations.Option) (*operations.GetSourceGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGcs", + OperationID: "getSourceGoogleSheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40341,7 +52066,7 @@ func (s *Sources) GetSourceGcs(ctx context.Context, request operations.GetSource } } - res := &operations.GetSourceGcsResponse{ + res := &operations.GetSourceGoogleSheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40378,21 +52103,43 @@ func (s *Sources) GetSourceGcs(ctx context.Context, request operations.GetSource } -// GetSourceGetlago - Get Source details -func (s *Sources) GetSourceGetlago(ctx context.Context, request operations.GetSourceGetlagoRequest) (*operations.GetSourceGetlagoResponse, error) { +// GetSourceGoogleWebfonts - Get Source details +func (s *Sources) GetSourceGoogleWebfonts(ctx context.Context, request operations.GetSourceGoogleWebfontsRequest, opts ...operations.Option) (*operations.GetSourceGoogleWebfontsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGetlago", + OperationID: "getSourceGoogleWebfonts", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40433,7 +52180,7 @@ func (s *Sources) GetSourceGetlago(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceGetlagoResponse{ + res := &operations.GetSourceGoogleWebfontsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40470,21 +52217,43 @@ func (s *Sources) GetSourceGetlago(ctx context.Context, request operations.GetSo } -// GetSourceGithub - Get Source details -func (s *Sources) GetSourceGithub(ctx context.Context, request operations.GetSourceGithubRequest) (*operations.GetSourceGithubResponse, error) { +// GetSourceGreenhouse - Get Source details +func (s *Sources) GetSourceGreenhouse(ctx context.Context, request operations.GetSourceGreenhouseRequest, opts ...operations.Option) (*operations.GetSourceGreenhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGithub", + OperationID: "getSourceGreenhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40525,7 +52294,7 @@ func (s *Sources) GetSourceGithub(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceGithubResponse{ + res := &operations.GetSourceGreenhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40562,21 +52331,43 @@ func (s *Sources) GetSourceGithub(ctx context.Context, request operations.GetSou } -// GetSourceGitlab - Get Source details -func (s *Sources) GetSourceGitlab(ctx context.Context, request operations.GetSourceGitlabRequest) (*operations.GetSourceGitlabResponse, error) { +// GetSourceGridly - Get Source details +func (s *Sources) GetSourceGridly(ctx context.Context, request operations.GetSourceGridlyRequest, opts ...operations.Option) (*operations.GetSourceGridlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGitlab", + OperationID: "getSourceGridly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40617,7 +52408,7 @@ func (s *Sources) GetSourceGitlab(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceGitlabResponse{ + res := &operations.GetSourceGridlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40654,21 +52445,43 @@ func (s *Sources) GetSourceGitlab(ctx context.Context, request operations.GetSou } -// GetSourceGlassfrog - Get Source details -func (s *Sources) GetSourceGlassfrog(ctx context.Context, request operations.GetSourceGlassfrogRequest) (*operations.GetSourceGlassfrogResponse, error) { +// GetSourceHarvest - Get Source details +func (s *Sources) GetSourceHarvest(ctx context.Context, request operations.GetSourceHarvestRequest, opts ...operations.Option) (*operations.GetSourceHarvestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGlassfrog", + OperationID: "getSourceHarvest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40709,7 +52522,7 @@ func (s *Sources) GetSourceGlassfrog(ctx context.Context, request operations.Get } } - res := &operations.GetSourceGlassfrogResponse{ + res := &operations.GetSourceHarvestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40746,21 +52559,43 @@ func (s *Sources) GetSourceGlassfrog(ctx context.Context, request operations.Get } -// GetSourceGnews - Get Source details -func (s *Sources) GetSourceGnews(ctx context.Context, request operations.GetSourceGnewsRequest) (*operations.GetSourceGnewsResponse, error) { +// GetSourceHubplanner - Get Source details +func (s *Sources) GetSourceHubplanner(ctx context.Context, request operations.GetSourceHubplannerRequest, opts ...operations.Option) (*operations.GetSourceHubplannerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGnews", + OperationID: "getSourceHubplanner", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40801,7 +52636,7 @@ func (s *Sources) GetSourceGnews(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceGnewsResponse{ + res := &operations.GetSourceHubplannerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40838,21 +52673,43 @@ func (s *Sources) GetSourceGnews(ctx context.Context, request operations.GetSour } -// GetSourceGoogleAds - Get Source details -func (s *Sources) GetSourceGoogleAds(ctx context.Context, request operations.GetSourceGoogleAdsRequest) (*operations.GetSourceGoogleAdsResponse, error) { +// GetSourceHubspot - Get Source details +func (s *Sources) GetSourceHubspot(ctx context.Context, request operations.GetSourceHubspotRequest, opts ...operations.Option) (*operations.GetSourceHubspotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleAds", + OperationID: "getSourceHubspot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -40893,7 +52750,7 @@ func (s *Sources) GetSourceGoogleAds(ctx context.Context, request operations.Get } } - res := &operations.GetSourceGoogleAdsResponse{ + res := &operations.GetSourceHubspotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -40930,111 +52787,41 @@ func (s *Sources) GetSourceGoogleAds(ctx context.Context, request operations.Get } -// GetSourceGoogleAnalyticsDataAPI - Get Source details -func (s *Sources) GetSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.GetSourceGoogleAnalyticsDataAPIRequest) (*operations.GetSourceGoogleAnalyticsDataAPIResponse, error) { +// GetSourceInsightly - Get Source details +func (s *Sources) GetSourceInsightly(ctx context.Context, request operations.GetSourceInsightlyRequest, opts ...operations.Option) (*operations.GetSourceInsightlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleAnalyticsDataApi", + OperationID: "getSourceInsightly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceGoogleAnalyticsDataAPIResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceGoogleAnalyticsV4ServiceAccountOnly - Get Source details -func (s *Sources) GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Context, request operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) (*operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceGoogleAnalyticsV4ServiceAccountOnly", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -41077,7 +52864,7 @@ func (s *Sources) GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Conte } } - res := &operations.GetSourceGoogleAnalyticsV4ServiceAccountOnlyResponse{ + res := &operations.GetSourceInsightlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41114,111 +52901,41 @@ func (s *Sources) GetSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Conte } -// GetSourceGoogleDirectory - Get Source details -func (s *Sources) GetSourceGoogleDirectory(ctx context.Context, request operations.GetSourceGoogleDirectoryRequest) (*operations.GetSourceGoogleDirectoryResponse, error) { +// GetSourceInstagram - Get Source details +func (s *Sources) GetSourceInstagram(ctx context.Context, request operations.GetSourceInstagramRequest, opts ...operations.Option) (*operations.GetSourceInstagramResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleDirectory", + OperationID: "getSourceInstagram", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.GetSourceGoogleDirectoryResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceGoogleDrive - Get Source details -func (s *Sources) GetSourceGoogleDrive(ctx context.Context, request operations.GetSourceGoogleDriveRequest) (*operations.GetSourceGoogleDriveResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceGoogleDrive", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -41261,7 +52978,7 @@ func (s *Sources) GetSourceGoogleDrive(ctx context.Context, request operations.G } } - res := &operations.GetSourceGoogleDriveResponse{ + res := &operations.GetSourceInstagramResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41298,21 +53015,43 @@ func (s *Sources) GetSourceGoogleDrive(ctx context.Context, request operations.G } -// GetSourceGooglePagespeedInsights - Get Source details -func (s *Sources) GetSourceGooglePagespeedInsights(ctx context.Context, request operations.GetSourceGooglePagespeedInsightsRequest) (*operations.GetSourceGooglePagespeedInsightsResponse, error) { +// GetSourceInstatus - Get Source details +func (s *Sources) GetSourceInstatus(ctx context.Context, request operations.GetSourceInstatusRequest, opts ...operations.Option) (*operations.GetSourceInstatusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGooglePagespeedInsights", + OperationID: "getSourceInstatus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41353,7 +53092,7 @@ func (s *Sources) GetSourceGooglePagespeedInsights(ctx context.Context, request } } - res := &operations.GetSourceGooglePagespeedInsightsResponse{ + res := &operations.GetSourceInstatusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41390,21 +53129,43 @@ func (s *Sources) GetSourceGooglePagespeedInsights(ctx context.Context, request } -// GetSourceGoogleSearchConsole - Get Source details -func (s *Sources) GetSourceGoogleSearchConsole(ctx context.Context, request operations.GetSourceGoogleSearchConsoleRequest) (*operations.GetSourceGoogleSearchConsoleResponse, error) { +// GetSourceIntercom - Get Source details +func (s *Sources) GetSourceIntercom(ctx context.Context, request operations.GetSourceIntercomRequest, opts ...operations.Option) (*operations.GetSourceIntercomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleSearchConsole", + OperationID: "getSourceIntercom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41445,7 +53206,7 @@ func (s *Sources) GetSourceGoogleSearchConsole(ctx context.Context, request oper } } - res := &operations.GetSourceGoogleSearchConsoleResponse{ + res := &operations.GetSourceIntercomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41482,21 +53243,43 @@ func (s *Sources) GetSourceGoogleSearchConsole(ctx context.Context, request oper } -// GetSourceGoogleSheets - Get Source details -func (s *Sources) GetSourceGoogleSheets(ctx context.Context, request operations.GetSourceGoogleSheetsRequest) (*operations.GetSourceGoogleSheetsResponse, error) { +// GetSourceIp2whois - Get Source details +func (s *Sources) GetSourceIp2whois(ctx context.Context, request operations.GetSourceIp2whoisRequest, opts ...operations.Option) (*operations.GetSourceIp2whoisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleSheets", + OperationID: "getSourceIp2whois", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41537,7 +53320,7 @@ func (s *Sources) GetSourceGoogleSheets(ctx context.Context, request operations. } } - res := &operations.GetSourceGoogleSheetsResponse{ + res := &operations.GetSourceIp2whoisResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41574,21 +53357,43 @@ func (s *Sources) GetSourceGoogleSheets(ctx context.Context, request operations. } -// GetSourceGoogleWebfonts - Get Source details -func (s *Sources) GetSourceGoogleWebfonts(ctx context.Context, request operations.GetSourceGoogleWebfontsRequest) (*operations.GetSourceGoogleWebfontsResponse, error) { +// GetSourceIterable - Get Source details +func (s *Sources) GetSourceIterable(ctx context.Context, request operations.GetSourceIterableRequest, opts ...operations.Option) (*operations.GetSourceIterableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGoogleWebfonts", + OperationID: "getSourceIterable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41629,7 +53434,7 @@ func (s *Sources) GetSourceGoogleWebfonts(ctx context.Context, request operation } } - res := &operations.GetSourceGoogleWebfontsResponse{ + res := &operations.GetSourceIterableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41666,21 +53471,43 @@ func (s *Sources) GetSourceGoogleWebfonts(ctx context.Context, request operation } -// GetSourceGreenhouse - Get Source details -func (s *Sources) GetSourceGreenhouse(ctx context.Context, request operations.GetSourceGreenhouseRequest) (*operations.GetSourceGreenhouseResponse, error) { +// GetSourceJira - Get Source details +func (s *Sources) GetSourceJira(ctx context.Context, request operations.GetSourceJiraRequest, opts ...operations.Option) (*operations.GetSourceJiraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGreenhouse", + OperationID: "getSourceJira", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41721,7 +53548,7 @@ func (s *Sources) GetSourceGreenhouse(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceGreenhouseResponse{ + res := &operations.GetSourceJiraResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41758,21 +53585,43 @@ func (s *Sources) GetSourceGreenhouse(ctx context.Context, request operations.Ge } -// GetSourceGridly - Get Source details -func (s *Sources) GetSourceGridly(ctx context.Context, request operations.GetSourceGridlyRequest) (*operations.GetSourceGridlyResponse, error) { +// GetSourceK6Cloud - Get Source details +func (s *Sources) GetSourceK6Cloud(ctx context.Context, request operations.GetSourceK6CloudRequest, opts ...operations.Option) (*operations.GetSourceK6CloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceGridly", + OperationID: "getSourceK6Cloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41813,7 +53662,7 @@ func (s *Sources) GetSourceGridly(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceGridlyResponse{ + res := &operations.GetSourceK6CloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41850,21 +53699,43 @@ func (s *Sources) GetSourceGridly(ctx context.Context, request operations.GetSou } -// GetSourceHarvest - Get Source details -func (s *Sources) GetSourceHarvest(ctx context.Context, request operations.GetSourceHarvestRequest) (*operations.GetSourceHarvestResponse, error) { +// GetSourceKlarna - Get Source details +func (s *Sources) GetSourceKlarna(ctx context.Context, request operations.GetSourceKlarnaRequest, opts ...operations.Option) (*operations.GetSourceKlarnaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceHarvest", + OperationID: "getSourceKlarna", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41905,7 +53776,7 @@ func (s *Sources) GetSourceHarvest(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceHarvestResponse{ + res := &operations.GetSourceKlarnaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -41942,21 +53813,43 @@ func (s *Sources) GetSourceHarvest(ctx context.Context, request operations.GetSo } -// GetSourceHubplanner - Get Source details -func (s *Sources) GetSourceHubplanner(ctx context.Context, request operations.GetSourceHubplannerRequest) (*operations.GetSourceHubplannerResponse, error) { +// GetSourceKlaviyo - Get Source details +func (s *Sources) GetSourceKlaviyo(ctx context.Context, request operations.GetSourceKlaviyoRequest, opts ...operations.Option) (*operations.GetSourceKlaviyoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceHubplanner", + OperationID: "getSourceKlaviyo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -41997,7 +53890,7 @@ func (s *Sources) GetSourceHubplanner(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceHubplannerResponse{ + res := &operations.GetSourceKlaviyoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42034,21 +53927,43 @@ func (s *Sources) GetSourceHubplanner(ctx context.Context, request operations.Ge } -// GetSourceHubspot - Get Source details -func (s *Sources) GetSourceHubspot(ctx context.Context, request operations.GetSourceHubspotRequest) (*operations.GetSourceHubspotResponse, error) { +// GetSourceKyve - Get Source details +func (s *Sources) GetSourceKyve(ctx context.Context, request operations.GetSourceKyveRequest, opts ...operations.Option) (*operations.GetSourceKyveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceHubspot", + OperationID: "getSourceKyve", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42089,7 +54004,7 @@ func (s *Sources) GetSourceHubspot(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceHubspotResponse{ + res := &operations.GetSourceKyveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42126,21 +54041,43 @@ func (s *Sources) GetSourceHubspot(ctx context.Context, request operations.GetSo } -// GetSourceInsightly - Get Source details -func (s *Sources) GetSourceInsightly(ctx context.Context, request operations.GetSourceInsightlyRequest) (*operations.GetSourceInsightlyResponse, error) { +// GetSourceLaunchdarkly - Get Source details +func (s *Sources) GetSourceLaunchdarkly(ctx context.Context, request operations.GetSourceLaunchdarklyRequest, opts ...operations.Option) (*operations.GetSourceLaunchdarklyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceInsightly", + OperationID: "getSourceLaunchdarkly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42181,7 +54118,7 @@ func (s *Sources) GetSourceInsightly(ctx context.Context, request operations.Get } } - res := &operations.GetSourceInsightlyResponse{ + res := &operations.GetSourceLaunchdarklyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42218,21 +54155,43 @@ func (s *Sources) GetSourceInsightly(ctx context.Context, request operations.Get } -// GetSourceInstagram - Get Source details -func (s *Sources) GetSourceInstagram(ctx context.Context, request operations.GetSourceInstagramRequest) (*operations.GetSourceInstagramResponse, error) { +// GetSourceLemlist - Get Source details +func (s *Sources) GetSourceLemlist(ctx context.Context, request operations.GetSourceLemlistRequest, opts ...operations.Option) (*operations.GetSourceLemlistResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceInstagram", + OperationID: "getSourceLemlist", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42273,7 +54232,7 @@ func (s *Sources) GetSourceInstagram(ctx context.Context, request operations.Get } } - res := &operations.GetSourceInstagramResponse{ + res := &operations.GetSourceLemlistResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42310,21 +54269,43 @@ func (s *Sources) GetSourceInstagram(ctx context.Context, request operations.Get } -// GetSourceInstatus - Get Source details -func (s *Sources) GetSourceInstatus(ctx context.Context, request operations.GetSourceInstatusRequest) (*operations.GetSourceInstatusResponse, error) { +// GetSourceLeverHiring - Get Source details +func (s *Sources) GetSourceLeverHiring(ctx context.Context, request operations.GetSourceLeverHiringRequest, opts ...operations.Option) (*operations.GetSourceLeverHiringResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceInstatus", + OperationID: "getSourceLeverHiring", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42365,7 +54346,7 @@ func (s *Sources) GetSourceInstatus(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceInstatusResponse{ + res := &operations.GetSourceLeverHiringResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42402,21 +54383,43 @@ func (s *Sources) GetSourceInstatus(ctx context.Context, request operations.GetS } -// GetSourceIntercom - Get Source details -func (s *Sources) GetSourceIntercom(ctx context.Context, request operations.GetSourceIntercomRequest) (*operations.GetSourceIntercomResponse, error) { +// GetSourceLinkedinAds - Get Source details +func (s *Sources) GetSourceLinkedinAds(ctx context.Context, request operations.GetSourceLinkedinAdsRequest, opts ...operations.Option) (*operations.GetSourceLinkedinAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceIntercom", + OperationID: "getSourceLinkedinAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42457,7 +54460,7 @@ func (s *Sources) GetSourceIntercom(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceIntercomResponse{ + res := &operations.GetSourceLinkedinAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42494,21 +54497,43 @@ func (s *Sources) GetSourceIntercom(ctx context.Context, request operations.GetS } -// GetSourceIp2whois - Get Source details -func (s *Sources) GetSourceIp2whois(ctx context.Context, request operations.GetSourceIp2whoisRequest) (*operations.GetSourceIp2whoisResponse, error) { +// GetSourceLinkedinPages - Get Source details +func (s *Sources) GetSourceLinkedinPages(ctx context.Context, request operations.GetSourceLinkedinPagesRequest, opts ...operations.Option) (*operations.GetSourceLinkedinPagesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceIp2whois", + OperationID: "getSourceLinkedinPages", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42549,7 +54574,7 @@ func (s *Sources) GetSourceIp2whois(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceIp2whoisResponse{ + res := &operations.GetSourceLinkedinPagesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42586,21 +54611,43 @@ func (s *Sources) GetSourceIp2whois(ctx context.Context, request operations.GetS } -// GetSourceIterable - Get Source details -func (s *Sources) GetSourceIterable(ctx context.Context, request operations.GetSourceIterableRequest) (*operations.GetSourceIterableResponse, error) { +// GetSourceLinnworks - Get Source details +func (s *Sources) GetSourceLinnworks(ctx context.Context, request operations.GetSourceLinnworksRequest, opts ...operations.Option) (*operations.GetSourceLinnworksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceIterable", + OperationID: "getSourceLinnworks", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42641,7 +54688,7 @@ func (s *Sources) GetSourceIterable(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceIterableResponse{ + res := &operations.GetSourceLinnworksResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42678,21 +54725,43 @@ func (s *Sources) GetSourceIterable(ctx context.Context, request operations.GetS } -// GetSourceJira - Get Source details -func (s *Sources) GetSourceJira(ctx context.Context, request operations.GetSourceJiraRequest) (*operations.GetSourceJiraResponse, error) { +// GetSourceLokalise - Get Source details +func (s *Sources) GetSourceLokalise(ctx context.Context, request operations.GetSourceLokaliseRequest, opts ...operations.Option) (*operations.GetSourceLokaliseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceJira", + OperationID: "getSourceLokalise", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42733,7 +54802,7 @@ func (s *Sources) GetSourceJira(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceJiraResponse{ + res := &operations.GetSourceLokaliseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42770,21 +54839,43 @@ func (s *Sources) GetSourceJira(ctx context.Context, request operations.GetSourc } -// GetSourceK6Cloud - Get Source details -func (s *Sources) GetSourceK6Cloud(ctx context.Context, request operations.GetSourceK6CloudRequest) (*operations.GetSourceK6CloudResponse, error) { +// GetSourceMailchimp - Get Source details +func (s *Sources) GetSourceMailchimp(ctx context.Context, request operations.GetSourceMailchimpRequest, opts ...operations.Option) (*operations.GetSourceMailchimpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceK6Cloud", + OperationID: "getSourceMailchimp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42825,7 +54916,7 @@ func (s *Sources) GetSourceK6Cloud(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceK6CloudResponse{ + res := &operations.GetSourceMailchimpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42862,21 +54953,43 @@ func (s *Sources) GetSourceK6Cloud(ctx context.Context, request operations.GetSo } -// GetSourceKlarna - Get Source details -func (s *Sources) GetSourceKlarna(ctx context.Context, request operations.GetSourceKlarnaRequest) (*operations.GetSourceKlarnaResponse, error) { +// GetSourceMailgun - Get Source details +func (s *Sources) GetSourceMailgun(ctx context.Context, request operations.GetSourceMailgunRequest, opts ...operations.Option) (*operations.GetSourceMailgunResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceKlarna", + OperationID: "getSourceMailgun", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -42917,7 +55030,7 @@ func (s *Sources) GetSourceKlarna(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceKlarnaResponse{ + res := &operations.GetSourceMailgunResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -42954,21 +55067,43 @@ func (s *Sources) GetSourceKlarna(ctx context.Context, request operations.GetSou } -// GetSourceKlaviyo - Get Source details -func (s *Sources) GetSourceKlaviyo(ctx context.Context, request operations.GetSourceKlaviyoRequest) (*operations.GetSourceKlaviyoResponse, error) { +// GetSourceMailjetSms - Get Source details +func (s *Sources) GetSourceMailjetSms(ctx context.Context, request operations.GetSourceMailjetSmsRequest, opts ...operations.Option) (*operations.GetSourceMailjetSmsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceKlaviyo", + OperationID: "getSourceMailjetSms", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43009,7 +55144,7 @@ func (s *Sources) GetSourceKlaviyo(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceKlaviyoResponse{ + res := &operations.GetSourceMailjetSmsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43046,21 +55181,43 @@ func (s *Sources) GetSourceKlaviyo(ctx context.Context, request operations.GetSo } -// GetSourceKyve - Get Source details -func (s *Sources) GetSourceKyve(ctx context.Context, request operations.GetSourceKyveRequest) (*operations.GetSourceKyveResponse, error) { +// GetSourceMarketo - Get Source details +func (s *Sources) GetSourceMarketo(ctx context.Context, request operations.GetSourceMarketoRequest, opts ...operations.Option) (*operations.GetSourceMarketoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceKyve", + OperationID: "getSourceMarketo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43101,7 +55258,7 @@ func (s *Sources) GetSourceKyve(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceKyveResponse{ + res := &operations.GetSourceMarketoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43138,21 +55295,43 @@ func (s *Sources) GetSourceKyve(ctx context.Context, request operations.GetSourc } -// GetSourceLaunchdarkly - Get Source details -func (s *Sources) GetSourceLaunchdarkly(ctx context.Context, request operations.GetSourceLaunchdarklyRequest) (*operations.GetSourceLaunchdarklyResponse, error) { +// GetSourceMetabase - Get Source details +func (s *Sources) GetSourceMetabase(ctx context.Context, request operations.GetSourceMetabaseRequest, opts ...operations.Option) (*operations.GetSourceMetabaseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLaunchdarkly", + OperationID: "getSourceMetabase", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43193,7 +55372,7 @@ func (s *Sources) GetSourceLaunchdarkly(ctx context.Context, request operations. } } - res := &operations.GetSourceLaunchdarklyResponse{ + res := &operations.GetSourceMetabaseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43230,21 +55409,43 @@ func (s *Sources) GetSourceLaunchdarkly(ctx context.Context, request operations. } -// GetSourceLemlist - Get Source details -func (s *Sources) GetSourceLemlist(ctx context.Context, request operations.GetSourceLemlistRequest) (*operations.GetSourceLemlistResponse, error) { +// GetSourceMicrosoftOnedrive - Get Source details +func (s *Sources) GetSourceMicrosoftOnedrive(ctx context.Context, request operations.GetSourceMicrosoftOnedriveRequest, opts ...operations.Option) (*operations.GetSourceMicrosoftOnedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLemlist", + OperationID: "getSourceMicrosoftOnedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43285,7 +55486,7 @@ func (s *Sources) GetSourceLemlist(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceLemlistResponse{ + res := &operations.GetSourceMicrosoftOnedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43322,111 +55523,41 @@ func (s *Sources) GetSourceLemlist(ctx context.Context, request operations.GetSo } -// GetSourceLeverHiring - Get Source details -func (s *Sources) GetSourceLeverHiring(ctx context.Context, request operations.GetSourceLeverHiringRequest) (*operations.GetSourceLeverHiringResponse, error) { +// GetSourceMicrosoftSharepoint - Get Source details +func (s *Sources) GetSourceMicrosoftSharepoint(ctx context.Context, request operations.GetSourceMicrosoftSharepointRequest, opts ...operations.Option) (*operations.GetSourceMicrosoftSharepointResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLeverHiring", + OperationID: "getSourceMicrosoftSharepoint", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceLeverHiringResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceLinkedinAds - Get Source details -func (s *Sources) GetSourceLinkedinAds(ctx context.Context, request operations.GetSourceLinkedinAdsRequest) (*operations.GetSourceLinkedinAdsResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceLinkedinAds", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -43469,7 +55600,7 @@ func (s *Sources) GetSourceLinkedinAds(ctx context.Context, request operations.G } } - res := &operations.GetSourceLinkedinAdsResponse{ + res := &operations.GetSourceMicrosoftSharepointResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43506,21 +55637,43 @@ func (s *Sources) GetSourceLinkedinAds(ctx context.Context, request operations.G } -// GetSourceLinkedinPages - Get Source details -func (s *Sources) GetSourceLinkedinPages(ctx context.Context, request operations.GetSourceLinkedinPagesRequest) (*operations.GetSourceLinkedinPagesResponse, error) { +// GetSourceMicrosoftTeams - Get Source details +func (s *Sources) GetSourceMicrosoftTeams(ctx context.Context, request operations.GetSourceMicrosoftTeamsRequest, opts ...operations.Option) (*operations.GetSourceMicrosoftTeamsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLinkedinPages", + OperationID: "getSourceMicrosoftTeams", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43561,7 +55714,7 @@ func (s *Sources) GetSourceLinkedinPages(ctx context.Context, request operations } } - res := &operations.GetSourceLinkedinPagesResponse{ + res := &operations.GetSourceMicrosoftTeamsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43598,21 +55751,43 @@ func (s *Sources) GetSourceLinkedinPages(ctx context.Context, request operations } -// GetSourceLinnworks - Get Source details -func (s *Sources) GetSourceLinnworks(ctx context.Context, request operations.GetSourceLinnworksRequest) (*operations.GetSourceLinnworksResponse, error) { +// GetSourceMixpanel - Get Source details +func (s *Sources) GetSourceMixpanel(ctx context.Context, request operations.GetSourceMixpanelRequest, opts ...operations.Option) (*operations.GetSourceMixpanelResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLinnworks", + OperationID: "getSourceMixpanel", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43653,7 +55828,7 @@ func (s *Sources) GetSourceLinnworks(ctx context.Context, request operations.Get } } - res := &operations.GetSourceLinnworksResponse{ + res := &operations.GetSourceMixpanelResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43690,21 +55865,43 @@ func (s *Sources) GetSourceLinnworks(ctx context.Context, request operations.Get } -// GetSourceLokalise - Get Source details -func (s *Sources) GetSourceLokalise(ctx context.Context, request operations.GetSourceLokaliseRequest) (*operations.GetSourceLokaliseResponse, error) { +// GetSourceMonday - Get Source details +func (s *Sources) GetSourceMonday(ctx context.Context, request operations.GetSourceMondayRequest, opts ...operations.Option) (*operations.GetSourceMondayResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceLokalise", + OperationID: "getSourceMonday", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43745,7 +55942,7 @@ func (s *Sources) GetSourceLokalise(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceLokaliseResponse{ + res := &operations.GetSourceMondayResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43782,21 +55979,43 @@ func (s *Sources) GetSourceLokalise(ctx context.Context, request operations.GetS } -// GetSourceMailchimp - Get Source details -func (s *Sources) GetSourceMailchimp(ctx context.Context, request operations.GetSourceMailchimpRequest) (*operations.GetSourceMailchimpResponse, error) { +// GetSourceMongodbInternalPoc - Get Source details +func (s *Sources) GetSourceMongodbInternalPoc(ctx context.Context, request operations.GetSourceMongodbInternalPocRequest, opts ...operations.Option) (*operations.GetSourceMongodbInternalPocResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMailchimp", + OperationID: "getSourceMongodbInternalPoc", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43837,7 +56056,7 @@ func (s *Sources) GetSourceMailchimp(ctx context.Context, request operations.Get } } - res := &operations.GetSourceMailchimpResponse{ + res := &operations.GetSourceMongodbInternalPocResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43874,21 +56093,43 @@ func (s *Sources) GetSourceMailchimp(ctx context.Context, request operations.Get } -// GetSourceMailgun - Get Source details -func (s *Sources) GetSourceMailgun(ctx context.Context, request operations.GetSourceMailgunRequest) (*operations.GetSourceMailgunResponse, error) { +// GetSourceMongodbV2 - Get Source details +func (s *Sources) GetSourceMongodbV2(ctx context.Context, request operations.GetSourceMongodbV2Request, opts ...operations.Option) (*operations.GetSourceMongodbV2Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMailgun", + OperationID: "getSourceMongodbV2", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -43929,7 +56170,7 @@ func (s *Sources) GetSourceMailgun(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceMailgunResponse{ + res := &operations.GetSourceMongodbV2Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -43966,21 +56207,43 @@ func (s *Sources) GetSourceMailgun(ctx context.Context, request operations.GetSo } -// GetSourceMailjetSms - Get Source details -func (s *Sources) GetSourceMailjetSms(ctx context.Context, request operations.GetSourceMailjetSmsRequest) (*operations.GetSourceMailjetSmsResponse, error) { +// GetSourceMssql - Get Source details +func (s *Sources) GetSourceMssql(ctx context.Context, request operations.GetSourceMssqlRequest, opts ...operations.Option) (*operations.GetSourceMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMailjetSms", + OperationID: "getSourceMssql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44021,7 +56284,7 @@ func (s *Sources) GetSourceMailjetSms(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceMailjetSmsResponse{ + res := &operations.GetSourceMssqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44058,21 +56321,43 @@ func (s *Sources) GetSourceMailjetSms(ctx context.Context, request operations.Ge } -// GetSourceMarketo - Get Source details -func (s *Sources) GetSourceMarketo(ctx context.Context, request operations.GetSourceMarketoRequest) (*operations.GetSourceMarketoResponse, error) { +// GetSourceMyHours - Get Source details +func (s *Sources) GetSourceMyHours(ctx context.Context, request operations.GetSourceMyHoursRequest, opts ...operations.Option) (*operations.GetSourceMyHoursResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMarketo", + OperationID: "getSourceMyHours", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44113,7 +56398,7 @@ func (s *Sources) GetSourceMarketo(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceMarketoResponse{ + res := &operations.GetSourceMyHoursResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44150,21 +56435,43 @@ func (s *Sources) GetSourceMarketo(ctx context.Context, request operations.GetSo } -// GetSourceMetabase - Get Source details -func (s *Sources) GetSourceMetabase(ctx context.Context, request operations.GetSourceMetabaseRequest) (*operations.GetSourceMetabaseResponse, error) { +// GetSourceMysql - Get Source details +func (s *Sources) GetSourceMysql(ctx context.Context, request operations.GetSourceMysqlRequest, opts ...operations.Option) (*operations.GetSourceMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMetabase", + OperationID: "getSourceMysql", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44205,7 +56512,7 @@ func (s *Sources) GetSourceMetabase(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceMetabaseResponse{ + res := &operations.GetSourceMysqlResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44242,21 +56549,43 @@ func (s *Sources) GetSourceMetabase(ctx context.Context, request operations.GetS } -// GetSourceMicrosoftOnedrive - Get Source details -func (s *Sources) GetSourceMicrosoftOnedrive(ctx context.Context, request operations.GetSourceMicrosoftOnedriveRequest) (*operations.GetSourceMicrosoftOnedriveResponse, error) { +// GetSourceNetsuite - Get Source details +func (s *Sources) GetSourceNetsuite(ctx context.Context, request operations.GetSourceNetsuiteRequest, opts ...operations.Option) (*operations.GetSourceNetsuiteResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMicrosoftOnedrive", + OperationID: "getSourceNetsuite", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44297,7 +56626,7 @@ func (s *Sources) GetSourceMicrosoftOnedrive(ctx context.Context, request operat } } - res := &operations.GetSourceMicrosoftOnedriveResponse{ + res := &operations.GetSourceNetsuiteResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44334,21 +56663,43 @@ func (s *Sources) GetSourceMicrosoftOnedrive(ctx context.Context, request operat } -// GetSourceMicrosoftSharepoint - Get Source details -func (s *Sources) GetSourceMicrosoftSharepoint(ctx context.Context, request operations.GetSourceMicrosoftSharepointRequest) (*operations.GetSourceMicrosoftSharepointResponse, error) { +// GetSourceNotion - Get Source details +func (s *Sources) GetSourceNotion(ctx context.Context, request operations.GetSourceNotionRequest, opts ...operations.Option) (*operations.GetSourceNotionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMicrosoftSharepoint", + OperationID: "getSourceNotion", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44389,7 +56740,7 @@ func (s *Sources) GetSourceMicrosoftSharepoint(ctx context.Context, request oper } } - res := &operations.GetSourceMicrosoftSharepointResponse{ + res := &operations.GetSourceNotionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44426,21 +56777,43 @@ func (s *Sources) GetSourceMicrosoftSharepoint(ctx context.Context, request oper } -// GetSourceMicrosoftTeams - Get Source details -func (s *Sources) GetSourceMicrosoftTeams(ctx context.Context, request operations.GetSourceMicrosoftTeamsRequest) (*operations.GetSourceMicrosoftTeamsResponse, error) { +// GetSourceNytimes - Get Source details +func (s *Sources) GetSourceNytimes(ctx context.Context, request operations.GetSourceNytimesRequest, opts ...operations.Option) (*operations.GetSourceNytimesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMicrosoftTeams", + OperationID: "getSourceNytimes", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44481,7 +56854,7 @@ func (s *Sources) GetSourceMicrosoftTeams(ctx context.Context, request operation } } - res := &operations.GetSourceMicrosoftTeamsResponse{ + res := &operations.GetSourceNytimesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44518,21 +56891,43 @@ func (s *Sources) GetSourceMicrosoftTeams(ctx context.Context, request operation } -// GetSourceMixpanel - Get Source details -func (s *Sources) GetSourceMixpanel(ctx context.Context, request operations.GetSourceMixpanelRequest) (*operations.GetSourceMixpanelResponse, error) { +// GetSourceOkta - Get Source details +func (s *Sources) GetSourceOkta(ctx context.Context, request operations.GetSourceOktaRequest, opts ...operations.Option) (*operations.GetSourceOktaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMixpanel", + OperationID: "getSourceOkta", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44573,7 +56968,7 @@ func (s *Sources) GetSourceMixpanel(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceMixpanelResponse{ + res := &operations.GetSourceOktaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44610,21 +57005,43 @@ func (s *Sources) GetSourceMixpanel(ctx context.Context, request operations.GetS } -// GetSourceMonday - Get Source details -func (s *Sources) GetSourceMonday(ctx context.Context, request operations.GetSourceMondayRequest) (*operations.GetSourceMondayResponse, error) { +// GetSourceOmnisend - Get Source details +func (s *Sources) GetSourceOmnisend(ctx context.Context, request operations.GetSourceOmnisendRequest, opts ...operations.Option) (*operations.GetSourceOmnisendResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMonday", + OperationID: "getSourceOmnisend", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44665,7 +57082,7 @@ func (s *Sources) GetSourceMonday(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceMondayResponse{ + res := &operations.GetSourceOmnisendResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44702,21 +57119,43 @@ func (s *Sources) GetSourceMonday(ctx context.Context, request operations.GetSou } -// GetSourceMongodbInternalPoc - Get Source details -func (s *Sources) GetSourceMongodbInternalPoc(ctx context.Context, request operations.GetSourceMongodbInternalPocRequest) (*operations.GetSourceMongodbInternalPocResponse, error) { +// GetSourceOnesignal - Get Source details +func (s *Sources) GetSourceOnesignal(ctx context.Context, request operations.GetSourceOnesignalRequest, opts ...operations.Option) (*operations.GetSourceOnesignalResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMongodbInternalPoc", + OperationID: "getSourceOnesignal", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44757,7 +57196,7 @@ func (s *Sources) GetSourceMongodbInternalPoc(ctx context.Context, request opera } } - res := &operations.GetSourceMongodbInternalPocResponse{ + res := &operations.GetSourceOnesignalResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44794,21 +57233,43 @@ func (s *Sources) GetSourceMongodbInternalPoc(ctx context.Context, request opera } -// GetSourceMongodbV2 - Get Source details -func (s *Sources) GetSourceMongodbV2(ctx context.Context, request operations.GetSourceMongodbV2Request) (*operations.GetSourceMongodbV2Response, error) { +// GetSourceOracle - Get Source details +func (s *Sources) GetSourceOracle(ctx context.Context, request operations.GetSourceOracleRequest, opts ...operations.Option) (*operations.GetSourceOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMongodbV2", + OperationID: "getSourceOracle", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44849,7 +57310,7 @@ func (s *Sources) GetSourceMongodbV2(ctx context.Context, request operations.Get } } - res := &operations.GetSourceMongodbV2Response{ + res := &operations.GetSourceOracleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44886,21 +57347,43 @@ func (s *Sources) GetSourceMongodbV2(ctx context.Context, request operations.Get } -// GetSourceMssql - Get Source details -func (s *Sources) GetSourceMssql(ctx context.Context, request operations.GetSourceMssqlRequest) (*operations.GetSourceMssqlResponse, error) { +// GetSourceOrb - Get Source details +func (s *Sources) GetSourceOrb(ctx context.Context, request operations.GetSourceOrbRequest, opts ...operations.Option) (*operations.GetSourceOrbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMssql", + OperationID: "getSourceOrb", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -44941,7 +57424,7 @@ func (s *Sources) GetSourceMssql(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceMssqlResponse{ + res := &operations.GetSourceOrbResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -44978,21 +57461,43 @@ func (s *Sources) GetSourceMssql(ctx context.Context, request operations.GetSour } -// GetSourceMyHours - Get Source details -func (s *Sources) GetSourceMyHours(ctx context.Context, request operations.GetSourceMyHoursRequest) (*operations.GetSourceMyHoursResponse, error) { +// GetSourceOrbit - Get Source details +func (s *Sources) GetSourceOrbit(ctx context.Context, request operations.GetSourceOrbitRequest, opts ...operations.Option) (*operations.GetSourceOrbitResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMyHours", + OperationID: "getSourceOrbit", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45033,7 +57538,7 @@ func (s *Sources) GetSourceMyHours(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceMyHoursResponse{ + res := &operations.GetSourceOrbitResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45070,21 +57575,43 @@ func (s *Sources) GetSourceMyHours(ctx context.Context, request operations.GetSo } -// GetSourceMysql - Get Source details -func (s *Sources) GetSourceMysql(ctx context.Context, request operations.GetSourceMysqlRequest) (*operations.GetSourceMysqlResponse, error) { +// GetSourceOutbrainAmplify - Get Source details +func (s *Sources) GetSourceOutbrainAmplify(ctx context.Context, request operations.GetSourceOutbrainAmplifyRequest, opts ...operations.Option) (*operations.GetSourceOutbrainAmplifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceMysql", + OperationID: "getSourceOutbrainAmplify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45125,7 +57652,7 @@ func (s *Sources) GetSourceMysql(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceMysqlResponse{ + res := &operations.GetSourceOutbrainAmplifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45162,21 +57689,43 @@ func (s *Sources) GetSourceMysql(ctx context.Context, request operations.GetSour } -// GetSourceNetsuite - Get Source details -func (s *Sources) GetSourceNetsuite(ctx context.Context, request operations.GetSourceNetsuiteRequest) (*operations.GetSourceNetsuiteResponse, error) { +// GetSourceOutreach - Get Source details +func (s *Sources) GetSourceOutreach(ctx context.Context, request operations.GetSourceOutreachRequest, opts ...operations.Option) (*operations.GetSourceOutreachResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceNetsuite", + OperationID: "getSourceOutreach", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45217,7 +57766,7 @@ func (s *Sources) GetSourceNetsuite(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceNetsuiteResponse{ + res := &operations.GetSourceOutreachResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45254,21 +57803,43 @@ func (s *Sources) GetSourceNetsuite(ctx context.Context, request operations.GetS } -// GetSourceNotion - Get Source details -func (s *Sources) GetSourceNotion(ctx context.Context, request operations.GetSourceNotionRequest) (*operations.GetSourceNotionResponse, error) { +// GetSourcePaypalTransaction - Get Source details +func (s *Sources) GetSourcePaypalTransaction(ctx context.Context, request operations.GetSourcePaypalTransactionRequest, opts ...operations.Option) (*operations.GetSourcePaypalTransactionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceNotion", + OperationID: "getSourcePaypalTransaction", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45309,7 +57880,7 @@ func (s *Sources) GetSourceNotion(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceNotionResponse{ + res := &operations.GetSourcePaypalTransactionResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45346,21 +57917,43 @@ func (s *Sources) GetSourceNotion(ctx context.Context, request operations.GetSou } -// GetSourceNytimes - Get Source details -func (s *Sources) GetSourceNytimes(ctx context.Context, request operations.GetSourceNytimesRequest) (*operations.GetSourceNytimesResponse, error) { +// GetSourcePaystack - Get Source details +func (s *Sources) GetSourcePaystack(ctx context.Context, request operations.GetSourcePaystackRequest, opts ...operations.Option) (*operations.GetSourcePaystackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceNytimes", + OperationID: "getSourcePaystack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45401,7 +57994,7 @@ func (s *Sources) GetSourceNytimes(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceNytimesResponse{ + res := &operations.GetSourcePaystackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45438,21 +58031,43 @@ func (s *Sources) GetSourceNytimes(ctx context.Context, request operations.GetSo } -// GetSourceOkta - Get Source details -func (s *Sources) GetSourceOkta(ctx context.Context, request operations.GetSourceOktaRequest) (*operations.GetSourceOktaResponse, error) { +// GetSourcePendo - Get Source details +func (s *Sources) GetSourcePendo(ctx context.Context, request operations.GetSourcePendoRequest, opts ...operations.Option) (*operations.GetSourcePendoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOkta", + OperationID: "getSourcePendo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45493,7 +58108,7 @@ func (s *Sources) GetSourceOkta(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceOktaResponse{ + res := &operations.GetSourcePendoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45530,21 +58145,43 @@ func (s *Sources) GetSourceOkta(ctx context.Context, request operations.GetSourc } -// GetSourceOmnisend - Get Source details -func (s *Sources) GetSourceOmnisend(ctx context.Context, request operations.GetSourceOmnisendRequest) (*operations.GetSourceOmnisendResponse, error) { +// GetSourcePersistiq - Get Source details +func (s *Sources) GetSourcePersistiq(ctx context.Context, request operations.GetSourcePersistiqRequest, opts ...operations.Option) (*operations.GetSourcePersistiqResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOmnisend", + OperationID: "getSourcePersistiq", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45585,7 +58222,7 @@ func (s *Sources) GetSourceOmnisend(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceOmnisendResponse{ + res := &operations.GetSourcePersistiqResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45622,21 +58259,43 @@ func (s *Sources) GetSourceOmnisend(ctx context.Context, request operations.GetS } -// GetSourceOnesignal - Get Source details -func (s *Sources) GetSourceOnesignal(ctx context.Context, request operations.GetSourceOnesignalRequest) (*operations.GetSourceOnesignalResponse, error) { +// GetSourcePexelsAPI - Get Source details +func (s *Sources) GetSourcePexelsAPI(ctx context.Context, request operations.GetSourcePexelsAPIRequest, opts ...operations.Option) (*operations.GetSourcePexelsAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOnesignal", + OperationID: "getSourcePexelsApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45677,7 +58336,7 @@ func (s *Sources) GetSourceOnesignal(ctx context.Context, request operations.Get } } - res := &operations.GetSourceOnesignalResponse{ + res := &operations.GetSourcePexelsAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45714,21 +58373,43 @@ func (s *Sources) GetSourceOnesignal(ctx context.Context, request operations.Get } -// GetSourceOracle - Get Source details -func (s *Sources) GetSourceOracle(ctx context.Context, request operations.GetSourceOracleRequest) (*operations.GetSourceOracleResponse, error) { +// GetSourcePinterest - Get Source details +func (s *Sources) GetSourcePinterest(ctx context.Context, request operations.GetSourcePinterestRequest, opts ...operations.Option) (*operations.GetSourcePinterestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOracle", + OperationID: "getSourcePinterest", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45769,7 +58450,7 @@ func (s *Sources) GetSourceOracle(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceOracleResponse{ + res := &operations.GetSourcePinterestResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45806,21 +58487,43 @@ func (s *Sources) GetSourceOracle(ctx context.Context, request operations.GetSou } -// GetSourceOrb - Get Source details -func (s *Sources) GetSourceOrb(ctx context.Context, request operations.GetSourceOrbRequest) (*operations.GetSourceOrbResponse, error) { +// GetSourcePipedrive - Get Source details +func (s *Sources) GetSourcePipedrive(ctx context.Context, request operations.GetSourcePipedriveRequest, opts ...operations.Option) (*operations.GetSourcePipedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOrb", + OperationID: "getSourcePipedrive", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45861,7 +58564,7 @@ func (s *Sources) GetSourceOrb(ctx context.Context, request operations.GetSource } } - res := &operations.GetSourceOrbResponse{ + res := &operations.GetSourcePipedriveResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45898,21 +58601,43 @@ func (s *Sources) GetSourceOrb(ctx context.Context, request operations.GetSource } -// GetSourceOrbit - Get Source details -func (s *Sources) GetSourceOrbit(ctx context.Context, request operations.GetSourceOrbitRequest) (*operations.GetSourceOrbitResponse, error) { +// GetSourcePocket - Get Source details +func (s *Sources) GetSourcePocket(ctx context.Context, request operations.GetSourcePocketRequest, opts ...operations.Option) (*operations.GetSourcePocketResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOrbit", + OperationID: "getSourcePocket", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -45953,7 +58678,7 @@ func (s *Sources) GetSourceOrbit(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceOrbitResponse{ + res := &operations.GetSourcePocketResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -45990,21 +58715,43 @@ func (s *Sources) GetSourceOrbit(ctx context.Context, request operations.GetSour } -// GetSourceOutbrainAmplify - Get Source details -func (s *Sources) GetSourceOutbrainAmplify(ctx context.Context, request operations.GetSourceOutbrainAmplifyRequest) (*operations.GetSourceOutbrainAmplifyResponse, error) { +// GetSourcePokeapi - Get Source details +func (s *Sources) GetSourcePokeapi(ctx context.Context, request operations.GetSourcePokeapiRequest, opts ...operations.Option) (*operations.GetSourcePokeapiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOutbrainAmplify", + OperationID: "getSourcePokeapi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46045,7 +58792,7 @@ func (s *Sources) GetSourceOutbrainAmplify(ctx context.Context, request operatio } } - res := &operations.GetSourceOutbrainAmplifyResponse{ + res := &operations.GetSourcePokeapiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46082,111 +58829,41 @@ func (s *Sources) GetSourceOutbrainAmplify(ctx context.Context, request operatio } -// GetSourceOutreach - Get Source details -func (s *Sources) GetSourceOutreach(ctx context.Context, request operations.GetSourceOutreachRequest) (*operations.GetSourceOutreachResponse, error) { +// GetSourcePolygonStockAPI - Get Source details +func (s *Sources) GetSourcePolygonStockAPI(ctx context.Context, request operations.GetSourcePolygonStockAPIRequest, opts ...operations.Option) (*operations.GetSourcePolygonStockAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceOutreach", + OperationID: "getSourcePolygonStockApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceOutreachResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourcePaypalTransaction - Get Source details -func (s *Sources) GetSourcePaypalTransaction(ctx context.Context, request operations.GetSourcePaypalTransactionRequest) (*operations.GetSourcePaypalTransactionResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourcePaypalTransaction", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -46229,7 +58906,7 @@ func (s *Sources) GetSourcePaypalTransaction(ctx context.Context, request operat } } - res := &operations.GetSourcePaypalTransactionResponse{ + res := &operations.GetSourcePolygonStockAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46266,21 +58943,43 @@ func (s *Sources) GetSourcePaypalTransaction(ctx context.Context, request operat } -// GetSourcePaystack - Get Source details -func (s *Sources) GetSourcePaystack(ctx context.Context, request operations.GetSourcePaystackRequest) (*operations.GetSourcePaystackResponse, error) { +// GetSourcePostgres - Get Source details +func (s *Sources) GetSourcePostgres(ctx context.Context, request operations.GetSourcePostgresRequest, opts ...operations.Option) (*operations.GetSourcePostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePaystack", + OperationID: "getSourcePostgres", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46321,7 +59020,7 @@ func (s *Sources) GetSourcePaystack(ctx context.Context, request operations.GetS } } - res := &operations.GetSourcePaystackResponse{ + res := &operations.GetSourcePostgresResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46358,21 +59057,43 @@ func (s *Sources) GetSourcePaystack(ctx context.Context, request operations.GetS } -// GetSourcePendo - Get Source details -func (s *Sources) GetSourcePendo(ctx context.Context, request operations.GetSourcePendoRequest) (*operations.GetSourcePendoResponse, error) { +// GetSourcePosthog - Get Source details +func (s *Sources) GetSourcePosthog(ctx context.Context, request operations.GetSourcePosthogRequest, opts ...operations.Option) (*operations.GetSourcePosthogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePendo", + OperationID: "getSourcePosthog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46413,7 +59134,7 @@ func (s *Sources) GetSourcePendo(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourcePendoResponse{ + res := &operations.GetSourcePosthogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46450,21 +59171,43 @@ func (s *Sources) GetSourcePendo(ctx context.Context, request operations.GetSour } -// GetSourcePersistiq - Get Source details -func (s *Sources) GetSourcePersistiq(ctx context.Context, request operations.GetSourcePersistiqRequest) (*operations.GetSourcePersistiqResponse, error) { +// GetSourcePostmarkapp - Get Source details +func (s *Sources) GetSourcePostmarkapp(ctx context.Context, request operations.GetSourcePostmarkappRequest, opts ...operations.Option) (*operations.GetSourcePostmarkappResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePersistiq", + OperationID: "getSourcePostmarkapp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46505,7 +59248,7 @@ func (s *Sources) GetSourcePersistiq(ctx context.Context, request operations.Get } } - res := &operations.GetSourcePersistiqResponse{ + res := &operations.GetSourcePostmarkappResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46542,21 +59285,43 @@ func (s *Sources) GetSourcePersistiq(ctx context.Context, request operations.Get } -// GetSourcePexelsAPI - Get Source details -func (s *Sources) GetSourcePexelsAPI(ctx context.Context, request operations.GetSourcePexelsAPIRequest) (*operations.GetSourcePexelsAPIResponse, error) { +// GetSourcePrestashop - Get Source details +func (s *Sources) GetSourcePrestashop(ctx context.Context, request operations.GetSourcePrestashopRequest, opts ...operations.Option) (*operations.GetSourcePrestashopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePexelsApi", + OperationID: "getSourcePrestashop", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46597,7 +59362,7 @@ func (s *Sources) GetSourcePexelsAPI(ctx context.Context, request operations.Get } } - res := &operations.GetSourcePexelsAPIResponse{ + res := &operations.GetSourcePrestashopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46634,21 +59399,43 @@ func (s *Sources) GetSourcePexelsAPI(ctx context.Context, request operations.Get } -// GetSourcePinterest - Get Source details -func (s *Sources) GetSourcePinterest(ctx context.Context, request operations.GetSourcePinterestRequest) (*operations.GetSourcePinterestResponse, error) { +// GetSourcePypi - Get Source details +func (s *Sources) GetSourcePypi(ctx context.Context, request operations.GetSourcePypiRequest, opts ...operations.Option) (*operations.GetSourcePypiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePinterest", + OperationID: "getSourcePypi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46689,7 +59476,7 @@ func (s *Sources) GetSourcePinterest(ctx context.Context, request operations.Get } } - res := &operations.GetSourcePinterestResponse{ + res := &operations.GetSourcePypiResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46726,21 +59513,43 @@ func (s *Sources) GetSourcePinterest(ctx context.Context, request operations.Get } -// GetSourcePipedrive - Get Source details -func (s *Sources) GetSourcePipedrive(ctx context.Context, request operations.GetSourcePipedriveRequest) (*operations.GetSourcePipedriveResponse, error) { +// GetSourceQualaroo - Get Source details +func (s *Sources) GetSourceQualaroo(ctx context.Context, request operations.GetSourceQualarooRequest, opts ...operations.Option) (*operations.GetSourceQualarooResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePipedrive", + OperationID: "getSourceQualaroo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46781,7 +59590,7 @@ func (s *Sources) GetSourcePipedrive(ctx context.Context, request operations.Get } } - res := &operations.GetSourcePipedriveResponse{ + res := &operations.GetSourceQualarooResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46818,21 +59627,43 @@ func (s *Sources) GetSourcePipedrive(ctx context.Context, request operations.Get } -// GetSourcePocket - Get Source details -func (s *Sources) GetSourcePocket(ctx context.Context, request operations.GetSourcePocketRequest) (*operations.GetSourcePocketResponse, error) { +// GetSourceRailz - Get Source details +func (s *Sources) GetSourceRailz(ctx context.Context, request operations.GetSourceRailzRequest, opts ...operations.Option) (*operations.GetSourceRailzResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePocket", + OperationID: "getSourceRailz", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46873,7 +59704,7 @@ func (s *Sources) GetSourcePocket(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourcePocketResponse{ + res := &operations.GetSourceRailzResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -46910,21 +59741,43 @@ func (s *Sources) GetSourcePocket(ctx context.Context, request operations.GetSou } -// GetSourcePokeapi - Get Source details -func (s *Sources) GetSourcePokeapi(ctx context.Context, request operations.GetSourcePokeapiRequest) (*operations.GetSourcePokeapiResponse, error) { +// GetSourceRecharge - Get Source details +func (s *Sources) GetSourceRecharge(ctx context.Context, request operations.GetSourceRechargeRequest, opts ...operations.Option) (*operations.GetSourceRechargeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePokeapi", + OperationID: "getSourceRecharge", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -46965,7 +59818,7 @@ func (s *Sources) GetSourcePokeapi(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourcePokeapiResponse{ + res := &operations.GetSourceRechargeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47002,21 +59855,43 @@ func (s *Sources) GetSourcePokeapi(ctx context.Context, request operations.GetSo } -// GetSourcePolygonStockAPI - Get Source details -func (s *Sources) GetSourcePolygonStockAPI(ctx context.Context, request operations.GetSourcePolygonStockAPIRequest) (*operations.GetSourcePolygonStockAPIResponse, error) { +// GetSourceRecreation - Get Source details +func (s *Sources) GetSourceRecreation(ctx context.Context, request operations.GetSourceRecreationRequest, opts ...operations.Option) (*operations.GetSourceRecreationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePolygonStockApi", + OperationID: "getSourceRecreation", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47057,7 +59932,7 @@ func (s *Sources) GetSourcePolygonStockAPI(ctx context.Context, request operatio } } - res := &operations.GetSourcePolygonStockAPIResponse{ + res := &operations.GetSourceRecreationResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47094,21 +59969,43 @@ func (s *Sources) GetSourcePolygonStockAPI(ctx context.Context, request operatio } -// GetSourcePostgres - Get Source details -func (s *Sources) GetSourcePostgres(ctx context.Context, request operations.GetSourcePostgresRequest) (*operations.GetSourcePostgresResponse, error) { +// GetSourceRecruitee - Get Source details +func (s *Sources) GetSourceRecruitee(ctx context.Context, request operations.GetSourceRecruiteeRequest, opts ...operations.Option) (*operations.GetSourceRecruiteeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePostgres", + OperationID: "getSourceRecruitee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47149,7 +60046,7 @@ func (s *Sources) GetSourcePostgres(ctx context.Context, request operations.GetS } } - res := &operations.GetSourcePostgresResponse{ + res := &operations.GetSourceRecruiteeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47186,21 +60083,43 @@ func (s *Sources) GetSourcePostgres(ctx context.Context, request operations.GetS } -// GetSourcePosthog - Get Source details -func (s *Sources) GetSourcePosthog(ctx context.Context, request operations.GetSourcePosthogRequest) (*operations.GetSourcePosthogResponse, error) { +// GetSourceRecurly - Get Source details +func (s *Sources) GetSourceRecurly(ctx context.Context, request operations.GetSourceRecurlyRequest, opts ...operations.Option) (*operations.GetSourceRecurlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePosthog", + OperationID: "getSourceRecurly", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47241,7 +60160,7 @@ func (s *Sources) GetSourcePosthog(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourcePosthogResponse{ + res := &operations.GetSourceRecurlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47278,111 +60197,41 @@ func (s *Sources) GetSourcePosthog(ctx context.Context, request operations.GetSo } -// GetSourcePostmarkapp - Get Source details -func (s *Sources) GetSourcePostmarkapp(ctx context.Context, request operations.GetSourcePostmarkappRequest) (*operations.GetSourcePostmarkappResponse, error) { +// GetSourceRedshift - Get Source details +func (s *Sources) GetSourceRedshift(ctx context.Context, request operations.GetSourceRedshiftRequest, opts ...operations.Option) (*operations.GetSourceRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePostmarkapp", + OperationID: "getSourceRedshift", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourcePostmarkappResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourcePrestashop - Get Source details -func (s *Sources) GetSourcePrestashop(ctx context.Context, request operations.GetSourcePrestashopRequest) (*operations.GetSourcePrestashopResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourcePrestashop", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -47425,7 +60274,7 @@ func (s *Sources) GetSourcePrestashop(ctx context.Context, request operations.Ge } } - res := &operations.GetSourcePrestashopResponse{ + res := &operations.GetSourceRedshiftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47462,21 +60311,43 @@ func (s *Sources) GetSourcePrestashop(ctx context.Context, request operations.Ge } -// GetSourcePunkAPI - Get Source details -func (s *Sources) GetSourcePunkAPI(ctx context.Context, request operations.GetSourcePunkAPIRequest) (*operations.GetSourcePunkAPIResponse, error) { +// GetSourceRetently - Get Source details +func (s *Sources) GetSourceRetently(ctx context.Context, request operations.GetSourceRetentlyRequest, opts ...operations.Option) (*operations.GetSourceRetentlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePunkApi", + OperationID: "getSourceRetently", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47517,7 +60388,7 @@ func (s *Sources) GetSourcePunkAPI(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourcePunkAPIResponse{ + res := &operations.GetSourceRetentlyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47554,21 +60425,43 @@ func (s *Sources) GetSourcePunkAPI(ctx context.Context, request operations.GetSo } -// GetSourcePypi - Get Source details -func (s *Sources) GetSourcePypi(ctx context.Context, request operations.GetSourcePypiRequest) (*operations.GetSourcePypiResponse, error) { +// GetSourceRkiCovid - Get Source details +func (s *Sources) GetSourceRkiCovid(ctx context.Context, request operations.GetSourceRkiCovidRequest, opts ...operations.Option) (*operations.GetSourceRkiCovidResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourcePypi", + OperationID: "getSourceRkiCovid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47609,7 +60502,7 @@ func (s *Sources) GetSourcePypi(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourcePypiResponse{ + res := &operations.GetSourceRkiCovidResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47646,21 +60539,43 @@ func (s *Sources) GetSourcePypi(ctx context.Context, request operations.GetSourc } -// GetSourceQualaroo - Get Source details -func (s *Sources) GetSourceQualaroo(ctx context.Context, request operations.GetSourceQualarooRequest) (*operations.GetSourceQualarooResponse, error) { +// GetSourceRss - Get Source details +func (s *Sources) GetSourceRss(ctx context.Context, request operations.GetSourceRssRequest, opts ...operations.Option) (*operations.GetSourceRssResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceQualaroo", + OperationID: "getSourceRss", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47701,7 +60616,7 @@ func (s *Sources) GetSourceQualaroo(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceQualarooResponse{ + res := &operations.GetSourceRssResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47738,21 +60653,43 @@ func (s *Sources) GetSourceQualaroo(ctx context.Context, request operations.GetS } -// GetSourceRailz - Get Source details -func (s *Sources) GetSourceRailz(ctx context.Context, request operations.GetSourceRailzRequest) (*operations.GetSourceRailzResponse, error) { +// GetSourceS3 - Get Source details +func (s *Sources) GetSourceS3(ctx context.Context, request operations.GetSourceS3Request, opts ...operations.Option) (*operations.GetSourceS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRailz", + OperationID: "getSourceS3", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47793,7 +60730,7 @@ func (s *Sources) GetSourceRailz(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceRailzResponse{ + res := &operations.GetSourceS3Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47830,21 +60767,43 @@ func (s *Sources) GetSourceRailz(ctx context.Context, request operations.GetSour } -// GetSourceRecharge - Get Source details -func (s *Sources) GetSourceRecharge(ctx context.Context, request operations.GetSourceRechargeRequest) (*operations.GetSourceRechargeResponse, error) { +// GetSourceSalesforce - Get Source details +func (s *Sources) GetSourceSalesforce(ctx context.Context, request operations.GetSourceSalesforceRequest, opts ...operations.Option) (*operations.GetSourceSalesforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRecharge", + OperationID: "getSourceSalesforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47885,7 +60844,7 @@ func (s *Sources) GetSourceRecharge(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceRechargeResponse{ + res := &operations.GetSourceSalesforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -47922,21 +60881,43 @@ func (s *Sources) GetSourceRecharge(ctx context.Context, request operations.GetS } -// GetSourceRecreation - Get Source details -func (s *Sources) GetSourceRecreation(ctx context.Context, request operations.GetSourceRecreationRequest) (*operations.GetSourceRecreationResponse, error) { +// GetSourceSalesloft - Get Source details +func (s *Sources) GetSourceSalesloft(ctx context.Context, request operations.GetSourceSalesloftRequest, opts ...operations.Option) (*operations.GetSourceSalesloftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRecreation", + OperationID: "getSourceSalesloft", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -47977,7 +60958,7 @@ func (s *Sources) GetSourceRecreation(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceRecreationResponse{ + res := &operations.GetSourceSalesloftResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48014,21 +60995,43 @@ func (s *Sources) GetSourceRecreation(ctx context.Context, request operations.Ge } -// GetSourceRecruitee - Get Source details -func (s *Sources) GetSourceRecruitee(ctx context.Context, request operations.GetSourceRecruiteeRequest) (*operations.GetSourceRecruiteeResponse, error) { +// GetSourceSapFieldglass - Get Source details +func (s *Sources) GetSourceSapFieldglass(ctx context.Context, request operations.GetSourceSapFieldglassRequest, opts ...operations.Option) (*operations.GetSourceSapFieldglassResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRecruitee", + OperationID: "getSourceSapFieldglass", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48069,7 +61072,7 @@ func (s *Sources) GetSourceRecruitee(ctx context.Context, request operations.Get } } - res := &operations.GetSourceRecruiteeResponse{ + res := &operations.GetSourceSapFieldglassResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48106,21 +61109,43 @@ func (s *Sources) GetSourceRecruitee(ctx context.Context, request operations.Get } -// GetSourceRecurly - Get Source details -func (s *Sources) GetSourceRecurly(ctx context.Context, request operations.GetSourceRecurlyRequest) (*operations.GetSourceRecurlyResponse, error) { +// GetSourceSecoda - Get Source details +func (s *Sources) GetSourceSecoda(ctx context.Context, request operations.GetSourceSecodaRequest, opts ...operations.Option) (*operations.GetSourceSecodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRecurly", + OperationID: "getSourceSecoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48161,7 +61186,7 @@ func (s *Sources) GetSourceRecurly(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceRecurlyResponse{ + res := &operations.GetSourceSecodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48198,21 +61223,43 @@ func (s *Sources) GetSourceRecurly(ctx context.Context, request operations.GetSo } -// GetSourceRedshift - Get Source details -func (s *Sources) GetSourceRedshift(ctx context.Context, request operations.GetSourceRedshiftRequest) (*operations.GetSourceRedshiftResponse, error) { +// GetSourceSendgrid - Get Source details +func (s *Sources) GetSourceSendgrid(ctx context.Context, request operations.GetSourceSendgridRequest, opts ...operations.Option) (*operations.GetSourceSendgridResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRedshift", + OperationID: "getSourceSendgrid", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48253,7 +61300,7 @@ func (s *Sources) GetSourceRedshift(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceRedshiftResponse{ + res := &operations.GetSourceSendgridResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48290,21 +61337,43 @@ func (s *Sources) GetSourceRedshift(ctx context.Context, request operations.GetS } -// GetSourceRetently - Get Source details -func (s *Sources) GetSourceRetently(ctx context.Context, request operations.GetSourceRetentlyRequest) (*operations.GetSourceRetentlyResponse, error) { +// GetSourceSendinblue - Get Source details +func (s *Sources) GetSourceSendinblue(ctx context.Context, request operations.GetSourceSendinblueRequest, opts ...operations.Option) (*operations.GetSourceSendinblueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRetently", + OperationID: "getSourceSendinblue", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48345,7 +61414,7 @@ func (s *Sources) GetSourceRetently(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceRetentlyResponse{ + res := &operations.GetSourceSendinblueResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48382,21 +61451,43 @@ func (s *Sources) GetSourceRetently(ctx context.Context, request operations.GetS } -// GetSourceRkiCovid - Get Source details -func (s *Sources) GetSourceRkiCovid(ctx context.Context, request operations.GetSourceRkiCovidRequest) (*operations.GetSourceRkiCovidResponse, error) { +// GetSourceSenseforce - Get Source details +func (s *Sources) GetSourceSenseforce(ctx context.Context, request operations.GetSourceSenseforceRequest, opts ...operations.Option) (*operations.GetSourceSenseforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRkiCovid", + OperationID: "getSourceSenseforce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48437,7 +61528,7 @@ func (s *Sources) GetSourceRkiCovid(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceRkiCovidResponse{ + res := &operations.GetSourceSenseforceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48474,111 +61565,41 @@ func (s *Sources) GetSourceRkiCovid(ctx context.Context, request operations.GetS } -// GetSourceRss - Get Source details -func (s *Sources) GetSourceRss(ctx context.Context, request operations.GetSourceRssRequest) (*operations.GetSourceRssResponse, error) { +// GetSourceSentry - Get Source details +func (s *Sources) GetSourceSentry(ctx context.Context, request operations.GetSourceSentryRequest, opts ...operations.Option) (*operations.GetSourceSentryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceRss", + OperationID: "getSourceSentry", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceRssResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceS3 - Get Source details -func (s *Sources) GetSourceS3(ctx context.Context, request operations.GetSourceS3Request) (*operations.GetSourceS3Response, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceS3", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -48621,7 +61642,7 @@ func (s *Sources) GetSourceS3(ctx context.Context, request operations.GetSourceS } } - res := &operations.GetSourceS3Response{ + res := &operations.GetSourceSentryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48658,21 +61679,43 @@ func (s *Sources) GetSourceS3(ctx context.Context, request operations.GetSourceS } -// GetSourceSalesforce - Get Source details -func (s *Sources) GetSourceSalesforce(ctx context.Context, request operations.GetSourceSalesforceRequest) (*operations.GetSourceSalesforceResponse, error) { +// GetSourceSftp - Get Source details +func (s *Sources) GetSourceSftp(ctx context.Context, request operations.GetSourceSftpRequest, opts ...operations.Option) (*operations.GetSourceSftpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSalesforce", + OperationID: "getSourceSftp", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48713,7 +61756,7 @@ func (s *Sources) GetSourceSalesforce(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceSalesforceResponse{ + res := &operations.GetSourceSftpResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48750,21 +61793,43 @@ func (s *Sources) GetSourceSalesforce(ctx context.Context, request operations.Ge } -// GetSourceSalesloft - Get Source details -func (s *Sources) GetSourceSalesloft(ctx context.Context, request operations.GetSourceSalesloftRequest) (*operations.GetSourceSalesloftResponse, error) { +// GetSourceSftpBulk - Get Source details +func (s *Sources) GetSourceSftpBulk(ctx context.Context, request operations.GetSourceSftpBulkRequest, opts ...operations.Option) (*operations.GetSourceSftpBulkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSalesloft", + OperationID: "getSourceSftpBulk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48805,7 +61870,7 @@ func (s *Sources) GetSourceSalesloft(ctx context.Context, request operations.Get } } - res := &operations.GetSourceSalesloftResponse{ + res := &operations.GetSourceSftpBulkResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48842,21 +61907,43 @@ func (s *Sources) GetSourceSalesloft(ctx context.Context, request operations.Get } -// GetSourceSapFieldglass - Get Source details -func (s *Sources) GetSourceSapFieldglass(ctx context.Context, request operations.GetSourceSapFieldglassRequest) (*operations.GetSourceSapFieldglassResponse, error) { +// GetSourceShopify - Get Source details +func (s *Sources) GetSourceShopify(ctx context.Context, request operations.GetSourceShopifyRequest, opts ...operations.Option) (*operations.GetSourceShopifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSapFieldglass", + OperationID: "getSourceShopify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48897,7 +61984,7 @@ func (s *Sources) GetSourceSapFieldglass(ctx context.Context, request operations } } - res := &operations.GetSourceSapFieldglassResponse{ + res := &operations.GetSourceShopifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -48934,21 +62021,43 @@ func (s *Sources) GetSourceSapFieldglass(ctx context.Context, request operations } -// GetSourceSecoda - Get Source details -func (s *Sources) GetSourceSecoda(ctx context.Context, request operations.GetSourceSecodaRequest) (*operations.GetSourceSecodaResponse, error) { +// GetSourceShortio - Get Source details +func (s *Sources) GetSourceShortio(ctx context.Context, request operations.GetSourceShortioRequest, opts ...operations.Option) (*operations.GetSourceShortioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSecoda", + OperationID: "getSourceShortio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -48989,7 +62098,7 @@ func (s *Sources) GetSourceSecoda(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceSecodaResponse{ + res := &operations.GetSourceShortioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49026,21 +62135,43 @@ func (s *Sources) GetSourceSecoda(ctx context.Context, request operations.GetSou } -// GetSourceSendgrid - Get Source details -func (s *Sources) GetSourceSendgrid(ctx context.Context, request operations.GetSourceSendgridRequest) (*operations.GetSourceSendgridResponse, error) { +// GetSourceSlack - Get Source details +func (s *Sources) GetSourceSlack(ctx context.Context, request operations.GetSourceSlackRequest, opts ...operations.Option) (*operations.GetSourceSlackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSendgrid", + OperationID: "getSourceSlack", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49081,7 +62212,7 @@ func (s *Sources) GetSourceSendgrid(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceSendgridResponse{ + res := &operations.GetSourceSlackResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49118,21 +62249,43 @@ func (s *Sources) GetSourceSendgrid(ctx context.Context, request operations.GetS } -// GetSourceSendinblue - Get Source details -func (s *Sources) GetSourceSendinblue(ctx context.Context, request operations.GetSourceSendinblueRequest) (*operations.GetSourceSendinblueResponse, error) { +// GetSourceSmaily - Get Source details +func (s *Sources) GetSourceSmaily(ctx context.Context, request operations.GetSourceSmailyRequest, opts ...operations.Option) (*operations.GetSourceSmailyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSendinblue", + OperationID: "getSourceSmaily", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49173,7 +62326,7 @@ func (s *Sources) GetSourceSendinblue(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceSendinblueResponse{ + res := &operations.GetSourceSmailyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49210,21 +62363,43 @@ func (s *Sources) GetSourceSendinblue(ctx context.Context, request operations.Ge } -// GetSourceSenseforce - Get Source details -func (s *Sources) GetSourceSenseforce(ctx context.Context, request operations.GetSourceSenseforceRequest) (*operations.GetSourceSenseforceResponse, error) { +// GetSourceSmartengage - Get Source details +func (s *Sources) GetSourceSmartengage(ctx context.Context, request operations.GetSourceSmartengageRequest, opts ...operations.Option) (*operations.GetSourceSmartengageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSenseforce", + OperationID: "getSourceSmartengage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49265,7 +62440,7 @@ func (s *Sources) GetSourceSenseforce(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceSenseforceResponse{ + res := &operations.GetSourceSmartengageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49302,21 +62477,43 @@ func (s *Sources) GetSourceSenseforce(ctx context.Context, request operations.Ge } -// GetSourceSentry - Get Source details -func (s *Sources) GetSourceSentry(ctx context.Context, request operations.GetSourceSentryRequest) (*operations.GetSourceSentryResponse, error) { +// GetSourceSmartsheets - Get Source details +func (s *Sources) GetSourceSmartsheets(ctx context.Context, request operations.GetSourceSmartsheetsRequest, opts ...operations.Option) (*operations.GetSourceSmartsheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSentry", + OperationID: "getSourceSmartsheets", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49357,7 +62554,7 @@ func (s *Sources) GetSourceSentry(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceSentryResponse{ + res := &operations.GetSourceSmartsheetsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49394,21 +62591,43 @@ func (s *Sources) GetSourceSentry(ctx context.Context, request operations.GetSou } -// GetSourceSftp - Get Source details -func (s *Sources) GetSourceSftp(ctx context.Context, request operations.GetSourceSftpRequest) (*operations.GetSourceSftpResponse, error) { +// GetSourceSnapchatMarketing - Get Source details +func (s *Sources) GetSourceSnapchatMarketing(ctx context.Context, request operations.GetSourceSnapchatMarketingRequest, opts ...operations.Option) (*operations.GetSourceSnapchatMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSftp", + OperationID: "getSourceSnapchatMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49449,7 +62668,7 @@ func (s *Sources) GetSourceSftp(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceSftpResponse{ + res := &operations.GetSourceSnapchatMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49486,21 +62705,43 @@ func (s *Sources) GetSourceSftp(ctx context.Context, request operations.GetSourc } -// GetSourceSftpBulk - Get Source details -func (s *Sources) GetSourceSftpBulk(ctx context.Context, request operations.GetSourceSftpBulkRequest) (*operations.GetSourceSftpBulkResponse, error) { +// GetSourceSnowflake - Get Source details +func (s *Sources) GetSourceSnowflake(ctx context.Context, request operations.GetSourceSnowflakeRequest, opts ...operations.Option) (*operations.GetSourceSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSftpBulk", + OperationID: "getSourceSnowflake", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49541,7 +62782,7 @@ func (s *Sources) GetSourceSftpBulk(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceSftpBulkResponse{ + res := &operations.GetSourceSnowflakeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49578,21 +62819,43 @@ func (s *Sources) GetSourceSftpBulk(ctx context.Context, request operations.GetS } -// GetSourceShopify - Get Source details -func (s *Sources) GetSourceShopify(ctx context.Context, request operations.GetSourceShopifyRequest) (*operations.GetSourceShopifyResponse, error) { +// GetSourceSonarCloud - Get Source details +func (s *Sources) GetSourceSonarCloud(ctx context.Context, request operations.GetSourceSonarCloudRequest, opts ...operations.Option) (*operations.GetSourceSonarCloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceShopify", + OperationID: "getSourceSonarCloud", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49633,7 +62896,7 @@ func (s *Sources) GetSourceShopify(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceShopifyResponse{ + res := &operations.GetSourceSonarCloudResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49670,21 +62933,43 @@ func (s *Sources) GetSourceShopify(ctx context.Context, request operations.GetSo } -// GetSourceShortio - Get Source details -func (s *Sources) GetSourceShortio(ctx context.Context, request operations.GetSourceShortioRequest) (*operations.GetSourceShortioResponse, error) { +// GetSourceSpacexAPI - Get Source details +func (s *Sources) GetSourceSpacexAPI(ctx context.Context, request operations.GetSourceSpacexAPIRequest, opts ...operations.Option) (*operations.GetSourceSpacexAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceShortio", + OperationID: "getSourceSpacexApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49725,7 +63010,7 @@ func (s *Sources) GetSourceShortio(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceShortioResponse{ + res := &operations.GetSourceSpacexAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49762,21 +63047,43 @@ func (s *Sources) GetSourceShortio(ctx context.Context, request operations.GetSo } -// GetSourceSlack - Get Source details -func (s *Sources) GetSourceSlack(ctx context.Context, request operations.GetSourceSlackRequest) (*operations.GetSourceSlackResponse, error) { +// GetSourceSquare - Get Source details +func (s *Sources) GetSourceSquare(ctx context.Context, request operations.GetSourceSquareRequest, opts ...operations.Option) (*operations.GetSourceSquareResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSlack", + OperationID: "getSourceSquare", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49817,7 +63124,7 @@ func (s *Sources) GetSourceSlack(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceSlackResponse{ + res := &operations.GetSourceSquareResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49854,21 +63161,43 @@ func (s *Sources) GetSourceSlack(ctx context.Context, request operations.GetSour } -// GetSourceSmaily - Get Source details -func (s *Sources) GetSourceSmaily(ctx context.Context, request operations.GetSourceSmailyRequest) (*operations.GetSourceSmailyResponse, error) { +// GetSourceStrava - Get Source details +func (s *Sources) GetSourceStrava(ctx context.Context, request operations.GetSourceStravaRequest, opts ...operations.Option) (*operations.GetSourceStravaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSmaily", + OperationID: "getSourceStrava", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -49909,7 +63238,7 @@ func (s *Sources) GetSourceSmaily(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceSmailyResponse{ + res := &operations.GetSourceStravaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -49946,21 +63275,43 @@ func (s *Sources) GetSourceSmaily(ctx context.Context, request operations.GetSou } -// GetSourceSmartengage - Get Source details -func (s *Sources) GetSourceSmartengage(ctx context.Context, request operations.GetSourceSmartengageRequest) (*operations.GetSourceSmartengageResponse, error) { +// GetSourceStripe - Get Source details +func (s *Sources) GetSourceStripe(ctx context.Context, request operations.GetSourceStripeRequest, opts ...operations.Option) (*operations.GetSourceStripeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSmartengage", + OperationID: "getSourceStripe", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50001,7 +63352,7 @@ func (s *Sources) GetSourceSmartengage(ctx context.Context, request operations.G } } - res := &operations.GetSourceSmartengageResponse{ + res := &operations.GetSourceStripeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50038,21 +63389,43 @@ func (s *Sources) GetSourceSmartengage(ctx context.Context, request operations.G } -// GetSourceSmartsheets - Get Source details -func (s *Sources) GetSourceSmartsheets(ctx context.Context, request operations.GetSourceSmartsheetsRequest) (*operations.GetSourceSmartsheetsResponse, error) { +// GetSourceSurveySparrow - Get Source details +func (s *Sources) GetSourceSurveySparrow(ctx context.Context, request operations.GetSourceSurveySparrowRequest, opts ...operations.Option) (*operations.GetSourceSurveySparrowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSmartsheets", + OperationID: "getSourceSurveySparrow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50093,7 +63466,7 @@ func (s *Sources) GetSourceSmartsheets(ctx context.Context, request operations.G } } - res := &operations.GetSourceSmartsheetsResponse{ + res := &operations.GetSourceSurveySparrowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50130,21 +63503,43 @@ func (s *Sources) GetSourceSmartsheets(ctx context.Context, request operations.G } -// GetSourceSnapchatMarketing - Get Source details -func (s *Sources) GetSourceSnapchatMarketing(ctx context.Context, request operations.GetSourceSnapchatMarketingRequest) (*operations.GetSourceSnapchatMarketingResponse, error) { +// GetSourceSurveymonkey - Get Source details +func (s *Sources) GetSourceSurveymonkey(ctx context.Context, request operations.GetSourceSurveymonkeyRequest, opts ...operations.Option) (*operations.GetSourceSurveymonkeyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSnapchatMarketing", + OperationID: "getSourceSurveymonkey", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50185,7 +63580,7 @@ func (s *Sources) GetSourceSnapchatMarketing(ctx context.Context, request operat } } - res := &operations.GetSourceSnapchatMarketingResponse{ + res := &operations.GetSourceSurveymonkeyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50222,21 +63617,43 @@ func (s *Sources) GetSourceSnapchatMarketing(ctx context.Context, request operat } -// GetSourceSnowflake - Get Source details -func (s *Sources) GetSourceSnowflake(ctx context.Context, request operations.GetSourceSnowflakeRequest) (*operations.GetSourceSnowflakeResponse, error) { +// GetSourceTempo - Get Source details +func (s *Sources) GetSourceTempo(ctx context.Context, request operations.GetSourceTempoRequest, opts ...operations.Option) (*operations.GetSourceTempoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSnowflake", + OperationID: "getSourceTempo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50277,7 +63694,7 @@ func (s *Sources) GetSourceSnowflake(ctx context.Context, request operations.Get } } - res := &operations.GetSourceSnowflakeResponse{ + res := &operations.GetSourceTempoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50314,21 +63731,43 @@ func (s *Sources) GetSourceSnowflake(ctx context.Context, request operations.Get } -// GetSourceSonarCloud - Get Source details -func (s *Sources) GetSourceSonarCloud(ctx context.Context, request operations.GetSourceSonarCloudRequest) (*operations.GetSourceSonarCloudResponse, error) { +// GetSourceTheGuardianAPI - Get Source details +func (s *Sources) GetSourceTheGuardianAPI(ctx context.Context, request operations.GetSourceTheGuardianAPIRequest, opts ...operations.Option) (*operations.GetSourceTheGuardianAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSonarCloud", + OperationID: "getSourceTheGuardianApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50369,7 +63808,7 @@ func (s *Sources) GetSourceSonarCloud(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceSonarCloudResponse{ + res := &operations.GetSourceTheGuardianAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50406,21 +63845,43 @@ func (s *Sources) GetSourceSonarCloud(ctx context.Context, request operations.Ge } -// GetSourceSpacexAPI - Get Source details -func (s *Sources) GetSourceSpacexAPI(ctx context.Context, request operations.GetSourceSpacexAPIRequest) (*operations.GetSourceSpacexAPIResponse, error) { +// GetSourceTiktokMarketing - Get Source details +func (s *Sources) GetSourceTiktokMarketing(ctx context.Context, request operations.GetSourceTiktokMarketingRequest, opts ...operations.Option) (*operations.GetSourceTiktokMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSpacexApi", + OperationID: "getSourceTiktokMarketing", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50461,7 +63922,7 @@ func (s *Sources) GetSourceSpacexAPI(ctx context.Context, request operations.Get } } - res := &operations.GetSourceSpacexAPIResponse{ + res := &operations.GetSourceTiktokMarketingResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50498,21 +63959,43 @@ func (s *Sources) GetSourceSpacexAPI(ctx context.Context, request operations.Get } -// GetSourceSquare - Get Source details -func (s *Sources) GetSourceSquare(ctx context.Context, request operations.GetSourceSquareRequest) (*operations.GetSourceSquareResponse, error) { +// GetSourceTrello - Get Source details +func (s *Sources) GetSourceTrello(ctx context.Context, request operations.GetSourceTrelloRequest, opts ...operations.Option) (*operations.GetSourceTrelloResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSquare", + OperationID: "getSourceTrello", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50553,7 +64036,7 @@ func (s *Sources) GetSourceSquare(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceSquareResponse{ + res := &operations.GetSourceTrelloResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50590,21 +64073,43 @@ func (s *Sources) GetSourceSquare(ctx context.Context, request operations.GetSou } -// GetSourceStrava - Get Source details -func (s *Sources) GetSourceStrava(ctx context.Context, request operations.GetSourceStravaRequest) (*operations.GetSourceStravaResponse, error) { +// GetSourceTrustpilot - Get Source details +func (s *Sources) GetSourceTrustpilot(ctx context.Context, request operations.GetSourceTrustpilotRequest, opts ...operations.Option) (*operations.GetSourceTrustpilotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceStrava", + OperationID: "getSourceTrustpilot", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50645,7 +64150,7 @@ func (s *Sources) GetSourceStrava(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceStravaResponse{ + res := &operations.GetSourceTrustpilotResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50682,21 +64187,43 @@ func (s *Sources) GetSourceStrava(ctx context.Context, request operations.GetSou } -// GetSourceStripe - Get Source details -func (s *Sources) GetSourceStripe(ctx context.Context, request operations.GetSourceStripeRequest) (*operations.GetSourceStripeResponse, error) { +// GetSourceTvmazeSchedule - Get Source details +func (s *Sources) GetSourceTvmazeSchedule(ctx context.Context, request operations.GetSourceTvmazeScheduleRequest, opts ...operations.Option) (*operations.GetSourceTvmazeScheduleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceStripe", + OperationID: "getSourceTvmazeSchedule", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50737,7 +64264,7 @@ func (s *Sources) GetSourceStripe(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceStripeResponse{ + res := &operations.GetSourceTvmazeScheduleResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50774,21 +64301,43 @@ func (s *Sources) GetSourceStripe(ctx context.Context, request operations.GetSou } -// GetSourceSurveySparrow - Get Source details -func (s *Sources) GetSourceSurveySparrow(ctx context.Context, request operations.GetSourceSurveySparrowRequest) (*operations.GetSourceSurveySparrowResponse, error) { +// GetSourceTwilio - Get Source details +func (s *Sources) GetSourceTwilio(ctx context.Context, request operations.GetSourceTwilioRequest, opts ...operations.Option) (*operations.GetSourceTwilioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSurveySparrow", + OperationID: "getSourceTwilio", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50829,7 +64378,7 @@ func (s *Sources) GetSourceSurveySparrow(ctx context.Context, request operations } } - res := &operations.GetSourceSurveySparrowResponse{ + res := &operations.GetSourceTwilioResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50866,21 +64415,43 @@ func (s *Sources) GetSourceSurveySparrow(ctx context.Context, request operations } -// GetSourceSurveymonkey - Get Source details -func (s *Sources) GetSourceSurveymonkey(ctx context.Context, request operations.GetSourceSurveymonkeyRequest) (*operations.GetSourceSurveymonkeyResponse, error) { +// GetSourceTwilioTaskrouter - Get Source details +func (s *Sources) GetSourceTwilioTaskrouter(ctx context.Context, request operations.GetSourceTwilioTaskrouterRequest, opts ...operations.Option) (*operations.GetSourceTwilioTaskrouterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceSurveymonkey", + OperationID: "getSourceTwilioTaskrouter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -50921,7 +64492,7 @@ func (s *Sources) GetSourceSurveymonkey(ctx context.Context, request operations. } } - res := &operations.GetSourceSurveymonkeyResponse{ + res := &operations.GetSourceTwilioTaskrouterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -50958,21 +64529,43 @@ func (s *Sources) GetSourceSurveymonkey(ctx context.Context, request operations. } -// GetSourceTempo - Get Source details -func (s *Sources) GetSourceTempo(ctx context.Context, request operations.GetSourceTempoRequest) (*operations.GetSourceTempoResponse, error) { +// GetSourceTwitter - Get Source details +func (s *Sources) GetSourceTwitter(ctx context.Context, request operations.GetSourceTwitterRequest, opts ...operations.Option) (*operations.GetSourceTwitterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTempo", + OperationID: "getSourceTwitter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51013,7 +64606,7 @@ func (s *Sources) GetSourceTempo(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceTempoResponse{ + res := &operations.GetSourceTwitterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51050,21 +64643,43 @@ func (s *Sources) GetSourceTempo(ctx context.Context, request operations.GetSour } -// GetSourceTheGuardianAPI - Get Source details -func (s *Sources) GetSourceTheGuardianAPI(ctx context.Context, request operations.GetSourceTheGuardianAPIRequest) (*operations.GetSourceTheGuardianAPIResponse, error) { +// GetSourceTypeform - Get Source details +func (s *Sources) GetSourceTypeform(ctx context.Context, request operations.GetSourceTypeformRequest, opts ...operations.Option) (*operations.GetSourceTypeformResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTheGuardianApi", + OperationID: "getSourceTypeform", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51105,7 +64720,7 @@ func (s *Sources) GetSourceTheGuardianAPI(ctx context.Context, request operation } } - res := &operations.GetSourceTheGuardianAPIResponse{ + res := &operations.GetSourceTypeformResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51142,21 +64757,43 @@ func (s *Sources) GetSourceTheGuardianAPI(ctx context.Context, request operation } -// GetSourceTiktokMarketing - Get Source details -func (s *Sources) GetSourceTiktokMarketing(ctx context.Context, request operations.GetSourceTiktokMarketingRequest) (*operations.GetSourceTiktokMarketingResponse, error) { +// GetSourceUsCensus - Get Source details +func (s *Sources) GetSourceUsCensus(ctx context.Context, request operations.GetSourceUsCensusRequest, opts ...operations.Option) (*operations.GetSourceUsCensusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTiktokMarketing", + OperationID: "getSourceUsCensus", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51197,7 +64834,7 @@ func (s *Sources) GetSourceTiktokMarketing(ctx context.Context, request operatio } } - res := &operations.GetSourceTiktokMarketingResponse{ + res := &operations.GetSourceUsCensusResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51234,111 +64871,41 @@ func (s *Sources) GetSourceTiktokMarketing(ctx context.Context, request operatio } -// GetSourceTrello - Get Source details -func (s *Sources) GetSourceTrello(ctx context.Context, request operations.GetSourceTrelloRequest) (*operations.GetSourceTrelloResponse, error) { +// GetSourceVantage - Get Source details +func (s *Sources) GetSourceVantage(ctx context.Context, request operations.GetSourceVantageRequest, opts ...operations.Option) (*operations.GetSourceVantageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTrello", + OperationID: "getSourceVantage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.GetSourceTrelloResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, } - rawBody, err := io.ReadAll(httpRes.Body) + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + return nil, fmt.Errorf("error generating URL: %w", err) } - return res, nil - -} - -// GetSourceTrustpilot - Get Source details -func (s *Sources) GetSourceTrustpilot(ctx context.Context, request operations.GetSourceTrustpilotRequest) (*operations.GetSourceTrustpilotResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "getSourceTrustpilot", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) @@ -51381,7 +64948,7 @@ func (s *Sources) GetSourceTrustpilot(ctx context.Context, request operations.Ge } } - res := &operations.GetSourceTrustpilotResponse{ + res := &operations.GetSourceVantageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51418,21 +64985,43 @@ func (s *Sources) GetSourceTrustpilot(ctx context.Context, request operations.Ge } -// GetSourceTvmazeSchedule - Get Source details -func (s *Sources) GetSourceTvmazeSchedule(ctx context.Context, request operations.GetSourceTvmazeScheduleRequest) (*operations.GetSourceTvmazeScheduleResponse, error) { +// GetSourceWebflow - Get Source details +func (s *Sources) GetSourceWebflow(ctx context.Context, request operations.GetSourceWebflowRequest, opts ...operations.Option) (*operations.GetSourceWebflowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTvmazeSchedule", + OperationID: "getSourceWebflow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51473,7 +65062,7 @@ func (s *Sources) GetSourceTvmazeSchedule(ctx context.Context, request operation } } - res := &operations.GetSourceTvmazeScheduleResponse{ + res := &operations.GetSourceWebflowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51510,21 +65099,43 @@ func (s *Sources) GetSourceTvmazeSchedule(ctx context.Context, request operation } -// GetSourceTwilio - Get Source details -func (s *Sources) GetSourceTwilio(ctx context.Context, request operations.GetSourceTwilioRequest) (*operations.GetSourceTwilioResponse, error) { +// GetSourceWhiskyHunter - Get Source details +func (s *Sources) GetSourceWhiskyHunter(ctx context.Context, request operations.GetSourceWhiskyHunterRequest, opts ...operations.Option) (*operations.GetSourceWhiskyHunterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTwilio", + OperationID: "getSourceWhiskyHunter", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51565,7 +65176,7 @@ func (s *Sources) GetSourceTwilio(ctx context.Context, request operations.GetSou } } - res := &operations.GetSourceTwilioResponse{ + res := &operations.GetSourceWhiskyHunterResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51602,21 +65213,43 @@ func (s *Sources) GetSourceTwilio(ctx context.Context, request operations.GetSou } -// GetSourceTwilioTaskrouter - Get Source details -func (s *Sources) GetSourceTwilioTaskrouter(ctx context.Context, request operations.GetSourceTwilioTaskrouterRequest) (*operations.GetSourceTwilioTaskrouterResponse, error) { +// GetSourceWikipediaPageviews - Get Source details +func (s *Sources) GetSourceWikipediaPageviews(ctx context.Context, request operations.GetSourceWikipediaPageviewsRequest, opts ...operations.Option) (*operations.GetSourceWikipediaPageviewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTwilioTaskrouter", + OperationID: "getSourceWikipediaPageviews", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51657,7 +65290,7 @@ func (s *Sources) GetSourceTwilioTaskrouter(ctx context.Context, request operati } } - res := &operations.GetSourceTwilioTaskrouterResponse{ + res := &operations.GetSourceWikipediaPageviewsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51694,21 +65327,43 @@ func (s *Sources) GetSourceTwilioTaskrouter(ctx context.Context, request operati } -// GetSourceTwitter - Get Source details -func (s *Sources) GetSourceTwitter(ctx context.Context, request operations.GetSourceTwitterRequest) (*operations.GetSourceTwitterResponse, error) { +// GetSourceWoocommerce - Get Source details +func (s *Sources) GetSourceWoocommerce(ctx context.Context, request operations.GetSourceWoocommerceRequest, opts ...operations.Option) (*operations.GetSourceWoocommerceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTwitter", + OperationID: "getSourceWoocommerce", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51749,7 +65404,7 @@ func (s *Sources) GetSourceTwitter(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceTwitterResponse{ + res := &operations.GetSourceWoocommerceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51786,21 +65441,43 @@ func (s *Sources) GetSourceTwitter(ctx context.Context, request operations.GetSo } -// GetSourceTypeform - Get Source details -func (s *Sources) GetSourceTypeform(ctx context.Context, request operations.GetSourceTypeformRequest) (*operations.GetSourceTypeformResponse, error) { +// GetSourceXkcd - Get Source details +func (s *Sources) GetSourceXkcd(ctx context.Context, request operations.GetSourceXkcdRequest, opts ...operations.Option) (*operations.GetSourceXkcdResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceTypeform", + OperationID: "getSourceXkcd", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51841,7 +65518,7 @@ func (s *Sources) GetSourceTypeform(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceTypeformResponse{ + res := &operations.GetSourceXkcdResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51878,21 +65555,43 @@ func (s *Sources) GetSourceTypeform(ctx context.Context, request operations.GetS } -// GetSourceUsCensus - Get Source details -func (s *Sources) GetSourceUsCensus(ctx context.Context, request operations.GetSourceUsCensusRequest) (*operations.GetSourceUsCensusResponse, error) { +// GetSourceYandexMetrica - Get Source details +func (s *Sources) GetSourceYandexMetrica(ctx context.Context, request operations.GetSourceYandexMetricaRequest, opts ...operations.Option) (*operations.GetSourceYandexMetricaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceUsCensus", + OperationID: "getSourceYandexMetrica", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -51933,7 +65632,7 @@ func (s *Sources) GetSourceUsCensus(ctx context.Context, request operations.GetS } } - res := &operations.GetSourceUsCensusResponse{ + res := &operations.GetSourceYandexMetricaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -51970,21 +65669,43 @@ func (s *Sources) GetSourceUsCensus(ctx context.Context, request operations.GetS } -// GetSourceVantage - Get Source details -func (s *Sources) GetSourceVantage(ctx context.Context, request operations.GetSourceVantageRequest) (*operations.GetSourceVantageResponse, error) { +// GetSourceYotpo - Get Source details +func (s *Sources) GetSourceYotpo(ctx context.Context, request operations.GetSourceYotpoRequest, opts ...operations.Option) (*operations.GetSourceYotpoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceVantage", + OperationID: "getSourceYotpo", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52025,7 +65746,7 @@ func (s *Sources) GetSourceVantage(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceVantageResponse{ + res := &operations.GetSourceYotpoResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52062,21 +65783,43 @@ func (s *Sources) GetSourceVantage(ctx context.Context, request operations.GetSo } -// GetSourceWebflow - Get Source details -func (s *Sources) GetSourceWebflow(ctx context.Context, request operations.GetSourceWebflowRequest) (*operations.GetSourceWebflowResponse, error) { +// GetSourceYoutubeAnalytics - Get Source details +func (s *Sources) GetSourceYoutubeAnalytics(ctx context.Context, request operations.GetSourceYoutubeAnalyticsRequest, opts ...operations.Option) (*operations.GetSourceYoutubeAnalyticsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceWebflow", + OperationID: "getSourceYoutubeAnalytics", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52117,7 +65860,7 @@ func (s *Sources) GetSourceWebflow(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceWebflowResponse{ + res := &operations.GetSourceYoutubeAnalyticsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52154,21 +65897,43 @@ func (s *Sources) GetSourceWebflow(ctx context.Context, request operations.GetSo } -// GetSourceWhiskyHunter - Get Source details -func (s *Sources) GetSourceWhiskyHunter(ctx context.Context, request operations.GetSourceWhiskyHunterRequest) (*operations.GetSourceWhiskyHunterResponse, error) { +// GetSourceZendeskChat - Get Source details +func (s *Sources) GetSourceZendeskChat(ctx context.Context, request operations.GetSourceZendeskChatRequest, opts ...operations.Option) (*operations.GetSourceZendeskChatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceWhiskyHunter", + OperationID: "getSourceZendeskChat", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52209,7 +65974,7 @@ func (s *Sources) GetSourceWhiskyHunter(ctx context.Context, request operations. } } - res := &operations.GetSourceWhiskyHunterResponse{ + res := &operations.GetSourceZendeskChatResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52246,21 +66011,43 @@ func (s *Sources) GetSourceWhiskyHunter(ctx context.Context, request operations. } -// GetSourceWikipediaPageviews - Get Source details -func (s *Sources) GetSourceWikipediaPageviews(ctx context.Context, request operations.GetSourceWikipediaPageviewsRequest) (*operations.GetSourceWikipediaPageviewsResponse, error) { +// GetSourceZendeskSell - Get Source details +func (s *Sources) GetSourceZendeskSell(ctx context.Context, request operations.GetSourceZendeskSellRequest, opts ...operations.Option) (*operations.GetSourceZendeskSellResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceWikipediaPageviews", + OperationID: "getSourceZendeskSell", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52301,7 +66088,7 @@ func (s *Sources) GetSourceWikipediaPageviews(ctx context.Context, request opera } } - res := &operations.GetSourceWikipediaPageviewsResponse{ + res := &operations.GetSourceZendeskSellResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52338,21 +66125,43 @@ func (s *Sources) GetSourceWikipediaPageviews(ctx context.Context, request opera } -// GetSourceWoocommerce - Get Source details -func (s *Sources) GetSourceWoocommerce(ctx context.Context, request operations.GetSourceWoocommerceRequest) (*operations.GetSourceWoocommerceResponse, error) { +// GetSourceZendeskSunshine - Get Source details +func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operations.GetSourceZendeskSunshineRequest, opts ...operations.Option) (*operations.GetSourceZendeskSunshineResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceWoocommerce", + OperationID: "getSourceZendeskSunshine", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52393,7 +66202,7 @@ func (s *Sources) GetSourceWoocommerce(ctx context.Context, request operations.G } } - res := &operations.GetSourceWoocommerceResponse{ + res := &operations.GetSourceZendeskSunshineResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52430,21 +66239,43 @@ func (s *Sources) GetSourceWoocommerce(ctx context.Context, request operations.G } -// GetSourceXkcd - Get Source details -func (s *Sources) GetSourceXkcd(ctx context.Context, request operations.GetSourceXkcdRequest) (*operations.GetSourceXkcdResponse, error) { +// GetSourceZendeskSupport - Get Source details +func (s *Sources) GetSourceZendeskSupport(ctx context.Context, request operations.GetSourceZendeskSupportRequest, opts ...operations.Option) (*operations.GetSourceZendeskSupportResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceXkcd", + OperationID: "getSourceZendeskSupport", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52485,7 +66316,7 @@ func (s *Sources) GetSourceXkcd(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceXkcdResponse{ + res := &operations.GetSourceZendeskSupportResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52522,21 +66353,43 @@ func (s *Sources) GetSourceXkcd(ctx context.Context, request operations.GetSourc } -// GetSourceYandexMetrica - Get Source details -func (s *Sources) GetSourceYandexMetrica(ctx context.Context, request operations.GetSourceYandexMetricaRequest) (*operations.GetSourceYandexMetricaResponse, error) { +// GetSourceZendeskTalk - Get Source details +func (s *Sources) GetSourceZendeskTalk(ctx context.Context, request operations.GetSourceZendeskTalkRequest, opts ...operations.Option) (*operations.GetSourceZendeskTalkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceYandexMetrica", + OperationID: "getSourceZendeskTalk", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52577,7 +66430,7 @@ func (s *Sources) GetSourceYandexMetrica(ctx context.Context, request operations } } - res := &operations.GetSourceYandexMetricaResponse{ + res := &operations.GetSourceZendeskTalkResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52614,21 +66467,43 @@ func (s *Sources) GetSourceYandexMetrica(ctx context.Context, request operations } -// GetSourceYotpo - Get Source details -func (s *Sources) GetSourceYotpo(ctx context.Context, request operations.GetSourceYotpoRequest) (*operations.GetSourceYotpoResponse, error) { +// GetSourceZenloop - Get Source details +func (s *Sources) GetSourceZenloop(ctx context.Context, request operations.GetSourceZenloopRequest, opts ...operations.Option) (*operations.GetSourceZenloopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceYotpo", + OperationID: "getSourceZenloop", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52669,7 +66544,7 @@ func (s *Sources) GetSourceYotpo(ctx context.Context, request operations.GetSour } } - res := &operations.GetSourceYotpoResponse{ + res := &operations.GetSourceZenloopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52706,21 +66581,43 @@ func (s *Sources) GetSourceYotpo(ctx context.Context, request operations.GetSour } -// GetSourceYoutubeAnalytics - Get Source details -func (s *Sources) GetSourceYoutubeAnalytics(ctx context.Context, request operations.GetSourceYoutubeAnalyticsRequest) (*operations.GetSourceYoutubeAnalyticsResponse, error) { +// GetSourceZohoCrm - Get Source details +func (s *Sources) GetSourceZohoCrm(ctx context.Context, request operations.GetSourceZohoCrmRequest, opts ...operations.Option) (*operations.GetSourceZohoCrmResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceYoutubeAnalytics", + OperationID: "getSourceZohoCrm", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52761,7 +66658,7 @@ func (s *Sources) GetSourceYoutubeAnalytics(ctx context.Context, request operati } } - res := &operations.GetSourceYoutubeAnalyticsResponse{ + res := &operations.GetSourceZohoCrmResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52798,21 +66695,43 @@ func (s *Sources) GetSourceYoutubeAnalytics(ctx context.Context, request operati } -// GetSourceZendeskChat - Get Source details -func (s *Sources) GetSourceZendeskChat(ctx context.Context, request operations.GetSourceZendeskChatRequest) (*operations.GetSourceZendeskChatResponse, error) { +// GetSourceZoom - Get Source details +func (s *Sources) GetSourceZoom(ctx context.Context, request operations.GetSourceZoomRequest, opts ...operations.Option) (*operations.GetSourceZoomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZendeskChat", + OperationID: "getSourceZoom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -52853,7 +66772,7 @@ func (s *Sources) GetSourceZendeskChat(ctx context.Context, request operations.G } } - res := &operations.GetSourceZendeskChatResponse{ + res := &operations.GetSourceZoomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52890,27 +66809,60 @@ func (s *Sources) GetSourceZendeskChat(ctx context.Context, request operations.G } -// GetSourceZendeskSell - Get Source details -func (s *Sources) GetSourceZendeskSell(ctx context.Context, request operations.GetSourceZendeskSellRequest) (*operations.GetSourceZendeskSellResponse, error) { +// InitiateOAuth - Initiate OAuth for a source +// Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. +// +// This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. +// +// That secret ID can be used to create a source with credentials in place of actual tokens. +func (s *Sources) InitiateOAuth(ctx context.Context, request shared.InitiateOauthRequest, opts ...operations.Option) (*operations.InitiateOAuthResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZendeskSell", + OperationID: "initiateOAuth", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + opURL, err := url.JoinPath(baseURL, "/sources/initiateOAuth") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -52945,7 +66897,7 @@ func (s *Sources) GetSourceZendeskSell(ctx context.Context, request operations.G } } - res := &operations.GetSourceZendeskSellResponse{ + res := &operations.InitiateOAuthResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -52960,20 +66912,10 @@ func (s *Sources) GetSourceZendeskSell(ctx context.Context, request operations.G switch { case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } - case httpRes.StatusCode == 403: fallthrough - case httpRes.StatusCode == 404: + case httpRes.StatusCode == 400: + fallthrough + case httpRes.StatusCode == 403: default: return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -52982,21 +66924,43 @@ func (s *Sources) GetSourceZendeskSell(ctx context.Context, request operations.G } -// GetSourceZendeskSunshine - Get Source details -func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operations.GetSourceZendeskSunshineRequest) (*operations.GetSourceZendeskSunshineResponse, error) { +// ListSources - List sources +func (s *Sources) ListSources(ctx context.Context, request operations.ListSourcesRequest, opts ...operations.Option) (*operations.ListSourcesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZendeskSunshine", + OperationID: "listSources", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) + opURL, err := url.JoinPath(baseURL, "/sources") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -53004,6 +66968,10 @@ func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operatio req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err } @@ -53037,7 +67005,7 @@ func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operatio } } - res := &operations.GetSourceZendeskSunshineResponse{ + res := &operations.ListSourcesResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53054,12 +67022,12 @@ func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operatio case httpRes.StatusCode == 200: switch { case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse + var out shared.SourcesResponse if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { return nil, err } - res.SourceResponse = &out + res.SourcesResponse = &out default: return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) } @@ -53074,27 +67042,55 @@ func (s *Sources) GetSourceZendeskSunshine(ctx context.Context, request operatio } -// GetSourceZendeskSupport - Get Source details -func (s *Sources) GetSourceZendeskSupport(ctx context.Context, request operations.GetSourceZendeskSupportRequest) (*operations.GetSourceZendeskSupportResponse, error) { +// PatchSource - Update a Source +func (s *Sources) PatchSource(ctx context.Context, request operations.PatchSourceRequest, opts ...operations.Option) (*operations.PatchSourceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZendeskSupport", + OperationID: "patchSource", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePatchRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -53129,7 +67125,7 @@ func (s *Sources) GetSourceZendeskSupport(ctx context.Context, request operation } } - res := &operations.GetSourceZendeskSupportResponse{ + res := &operations.PatchSourceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53166,27 +67162,55 @@ func (s *Sources) GetSourceZendeskSupport(ctx context.Context, request operation } -// GetSourceZendeskTalk - Get Source details -func (s *Sources) GetSourceZendeskTalk(ctx context.Context, request operations.GetSourceZendeskTalkRequest) (*operations.GetSourceZendeskTalkResponse, error) { +// PutSource - Update a Source and fully overwrite it +func (s *Sources) PutSource(ctx context.Context, request operations.PutSourceRequest, opts ...operations.Option) (*operations.PutSourceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZendeskTalk", + OperationID: "putSource", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePutRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -53221,7 +67245,7 @@ func (s *Sources) GetSourceZendeskTalk(ctx context.Context, request operations.G } } - res := &operations.GetSourceZendeskTalkResponse{ + res := &operations.PutSourceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53258,27 +67282,55 @@ func (s *Sources) GetSourceZendeskTalk(ctx context.Context, request operations.G } -// GetSourceZenloop - Get Source details -func (s *Sources) GetSourceZenloop(ctx context.Context, request operations.GetSourceZenloopRequest) (*operations.GetSourceZenloopResponse, error) { +// PutSourceAha - Update a Source fully +func (s *Sources) PutSourceAha(ctx context.Context, request operations.PutSourceAhaRequest, opts ...operations.Option) (*operations.PutSourceAhaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZenloop", + OperationID: "putSourceAha", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAhaPutRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -53313,7 +67365,7 @@ func (s *Sources) GetSourceZenloop(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceZenloopResponse{ + res := &operations.PutSourceAhaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53327,18 +67379,8 @@ func (s *Sources) GetSourceZenloop(ctx context.Context, request operations.GetSo httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53350,27 +67392,55 @@ func (s *Sources) GetSourceZenloop(ctx context.Context, request operations.GetSo } -// GetSourceZohoCrm - Get Source details -func (s *Sources) GetSourceZohoCrm(ctx context.Context, request operations.GetSourceZohoCrmRequest) (*operations.GetSourceZohoCrmResponse, error) { +// PutSourceAircall - Update a Source fully +func (s *Sources) PutSourceAircall(ctx context.Context, request operations.PutSourceAircallRequest, opts ...operations.Option) (*operations.PutSourceAircallResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZohoCrm", + OperationID: "putSourceAircall", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAircallPutRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -53405,7 +67475,7 @@ func (s *Sources) GetSourceZohoCrm(ctx context.Context, request operations.GetSo } } - res := &operations.GetSourceZohoCrmResponse{ + res := &operations.PutSourceAircallResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53419,18 +67489,8 @@ func (s *Sources) GetSourceZohoCrm(ctx context.Context, request operations.GetSo httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53442,27 +67502,55 @@ func (s *Sources) GetSourceZohoCrm(ctx context.Context, request operations.GetSo } -// GetSourceZoom - Get Source details -func (s *Sources) GetSourceZoom(ctx context.Context, request operations.GetSourceZoomRequest) (*operations.GetSourceZoomResponse, error) { +// PutSourceAirtable - Update a Source fully +func (s *Sources) PutSourceAirtable(ctx context.Context, request operations.PutSourceAirtableRequest, opts ...operations.Option) (*operations.PutSourceAirtableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "getSourceZoom", + OperationID: "putSourceAirtable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAirtablePutRequest", "json", `request:"mediaType=application/json"`) + if err != nil { + return nil, err + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err @@ -53497,7 +67585,7 @@ func (s *Sources) GetSourceZoom(ctx context.Context, request operations.GetSourc } } - res := &operations.GetSourceZoomResponse{ + res := &operations.PutSourceAirtableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53511,18 +67599,8 @@ func (s *Sources) GetSourceZoom(ctx context.Context, request operations.GetSourc httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53534,32 +67612,49 @@ func (s *Sources) GetSourceZoom(ctx context.Context, request operations.GetSourc } -// InitiateOAuth - Initiate OAuth for a source -// Given a source ID, workspace ID, and redirect URL, initiates OAuth for the source. -// -// This returns a fully formed URL for performing user authentication against the relevant source identity provider (IdP). Once authentication has been completed, the IdP will redirect to an Airbyte endpoint which will save the access and refresh tokens off as a secret and return the secret ID to the redirect URL specified in the `secret_id` query string parameter. -// -// That secret ID can be used to create a source with credentials in place of actual tokens. -func (s *Sources) InitiateOAuth(ctx context.Context, request shared.InitiateOauthRequest) (*operations.InitiateOAuthResponse, error) { +// PutSourceAmazonAds - Update a Source fully +func (s *Sources) PutSourceAmazonAds(ctx context.Context, request operations.PutSourceAmazonAdsRequest, opts ...operations.Option) (*operations.PutSourceAmazonAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "initiateOAuth", + OperationID: "putSourceAmazonAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources/initiateOAuth") + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, false, "Request", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonAdsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } - req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } @@ -53600,7 +67695,7 @@ func (s *Sources) InitiateOAuth(ctx context.Context, request shared.InitiateOaut } } - res := &operations.InitiateOAuthResponse{ + res := &operations.PutSourceAmazonAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53614,11 +67709,11 @@ func (s *Sources) InitiateOAuth(ctx context.Context, request shared.InitiateOaut httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - fallthrough - case httpRes.StatusCode == 400: + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: fallthrough case httpRes.StatusCode == 403: + fallthrough + case httpRes.StatusCode == 404: default: return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) } @@ -53627,32 +67722,56 @@ func (s *Sources) InitiateOAuth(ctx context.Context, request shared.InitiateOaut } -// ListSources - List sources -func (s *Sources) ListSources(ctx context.Context, request operations.ListSourcesRequest) (*operations.ListSourcesResponse, error) { +// PutSourceAmazonSellerPartner - Update a Source fully +func (s *Sources) PutSourceAmazonSellerPartner(ctx context.Context, request operations.PutSourceAmazonSellerPartnerRequest, opts ...operations.Option) (*operations.PutSourceAmazonSellerPartnerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "listSources", + OperationID: "putSourceAmazonSellerPartner", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := url.JoinPath(baseURL, "/sources") + opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonSellerPartnerPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) + return nil, err } - req.Header.Set("Accept", "application/json") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil { - return nil, fmt.Errorf("error populating query params: %w", err) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "*/*") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + req.Header.Set("Content-Type", reqContentType) + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { return nil, err } @@ -53686,7 +67805,7 @@ func (s *Sources) ListSources(ctx context.Context, request operations.ListSource } } - res := &operations.ListSourcesResponse{ + res := &operations.PutSourceAmazonSellerPartnerResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53700,18 +67819,8 @@ func (s *Sources) ListSources(ctx context.Context, request operations.ListSource httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourcesResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourcesResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53723,31 +67832,53 @@ func (s *Sources) ListSources(ctx context.Context, request operations.ListSource } -// PatchSource - Update a Source -func (s *Sources) PatchSource(ctx context.Context, request operations.PatchSourceRequest) (*operations.PatchSourceResponse, error) { +// PutSourceAmazonSqs - Update a Source fully +func (s *Sources) PutSourceAmazonSqs(ctx context.Context, request operations.PutSourceAmazonSqsRequest, opts ...operations.Option) (*operations.PutSourceAmazonSqsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "patchSource", + OperationID: "putSourceAmazonSqs", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePatchRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonSqsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } - req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -53784,7 +67915,7 @@ func (s *Sources) PatchSource(ctx context.Context, request operations.PatchSourc } } - res := &operations.PatchSourceResponse{ + res := &operations.PutSourceAmazonSqsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53798,18 +67929,8 @@ func (s *Sources) PatchSource(ctx context.Context, request operations.PatchSourc httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53821,31 +67942,53 @@ func (s *Sources) PatchSource(ctx context.Context, request operations.PatchSourc } -// PutSource - Update a Source and fully overwrite it -func (s *Sources) PutSource(ctx context.Context, request operations.PutSourceRequest) (*operations.PutSourceResponse, error) { +// PutSourceAmplitude - Update a Source fully +func (s *Sources) PutSourceAmplitude(ctx context.Context, request operations.PutSourceAmplitudeRequest, opts ...operations.Option) (*operations.PutSourceAmplitudeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSource", + OperationID: "putSourceAmplitude", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmplitudePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) } - req.Header.Set("Accept", "application/json") + req.Header.Set("Accept", "*/*") req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) req.Header.Set("Content-Type", reqContentType) @@ -53882,7 +68025,7 @@ func (s *Sources) PutSource(ctx context.Context, request operations.PutSourceReq } } - res := &operations.PutSourceResponse{ + res := &operations.PutSourceAmplitudeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -53896,18 +68039,8 @@ func (s *Sources) PutSource(ctx context.Context, request operations.PutSourceReq httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) switch { - case httpRes.StatusCode == 200: - switch { - case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): - var out shared.SourceResponse - if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { - return nil, err - } - - res.SourceResponse = &out - default: - return nil, errors.NewSDKError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) - } + case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: + fallthrough case httpRes.StatusCode == 403: fallthrough case httpRes.StatusCode == 404: @@ -53919,26 +68052,48 @@ func (s *Sources) PutSource(ctx context.Context, request operations.PutSourceReq } -// PutSourceAha - Update a Source fully -func (s *Sources) PutSourceAha(ctx context.Context, request operations.PutSourceAhaRequest) (*operations.PutSourceAhaResponse, error) { +// PutSourceApifyDataset - Update a Source fully +func (s *Sources) PutSourceApifyDataset(ctx context.Context, request operations.PutSourceApifyDatasetRequest, opts ...operations.Option) (*operations.PutSourceApifyDatasetResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAha", + OperationID: "putSourceApifyDataset", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAhaPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceApifyDatasetPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -53980,7 +68135,7 @@ func (s *Sources) PutSourceAha(ctx context.Context, request operations.PutSource } } - res := &operations.PutSourceAhaResponse{ + res := &operations.PutSourceApifyDatasetResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54007,26 +68162,48 @@ func (s *Sources) PutSourceAha(ctx context.Context, request operations.PutSource } -// PutSourceAircall - Update a Source fully -func (s *Sources) PutSourceAircall(ctx context.Context, request operations.PutSourceAircallRequest) (*operations.PutSourceAircallResponse, error) { +// PutSourceAppfollow - Update a Source fully +func (s *Sources) PutSourceAppfollow(ctx context.Context, request operations.PutSourceAppfollowRequest, opts ...operations.Option) (*operations.PutSourceAppfollowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAircall", + OperationID: "putSourceAppfollow", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAircallPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAppfollowPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54068,7 +68245,7 @@ func (s *Sources) PutSourceAircall(ctx context.Context, request operations.PutSo } } - res := &operations.PutSourceAircallResponse{ + res := &operations.PutSourceAppfollowResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54095,26 +68272,48 @@ func (s *Sources) PutSourceAircall(ctx context.Context, request operations.PutSo } -// PutSourceAirtable - Update a Source fully -func (s *Sources) PutSourceAirtable(ctx context.Context, request operations.PutSourceAirtableRequest) (*operations.PutSourceAirtableResponse, error) { +// PutSourceAsana - Update a Source fully +func (s *Sources) PutSourceAsana(ctx context.Context, request operations.PutSourceAsanaRequest, opts ...operations.Option) (*operations.PutSourceAsanaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAirtable", + OperationID: "putSourceAsana", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAirtablePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAsanaPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54156,7 +68355,7 @@ func (s *Sources) PutSourceAirtable(ctx context.Context, request operations.PutS } } - res := &operations.PutSourceAirtableResponse{ + res := &operations.PutSourceAsanaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54183,26 +68382,48 @@ func (s *Sources) PutSourceAirtable(ctx context.Context, request operations.PutS } -// PutSourceAmazonAds - Update a Source fully -func (s *Sources) PutSourceAmazonAds(ctx context.Context, request operations.PutSourceAmazonAdsRequest) (*operations.PutSourceAmazonAdsResponse, error) { +// PutSourceAuth0 - Update a Source fully +func (s *Sources) PutSourceAuth0(ctx context.Context, request operations.PutSourceAuth0Request, opts ...operations.Option) (*operations.PutSourceAuth0Response, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAmazonAds", + OperationID: "putSourceAuth0", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonAdsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAuth0PutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54244,7 +68465,7 @@ func (s *Sources) PutSourceAmazonAds(ctx context.Context, request operations.Put } } - res := &operations.PutSourceAmazonAdsResponse{ + res := &operations.PutSourceAuth0Response{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54271,114 +68492,48 @@ func (s *Sources) PutSourceAmazonAds(ctx context.Context, request operations.Put } -// PutSourceAmazonSellerPartner - Update a Source fully -func (s *Sources) PutSourceAmazonSellerPartner(ctx context.Context, request operations.PutSourceAmazonSellerPartnerRequest) (*operations.PutSourceAmazonSellerPartnerResponse, error) { +// PutSourceAwsCloudtrail - Update a Source fully +func (s *Sources) PutSourceAwsCloudtrail(ctx context.Context, request operations.PutSourceAwsCloudtrailRequest, opts ...operations.Option) (*operations.PutSourceAwsCloudtrailResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAmazonSellerPartner", + OperationID: "putSourceAwsCloudtrail", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonSellerPartnerPutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.PutSourceAmazonSellerPartnerResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourceAmazonSqs - Update a Source fully -func (s *Sources) PutSourceAmazonSqs(ctx context.Context, request operations.PutSourceAmazonSqsRequest) (*operations.PutSourceAmazonSqsResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourceAmazonSqs", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmazonSqsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAwsCloudtrailPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54420,7 +68575,7 @@ func (s *Sources) PutSourceAmazonSqs(ctx context.Context, request operations.Put } } - res := &operations.PutSourceAmazonSqsResponse{ + res := &operations.PutSourceAwsCloudtrailResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54447,101 +68602,24 @@ func (s *Sources) PutSourceAmazonSqs(ctx context.Context, request operations.Put } -// PutSourceAmplitude - Update a Source fully -func (s *Sources) PutSourceAmplitude(ctx context.Context, request operations.PutSourceAmplitudeRequest) (*operations.PutSourceAmplitudeResponse, error) { +// PutSourceAzureBlobStorage - Update a Source fully +func (s *Sources) PutSourceAzureBlobStorage(ctx context.Context, request operations.PutSourceAzureBlobStorageRequest, opts ...operations.Option) (*operations.PutSourceAzureBlobStorageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAmplitude", + OperationID: "putSourceAzureBlobStorage", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAmplitudePutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.PutSourceAmplitudeResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourceApifyDataset - Update a Source fully -func (s *Sources) PutSourceApifyDataset(ctx context.Context, request operations.PutSourceApifyDatasetRequest) (*operations.PutSourceApifyDatasetResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourceApifyDataset", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -54550,11 +68628,22 @@ func (s *Sources) PutSourceApifyDataset(ctx context.Context, request operations. return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceApifyDatasetPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAzureBlobStoragePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54596,7 +68685,7 @@ func (s *Sources) PutSourceApifyDataset(ctx context.Context, request operations. } } - res := &operations.PutSourceApifyDatasetResponse{ + res := &operations.PutSourceAzureBlobStorageResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54623,26 +68712,48 @@ func (s *Sources) PutSourceApifyDataset(ctx context.Context, request operations. } -// PutSourceAppfollow - Update a Source fully -func (s *Sources) PutSourceAppfollow(ctx context.Context, request operations.PutSourceAppfollowRequest) (*operations.PutSourceAppfollowResponse, error) { +// PutSourceAzureTable - Update a Source fully +func (s *Sources) PutSourceAzureTable(ctx context.Context, request operations.PutSourceAzureTableRequest, opts ...operations.Option) (*operations.PutSourceAzureTableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAppfollow", + OperationID: "putSourceAzureTable", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAppfollowPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAzureTablePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54684,7 +68795,7 @@ func (s *Sources) PutSourceAppfollow(ctx context.Context, request operations.Put } } - res := &operations.PutSourceAppfollowResponse{ + res := &operations.PutSourceAzureTableResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54711,26 +68822,48 @@ func (s *Sources) PutSourceAppfollow(ctx context.Context, request operations.Put } -// PutSourceAsana - Update a Source fully -func (s *Sources) PutSourceAsana(ctx context.Context, request operations.PutSourceAsanaRequest) (*operations.PutSourceAsanaResponse, error) { +// PutSourceBambooHr - Update a Source fully +func (s *Sources) PutSourceBambooHr(ctx context.Context, request operations.PutSourceBambooHrRequest, opts ...operations.Option) (*operations.PutSourceBambooHrResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAsana", + OperationID: "putSourceBambooHr", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAsanaPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBambooHrPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54772,7 +68905,7 @@ func (s *Sources) PutSourceAsana(ctx context.Context, request operations.PutSour } } - res := &operations.PutSourceAsanaResponse{ + res := &operations.PutSourceBambooHrResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54799,26 +68932,48 @@ func (s *Sources) PutSourceAsana(ctx context.Context, request operations.PutSour } -// PutSourceAuth0 - Update a Source fully -func (s *Sources) PutSourceAuth0(ctx context.Context, request operations.PutSourceAuth0Request) (*operations.PutSourceAuth0Response, error) { +// PutSourceBigquery - Update a Source fully +func (s *Sources) PutSourceBigquery(ctx context.Context, request operations.PutSourceBigqueryRequest, opts ...operations.Option) (*operations.PutSourceBigqueryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAuth0", + OperationID: "putSourceBigquery", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAuth0PutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBigqueryPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54860,7 +69015,7 @@ func (s *Sources) PutSourceAuth0(ctx context.Context, request operations.PutSour } } - res := &operations.PutSourceAuth0Response{ + res := &operations.PutSourceBigqueryResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54887,26 +69042,48 @@ func (s *Sources) PutSourceAuth0(ctx context.Context, request operations.PutSour } -// PutSourceAwsCloudtrail - Update a Source fully -func (s *Sources) PutSourceAwsCloudtrail(ctx context.Context, request operations.PutSourceAwsCloudtrailRequest) (*operations.PutSourceAwsCloudtrailResponse, error) { +// PutSourceBingAds - Update a Source fully +func (s *Sources) PutSourceBingAds(ctx context.Context, request operations.PutSourceBingAdsRequest, opts ...operations.Option) (*operations.PutSourceBingAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAwsCloudtrail", + OperationID: "putSourceBingAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAwsCloudtrailPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBingAdsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -54948,7 +69125,7 @@ func (s *Sources) PutSourceAwsCloudtrail(ctx context.Context, request operations } } - res := &operations.PutSourceAwsCloudtrailResponse{ + res := &operations.PutSourceBingAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -54975,114 +69152,48 @@ func (s *Sources) PutSourceAwsCloudtrail(ctx context.Context, request operations } -// PutSourceAzureBlobStorage - Update a Source fully -func (s *Sources) PutSourceAzureBlobStorage(ctx context.Context, request operations.PutSourceAzureBlobStorageRequest) (*operations.PutSourceAzureBlobStorageResponse, error) { +// PutSourceBraintree - Update a Source fully +func (s *Sources) PutSourceBraintree(ctx context.Context, request operations.PutSourceBraintreeRequest, opts ...operations.Option) (*operations.PutSourceBraintreeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceAzureBlobStorage", + OperationID: "putSourceBraintree", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAzureBlobStoragePutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.PutSourceAzureBlobStorageResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourceAzureTable - Update a Source fully -func (s *Sources) PutSourceAzureTable(ctx context.Context, request operations.PutSourceAzureTableRequest) (*operations.PutSourceAzureTableResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourceAzureTable", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceAzureTablePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBraintreePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55124,7 +69235,7 @@ func (s *Sources) PutSourceAzureTable(ctx context.Context, request operations.Pu } } - res := &operations.PutSourceAzureTableResponse{ + res := &operations.PutSourceBraintreeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55151,26 +69262,48 @@ func (s *Sources) PutSourceAzureTable(ctx context.Context, request operations.Pu } -// PutSourceBambooHr - Update a Source fully -func (s *Sources) PutSourceBambooHr(ctx context.Context, request operations.PutSourceBambooHrRequest) (*operations.PutSourceBambooHrResponse, error) { +// PutSourceBraze - Update a Source fully +func (s *Sources) PutSourceBraze(ctx context.Context, request operations.PutSourceBrazeRequest, opts ...operations.Option) (*operations.PutSourceBrazeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceBambooHr", + OperationID: "putSourceBraze", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBambooHrPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBrazePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55212,7 +69345,7 @@ func (s *Sources) PutSourceBambooHr(ctx context.Context, request operations.PutS } } - res := &operations.PutSourceBambooHrResponse{ + res := &operations.PutSourceBrazeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55239,26 +69372,48 @@ func (s *Sources) PutSourceBambooHr(ctx context.Context, request operations.PutS } -// PutSourceBigquery - Update a Source fully -func (s *Sources) PutSourceBigquery(ctx context.Context, request operations.PutSourceBigqueryRequest) (*operations.PutSourceBigqueryResponse, error) { +// PutSourceCart - Update a Source fully +func (s *Sources) PutSourceCart(ctx context.Context, request operations.PutSourceCartRequest, opts ...operations.Option) (*operations.PutSourceCartResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceBigquery", + OperationID: "putSourceCart", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBigqueryPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCartPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55300,7 +69455,7 @@ func (s *Sources) PutSourceBigquery(ctx context.Context, request operations.PutS } } - res := &operations.PutSourceBigqueryResponse{ + res := &operations.PutSourceCartResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55327,26 +69482,48 @@ func (s *Sources) PutSourceBigquery(ctx context.Context, request operations.PutS } -// PutSourceBingAds - Update a Source fully -func (s *Sources) PutSourceBingAds(ctx context.Context, request operations.PutSourceBingAdsRequest) (*operations.PutSourceBingAdsResponse, error) { +// PutSourceChargebee - Update a Source fully +func (s *Sources) PutSourceChargebee(ctx context.Context, request operations.PutSourceChargebeeRequest, opts ...operations.Option) (*operations.PutSourceChargebeeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceBingAds", + OperationID: "putSourceChargebee", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBingAdsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceChargebeePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55388,7 +69565,7 @@ func (s *Sources) PutSourceBingAds(ctx context.Context, request operations.PutSo } } - res := &operations.PutSourceBingAdsResponse{ + res := &operations.PutSourceChargebeeResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55415,26 +69592,48 @@ func (s *Sources) PutSourceBingAds(ctx context.Context, request operations.PutSo } -// PutSourceBraintree - Update a Source fully -func (s *Sources) PutSourceBraintree(ctx context.Context, request operations.PutSourceBraintreeRequest) (*operations.PutSourceBraintreeResponse, error) { +// PutSourceChartmogul - Update a Source fully +func (s *Sources) PutSourceChartmogul(ctx context.Context, request operations.PutSourceChartmogulRequest, opts ...operations.Option) (*operations.PutSourceChartmogulResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceBraintree", + OperationID: "putSourceChartmogul", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBraintreePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceChartmogulPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55476,7 +69675,7 @@ func (s *Sources) PutSourceBraintree(ctx context.Context, request operations.Put } } - res := &operations.PutSourceBraintreeResponse{ + res := &operations.PutSourceChartmogulResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55503,26 +69702,48 @@ func (s *Sources) PutSourceBraintree(ctx context.Context, request operations.Put } -// PutSourceBraze - Update a Source fully -func (s *Sources) PutSourceBraze(ctx context.Context, request operations.PutSourceBrazeRequest) (*operations.PutSourceBrazeResponse, error) { +// PutSourceClazar - Update a Source fully +func (s *Sources) PutSourceClazar(ctx context.Context, request operations.PutSourceClazarRequest, opts ...operations.Option) (*operations.PutSourceClazarResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceBraze", + OperationID: "putSourceClazar", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceBrazePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClazarPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55564,7 +69785,7 @@ func (s *Sources) PutSourceBraze(ctx context.Context, request operations.PutSour } } - res := &operations.PutSourceBrazeResponse{ + res := &operations.PutSourceClazarResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55591,26 +69812,48 @@ func (s *Sources) PutSourceBraze(ctx context.Context, request operations.PutSour } -// PutSourceCart - Update a Source fully -func (s *Sources) PutSourceCart(ctx context.Context, request operations.PutSourceCartRequest) (*operations.PutSourceCartResponse, error) { +// PutSourceClickhouse - Update a Source fully +func (s *Sources) PutSourceClickhouse(ctx context.Context, request operations.PutSourceClickhouseRequest, opts ...operations.Option) (*operations.PutSourceClickhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceCart", + OperationID: "putSourceClickhouse", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCartPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClickhousePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55652,7 +69895,7 @@ func (s *Sources) PutSourceCart(ctx context.Context, request operations.PutSourc } } - res := &operations.PutSourceCartResponse{ + res := &operations.PutSourceClickhouseResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55679,26 +69922,48 @@ func (s *Sources) PutSourceCart(ctx context.Context, request operations.PutSourc } -// PutSourceChargebee - Update a Source fully -func (s *Sources) PutSourceChargebee(ctx context.Context, request operations.PutSourceChargebeeRequest) (*operations.PutSourceChargebeeResponse, error) { +// PutSourceClickupAPI - Update a Source fully +func (s *Sources) PutSourceClickupAPI(ctx context.Context, request operations.PutSourceClickupAPIRequest, opts ...operations.Option) (*operations.PutSourceClickupAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceChargebee", + OperationID: "putSourceClickupApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceChargebeePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClickupAPIPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55740,7 +70005,7 @@ func (s *Sources) PutSourceChargebee(ctx context.Context, request operations.Put } } - res := &operations.PutSourceChargebeeResponse{ + res := &operations.PutSourceClickupAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55767,26 +70032,48 @@ func (s *Sources) PutSourceChargebee(ctx context.Context, request operations.Put } -// PutSourceChartmogul - Update a Source fully -func (s *Sources) PutSourceChartmogul(ctx context.Context, request operations.PutSourceChartmogulRequest) (*operations.PutSourceChartmogulResponse, error) { +// PutSourceClockify - Update a Source fully +func (s *Sources) PutSourceClockify(ctx context.Context, request operations.PutSourceClockifyRequest, opts ...operations.Option) (*operations.PutSourceClockifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceChartmogul", + OperationID: "putSourceClockify", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceChartmogulPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClockifyPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55828,7 +70115,7 @@ func (s *Sources) PutSourceChartmogul(ctx context.Context, request operations.Pu } } - res := &operations.PutSourceChartmogulResponse{ + res := &operations.PutSourceClockifyResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55855,26 +70142,48 @@ func (s *Sources) PutSourceChartmogul(ctx context.Context, request operations.Pu } -// PutSourceClickhouse - Update a Source fully -func (s *Sources) PutSourceClickhouse(ctx context.Context, request operations.PutSourceClickhouseRequest) (*operations.PutSourceClickhouseResponse, error) { +// PutSourceCloseCom - Update a Source fully +func (s *Sources) PutSourceCloseCom(ctx context.Context, request operations.PutSourceCloseComRequest, opts ...operations.Option) (*operations.PutSourceCloseComResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceClickhouse", + OperationID: "putSourceCloseCom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClickhousePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCloseComPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -55916,7 +70225,7 @@ func (s *Sources) PutSourceClickhouse(ctx context.Context, request operations.Pu } } - res := &operations.PutSourceClickhouseResponse{ + res := &operations.PutSourceCloseComResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -55943,26 +70252,48 @@ func (s *Sources) PutSourceClickhouse(ctx context.Context, request operations.Pu } -// PutSourceClickupAPI - Update a Source fully -func (s *Sources) PutSourceClickupAPI(ctx context.Context, request operations.PutSourceClickupAPIRequest) (*operations.PutSourceClickupAPIResponse, error) { +// PutSourceCoda - Update a Source fully +func (s *Sources) PutSourceCoda(ctx context.Context, request operations.PutSourceCodaRequest, opts ...operations.Option) (*operations.PutSourceCodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceClickupApi", + OperationID: "putSourceCoda", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClickupAPIPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCodaPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56004,7 +70335,7 @@ func (s *Sources) PutSourceClickupAPI(ctx context.Context, request operations.Pu } } - res := &operations.PutSourceClickupAPIResponse{ + res := &operations.PutSourceCodaResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56031,114 +70362,48 @@ func (s *Sources) PutSourceClickupAPI(ctx context.Context, request operations.Pu } -// PutSourceClockify - Update a Source fully -func (s *Sources) PutSourceClockify(ctx context.Context, request operations.PutSourceClockifyRequest) (*operations.PutSourceClockifyResponse, error) { +// PutSourceCoinAPI - Update a Source fully +func (s *Sources) PutSourceCoinAPI(ctx context.Context, request operations.PutSourceCoinAPIRequest, opts ...operations.Option) (*operations.PutSourceCoinAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceClockify", + OperationID: "putSourceCoinApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceClockifyPutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.PutSourceClockifyResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourceCloseCom - Update a Source fully -func (s *Sources) PutSourceCloseCom(ctx context.Context, request operations.PutSourceCloseComRequest) (*operations.PutSourceCloseComResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourceCloseCom", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCloseComPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCoinAPIPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56180,7 +70445,7 @@ func (s *Sources) PutSourceCloseCom(ctx context.Context, request operations.PutS } } - res := &operations.PutSourceCloseComResponse{ + res := &operations.PutSourceCoinAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56207,101 +70472,24 @@ func (s *Sources) PutSourceCloseCom(ctx context.Context, request operations.PutS } -// PutSourceCoda - Update a Source fully -func (s *Sources) PutSourceCoda(ctx context.Context, request operations.PutSourceCodaRequest) (*operations.PutSourceCodaResponse, error) { +// PutSourceCoinmarketcap - Update a Source fully +func (s *Sources) PutSourceCoinmarketcap(ctx context.Context, request operations.PutSourceCoinmarketcapRequest, opts ...operations.Option) (*operations.PutSourceCoinmarketcapResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceCoda", + OperationID: "putSourceCoinmarketcap", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCodaPutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err - } - - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err - } - } - - res := &operations.PutSourceCodaResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourceCoinAPI - Update a Source fully -func (s *Sources) PutSourceCoinAPI(ctx context.Context, request operations.PutSourceCoinAPIRequest) (*operations.PutSourceCoinAPIResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourceCoinApi", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, } baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) @@ -56310,11 +70498,22 @@ func (s *Sources) PutSourceCoinAPI(ctx context.Context, request operations.PutSo return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCoinAPIPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCoinmarketcapPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56356,7 +70555,7 @@ func (s *Sources) PutSourceCoinAPI(ctx context.Context, request operations.PutSo } } - res := &operations.PutSourceCoinAPIResponse{ + res := &operations.PutSourceCoinmarketcapResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56383,26 +70582,48 @@ func (s *Sources) PutSourceCoinAPI(ctx context.Context, request operations.PutSo } -// PutSourceCoinmarketcap - Update a Source fully -func (s *Sources) PutSourceCoinmarketcap(ctx context.Context, request operations.PutSourceCoinmarketcapRequest) (*operations.PutSourceCoinmarketcapResponse, error) { +// PutSourceConfigcat - Update a Source fully +func (s *Sources) PutSourceConfigcat(ctx context.Context, request operations.PutSourceConfigcatRequest, opts ...operations.Option) (*operations.PutSourceConfigcatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceCoinmarketcap", + OperationID: "putSourceConfigcat", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCoinmarketcapPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConfigcatPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56444,7 +70665,7 @@ func (s *Sources) PutSourceCoinmarketcap(ctx context.Context, request operations } } - res := &operations.PutSourceCoinmarketcapResponse{ + res := &operations.PutSourceConfigcatResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56471,26 +70692,48 @@ func (s *Sources) PutSourceCoinmarketcap(ctx context.Context, request operations } -// PutSourceConfigcat - Update a Source fully -func (s *Sources) PutSourceConfigcat(ctx context.Context, request operations.PutSourceConfigcatRequest) (*operations.PutSourceConfigcatResponse, error) { +// PutSourceConfluence - Update a Source fully +func (s *Sources) PutSourceConfluence(ctx context.Context, request operations.PutSourceConfluenceRequest, opts ...operations.Option) (*operations.PutSourceConfluenceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceConfigcat", + OperationID: "putSourceConfluence", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConfigcatPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConfluencePutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56532,7 +70775,7 @@ func (s *Sources) PutSourceConfigcat(ctx context.Context, request operations.Put } } - res := &operations.PutSourceConfigcatResponse{ + res := &operations.PutSourceConfluenceResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56559,26 +70802,48 @@ func (s *Sources) PutSourceConfigcat(ctx context.Context, request operations.Put } -// PutSourceConfluence - Update a Source fully -func (s *Sources) PutSourceConfluence(ctx context.Context, request operations.PutSourceConfluenceRequest) (*operations.PutSourceConfluenceResponse, error) { +// PutSourceConvex - Update a Source fully +func (s *Sources) PutSourceConvex(ctx context.Context, request operations.PutSourceConvexRequest, opts ...operations.Option) (*operations.PutSourceConvexResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceConfluence", + OperationID: "putSourceConvex", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConfluencePutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConvexPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56620,7 +70885,7 @@ func (s *Sources) PutSourceConfluence(ctx context.Context, request operations.Pu } } - res := &operations.PutSourceConfluenceResponse{ + res := &operations.PutSourceConvexResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56647,26 +70912,48 @@ func (s *Sources) PutSourceConfluence(ctx context.Context, request operations.Pu } -// PutSourceConvex - Update a Source fully -func (s *Sources) PutSourceConvex(ctx context.Context, request operations.PutSourceConvexRequest) (*operations.PutSourceConvexResponse, error) { +// PutSourceCustom - Update a Source fully +func (s *Sources) PutSourceCustom(ctx context.Context, request operations.PutSourceCustomRequest, opts ...operations.Option) (*operations.PutSourceCustomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceConvex", + OperationID: "putSourceCustom", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceConvexPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCustomPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56708,7 +70995,7 @@ func (s *Sources) PutSourceConvex(ctx context.Context, request operations.PutSou } } - res := &operations.PutSourceConvexResponse{ + res := &operations.PutSourceCustomResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56735,26 +71022,48 @@ func (s *Sources) PutSourceConvex(ctx context.Context, request operations.PutSou } -// PutSourceCustom - Update a Source fully -func (s *Sources) PutSourceCustom(ctx context.Context, request operations.PutSourceCustomRequest) (*operations.PutSourceCustomResponse, error) { +// PutSourceDatadog - Update a Source fully +func (s *Sources) PutSourceDatadog(ctx context.Context, request operations.PutSourceDatadogRequest, opts ...operations.Option) (*operations.PutSourceDatadogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceCustom", + OperationID: "putSourceDatadog", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceCustomPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceDatadogPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56796,7 +71105,7 @@ func (s *Sources) PutSourceCustom(ctx context.Context, request operations.PutSou } } - res := &operations.PutSourceCustomResponse{ + res := &operations.PutSourceDatadogResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -56824,7 +71133,7 @@ func (s *Sources) PutSourceCustom(ctx context.Context, request operations.PutSou } // PutSourceDatascope - Update a Source fully -func (s *Sources) PutSourceDatascope(ctx context.Context, request operations.PutSourceDatascopeRequest) (*operations.PutSourceDatascopeResponse, error) { +func (s *Sources) PutSourceDatascope(ctx context.Context, request operations.PutSourceDatascopeRequest, opts ...operations.Option) (*operations.PutSourceDatascopeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDatascope", @@ -56832,6 +71141,17 @@ func (s *Sources) PutSourceDatascope(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -56843,6 +71163,17 @@ func (s *Sources) PutSourceDatascope(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -56912,7 +71243,7 @@ func (s *Sources) PutSourceDatascope(ctx context.Context, request operations.Put } // PutSourceDelighted - Update a Source fully -func (s *Sources) PutSourceDelighted(ctx context.Context, request operations.PutSourceDelightedRequest) (*operations.PutSourceDelightedResponse, error) { +func (s *Sources) PutSourceDelighted(ctx context.Context, request operations.PutSourceDelightedRequest, opts ...operations.Option) (*operations.PutSourceDelightedResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDelighted", @@ -56920,6 +71251,17 @@ func (s *Sources) PutSourceDelighted(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -56931,6 +71273,17 @@ func (s *Sources) PutSourceDelighted(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57000,7 +71353,7 @@ func (s *Sources) PutSourceDelighted(ctx context.Context, request operations.Put } // PutSourceDixa - Update a Source fully -func (s *Sources) PutSourceDixa(ctx context.Context, request operations.PutSourceDixaRequest) (*operations.PutSourceDixaResponse, error) { +func (s *Sources) PutSourceDixa(ctx context.Context, request operations.PutSourceDixaRequest, opts ...operations.Option) (*operations.PutSourceDixaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDixa", @@ -57008,6 +71361,17 @@ func (s *Sources) PutSourceDixa(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57019,6 +71383,17 @@ func (s *Sources) PutSourceDixa(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57088,7 +71463,7 @@ func (s *Sources) PutSourceDixa(ctx context.Context, request operations.PutSourc } // PutSourceDockerhub - Update a Source fully -func (s *Sources) PutSourceDockerhub(ctx context.Context, request operations.PutSourceDockerhubRequest) (*operations.PutSourceDockerhubResponse, error) { +func (s *Sources) PutSourceDockerhub(ctx context.Context, request operations.PutSourceDockerhubRequest, opts ...operations.Option) (*operations.PutSourceDockerhubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDockerhub", @@ -57096,6 +71471,17 @@ func (s *Sources) PutSourceDockerhub(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57107,6 +71493,17 @@ func (s *Sources) PutSourceDockerhub(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57176,7 +71573,7 @@ func (s *Sources) PutSourceDockerhub(ctx context.Context, request operations.Put } // PutSourceDremio - Update a Source fully -func (s *Sources) PutSourceDremio(ctx context.Context, request operations.PutSourceDremioRequest) (*operations.PutSourceDremioResponse, error) { +func (s *Sources) PutSourceDremio(ctx context.Context, request operations.PutSourceDremioRequest, opts ...operations.Option) (*operations.PutSourceDremioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDremio", @@ -57184,6 +71581,17 @@ func (s *Sources) PutSourceDremio(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57195,6 +71603,17 @@ func (s *Sources) PutSourceDremio(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57264,7 +71683,7 @@ func (s *Sources) PutSourceDremio(ctx context.Context, request operations.PutSou } // PutSourceDynamodb - Update a Source fully -func (s *Sources) PutSourceDynamodb(ctx context.Context, request operations.PutSourceDynamodbRequest) (*operations.PutSourceDynamodbResponse, error) { +func (s *Sources) PutSourceDynamodb(ctx context.Context, request operations.PutSourceDynamodbRequest, opts ...operations.Option) (*operations.PutSourceDynamodbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceDynamodb", @@ -57272,6 +71691,17 @@ func (s *Sources) PutSourceDynamodb(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57283,6 +71713,17 @@ func (s *Sources) PutSourceDynamodb(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57352,7 +71793,7 @@ func (s *Sources) PutSourceDynamodb(ctx context.Context, request operations.PutS } // PutSourceEmailoctopus - Update a Source fully -func (s *Sources) PutSourceEmailoctopus(ctx context.Context, request operations.PutSourceEmailoctopusRequest) (*operations.PutSourceEmailoctopusResponse, error) { +func (s *Sources) PutSourceEmailoctopus(ctx context.Context, request operations.PutSourceEmailoctopusRequest, opts ...operations.Option) (*operations.PutSourceEmailoctopusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceEmailoctopus", @@ -57360,6 +71801,17 @@ func (s *Sources) PutSourceEmailoctopus(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57371,6 +71823,17 @@ func (s *Sources) PutSourceEmailoctopus(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57440,7 +71903,7 @@ func (s *Sources) PutSourceEmailoctopus(ctx context.Context, request operations. } // PutSourceExchangeRates - Update a Source fully -func (s *Sources) PutSourceExchangeRates(ctx context.Context, request operations.PutSourceExchangeRatesRequest) (*operations.PutSourceExchangeRatesResponse, error) { +func (s *Sources) PutSourceExchangeRates(ctx context.Context, request operations.PutSourceExchangeRatesRequest, opts ...operations.Option) (*operations.PutSourceExchangeRatesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceExchangeRates", @@ -57448,6 +71911,17 @@ func (s *Sources) PutSourceExchangeRates(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57459,6 +71933,17 @@ func (s *Sources) PutSourceExchangeRates(ctx context.Context, request operations return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57528,7 +72013,7 @@ func (s *Sources) PutSourceExchangeRates(ctx context.Context, request operations } // PutSourceFacebookMarketing - Update a Source fully -func (s *Sources) PutSourceFacebookMarketing(ctx context.Context, request operations.PutSourceFacebookMarketingRequest) (*operations.PutSourceFacebookMarketingResponse, error) { +func (s *Sources) PutSourceFacebookMarketing(ctx context.Context, request operations.PutSourceFacebookMarketingRequest, opts ...operations.Option) (*operations.PutSourceFacebookMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFacebookMarketing", @@ -57536,6 +72021,17 @@ func (s *Sources) PutSourceFacebookMarketing(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57547,6 +72043,17 @@ func (s *Sources) PutSourceFacebookMarketing(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57616,7 +72123,7 @@ func (s *Sources) PutSourceFacebookMarketing(ctx context.Context, request operat } // PutSourceFaker - Update a Source fully -func (s *Sources) PutSourceFaker(ctx context.Context, request operations.PutSourceFakerRequest) (*operations.PutSourceFakerResponse, error) { +func (s *Sources) PutSourceFaker(ctx context.Context, request operations.PutSourceFakerRequest, opts ...operations.Option) (*operations.PutSourceFakerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFaker", @@ -57624,6 +72131,17 @@ func (s *Sources) PutSourceFaker(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57635,6 +72153,17 @@ func (s *Sources) PutSourceFaker(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57704,7 +72233,7 @@ func (s *Sources) PutSourceFaker(ctx context.Context, request operations.PutSour } // PutSourceFauna - Update a Source fully -func (s *Sources) PutSourceFauna(ctx context.Context, request operations.PutSourceFaunaRequest) (*operations.PutSourceFaunaResponse, error) { +func (s *Sources) PutSourceFauna(ctx context.Context, request operations.PutSourceFaunaRequest, opts ...operations.Option) (*operations.PutSourceFaunaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFauna", @@ -57712,6 +72241,17 @@ func (s *Sources) PutSourceFauna(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57723,6 +72263,17 @@ func (s *Sources) PutSourceFauna(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57792,7 +72343,7 @@ func (s *Sources) PutSourceFauna(ctx context.Context, request operations.PutSour } // PutSourceFile - Update a Source fully -func (s *Sources) PutSourceFile(ctx context.Context, request operations.PutSourceFileRequest) (*operations.PutSourceFileResponse, error) { +func (s *Sources) PutSourceFile(ctx context.Context, request operations.PutSourceFileRequest, opts ...operations.Option) (*operations.PutSourceFileResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFile", @@ -57800,6 +72351,17 @@ func (s *Sources) PutSourceFile(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57811,6 +72373,17 @@ func (s *Sources) PutSourceFile(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57880,7 +72453,7 @@ func (s *Sources) PutSourceFile(ctx context.Context, request operations.PutSourc } // PutSourceFirebolt - Update a Source fully -func (s *Sources) PutSourceFirebolt(ctx context.Context, request operations.PutSourceFireboltRequest) (*operations.PutSourceFireboltResponse, error) { +func (s *Sources) PutSourceFirebolt(ctx context.Context, request operations.PutSourceFireboltRequest, opts ...operations.Option) (*operations.PutSourceFireboltResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFirebolt", @@ -57888,6 +72461,17 @@ func (s *Sources) PutSourceFirebolt(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57899,6 +72483,17 @@ func (s *Sources) PutSourceFirebolt(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -57968,7 +72563,7 @@ func (s *Sources) PutSourceFirebolt(ctx context.Context, request operations.PutS } // PutSourceFleetio - Update a Source fully -func (s *Sources) PutSourceFleetio(ctx context.Context, request operations.PutSourceFleetioRequest) (*operations.PutSourceFleetioResponse, error) { +func (s *Sources) PutSourceFleetio(ctx context.Context, request operations.PutSourceFleetioRequest, opts ...operations.Option) (*operations.PutSourceFleetioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFleetio", @@ -57976,6 +72571,17 @@ func (s *Sources) PutSourceFleetio(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -57987,6 +72593,17 @@ func (s *Sources) PutSourceFleetio(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58056,7 +72673,7 @@ func (s *Sources) PutSourceFleetio(ctx context.Context, request operations.PutSo } // PutSourceFreshcaller - Update a Source fully -func (s *Sources) PutSourceFreshcaller(ctx context.Context, request operations.PutSourceFreshcallerRequest) (*operations.PutSourceFreshcallerResponse, error) { +func (s *Sources) PutSourceFreshcaller(ctx context.Context, request operations.PutSourceFreshcallerRequest, opts ...operations.Option) (*operations.PutSourceFreshcallerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFreshcaller", @@ -58064,6 +72681,17 @@ func (s *Sources) PutSourceFreshcaller(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58075,6 +72703,17 @@ func (s *Sources) PutSourceFreshcaller(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58144,7 +72783,7 @@ func (s *Sources) PutSourceFreshcaller(ctx context.Context, request operations.P } // PutSourceFreshdesk - Update a Source fully -func (s *Sources) PutSourceFreshdesk(ctx context.Context, request operations.PutSourceFreshdeskRequest) (*operations.PutSourceFreshdeskResponse, error) { +func (s *Sources) PutSourceFreshdesk(ctx context.Context, request operations.PutSourceFreshdeskRequest, opts ...operations.Option) (*operations.PutSourceFreshdeskResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFreshdesk", @@ -58152,6 +72791,17 @@ func (s *Sources) PutSourceFreshdesk(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58163,6 +72813,17 @@ func (s *Sources) PutSourceFreshdesk(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58232,7 +72893,7 @@ func (s *Sources) PutSourceFreshdesk(ctx context.Context, request operations.Put } // PutSourceFreshsales - Update a Source fully -func (s *Sources) PutSourceFreshsales(ctx context.Context, request operations.PutSourceFreshsalesRequest) (*operations.PutSourceFreshsalesResponse, error) { +func (s *Sources) PutSourceFreshsales(ctx context.Context, request operations.PutSourceFreshsalesRequest, opts ...operations.Option) (*operations.PutSourceFreshsalesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceFreshsales", @@ -58240,6 +72901,17 @@ func (s *Sources) PutSourceFreshsales(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58251,6 +72923,17 @@ func (s *Sources) PutSourceFreshsales(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58320,7 +73003,7 @@ func (s *Sources) PutSourceFreshsales(ctx context.Context, request operations.Pu } // PutSourceGainsightPx - Update a Source fully -func (s *Sources) PutSourceGainsightPx(ctx context.Context, request operations.PutSourceGainsightPxRequest) (*operations.PutSourceGainsightPxResponse, error) { +func (s *Sources) PutSourceGainsightPx(ctx context.Context, request operations.PutSourceGainsightPxRequest, opts ...operations.Option) (*operations.PutSourceGainsightPxResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGainsightPx", @@ -58328,6 +73011,17 @@ func (s *Sources) PutSourceGainsightPx(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58339,6 +73033,17 @@ func (s *Sources) PutSourceGainsightPx(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58408,7 +73113,7 @@ func (s *Sources) PutSourceGainsightPx(ctx context.Context, request operations.P } // PutSourceGcs - Update a Source fully -func (s *Sources) PutSourceGcs(ctx context.Context, request operations.PutSourceGcsRequest) (*operations.PutSourceGcsResponse, error) { +func (s *Sources) PutSourceGcs(ctx context.Context, request operations.PutSourceGcsRequest, opts ...operations.Option) (*operations.PutSourceGcsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGcs", @@ -58416,6 +73121,17 @@ func (s *Sources) PutSourceGcs(ctx context.Context, request operations.PutSource SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58427,6 +73143,17 @@ func (s *Sources) PutSourceGcs(ctx context.Context, request operations.PutSource return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58496,7 +73223,7 @@ func (s *Sources) PutSourceGcs(ctx context.Context, request operations.PutSource } // PutSourceGetlago - Update a Source fully -func (s *Sources) PutSourceGetlago(ctx context.Context, request operations.PutSourceGetlagoRequest) (*operations.PutSourceGetlagoResponse, error) { +func (s *Sources) PutSourceGetlago(ctx context.Context, request operations.PutSourceGetlagoRequest, opts ...operations.Option) (*operations.PutSourceGetlagoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGetlago", @@ -58504,6 +73231,17 @@ func (s *Sources) PutSourceGetlago(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58515,6 +73253,17 @@ func (s *Sources) PutSourceGetlago(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58584,7 +73333,7 @@ func (s *Sources) PutSourceGetlago(ctx context.Context, request operations.PutSo } // PutSourceGithub - Update a Source fully -func (s *Sources) PutSourceGithub(ctx context.Context, request operations.PutSourceGithubRequest) (*operations.PutSourceGithubResponse, error) { +func (s *Sources) PutSourceGithub(ctx context.Context, request operations.PutSourceGithubRequest, opts ...operations.Option) (*operations.PutSourceGithubResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGithub", @@ -58592,6 +73341,17 @@ func (s *Sources) PutSourceGithub(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58603,6 +73363,17 @@ func (s *Sources) PutSourceGithub(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58672,7 +73443,7 @@ func (s *Sources) PutSourceGithub(ctx context.Context, request operations.PutSou } // PutSourceGitlab - Update a Source fully -func (s *Sources) PutSourceGitlab(ctx context.Context, request operations.PutSourceGitlabRequest) (*operations.PutSourceGitlabResponse, error) { +func (s *Sources) PutSourceGitlab(ctx context.Context, request operations.PutSourceGitlabRequest, opts ...operations.Option) (*operations.PutSourceGitlabResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGitlab", @@ -58680,6 +73451,17 @@ func (s *Sources) PutSourceGitlab(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58691,6 +73473,17 @@ func (s *Sources) PutSourceGitlab(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58760,7 +73553,7 @@ func (s *Sources) PutSourceGitlab(ctx context.Context, request operations.PutSou } // PutSourceGlassfrog - Update a Source fully -func (s *Sources) PutSourceGlassfrog(ctx context.Context, request operations.PutSourceGlassfrogRequest) (*operations.PutSourceGlassfrogResponse, error) { +func (s *Sources) PutSourceGlassfrog(ctx context.Context, request operations.PutSourceGlassfrogRequest, opts ...operations.Option) (*operations.PutSourceGlassfrogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGlassfrog", @@ -58768,6 +73561,17 @@ func (s *Sources) PutSourceGlassfrog(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58779,6 +73583,17 @@ func (s *Sources) PutSourceGlassfrog(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58848,7 +73663,7 @@ func (s *Sources) PutSourceGlassfrog(ctx context.Context, request operations.Put } // PutSourceGnews - Update a Source fully -func (s *Sources) PutSourceGnews(ctx context.Context, request operations.PutSourceGnewsRequest) (*operations.PutSourceGnewsResponse, error) { +func (s *Sources) PutSourceGnews(ctx context.Context, request operations.PutSourceGnewsRequest, opts ...operations.Option) (*operations.PutSourceGnewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGnews", @@ -58856,6 +73671,17 @@ func (s *Sources) PutSourceGnews(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -58867,6 +73693,17 @@ func (s *Sources) PutSourceGnews(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58935,26 +73772,48 @@ func (s *Sources) PutSourceGnews(ctx context.Context, request operations.PutSour } -// PutSourceGoogleAds - Update a Source fully -func (s *Sources) PutSourceGoogleAds(ctx context.Context, request operations.PutSourceGoogleAdsRequest) (*operations.PutSourceGoogleAdsResponse, error) { +// PutSourceGoldcast - Update a Source fully +func (s *Sources) PutSourceGoldcast(ctx context.Context, request operations.PutSourceGoldcastRequest, opts ...operations.Option) (*operations.PutSourceGoldcastResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceGoogleAds", + OperationID: "putSourceGoldcast", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoogleAdsPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoldcastPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -58996,7 +73855,7 @@ func (s *Sources) PutSourceGoogleAds(ctx context.Context, request operations.Put } } - res := &operations.PutSourceGoogleAdsResponse{ + res := &operations.PutSourceGoldcastResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -59023,26 +73882,48 @@ func (s *Sources) PutSourceGoogleAds(ctx context.Context, request operations.Put } -// PutSourceGoogleAnalyticsDataAPI - Update a Source fully -func (s *Sources) PutSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.PutSourceGoogleAnalyticsDataAPIRequest) (*operations.PutSourceGoogleAnalyticsDataAPIResponse, error) { +// PutSourceGoogleAds - Update a Source fully +func (s *Sources) PutSourceGoogleAds(ctx context.Context, request operations.PutSourceGoogleAdsRequest, opts ...operations.Option) (*operations.PutSourceGoogleAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceGoogleAnalyticsDataApi", + OperationID: "putSourceGoogleAds", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoogleAnalyticsDataAPIPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoogleAdsPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59084,7 +73965,7 @@ func (s *Sources) PutSourceGoogleAnalyticsDataAPI(ctx context.Context, request o } } - res := &operations.PutSourceGoogleAnalyticsDataAPIResponse{ + res := &operations.PutSourceGoogleAdsResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -59111,26 +73992,48 @@ func (s *Sources) PutSourceGoogleAnalyticsDataAPI(ctx context.Context, request o } -// PutSourceGoogleAnalyticsV4ServiceAccountOnly - Update a Source fully -func (s *Sources) PutSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Context, request operations.PutSourceGoogleAnalyticsV4ServiceAccountOnlyRequest) (*operations.PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse, error) { +// PutSourceGoogleAnalyticsDataAPI - Update a Source fully +func (s *Sources) PutSourceGoogleAnalyticsDataAPI(ctx context.Context, request operations.PutSourceGoogleAnalyticsDataAPIRequest, opts ...operations.Option) (*operations.PutSourceGoogleAnalyticsDataAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, - OperationID: "putSourceGoogleAnalyticsV4ServiceAccountOnly", + OperationID: "putSourceGoogleAnalyticsDataApi", OAuth2Scopes: []string{}, SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoogleAnalyticsV4ServiceAccountOnlyPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourceGoogleAnalyticsDataAPIPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59172,7 +74075,7 @@ func (s *Sources) PutSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Conte } } - res := &operations.PutSourceGoogleAnalyticsV4ServiceAccountOnlyResponse{ + res := &operations.PutSourceGoogleAnalyticsDataAPIResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -59200,7 +74103,7 @@ func (s *Sources) PutSourceGoogleAnalyticsV4ServiceAccountOnly(ctx context.Conte } // PutSourceGoogleDirectory - Update a Source fully -func (s *Sources) PutSourceGoogleDirectory(ctx context.Context, request operations.PutSourceGoogleDirectoryRequest) (*operations.PutSourceGoogleDirectoryResponse, error) { +func (s *Sources) PutSourceGoogleDirectory(ctx context.Context, request operations.PutSourceGoogleDirectoryRequest, opts ...operations.Option) (*operations.PutSourceGoogleDirectoryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGoogleDirectory", @@ -59208,6 +74111,17 @@ func (s *Sources) PutSourceGoogleDirectory(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59219,6 +74133,17 @@ func (s *Sources) PutSourceGoogleDirectory(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59288,7 +74213,7 @@ func (s *Sources) PutSourceGoogleDirectory(ctx context.Context, request operatio } // PutSourceGoogleDrive - Update a Source fully -func (s *Sources) PutSourceGoogleDrive(ctx context.Context, request operations.PutSourceGoogleDriveRequest) (*operations.PutSourceGoogleDriveResponse, error) { +func (s *Sources) PutSourceGoogleDrive(ctx context.Context, request operations.PutSourceGoogleDriveRequest, opts ...operations.Option) (*operations.PutSourceGoogleDriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGoogleDrive", @@ -59296,6 +74221,17 @@ func (s *Sources) PutSourceGoogleDrive(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59307,6 +74243,17 @@ func (s *Sources) PutSourceGoogleDrive(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59376,7 +74323,7 @@ func (s *Sources) PutSourceGoogleDrive(ctx context.Context, request operations.P } // PutSourceGooglePagespeedInsights - Update a Source fully -func (s *Sources) PutSourceGooglePagespeedInsights(ctx context.Context, request operations.PutSourceGooglePagespeedInsightsRequest) (*operations.PutSourceGooglePagespeedInsightsResponse, error) { +func (s *Sources) PutSourceGooglePagespeedInsights(ctx context.Context, request operations.PutSourceGooglePagespeedInsightsRequest, opts ...operations.Option) (*operations.PutSourceGooglePagespeedInsightsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGooglePagespeedInsights", @@ -59384,6 +74331,17 @@ func (s *Sources) PutSourceGooglePagespeedInsights(ctx context.Context, request SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59395,6 +74353,17 @@ func (s *Sources) PutSourceGooglePagespeedInsights(ctx context.Context, request return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59464,7 +74433,7 @@ func (s *Sources) PutSourceGooglePagespeedInsights(ctx context.Context, request } // PutSourceGoogleSearchConsole - Update a Source fully -func (s *Sources) PutSourceGoogleSearchConsole(ctx context.Context, request operations.PutSourceGoogleSearchConsoleRequest) (*operations.PutSourceGoogleSearchConsoleResponse, error) { +func (s *Sources) PutSourceGoogleSearchConsole(ctx context.Context, request operations.PutSourceGoogleSearchConsoleRequest, opts ...operations.Option) (*operations.PutSourceGoogleSearchConsoleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGoogleSearchConsole", @@ -59472,6 +74441,17 @@ func (s *Sources) PutSourceGoogleSearchConsole(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59483,6 +74463,17 @@ func (s *Sources) PutSourceGoogleSearchConsole(ctx context.Context, request oper return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59552,7 +74543,7 @@ func (s *Sources) PutSourceGoogleSearchConsole(ctx context.Context, request oper } // PutSourceGoogleSheets - Update a Source fully -func (s *Sources) PutSourceGoogleSheets(ctx context.Context, request operations.PutSourceGoogleSheetsRequest) (*operations.PutSourceGoogleSheetsResponse, error) { +func (s *Sources) PutSourceGoogleSheets(ctx context.Context, request operations.PutSourceGoogleSheetsRequest, opts ...operations.Option) (*operations.PutSourceGoogleSheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGoogleSheets", @@ -59560,6 +74551,17 @@ func (s *Sources) PutSourceGoogleSheets(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59571,6 +74573,17 @@ func (s *Sources) PutSourceGoogleSheets(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59640,7 +74653,7 @@ func (s *Sources) PutSourceGoogleSheets(ctx context.Context, request operations. } // PutSourceGoogleWebfonts - Update a Source fully -func (s *Sources) PutSourceGoogleWebfonts(ctx context.Context, request operations.PutSourceGoogleWebfontsRequest) (*operations.PutSourceGoogleWebfontsResponse, error) { +func (s *Sources) PutSourceGoogleWebfonts(ctx context.Context, request operations.PutSourceGoogleWebfontsRequest, opts ...operations.Option) (*operations.PutSourceGoogleWebfontsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGoogleWebfonts", @@ -59648,6 +74661,17 @@ func (s *Sources) PutSourceGoogleWebfonts(ctx context.Context, request operation SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59659,6 +74683,17 @@ func (s *Sources) PutSourceGoogleWebfonts(ctx context.Context, request operation return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59728,7 +74763,7 @@ func (s *Sources) PutSourceGoogleWebfonts(ctx context.Context, request operation } // PutSourceGreenhouse - Update a Source fully -func (s *Sources) PutSourceGreenhouse(ctx context.Context, request operations.PutSourceGreenhouseRequest) (*operations.PutSourceGreenhouseResponse, error) { +func (s *Sources) PutSourceGreenhouse(ctx context.Context, request operations.PutSourceGreenhouseRequest, opts ...operations.Option) (*operations.PutSourceGreenhouseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGreenhouse", @@ -59736,6 +74771,17 @@ func (s *Sources) PutSourceGreenhouse(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59747,6 +74793,17 @@ func (s *Sources) PutSourceGreenhouse(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59816,7 +74873,7 @@ func (s *Sources) PutSourceGreenhouse(ctx context.Context, request operations.Pu } // PutSourceGridly - Update a Source fully -func (s *Sources) PutSourceGridly(ctx context.Context, request operations.PutSourceGridlyRequest) (*operations.PutSourceGridlyResponse, error) { +func (s *Sources) PutSourceGridly(ctx context.Context, request operations.PutSourceGridlyRequest, opts ...operations.Option) (*operations.PutSourceGridlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceGridly", @@ -59824,6 +74881,17 @@ func (s *Sources) PutSourceGridly(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59835,6 +74903,17 @@ func (s *Sources) PutSourceGridly(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59904,7 +74983,7 @@ func (s *Sources) PutSourceGridly(ctx context.Context, request operations.PutSou } // PutSourceHarvest - Update a Source fully -func (s *Sources) PutSourceHarvest(ctx context.Context, request operations.PutSourceHarvestRequest) (*operations.PutSourceHarvestResponse, error) { +func (s *Sources) PutSourceHarvest(ctx context.Context, request operations.PutSourceHarvestRequest, opts ...operations.Option) (*operations.PutSourceHarvestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceHarvest", @@ -59912,6 +74991,17 @@ func (s *Sources) PutSourceHarvest(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -59923,6 +75013,17 @@ func (s *Sources) PutSourceHarvest(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -59992,7 +75093,7 @@ func (s *Sources) PutSourceHarvest(ctx context.Context, request operations.PutSo } // PutSourceHubplanner - Update a Source fully -func (s *Sources) PutSourceHubplanner(ctx context.Context, request operations.PutSourceHubplannerRequest) (*operations.PutSourceHubplannerResponse, error) { +func (s *Sources) PutSourceHubplanner(ctx context.Context, request operations.PutSourceHubplannerRequest, opts ...operations.Option) (*operations.PutSourceHubplannerResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceHubplanner", @@ -60000,6 +75101,17 @@ func (s *Sources) PutSourceHubplanner(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60011,6 +75123,17 @@ func (s *Sources) PutSourceHubplanner(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60080,7 +75203,7 @@ func (s *Sources) PutSourceHubplanner(ctx context.Context, request operations.Pu } // PutSourceHubspot - Update a Source fully -func (s *Sources) PutSourceHubspot(ctx context.Context, request operations.PutSourceHubspotRequest) (*operations.PutSourceHubspotResponse, error) { +func (s *Sources) PutSourceHubspot(ctx context.Context, request operations.PutSourceHubspotRequest, opts ...operations.Option) (*operations.PutSourceHubspotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceHubspot", @@ -60088,6 +75211,17 @@ func (s *Sources) PutSourceHubspot(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60099,6 +75233,17 @@ func (s *Sources) PutSourceHubspot(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60168,7 +75313,7 @@ func (s *Sources) PutSourceHubspot(ctx context.Context, request operations.PutSo } // PutSourceInsightly - Update a Source fully -func (s *Sources) PutSourceInsightly(ctx context.Context, request operations.PutSourceInsightlyRequest) (*operations.PutSourceInsightlyResponse, error) { +func (s *Sources) PutSourceInsightly(ctx context.Context, request operations.PutSourceInsightlyRequest, opts ...operations.Option) (*operations.PutSourceInsightlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceInsightly", @@ -60176,6 +75321,17 @@ func (s *Sources) PutSourceInsightly(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60187,6 +75343,17 @@ func (s *Sources) PutSourceInsightly(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60256,7 +75423,7 @@ func (s *Sources) PutSourceInsightly(ctx context.Context, request operations.Put } // PutSourceInstagram - Update a Source fully -func (s *Sources) PutSourceInstagram(ctx context.Context, request operations.PutSourceInstagramRequest) (*operations.PutSourceInstagramResponse, error) { +func (s *Sources) PutSourceInstagram(ctx context.Context, request operations.PutSourceInstagramRequest, opts ...operations.Option) (*operations.PutSourceInstagramResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceInstagram", @@ -60264,6 +75431,17 @@ func (s *Sources) PutSourceInstagram(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60275,6 +75453,17 @@ func (s *Sources) PutSourceInstagram(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60344,7 +75533,7 @@ func (s *Sources) PutSourceInstagram(ctx context.Context, request operations.Put } // PutSourceInstatus - Update a Source fully -func (s *Sources) PutSourceInstatus(ctx context.Context, request operations.PutSourceInstatusRequest) (*operations.PutSourceInstatusResponse, error) { +func (s *Sources) PutSourceInstatus(ctx context.Context, request operations.PutSourceInstatusRequest, opts ...operations.Option) (*operations.PutSourceInstatusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceInstatus", @@ -60352,6 +75541,17 @@ func (s *Sources) PutSourceInstatus(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60363,6 +75563,17 @@ func (s *Sources) PutSourceInstatus(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60432,7 +75643,7 @@ func (s *Sources) PutSourceInstatus(ctx context.Context, request operations.PutS } // PutSourceIntercom - Update a Source fully -func (s *Sources) PutSourceIntercom(ctx context.Context, request operations.PutSourceIntercomRequest) (*operations.PutSourceIntercomResponse, error) { +func (s *Sources) PutSourceIntercom(ctx context.Context, request operations.PutSourceIntercomRequest, opts ...operations.Option) (*operations.PutSourceIntercomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceIntercom", @@ -60440,6 +75651,17 @@ func (s *Sources) PutSourceIntercom(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60451,6 +75673,17 @@ func (s *Sources) PutSourceIntercom(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60520,7 +75753,7 @@ func (s *Sources) PutSourceIntercom(ctx context.Context, request operations.PutS } // PutSourceIp2whois - Update a Source fully -func (s *Sources) PutSourceIp2whois(ctx context.Context, request operations.PutSourceIp2whoisRequest) (*operations.PutSourceIp2whoisResponse, error) { +func (s *Sources) PutSourceIp2whois(ctx context.Context, request operations.PutSourceIp2whoisRequest, opts ...operations.Option) (*operations.PutSourceIp2whoisResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceIp2whois", @@ -60528,6 +75761,17 @@ func (s *Sources) PutSourceIp2whois(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60539,6 +75783,17 @@ func (s *Sources) PutSourceIp2whois(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60608,7 +75863,7 @@ func (s *Sources) PutSourceIp2whois(ctx context.Context, request operations.PutS } // PutSourceIterable - Update a Source fully -func (s *Sources) PutSourceIterable(ctx context.Context, request operations.PutSourceIterableRequest) (*operations.PutSourceIterableResponse, error) { +func (s *Sources) PutSourceIterable(ctx context.Context, request operations.PutSourceIterableRequest, opts ...operations.Option) (*operations.PutSourceIterableResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceIterable", @@ -60616,6 +75871,17 @@ func (s *Sources) PutSourceIterable(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60627,6 +75893,17 @@ func (s *Sources) PutSourceIterable(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60696,7 +75973,7 @@ func (s *Sources) PutSourceIterable(ctx context.Context, request operations.PutS } // PutSourceJira - Update a Source fully -func (s *Sources) PutSourceJira(ctx context.Context, request operations.PutSourceJiraRequest) (*operations.PutSourceJiraResponse, error) { +func (s *Sources) PutSourceJira(ctx context.Context, request operations.PutSourceJiraRequest, opts ...operations.Option) (*operations.PutSourceJiraResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceJira", @@ -60704,6 +75981,17 @@ func (s *Sources) PutSourceJira(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60715,6 +76003,17 @@ func (s *Sources) PutSourceJira(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60784,7 +76083,7 @@ func (s *Sources) PutSourceJira(ctx context.Context, request operations.PutSourc } // PutSourceK6Cloud - Update a Source fully -func (s *Sources) PutSourceK6Cloud(ctx context.Context, request operations.PutSourceK6CloudRequest) (*operations.PutSourceK6CloudResponse, error) { +func (s *Sources) PutSourceK6Cloud(ctx context.Context, request operations.PutSourceK6CloudRequest, opts ...operations.Option) (*operations.PutSourceK6CloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceK6Cloud", @@ -60792,6 +76091,17 @@ func (s *Sources) PutSourceK6Cloud(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60803,6 +76113,17 @@ func (s *Sources) PutSourceK6Cloud(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60872,7 +76193,7 @@ func (s *Sources) PutSourceK6Cloud(ctx context.Context, request operations.PutSo } // PutSourceKlarna - Update a Source fully -func (s *Sources) PutSourceKlarna(ctx context.Context, request operations.PutSourceKlarnaRequest) (*operations.PutSourceKlarnaResponse, error) { +func (s *Sources) PutSourceKlarna(ctx context.Context, request operations.PutSourceKlarnaRequest, opts ...operations.Option) (*operations.PutSourceKlarnaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceKlarna", @@ -60880,6 +76201,17 @@ func (s *Sources) PutSourceKlarna(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60891,6 +76223,17 @@ func (s *Sources) PutSourceKlarna(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -60960,7 +76303,7 @@ func (s *Sources) PutSourceKlarna(ctx context.Context, request operations.PutSou } // PutSourceKlaviyo - Update a Source fully -func (s *Sources) PutSourceKlaviyo(ctx context.Context, request operations.PutSourceKlaviyoRequest) (*operations.PutSourceKlaviyoResponse, error) { +func (s *Sources) PutSourceKlaviyo(ctx context.Context, request operations.PutSourceKlaviyoRequest, opts ...operations.Option) (*operations.PutSourceKlaviyoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceKlaviyo", @@ -60968,6 +76311,17 @@ func (s *Sources) PutSourceKlaviyo(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -60979,6 +76333,17 @@ func (s *Sources) PutSourceKlaviyo(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61048,7 +76413,7 @@ func (s *Sources) PutSourceKlaviyo(ctx context.Context, request operations.PutSo } // PutSourceKyve - Update a Source fully -func (s *Sources) PutSourceKyve(ctx context.Context, request operations.PutSourceKyveRequest) (*operations.PutSourceKyveResponse, error) { +func (s *Sources) PutSourceKyve(ctx context.Context, request operations.PutSourceKyveRequest, opts ...operations.Option) (*operations.PutSourceKyveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceKyve", @@ -61056,6 +76421,17 @@ func (s *Sources) PutSourceKyve(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61067,6 +76443,17 @@ func (s *Sources) PutSourceKyve(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61136,7 +76523,7 @@ func (s *Sources) PutSourceKyve(ctx context.Context, request operations.PutSourc } // PutSourceLaunchdarkly - Update a Source fully -func (s *Sources) PutSourceLaunchdarkly(ctx context.Context, request operations.PutSourceLaunchdarklyRequest) (*operations.PutSourceLaunchdarklyResponse, error) { +func (s *Sources) PutSourceLaunchdarkly(ctx context.Context, request operations.PutSourceLaunchdarklyRequest, opts ...operations.Option) (*operations.PutSourceLaunchdarklyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLaunchdarkly", @@ -61144,6 +76531,17 @@ func (s *Sources) PutSourceLaunchdarkly(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61155,6 +76553,17 @@ func (s *Sources) PutSourceLaunchdarkly(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61224,7 +76633,7 @@ func (s *Sources) PutSourceLaunchdarkly(ctx context.Context, request operations. } // PutSourceLemlist - Update a Source fully -func (s *Sources) PutSourceLemlist(ctx context.Context, request operations.PutSourceLemlistRequest) (*operations.PutSourceLemlistResponse, error) { +func (s *Sources) PutSourceLemlist(ctx context.Context, request operations.PutSourceLemlistRequest, opts ...operations.Option) (*operations.PutSourceLemlistResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLemlist", @@ -61232,6 +76641,17 @@ func (s *Sources) PutSourceLemlist(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61243,6 +76663,17 @@ func (s *Sources) PutSourceLemlist(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61312,7 +76743,7 @@ func (s *Sources) PutSourceLemlist(ctx context.Context, request operations.PutSo } // PutSourceLeverHiring - Update a Source fully -func (s *Sources) PutSourceLeverHiring(ctx context.Context, request operations.PutSourceLeverHiringRequest) (*operations.PutSourceLeverHiringResponse, error) { +func (s *Sources) PutSourceLeverHiring(ctx context.Context, request operations.PutSourceLeverHiringRequest, opts ...operations.Option) (*operations.PutSourceLeverHiringResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLeverHiring", @@ -61320,6 +76751,17 @@ func (s *Sources) PutSourceLeverHiring(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61331,6 +76773,17 @@ func (s *Sources) PutSourceLeverHiring(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61400,7 +76853,7 @@ func (s *Sources) PutSourceLeverHiring(ctx context.Context, request operations.P } // PutSourceLinkedinAds - Update a Source fully -func (s *Sources) PutSourceLinkedinAds(ctx context.Context, request operations.PutSourceLinkedinAdsRequest) (*operations.PutSourceLinkedinAdsResponse, error) { +func (s *Sources) PutSourceLinkedinAds(ctx context.Context, request operations.PutSourceLinkedinAdsRequest, opts ...operations.Option) (*operations.PutSourceLinkedinAdsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLinkedinAds", @@ -61408,6 +76861,17 @@ func (s *Sources) PutSourceLinkedinAds(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61419,6 +76883,17 @@ func (s *Sources) PutSourceLinkedinAds(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61488,7 +76963,7 @@ func (s *Sources) PutSourceLinkedinAds(ctx context.Context, request operations.P } // PutSourceLinkedinPages - Update a Source fully -func (s *Sources) PutSourceLinkedinPages(ctx context.Context, request operations.PutSourceLinkedinPagesRequest) (*operations.PutSourceLinkedinPagesResponse, error) { +func (s *Sources) PutSourceLinkedinPages(ctx context.Context, request operations.PutSourceLinkedinPagesRequest, opts ...operations.Option) (*operations.PutSourceLinkedinPagesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLinkedinPages", @@ -61496,6 +76971,17 @@ func (s *Sources) PutSourceLinkedinPages(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61507,6 +76993,17 @@ func (s *Sources) PutSourceLinkedinPages(ctx context.Context, request operations return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61576,7 +77073,7 @@ func (s *Sources) PutSourceLinkedinPages(ctx context.Context, request operations } // PutSourceLinnworks - Update a Source fully -func (s *Sources) PutSourceLinnworks(ctx context.Context, request operations.PutSourceLinnworksRequest) (*operations.PutSourceLinnworksResponse, error) { +func (s *Sources) PutSourceLinnworks(ctx context.Context, request operations.PutSourceLinnworksRequest, opts ...operations.Option) (*operations.PutSourceLinnworksResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLinnworks", @@ -61584,6 +77081,17 @@ func (s *Sources) PutSourceLinnworks(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61595,6 +77103,17 @@ func (s *Sources) PutSourceLinnworks(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61664,7 +77183,7 @@ func (s *Sources) PutSourceLinnworks(ctx context.Context, request operations.Put } // PutSourceLokalise - Update a Source fully -func (s *Sources) PutSourceLokalise(ctx context.Context, request operations.PutSourceLokaliseRequest) (*operations.PutSourceLokaliseResponse, error) { +func (s *Sources) PutSourceLokalise(ctx context.Context, request operations.PutSourceLokaliseRequest, opts ...operations.Option) (*operations.PutSourceLokaliseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceLokalise", @@ -61672,6 +77191,17 @@ func (s *Sources) PutSourceLokalise(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61683,6 +77213,17 @@ func (s *Sources) PutSourceLokalise(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61752,7 +77293,7 @@ func (s *Sources) PutSourceLokalise(ctx context.Context, request operations.PutS } // PutSourceMailchimp - Update a Source fully -func (s *Sources) PutSourceMailchimp(ctx context.Context, request operations.PutSourceMailchimpRequest) (*operations.PutSourceMailchimpResponse, error) { +func (s *Sources) PutSourceMailchimp(ctx context.Context, request operations.PutSourceMailchimpRequest, opts ...operations.Option) (*operations.PutSourceMailchimpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMailchimp", @@ -61760,6 +77301,17 @@ func (s *Sources) PutSourceMailchimp(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61771,6 +77323,17 @@ func (s *Sources) PutSourceMailchimp(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61840,7 +77403,7 @@ func (s *Sources) PutSourceMailchimp(ctx context.Context, request operations.Put } // PutSourceMailgun - Update a Source fully -func (s *Sources) PutSourceMailgun(ctx context.Context, request operations.PutSourceMailgunRequest) (*operations.PutSourceMailgunResponse, error) { +func (s *Sources) PutSourceMailgun(ctx context.Context, request operations.PutSourceMailgunRequest, opts ...operations.Option) (*operations.PutSourceMailgunResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMailgun", @@ -61848,6 +77411,17 @@ func (s *Sources) PutSourceMailgun(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61859,6 +77433,17 @@ func (s *Sources) PutSourceMailgun(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -61928,7 +77513,7 @@ func (s *Sources) PutSourceMailgun(ctx context.Context, request operations.PutSo } // PutSourceMailjetSms - Update a Source fully -func (s *Sources) PutSourceMailjetSms(ctx context.Context, request operations.PutSourceMailjetSmsRequest) (*operations.PutSourceMailjetSmsResponse, error) { +func (s *Sources) PutSourceMailjetSms(ctx context.Context, request operations.PutSourceMailjetSmsRequest, opts ...operations.Option) (*operations.PutSourceMailjetSmsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMailjetSms", @@ -61936,6 +77521,17 @@ func (s *Sources) PutSourceMailjetSms(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -61947,6 +77543,17 @@ func (s *Sources) PutSourceMailjetSms(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62016,7 +77623,7 @@ func (s *Sources) PutSourceMailjetSms(ctx context.Context, request operations.Pu } // PutSourceMarketo - Update a Source fully -func (s *Sources) PutSourceMarketo(ctx context.Context, request operations.PutSourceMarketoRequest) (*operations.PutSourceMarketoResponse, error) { +func (s *Sources) PutSourceMarketo(ctx context.Context, request operations.PutSourceMarketoRequest, opts ...operations.Option) (*operations.PutSourceMarketoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMarketo", @@ -62024,6 +77631,17 @@ func (s *Sources) PutSourceMarketo(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62035,6 +77653,17 @@ func (s *Sources) PutSourceMarketo(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62104,7 +77733,7 @@ func (s *Sources) PutSourceMarketo(ctx context.Context, request operations.PutSo } // PutSourceMetabase - Update a Source fully -func (s *Sources) PutSourceMetabase(ctx context.Context, request operations.PutSourceMetabaseRequest) (*operations.PutSourceMetabaseResponse, error) { +func (s *Sources) PutSourceMetabase(ctx context.Context, request operations.PutSourceMetabaseRequest, opts ...operations.Option) (*operations.PutSourceMetabaseResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMetabase", @@ -62112,6 +77741,17 @@ func (s *Sources) PutSourceMetabase(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62123,6 +77763,17 @@ func (s *Sources) PutSourceMetabase(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62192,7 +77843,7 @@ func (s *Sources) PutSourceMetabase(ctx context.Context, request operations.PutS } // PutSourceMicrosoftOnedrive - Update a Source fully -func (s *Sources) PutSourceMicrosoftOnedrive(ctx context.Context, request operations.PutSourceMicrosoftOnedriveRequest) (*operations.PutSourceMicrosoftOnedriveResponse, error) { +func (s *Sources) PutSourceMicrosoftOnedrive(ctx context.Context, request operations.PutSourceMicrosoftOnedriveRequest, opts ...operations.Option) (*operations.PutSourceMicrosoftOnedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMicrosoftOnedrive", @@ -62200,6 +77851,17 @@ func (s *Sources) PutSourceMicrosoftOnedrive(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62211,6 +77873,17 @@ func (s *Sources) PutSourceMicrosoftOnedrive(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62280,7 +77953,7 @@ func (s *Sources) PutSourceMicrosoftOnedrive(ctx context.Context, request operat } // PutSourceMicrosoftSharepoint - Update a Source fully -func (s *Sources) PutSourceMicrosoftSharepoint(ctx context.Context, request operations.PutSourceMicrosoftSharepointRequest) (*operations.PutSourceMicrosoftSharepointResponse, error) { +func (s *Sources) PutSourceMicrosoftSharepoint(ctx context.Context, request operations.PutSourceMicrosoftSharepointRequest, opts ...operations.Option) (*operations.PutSourceMicrosoftSharepointResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMicrosoftSharepoint", @@ -62288,6 +77961,17 @@ func (s *Sources) PutSourceMicrosoftSharepoint(ctx context.Context, request oper SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62299,6 +77983,17 @@ func (s *Sources) PutSourceMicrosoftSharepoint(ctx context.Context, request oper return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62368,7 +78063,7 @@ func (s *Sources) PutSourceMicrosoftSharepoint(ctx context.Context, request oper } // PutSourceMicrosoftTeams - Update a Source fully -func (s *Sources) PutSourceMicrosoftTeams(ctx context.Context, request operations.PutSourceMicrosoftTeamsRequest) (*operations.PutSourceMicrosoftTeamsResponse, error) { +func (s *Sources) PutSourceMicrosoftTeams(ctx context.Context, request operations.PutSourceMicrosoftTeamsRequest, opts ...operations.Option) (*operations.PutSourceMicrosoftTeamsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMicrosoftTeams", @@ -62376,6 +78071,17 @@ func (s *Sources) PutSourceMicrosoftTeams(ctx context.Context, request operation SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62387,6 +78093,17 @@ func (s *Sources) PutSourceMicrosoftTeams(ctx context.Context, request operation return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62456,7 +78173,7 @@ func (s *Sources) PutSourceMicrosoftTeams(ctx context.Context, request operation } // PutSourceMixpanel - Update a Source fully -func (s *Sources) PutSourceMixpanel(ctx context.Context, request operations.PutSourceMixpanelRequest) (*operations.PutSourceMixpanelResponse, error) { +func (s *Sources) PutSourceMixpanel(ctx context.Context, request operations.PutSourceMixpanelRequest, opts ...operations.Option) (*operations.PutSourceMixpanelResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMixpanel", @@ -62464,6 +78181,17 @@ func (s *Sources) PutSourceMixpanel(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62475,6 +78203,17 @@ func (s *Sources) PutSourceMixpanel(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62544,7 +78283,7 @@ func (s *Sources) PutSourceMixpanel(ctx context.Context, request operations.PutS } // PutSourceMonday - Update a Source fully -func (s *Sources) PutSourceMonday(ctx context.Context, request operations.PutSourceMondayRequest) (*operations.PutSourceMondayResponse, error) { +func (s *Sources) PutSourceMonday(ctx context.Context, request operations.PutSourceMondayRequest, opts ...operations.Option) (*operations.PutSourceMondayResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMonday", @@ -62552,6 +78291,17 @@ func (s *Sources) PutSourceMonday(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62563,6 +78313,17 @@ func (s *Sources) PutSourceMonday(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62632,7 +78393,7 @@ func (s *Sources) PutSourceMonday(ctx context.Context, request operations.PutSou } // PutSourceMongodbInternalPoc - Update a Source fully -func (s *Sources) PutSourceMongodbInternalPoc(ctx context.Context, request operations.PutSourceMongodbInternalPocRequest) (*operations.PutSourceMongodbInternalPocResponse, error) { +func (s *Sources) PutSourceMongodbInternalPoc(ctx context.Context, request operations.PutSourceMongodbInternalPocRequest, opts ...operations.Option) (*operations.PutSourceMongodbInternalPocResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMongodbInternalPoc", @@ -62640,6 +78401,17 @@ func (s *Sources) PutSourceMongodbInternalPoc(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62651,6 +78423,17 @@ func (s *Sources) PutSourceMongodbInternalPoc(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62720,7 +78503,7 @@ func (s *Sources) PutSourceMongodbInternalPoc(ctx context.Context, request opera } // PutSourceMongodbV2 - Update a Source fully -func (s *Sources) PutSourceMongodbV2(ctx context.Context, request operations.PutSourceMongodbV2Request) (*operations.PutSourceMongodbV2Response, error) { +func (s *Sources) PutSourceMongodbV2(ctx context.Context, request operations.PutSourceMongodbV2Request, opts ...operations.Option) (*operations.PutSourceMongodbV2Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMongodbV2", @@ -62728,6 +78511,17 @@ func (s *Sources) PutSourceMongodbV2(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62739,6 +78533,17 @@ func (s *Sources) PutSourceMongodbV2(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62808,7 +78613,7 @@ func (s *Sources) PutSourceMongodbV2(ctx context.Context, request operations.Put } // PutSourceMssql - Update a Source fully -func (s *Sources) PutSourceMssql(ctx context.Context, request operations.PutSourceMssqlRequest) (*operations.PutSourceMssqlResponse, error) { +func (s *Sources) PutSourceMssql(ctx context.Context, request operations.PutSourceMssqlRequest, opts ...operations.Option) (*operations.PutSourceMssqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMssql", @@ -62816,6 +78621,17 @@ func (s *Sources) PutSourceMssql(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62827,6 +78643,17 @@ func (s *Sources) PutSourceMssql(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62896,7 +78723,7 @@ func (s *Sources) PutSourceMssql(ctx context.Context, request operations.PutSour } // PutSourceMyHours - Update a Source fully -func (s *Sources) PutSourceMyHours(ctx context.Context, request operations.PutSourceMyHoursRequest) (*operations.PutSourceMyHoursResponse, error) { +func (s *Sources) PutSourceMyHours(ctx context.Context, request operations.PutSourceMyHoursRequest, opts ...operations.Option) (*operations.PutSourceMyHoursResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMyHours", @@ -62904,6 +78731,17 @@ func (s *Sources) PutSourceMyHours(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -62915,6 +78753,17 @@ func (s *Sources) PutSourceMyHours(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -62984,7 +78833,7 @@ func (s *Sources) PutSourceMyHours(ctx context.Context, request operations.PutSo } // PutSourceMysql - Update a Source fully -func (s *Sources) PutSourceMysql(ctx context.Context, request operations.PutSourceMysqlRequest) (*operations.PutSourceMysqlResponse, error) { +func (s *Sources) PutSourceMysql(ctx context.Context, request operations.PutSourceMysqlRequest, opts ...operations.Option) (*operations.PutSourceMysqlResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceMysql", @@ -62992,6 +78841,17 @@ func (s *Sources) PutSourceMysql(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63003,6 +78863,17 @@ func (s *Sources) PutSourceMysql(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63072,7 +78943,7 @@ func (s *Sources) PutSourceMysql(ctx context.Context, request operations.PutSour } // PutSourceNetsuite - Update a Source fully -func (s *Sources) PutSourceNetsuite(ctx context.Context, request operations.PutSourceNetsuiteRequest) (*operations.PutSourceNetsuiteResponse, error) { +func (s *Sources) PutSourceNetsuite(ctx context.Context, request operations.PutSourceNetsuiteRequest, opts ...operations.Option) (*operations.PutSourceNetsuiteResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceNetsuite", @@ -63080,6 +78951,17 @@ func (s *Sources) PutSourceNetsuite(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63091,6 +78973,17 @@ func (s *Sources) PutSourceNetsuite(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63160,7 +79053,7 @@ func (s *Sources) PutSourceNetsuite(ctx context.Context, request operations.PutS } // PutSourceNotion - Update a Source fully -func (s *Sources) PutSourceNotion(ctx context.Context, request operations.PutSourceNotionRequest) (*operations.PutSourceNotionResponse, error) { +func (s *Sources) PutSourceNotion(ctx context.Context, request operations.PutSourceNotionRequest, opts ...operations.Option) (*operations.PutSourceNotionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceNotion", @@ -63168,6 +79061,17 @@ func (s *Sources) PutSourceNotion(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63179,6 +79083,17 @@ func (s *Sources) PutSourceNotion(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63248,7 +79163,7 @@ func (s *Sources) PutSourceNotion(ctx context.Context, request operations.PutSou } // PutSourceNytimes - Update a Source fully -func (s *Sources) PutSourceNytimes(ctx context.Context, request operations.PutSourceNytimesRequest) (*operations.PutSourceNytimesResponse, error) { +func (s *Sources) PutSourceNytimes(ctx context.Context, request operations.PutSourceNytimesRequest, opts ...operations.Option) (*operations.PutSourceNytimesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceNytimes", @@ -63256,6 +79171,17 @@ func (s *Sources) PutSourceNytimes(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63267,6 +79193,17 @@ func (s *Sources) PutSourceNytimes(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63336,7 +79273,7 @@ func (s *Sources) PutSourceNytimes(ctx context.Context, request operations.PutSo } // PutSourceOkta - Update a Source fully -func (s *Sources) PutSourceOkta(ctx context.Context, request operations.PutSourceOktaRequest) (*operations.PutSourceOktaResponse, error) { +func (s *Sources) PutSourceOkta(ctx context.Context, request operations.PutSourceOktaRequest, opts ...operations.Option) (*operations.PutSourceOktaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOkta", @@ -63344,6 +79281,17 @@ func (s *Sources) PutSourceOkta(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63355,6 +79303,17 @@ func (s *Sources) PutSourceOkta(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63424,7 +79383,7 @@ func (s *Sources) PutSourceOkta(ctx context.Context, request operations.PutSourc } // PutSourceOmnisend - Update a Source fully -func (s *Sources) PutSourceOmnisend(ctx context.Context, request operations.PutSourceOmnisendRequest) (*operations.PutSourceOmnisendResponse, error) { +func (s *Sources) PutSourceOmnisend(ctx context.Context, request operations.PutSourceOmnisendRequest, opts ...operations.Option) (*operations.PutSourceOmnisendResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOmnisend", @@ -63432,6 +79391,17 @@ func (s *Sources) PutSourceOmnisend(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63443,6 +79413,17 @@ func (s *Sources) PutSourceOmnisend(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63512,7 +79493,7 @@ func (s *Sources) PutSourceOmnisend(ctx context.Context, request operations.PutS } // PutSourceOnesignal - Update a Source fully -func (s *Sources) PutSourceOnesignal(ctx context.Context, request operations.PutSourceOnesignalRequest) (*operations.PutSourceOnesignalResponse, error) { +func (s *Sources) PutSourceOnesignal(ctx context.Context, request operations.PutSourceOnesignalRequest, opts ...operations.Option) (*operations.PutSourceOnesignalResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOnesignal", @@ -63520,6 +79501,17 @@ func (s *Sources) PutSourceOnesignal(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63531,6 +79523,17 @@ func (s *Sources) PutSourceOnesignal(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63600,7 +79603,7 @@ func (s *Sources) PutSourceOnesignal(ctx context.Context, request operations.Put } // PutSourceOracle - Update a Source fully -func (s *Sources) PutSourceOracle(ctx context.Context, request operations.PutSourceOracleRequest) (*operations.PutSourceOracleResponse, error) { +func (s *Sources) PutSourceOracle(ctx context.Context, request operations.PutSourceOracleRequest, opts ...operations.Option) (*operations.PutSourceOracleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOracle", @@ -63608,6 +79611,17 @@ func (s *Sources) PutSourceOracle(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63619,6 +79633,17 @@ func (s *Sources) PutSourceOracle(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63688,7 +79713,7 @@ func (s *Sources) PutSourceOracle(ctx context.Context, request operations.PutSou } // PutSourceOrb - Update a Source fully -func (s *Sources) PutSourceOrb(ctx context.Context, request operations.PutSourceOrbRequest) (*operations.PutSourceOrbResponse, error) { +func (s *Sources) PutSourceOrb(ctx context.Context, request operations.PutSourceOrbRequest, opts ...operations.Option) (*operations.PutSourceOrbResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOrb", @@ -63696,6 +79721,17 @@ func (s *Sources) PutSourceOrb(ctx context.Context, request operations.PutSource SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63707,6 +79743,17 @@ func (s *Sources) PutSourceOrb(ctx context.Context, request operations.PutSource return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63776,7 +79823,7 @@ func (s *Sources) PutSourceOrb(ctx context.Context, request operations.PutSource } // PutSourceOrbit - Update a Source fully -func (s *Sources) PutSourceOrbit(ctx context.Context, request operations.PutSourceOrbitRequest) (*operations.PutSourceOrbitResponse, error) { +func (s *Sources) PutSourceOrbit(ctx context.Context, request operations.PutSourceOrbitRequest, opts ...operations.Option) (*operations.PutSourceOrbitResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOrbit", @@ -63784,6 +79831,17 @@ func (s *Sources) PutSourceOrbit(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63795,6 +79853,17 @@ func (s *Sources) PutSourceOrbit(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63864,7 +79933,7 @@ func (s *Sources) PutSourceOrbit(ctx context.Context, request operations.PutSour } // PutSourceOutbrainAmplify - Update a Source fully -func (s *Sources) PutSourceOutbrainAmplify(ctx context.Context, request operations.PutSourceOutbrainAmplifyRequest) (*operations.PutSourceOutbrainAmplifyResponse, error) { +func (s *Sources) PutSourceOutbrainAmplify(ctx context.Context, request operations.PutSourceOutbrainAmplifyRequest, opts ...operations.Option) (*operations.PutSourceOutbrainAmplifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOutbrainAmplify", @@ -63872,6 +79941,17 @@ func (s *Sources) PutSourceOutbrainAmplify(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63883,6 +79963,17 @@ func (s *Sources) PutSourceOutbrainAmplify(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -63952,7 +80043,7 @@ func (s *Sources) PutSourceOutbrainAmplify(ctx context.Context, request operatio } // PutSourceOutreach - Update a Source fully -func (s *Sources) PutSourceOutreach(ctx context.Context, request operations.PutSourceOutreachRequest) (*operations.PutSourceOutreachResponse, error) { +func (s *Sources) PutSourceOutreach(ctx context.Context, request operations.PutSourceOutreachRequest, opts ...operations.Option) (*operations.PutSourceOutreachResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceOutreach", @@ -63960,6 +80051,17 @@ func (s *Sources) PutSourceOutreach(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -63971,6 +80073,17 @@ func (s *Sources) PutSourceOutreach(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64040,7 +80153,7 @@ func (s *Sources) PutSourceOutreach(ctx context.Context, request operations.PutS } // PutSourcePaypalTransaction - Update a Source fully -func (s *Sources) PutSourcePaypalTransaction(ctx context.Context, request operations.PutSourcePaypalTransactionRequest) (*operations.PutSourcePaypalTransactionResponse, error) { +func (s *Sources) PutSourcePaypalTransaction(ctx context.Context, request operations.PutSourcePaypalTransactionRequest, opts ...operations.Option) (*operations.PutSourcePaypalTransactionResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePaypalTransaction", @@ -64048,6 +80161,17 @@ func (s *Sources) PutSourcePaypalTransaction(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64059,6 +80183,17 @@ func (s *Sources) PutSourcePaypalTransaction(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64128,7 +80263,7 @@ func (s *Sources) PutSourcePaypalTransaction(ctx context.Context, request operat } // PutSourcePaystack - Update a Source fully -func (s *Sources) PutSourcePaystack(ctx context.Context, request operations.PutSourcePaystackRequest) (*operations.PutSourcePaystackResponse, error) { +func (s *Sources) PutSourcePaystack(ctx context.Context, request operations.PutSourcePaystackRequest, opts ...operations.Option) (*operations.PutSourcePaystackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePaystack", @@ -64136,6 +80271,17 @@ func (s *Sources) PutSourcePaystack(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64147,6 +80293,17 @@ func (s *Sources) PutSourcePaystack(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64216,7 +80373,7 @@ func (s *Sources) PutSourcePaystack(ctx context.Context, request operations.PutS } // PutSourcePendo - Update a Source fully -func (s *Sources) PutSourcePendo(ctx context.Context, request operations.PutSourcePendoRequest) (*operations.PutSourcePendoResponse, error) { +func (s *Sources) PutSourcePendo(ctx context.Context, request operations.PutSourcePendoRequest, opts ...operations.Option) (*operations.PutSourcePendoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePendo", @@ -64224,6 +80381,17 @@ func (s *Sources) PutSourcePendo(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64235,6 +80403,17 @@ func (s *Sources) PutSourcePendo(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64304,7 +80483,7 @@ func (s *Sources) PutSourcePendo(ctx context.Context, request operations.PutSour } // PutSourcePersistiq - Update a Source fully -func (s *Sources) PutSourcePersistiq(ctx context.Context, request operations.PutSourcePersistiqRequest) (*operations.PutSourcePersistiqResponse, error) { +func (s *Sources) PutSourcePersistiq(ctx context.Context, request operations.PutSourcePersistiqRequest, opts ...operations.Option) (*operations.PutSourcePersistiqResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePersistiq", @@ -64312,6 +80491,17 @@ func (s *Sources) PutSourcePersistiq(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64323,6 +80513,17 @@ func (s *Sources) PutSourcePersistiq(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64392,7 +80593,7 @@ func (s *Sources) PutSourcePersistiq(ctx context.Context, request operations.Put } // PutSourcePexelsAPI - Update a Source fully -func (s *Sources) PutSourcePexelsAPI(ctx context.Context, request operations.PutSourcePexelsAPIRequest) (*operations.PutSourcePexelsAPIResponse, error) { +func (s *Sources) PutSourcePexelsAPI(ctx context.Context, request operations.PutSourcePexelsAPIRequest, opts ...operations.Option) (*operations.PutSourcePexelsAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePexelsApi", @@ -64400,6 +80601,17 @@ func (s *Sources) PutSourcePexelsAPI(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64411,6 +80623,17 @@ func (s *Sources) PutSourcePexelsAPI(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64480,7 +80703,7 @@ func (s *Sources) PutSourcePexelsAPI(ctx context.Context, request operations.Put } // PutSourcePinterest - Update a Source fully -func (s *Sources) PutSourcePinterest(ctx context.Context, request operations.PutSourcePinterestRequest) (*operations.PutSourcePinterestResponse, error) { +func (s *Sources) PutSourcePinterest(ctx context.Context, request operations.PutSourcePinterestRequest, opts ...operations.Option) (*operations.PutSourcePinterestResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePinterest", @@ -64488,6 +80711,17 @@ func (s *Sources) PutSourcePinterest(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64499,6 +80733,17 @@ func (s *Sources) PutSourcePinterest(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64568,7 +80813,7 @@ func (s *Sources) PutSourcePinterest(ctx context.Context, request operations.Put } // PutSourcePipedrive - Update a Source fully -func (s *Sources) PutSourcePipedrive(ctx context.Context, request operations.PutSourcePipedriveRequest) (*operations.PutSourcePipedriveResponse, error) { +func (s *Sources) PutSourcePipedrive(ctx context.Context, request operations.PutSourcePipedriveRequest, opts ...operations.Option) (*operations.PutSourcePipedriveResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePipedrive", @@ -64576,6 +80821,17 @@ func (s *Sources) PutSourcePipedrive(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64587,6 +80843,17 @@ func (s *Sources) PutSourcePipedrive(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64656,7 +80923,7 @@ func (s *Sources) PutSourcePipedrive(ctx context.Context, request operations.Put } // PutSourcePocket - Update a Source fully -func (s *Sources) PutSourcePocket(ctx context.Context, request operations.PutSourcePocketRequest) (*operations.PutSourcePocketResponse, error) { +func (s *Sources) PutSourcePocket(ctx context.Context, request operations.PutSourcePocketRequest, opts ...operations.Option) (*operations.PutSourcePocketResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePocket", @@ -64664,6 +80931,17 @@ func (s *Sources) PutSourcePocket(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64675,6 +80953,17 @@ func (s *Sources) PutSourcePocket(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64744,7 +81033,7 @@ func (s *Sources) PutSourcePocket(ctx context.Context, request operations.PutSou } // PutSourcePokeapi - Update a Source fully -func (s *Sources) PutSourcePokeapi(ctx context.Context, request operations.PutSourcePokeapiRequest) (*operations.PutSourcePokeapiResponse, error) { +func (s *Sources) PutSourcePokeapi(ctx context.Context, request operations.PutSourcePokeapiRequest, opts ...operations.Option) (*operations.PutSourcePokeapiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePokeapi", @@ -64752,6 +81041,17 @@ func (s *Sources) PutSourcePokeapi(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64763,6 +81063,17 @@ func (s *Sources) PutSourcePokeapi(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64832,7 +81143,7 @@ func (s *Sources) PutSourcePokeapi(ctx context.Context, request operations.PutSo } // PutSourcePolygonStockAPI - Update a Source fully -func (s *Sources) PutSourcePolygonStockAPI(ctx context.Context, request operations.PutSourcePolygonStockAPIRequest) (*operations.PutSourcePolygonStockAPIResponse, error) { +func (s *Sources) PutSourcePolygonStockAPI(ctx context.Context, request operations.PutSourcePolygonStockAPIRequest, opts ...operations.Option) (*operations.PutSourcePolygonStockAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePolygonStockApi", @@ -64840,6 +81151,17 @@ func (s *Sources) PutSourcePolygonStockAPI(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64851,6 +81173,17 @@ func (s *Sources) PutSourcePolygonStockAPI(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -64920,7 +81253,7 @@ func (s *Sources) PutSourcePolygonStockAPI(ctx context.Context, request operatio } // PutSourcePostgres - Update a Source fully -func (s *Sources) PutSourcePostgres(ctx context.Context, request operations.PutSourcePostgresRequest) (*operations.PutSourcePostgresResponse, error) { +func (s *Sources) PutSourcePostgres(ctx context.Context, request operations.PutSourcePostgresRequest, opts ...operations.Option) (*operations.PutSourcePostgresResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePostgres", @@ -64928,6 +81261,17 @@ func (s *Sources) PutSourcePostgres(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -64939,6 +81283,17 @@ func (s *Sources) PutSourcePostgres(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65008,7 +81363,7 @@ func (s *Sources) PutSourcePostgres(ctx context.Context, request operations.PutS } // PutSourcePosthog - Update a Source fully -func (s *Sources) PutSourcePosthog(ctx context.Context, request operations.PutSourcePosthogRequest) (*operations.PutSourcePosthogResponse, error) { +func (s *Sources) PutSourcePosthog(ctx context.Context, request operations.PutSourcePosthogRequest, opts ...operations.Option) (*operations.PutSourcePosthogResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePosthog", @@ -65016,6 +81371,17 @@ func (s *Sources) PutSourcePosthog(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65027,6 +81393,17 @@ func (s *Sources) PutSourcePosthog(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65096,7 +81473,7 @@ func (s *Sources) PutSourcePosthog(ctx context.Context, request operations.PutSo } // PutSourcePostmarkapp - Update a Source fully -func (s *Sources) PutSourcePostmarkapp(ctx context.Context, request operations.PutSourcePostmarkappRequest) (*operations.PutSourcePostmarkappResponse, error) { +func (s *Sources) PutSourcePostmarkapp(ctx context.Context, request operations.PutSourcePostmarkappRequest, opts ...operations.Option) (*operations.PutSourcePostmarkappResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePostmarkapp", @@ -65104,6 +81481,17 @@ func (s *Sources) PutSourcePostmarkapp(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65115,6 +81503,17 @@ func (s *Sources) PutSourcePostmarkapp(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65184,7 +81583,7 @@ func (s *Sources) PutSourcePostmarkapp(ctx context.Context, request operations.P } // PutSourcePrestashop - Update a Source fully -func (s *Sources) PutSourcePrestashop(ctx context.Context, request operations.PutSourcePrestashopRequest) (*operations.PutSourcePrestashopResponse, error) { +func (s *Sources) PutSourcePrestashop(ctx context.Context, request operations.PutSourcePrestashopRequest, opts ...operations.Option) (*operations.PutSourcePrestashopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePrestashop", @@ -65192,105 +81591,39 @@ func (s *Sources) PutSourcePrestashop(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) - opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) - if err != nil { - return nil, fmt.Errorf("error generating URL: %w", err) - } - - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePrestashopPutRequest", "json", `request:"mediaType=application/json"`) - if err != nil { - return nil, err - } - - req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - req.Header.Set("Accept", "*/*") - req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) - req.Header.Set("Content-Type", reqContentType) - - if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { - return nil, err + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, } - req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) - if err != nil { - return nil, err - } - - httpRes, err := s.sdkConfiguration.Client.Do(req) - if err != nil || httpRes == nil { - if err != nil { - err = fmt.Errorf("error sending request: %w", err) - } else { - err = fmt.Errorf("error sending request: no response") - } - - _, err = s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) - return nil, err - } else if utils.MatchStatusCodes([]string{}, httpRes.StatusCode) { - _httpRes, err := s.sdkConfiguration.Hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) - if err != nil { - return nil, err - } else if _httpRes != nil { - httpRes = _httpRes - } - } else { - httpRes, err = s.sdkConfiguration.Hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) - if err != nil { - return nil, err + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) } } - res := &operations.PutSourcePrestashopResponse{ - StatusCode: httpRes.StatusCode, - ContentType: httpRes.Header.Get("Content-Type"), - RawResponse: httpRes, - } - - rawBody, err := io.ReadAll(httpRes.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - httpRes.Body.Close() - httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody)) - - switch { - case httpRes.StatusCode >= 200 && httpRes.StatusCode < 300: - fallthrough - case httpRes.StatusCode == 403: - fallthrough - case httpRes.StatusCode == 404: - default: - return nil, errors.NewSDKError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) - } - - return res, nil - -} - -// PutSourcePunkAPI - Update a Source fully -func (s *Sources) PutSourcePunkAPI(ctx context.Context, request operations.PutSourcePunkAPIRequest) (*operations.PutSourcePunkAPIResponse, error) { - hookCtx := hooks.HookContext{ - Context: ctx, - OperationID: "putSourcePunkApi", - OAuth2Scopes: []string{}, - SecuritySource: s.sdkConfiguration.Security, - } - baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } - bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePunkAPIPutRequest", "json", `request:"mediaType=application/json"`) + bodyReader, reqContentType, err := utils.SerializeRequestBody(ctx, request, false, true, "SourcePrestashopPutRequest", "json", `request:"mediaType=application/json"`) if err != nil { return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65332,7 +81665,7 @@ func (s *Sources) PutSourcePunkAPI(ctx context.Context, request operations.PutSo } } - res := &operations.PutSourcePunkAPIResponse{ + res := &operations.PutSourcePrestashopResponse{ StatusCode: httpRes.StatusCode, ContentType: httpRes.Header.Get("Content-Type"), RawResponse: httpRes, @@ -65360,7 +81693,7 @@ func (s *Sources) PutSourcePunkAPI(ctx context.Context, request operations.PutSo } // PutSourcePypi - Update a Source fully -func (s *Sources) PutSourcePypi(ctx context.Context, request operations.PutSourcePypiRequest) (*operations.PutSourcePypiResponse, error) { +func (s *Sources) PutSourcePypi(ctx context.Context, request operations.PutSourcePypiRequest, opts ...operations.Option) (*operations.PutSourcePypiResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourcePypi", @@ -65368,6 +81701,17 @@ func (s *Sources) PutSourcePypi(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65379,6 +81723,17 @@ func (s *Sources) PutSourcePypi(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65448,7 +81803,7 @@ func (s *Sources) PutSourcePypi(ctx context.Context, request operations.PutSourc } // PutSourceQualaroo - Update a Source fully -func (s *Sources) PutSourceQualaroo(ctx context.Context, request operations.PutSourceQualarooRequest) (*operations.PutSourceQualarooResponse, error) { +func (s *Sources) PutSourceQualaroo(ctx context.Context, request operations.PutSourceQualarooRequest, opts ...operations.Option) (*operations.PutSourceQualarooResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceQualaroo", @@ -65456,6 +81811,17 @@ func (s *Sources) PutSourceQualaroo(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65467,6 +81833,17 @@ func (s *Sources) PutSourceQualaroo(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65536,7 +81913,7 @@ func (s *Sources) PutSourceQualaroo(ctx context.Context, request operations.PutS } // PutSourceRailz - Update a Source fully -func (s *Sources) PutSourceRailz(ctx context.Context, request operations.PutSourceRailzRequest) (*operations.PutSourceRailzResponse, error) { +func (s *Sources) PutSourceRailz(ctx context.Context, request operations.PutSourceRailzRequest, opts ...operations.Option) (*operations.PutSourceRailzResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRailz", @@ -65544,6 +81921,17 @@ func (s *Sources) PutSourceRailz(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65555,6 +81943,17 @@ func (s *Sources) PutSourceRailz(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65624,7 +82023,7 @@ func (s *Sources) PutSourceRailz(ctx context.Context, request operations.PutSour } // PutSourceRecharge - Update a Source fully -func (s *Sources) PutSourceRecharge(ctx context.Context, request operations.PutSourceRechargeRequest) (*operations.PutSourceRechargeResponse, error) { +func (s *Sources) PutSourceRecharge(ctx context.Context, request operations.PutSourceRechargeRequest, opts ...operations.Option) (*operations.PutSourceRechargeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRecharge", @@ -65632,6 +82031,17 @@ func (s *Sources) PutSourceRecharge(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65643,6 +82053,17 @@ func (s *Sources) PutSourceRecharge(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65712,7 +82133,7 @@ func (s *Sources) PutSourceRecharge(ctx context.Context, request operations.PutS } // PutSourceRecreation - Update a Source fully -func (s *Sources) PutSourceRecreation(ctx context.Context, request operations.PutSourceRecreationRequest) (*operations.PutSourceRecreationResponse, error) { +func (s *Sources) PutSourceRecreation(ctx context.Context, request operations.PutSourceRecreationRequest, opts ...operations.Option) (*operations.PutSourceRecreationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRecreation", @@ -65720,6 +82141,17 @@ func (s *Sources) PutSourceRecreation(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65731,6 +82163,17 @@ func (s *Sources) PutSourceRecreation(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65800,7 +82243,7 @@ func (s *Sources) PutSourceRecreation(ctx context.Context, request operations.Pu } // PutSourceRecruitee - Update a Source fully -func (s *Sources) PutSourceRecruitee(ctx context.Context, request operations.PutSourceRecruiteeRequest) (*operations.PutSourceRecruiteeResponse, error) { +func (s *Sources) PutSourceRecruitee(ctx context.Context, request operations.PutSourceRecruiteeRequest, opts ...operations.Option) (*operations.PutSourceRecruiteeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRecruitee", @@ -65808,6 +82251,17 @@ func (s *Sources) PutSourceRecruitee(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65819,6 +82273,17 @@ func (s *Sources) PutSourceRecruitee(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65888,7 +82353,7 @@ func (s *Sources) PutSourceRecruitee(ctx context.Context, request operations.Put } // PutSourceRecurly - Update a Source fully -func (s *Sources) PutSourceRecurly(ctx context.Context, request operations.PutSourceRecurlyRequest) (*operations.PutSourceRecurlyResponse, error) { +func (s *Sources) PutSourceRecurly(ctx context.Context, request operations.PutSourceRecurlyRequest, opts ...operations.Option) (*operations.PutSourceRecurlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRecurly", @@ -65896,6 +82361,17 @@ func (s *Sources) PutSourceRecurly(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65907,6 +82383,17 @@ func (s *Sources) PutSourceRecurly(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -65976,7 +82463,7 @@ func (s *Sources) PutSourceRecurly(ctx context.Context, request operations.PutSo } // PutSourceRedshift - Update a Source fully -func (s *Sources) PutSourceRedshift(ctx context.Context, request operations.PutSourceRedshiftRequest) (*operations.PutSourceRedshiftResponse, error) { +func (s *Sources) PutSourceRedshift(ctx context.Context, request operations.PutSourceRedshiftRequest, opts ...operations.Option) (*operations.PutSourceRedshiftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRedshift", @@ -65984,6 +82471,17 @@ func (s *Sources) PutSourceRedshift(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -65995,6 +82493,17 @@ func (s *Sources) PutSourceRedshift(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66064,7 +82573,7 @@ func (s *Sources) PutSourceRedshift(ctx context.Context, request operations.PutS } // PutSourceRetently - Update a Source fully -func (s *Sources) PutSourceRetently(ctx context.Context, request operations.PutSourceRetentlyRequest) (*operations.PutSourceRetentlyResponse, error) { +func (s *Sources) PutSourceRetently(ctx context.Context, request operations.PutSourceRetentlyRequest, opts ...operations.Option) (*operations.PutSourceRetentlyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRetently", @@ -66072,6 +82581,17 @@ func (s *Sources) PutSourceRetently(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66083,6 +82603,17 @@ func (s *Sources) PutSourceRetently(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66152,7 +82683,7 @@ func (s *Sources) PutSourceRetently(ctx context.Context, request operations.PutS } // PutSourceRkiCovid - Update a Source fully -func (s *Sources) PutSourceRkiCovid(ctx context.Context, request operations.PutSourceRkiCovidRequest) (*operations.PutSourceRkiCovidResponse, error) { +func (s *Sources) PutSourceRkiCovid(ctx context.Context, request operations.PutSourceRkiCovidRequest, opts ...operations.Option) (*operations.PutSourceRkiCovidResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRkiCovid", @@ -66160,6 +82691,17 @@ func (s *Sources) PutSourceRkiCovid(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66171,6 +82713,17 @@ func (s *Sources) PutSourceRkiCovid(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66240,7 +82793,7 @@ func (s *Sources) PutSourceRkiCovid(ctx context.Context, request operations.PutS } // PutSourceRss - Update a Source fully -func (s *Sources) PutSourceRss(ctx context.Context, request operations.PutSourceRssRequest) (*operations.PutSourceRssResponse, error) { +func (s *Sources) PutSourceRss(ctx context.Context, request operations.PutSourceRssRequest, opts ...operations.Option) (*operations.PutSourceRssResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceRss", @@ -66248,6 +82801,17 @@ func (s *Sources) PutSourceRss(ctx context.Context, request operations.PutSource SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66259,6 +82823,17 @@ func (s *Sources) PutSourceRss(ctx context.Context, request operations.PutSource return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66328,7 +82903,7 @@ func (s *Sources) PutSourceRss(ctx context.Context, request operations.PutSource } // PutSourceS3 - Update a Source fully -func (s *Sources) PutSourceS3(ctx context.Context, request operations.PutSourceS3Request) (*operations.PutSourceS3Response, error) { +func (s *Sources) PutSourceS3(ctx context.Context, request operations.PutSourceS3Request, opts ...operations.Option) (*operations.PutSourceS3Response, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceS3", @@ -66336,6 +82911,17 @@ func (s *Sources) PutSourceS3(ctx context.Context, request operations.PutSourceS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66347,6 +82933,17 @@ func (s *Sources) PutSourceS3(ctx context.Context, request operations.PutSourceS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66416,7 +83013,7 @@ func (s *Sources) PutSourceS3(ctx context.Context, request operations.PutSourceS } // PutSourceSalesforce - Update a Source fully -func (s *Sources) PutSourceSalesforce(ctx context.Context, request operations.PutSourceSalesforceRequest) (*operations.PutSourceSalesforceResponse, error) { +func (s *Sources) PutSourceSalesforce(ctx context.Context, request operations.PutSourceSalesforceRequest, opts ...operations.Option) (*operations.PutSourceSalesforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSalesforce", @@ -66424,6 +83021,17 @@ func (s *Sources) PutSourceSalesforce(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66435,6 +83043,17 @@ func (s *Sources) PutSourceSalesforce(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66504,7 +83123,7 @@ func (s *Sources) PutSourceSalesforce(ctx context.Context, request operations.Pu } // PutSourceSalesloft - Update a Source fully -func (s *Sources) PutSourceSalesloft(ctx context.Context, request operations.PutSourceSalesloftRequest) (*operations.PutSourceSalesloftResponse, error) { +func (s *Sources) PutSourceSalesloft(ctx context.Context, request operations.PutSourceSalesloftRequest, opts ...operations.Option) (*operations.PutSourceSalesloftResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSalesloft", @@ -66512,6 +83131,17 @@ func (s *Sources) PutSourceSalesloft(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66523,6 +83153,17 @@ func (s *Sources) PutSourceSalesloft(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66592,7 +83233,7 @@ func (s *Sources) PutSourceSalesloft(ctx context.Context, request operations.Put } // PutSourceSapFieldglass - Update a Source fully -func (s *Sources) PutSourceSapFieldglass(ctx context.Context, request operations.PutSourceSapFieldglassRequest) (*operations.PutSourceSapFieldglassResponse, error) { +func (s *Sources) PutSourceSapFieldglass(ctx context.Context, request operations.PutSourceSapFieldglassRequest, opts ...operations.Option) (*operations.PutSourceSapFieldglassResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSapFieldglass", @@ -66600,6 +83241,17 @@ func (s *Sources) PutSourceSapFieldglass(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66611,6 +83263,17 @@ func (s *Sources) PutSourceSapFieldglass(ctx context.Context, request operations return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66680,7 +83343,7 @@ func (s *Sources) PutSourceSapFieldglass(ctx context.Context, request operations } // PutSourceSecoda - Update a Source fully -func (s *Sources) PutSourceSecoda(ctx context.Context, request operations.PutSourceSecodaRequest) (*operations.PutSourceSecodaResponse, error) { +func (s *Sources) PutSourceSecoda(ctx context.Context, request operations.PutSourceSecodaRequest, opts ...operations.Option) (*operations.PutSourceSecodaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSecoda", @@ -66688,6 +83351,17 @@ func (s *Sources) PutSourceSecoda(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66699,6 +83373,17 @@ func (s *Sources) PutSourceSecoda(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66768,7 +83453,7 @@ func (s *Sources) PutSourceSecoda(ctx context.Context, request operations.PutSou } // PutSourceSendgrid - Update a Source fully -func (s *Sources) PutSourceSendgrid(ctx context.Context, request operations.PutSourceSendgridRequest) (*operations.PutSourceSendgridResponse, error) { +func (s *Sources) PutSourceSendgrid(ctx context.Context, request operations.PutSourceSendgridRequest, opts ...operations.Option) (*operations.PutSourceSendgridResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSendgrid", @@ -66776,6 +83461,17 @@ func (s *Sources) PutSourceSendgrid(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66787,6 +83483,17 @@ func (s *Sources) PutSourceSendgrid(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66856,7 +83563,7 @@ func (s *Sources) PutSourceSendgrid(ctx context.Context, request operations.PutS } // PutSourceSendinblue - Update a Source fully -func (s *Sources) PutSourceSendinblue(ctx context.Context, request operations.PutSourceSendinblueRequest) (*operations.PutSourceSendinblueResponse, error) { +func (s *Sources) PutSourceSendinblue(ctx context.Context, request operations.PutSourceSendinblueRequest, opts ...operations.Option) (*operations.PutSourceSendinblueResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSendinblue", @@ -66864,6 +83571,17 @@ func (s *Sources) PutSourceSendinblue(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66875,6 +83593,17 @@ func (s *Sources) PutSourceSendinblue(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -66944,7 +83673,7 @@ func (s *Sources) PutSourceSendinblue(ctx context.Context, request operations.Pu } // PutSourceSenseforce - Update a Source fully -func (s *Sources) PutSourceSenseforce(ctx context.Context, request operations.PutSourceSenseforceRequest) (*operations.PutSourceSenseforceResponse, error) { +func (s *Sources) PutSourceSenseforce(ctx context.Context, request operations.PutSourceSenseforceRequest, opts ...operations.Option) (*operations.PutSourceSenseforceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSenseforce", @@ -66952,6 +83681,17 @@ func (s *Sources) PutSourceSenseforce(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -66963,6 +83703,17 @@ func (s *Sources) PutSourceSenseforce(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67032,7 +83783,7 @@ func (s *Sources) PutSourceSenseforce(ctx context.Context, request operations.Pu } // PutSourceSentry - Update a Source fully -func (s *Sources) PutSourceSentry(ctx context.Context, request operations.PutSourceSentryRequest) (*operations.PutSourceSentryResponse, error) { +func (s *Sources) PutSourceSentry(ctx context.Context, request operations.PutSourceSentryRequest, opts ...operations.Option) (*operations.PutSourceSentryResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSentry", @@ -67040,6 +83791,17 @@ func (s *Sources) PutSourceSentry(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67051,6 +83813,17 @@ func (s *Sources) PutSourceSentry(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67120,7 +83893,7 @@ func (s *Sources) PutSourceSentry(ctx context.Context, request operations.PutSou } // PutSourceSftp - Update a Source fully -func (s *Sources) PutSourceSftp(ctx context.Context, request operations.PutSourceSftpRequest) (*operations.PutSourceSftpResponse, error) { +func (s *Sources) PutSourceSftp(ctx context.Context, request operations.PutSourceSftpRequest, opts ...operations.Option) (*operations.PutSourceSftpResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSftp", @@ -67128,6 +83901,17 @@ func (s *Sources) PutSourceSftp(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67139,6 +83923,17 @@ func (s *Sources) PutSourceSftp(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67208,7 +84003,7 @@ func (s *Sources) PutSourceSftp(ctx context.Context, request operations.PutSourc } // PutSourceSftpBulk - Update a Source fully -func (s *Sources) PutSourceSftpBulk(ctx context.Context, request operations.PutSourceSftpBulkRequest) (*operations.PutSourceSftpBulkResponse, error) { +func (s *Sources) PutSourceSftpBulk(ctx context.Context, request operations.PutSourceSftpBulkRequest, opts ...operations.Option) (*operations.PutSourceSftpBulkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSftpBulk", @@ -67216,6 +84011,17 @@ func (s *Sources) PutSourceSftpBulk(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67227,6 +84033,17 @@ func (s *Sources) PutSourceSftpBulk(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67296,7 +84113,7 @@ func (s *Sources) PutSourceSftpBulk(ctx context.Context, request operations.PutS } // PutSourceShopify - Update a Source fully -func (s *Sources) PutSourceShopify(ctx context.Context, request operations.PutSourceShopifyRequest) (*operations.PutSourceShopifyResponse, error) { +func (s *Sources) PutSourceShopify(ctx context.Context, request operations.PutSourceShopifyRequest, opts ...operations.Option) (*operations.PutSourceShopifyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceShopify", @@ -67304,6 +84121,17 @@ func (s *Sources) PutSourceShopify(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67315,6 +84143,17 @@ func (s *Sources) PutSourceShopify(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67384,7 +84223,7 @@ func (s *Sources) PutSourceShopify(ctx context.Context, request operations.PutSo } // PutSourceShortio - Update a Source fully -func (s *Sources) PutSourceShortio(ctx context.Context, request operations.PutSourceShortioRequest) (*operations.PutSourceShortioResponse, error) { +func (s *Sources) PutSourceShortio(ctx context.Context, request operations.PutSourceShortioRequest, opts ...operations.Option) (*operations.PutSourceShortioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceShortio", @@ -67392,6 +84231,17 @@ func (s *Sources) PutSourceShortio(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67403,6 +84253,17 @@ func (s *Sources) PutSourceShortio(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67472,7 +84333,7 @@ func (s *Sources) PutSourceShortio(ctx context.Context, request operations.PutSo } // PutSourceSlack - Update a Source fully -func (s *Sources) PutSourceSlack(ctx context.Context, request operations.PutSourceSlackRequest) (*operations.PutSourceSlackResponse, error) { +func (s *Sources) PutSourceSlack(ctx context.Context, request operations.PutSourceSlackRequest, opts ...operations.Option) (*operations.PutSourceSlackResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSlack", @@ -67480,6 +84341,17 @@ func (s *Sources) PutSourceSlack(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67491,6 +84363,17 @@ func (s *Sources) PutSourceSlack(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67560,7 +84443,7 @@ func (s *Sources) PutSourceSlack(ctx context.Context, request operations.PutSour } // PutSourceSmaily - Update a Source fully -func (s *Sources) PutSourceSmaily(ctx context.Context, request operations.PutSourceSmailyRequest) (*operations.PutSourceSmailyResponse, error) { +func (s *Sources) PutSourceSmaily(ctx context.Context, request operations.PutSourceSmailyRequest, opts ...operations.Option) (*operations.PutSourceSmailyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSmaily", @@ -67568,6 +84451,17 @@ func (s *Sources) PutSourceSmaily(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67579,6 +84473,17 @@ func (s *Sources) PutSourceSmaily(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67648,7 +84553,7 @@ func (s *Sources) PutSourceSmaily(ctx context.Context, request operations.PutSou } // PutSourceSmartengage - Update a Source fully -func (s *Sources) PutSourceSmartengage(ctx context.Context, request operations.PutSourceSmartengageRequest) (*operations.PutSourceSmartengageResponse, error) { +func (s *Sources) PutSourceSmartengage(ctx context.Context, request operations.PutSourceSmartengageRequest, opts ...operations.Option) (*operations.PutSourceSmartengageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSmartengage", @@ -67656,6 +84561,17 @@ func (s *Sources) PutSourceSmartengage(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67667,6 +84583,17 @@ func (s *Sources) PutSourceSmartengage(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67736,7 +84663,7 @@ func (s *Sources) PutSourceSmartengage(ctx context.Context, request operations.P } // PutSourceSmartsheets - Update a Source fully -func (s *Sources) PutSourceSmartsheets(ctx context.Context, request operations.PutSourceSmartsheetsRequest) (*operations.PutSourceSmartsheetsResponse, error) { +func (s *Sources) PutSourceSmartsheets(ctx context.Context, request operations.PutSourceSmartsheetsRequest, opts ...operations.Option) (*operations.PutSourceSmartsheetsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSmartsheets", @@ -67744,6 +84671,17 @@ func (s *Sources) PutSourceSmartsheets(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67755,6 +84693,17 @@ func (s *Sources) PutSourceSmartsheets(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67824,7 +84773,7 @@ func (s *Sources) PutSourceSmartsheets(ctx context.Context, request operations.P } // PutSourceSnapchatMarketing - Update a Source fully -func (s *Sources) PutSourceSnapchatMarketing(ctx context.Context, request operations.PutSourceSnapchatMarketingRequest) (*operations.PutSourceSnapchatMarketingResponse, error) { +func (s *Sources) PutSourceSnapchatMarketing(ctx context.Context, request operations.PutSourceSnapchatMarketingRequest, opts ...operations.Option) (*operations.PutSourceSnapchatMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSnapchatMarketing", @@ -67832,6 +84781,17 @@ func (s *Sources) PutSourceSnapchatMarketing(ctx context.Context, request operat SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67843,6 +84803,17 @@ func (s *Sources) PutSourceSnapchatMarketing(ctx context.Context, request operat return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -67912,7 +84883,7 @@ func (s *Sources) PutSourceSnapchatMarketing(ctx context.Context, request operat } // PutSourceSnowflake - Update a Source fully -func (s *Sources) PutSourceSnowflake(ctx context.Context, request operations.PutSourceSnowflakeRequest) (*operations.PutSourceSnowflakeResponse, error) { +func (s *Sources) PutSourceSnowflake(ctx context.Context, request operations.PutSourceSnowflakeRequest, opts ...operations.Option) (*operations.PutSourceSnowflakeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSnowflake", @@ -67920,6 +84891,17 @@ func (s *Sources) PutSourceSnowflake(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -67931,6 +84913,17 @@ func (s *Sources) PutSourceSnowflake(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68000,7 +84993,7 @@ func (s *Sources) PutSourceSnowflake(ctx context.Context, request operations.Put } // PutSourceSonarCloud - Update a Source fully -func (s *Sources) PutSourceSonarCloud(ctx context.Context, request operations.PutSourceSonarCloudRequest) (*operations.PutSourceSonarCloudResponse, error) { +func (s *Sources) PutSourceSonarCloud(ctx context.Context, request operations.PutSourceSonarCloudRequest, opts ...operations.Option) (*operations.PutSourceSonarCloudResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSonarCloud", @@ -68008,6 +85001,17 @@ func (s *Sources) PutSourceSonarCloud(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68019,6 +85023,17 @@ func (s *Sources) PutSourceSonarCloud(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68088,7 +85103,7 @@ func (s *Sources) PutSourceSonarCloud(ctx context.Context, request operations.Pu } // PutSourceSpacexAPI - Update a Source fully -func (s *Sources) PutSourceSpacexAPI(ctx context.Context, request operations.PutSourceSpacexAPIRequest) (*operations.PutSourceSpacexAPIResponse, error) { +func (s *Sources) PutSourceSpacexAPI(ctx context.Context, request operations.PutSourceSpacexAPIRequest, opts ...operations.Option) (*operations.PutSourceSpacexAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSpacexApi", @@ -68096,6 +85111,17 @@ func (s *Sources) PutSourceSpacexAPI(ctx context.Context, request operations.Put SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68107,6 +85133,17 @@ func (s *Sources) PutSourceSpacexAPI(ctx context.Context, request operations.Put return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68176,7 +85213,7 @@ func (s *Sources) PutSourceSpacexAPI(ctx context.Context, request operations.Put } // PutSourceSquare - Update a Source fully -func (s *Sources) PutSourceSquare(ctx context.Context, request operations.PutSourceSquareRequest) (*operations.PutSourceSquareResponse, error) { +func (s *Sources) PutSourceSquare(ctx context.Context, request operations.PutSourceSquareRequest, opts ...operations.Option) (*operations.PutSourceSquareResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSquare", @@ -68184,6 +85221,17 @@ func (s *Sources) PutSourceSquare(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68195,6 +85243,17 @@ func (s *Sources) PutSourceSquare(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68264,7 +85323,7 @@ func (s *Sources) PutSourceSquare(ctx context.Context, request operations.PutSou } // PutSourceStrava - Update a Source fully -func (s *Sources) PutSourceStrava(ctx context.Context, request operations.PutSourceStravaRequest) (*operations.PutSourceStravaResponse, error) { +func (s *Sources) PutSourceStrava(ctx context.Context, request operations.PutSourceStravaRequest, opts ...operations.Option) (*operations.PutSourceStravaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceStrava", @@ -68272,6 +85331,17 @@ func (s *Sources) PutSourceStrava(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68283,6 +85353,17 @@ func (s *Sources) PutSourceStrava(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68352,7 +85433,7 @@ func (s *Sources) PutSourceStrava(ctx context.Context, request operations.PutSou } // PutSourceStripe - Update a Source fully -func (s *Sources) PutSourceStripe(ctx context.Context, request operations.PutSourceStripeRequest) (*operations.PutSourceStripeResponse, error) { +func (s *Sources) PutSourceStripe(ctx context.Context, request operations.PutSourceStripeRequest, opts ...operations.Option) (*operations.PutSourceStripeResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceStripe", @@ -68360,6 +85441,17 @@ func (s *Sources) PutSourceStripe(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68371,6 +85463,17 @@ func (s *Sources) PutSourceStripe(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68440,7 +85543,7 @@ func (s *Sources) PutSourceStripe(ctx context.Context, request operations.PutSou } // PutSourceSurveySparrow - Update a Source fully -func (s *Sources) PutSourceSurveySparrow(ctx context.Context, request operations.PutSourceSurveySparrowRequest) (*operations.PutSourceSurveySparrowResponse, error) { +func (s *Sources) PutSourceSurveySparrow(ctx context.Context, request operations.PutSourceSurveySparrowRequest, opts ...operations.Option) (*operations.PutSourceSurveySparrowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSurveySparrow", @@ -68448,6 +85551,17 @@ func (s *Sources) PutSourceSurveySparrow(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68459,6 +85573,17 @@ func (s *Sources) PutSourceSurveySparrow(ctx context.Context, request operations return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68528,7 +85653,7 @@ func (s *Sources) PutSourceSurveySparrow(ctx context.Context, request operations } // PutSourceSurveymonkey - Update a Source fully -func (s *Sources) PutSourceSurveymonkey(ctx context.Context, request operations.PutSourceSurveymonkeyRequest) (*operations.PutSourceSurveymonkeyResponse, error) { +func (s *Sources) PutSourceSurveymonkey(ctx context.Context, request operations.PutSourceSurveymonkeyRequest, opts ...operations.Option) (*operations.PutSourceSurveymonkeyResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceSurveymonkey", @@ -68536,6 +85661,17 @@ func (s *Sources) PutSourceSurveymonkey(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68547,6 +85683,17 @@ func (s *Sources) PutSourceSurveymonkey(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68616,7 +85763,7 @@ func (s *Sources) PutSourceSurveymonkey(ctx context.Context, request operations. } // PutSourceTempo - Update a Source fully -func (s *Sources) PutSourceTempo(ctx context.Context, request operations.PutSourceTempoRequest) (*operations.PutSourceTempoResponse, error) { +func (s *Sources) PutSourceTempo(ctx context.Context, request operations.PutSourceTempoRequest, opts ...operations.Option) (*operations.PutSourceTempoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTempo", @@ -68624,6 +85771,17 @@ func (s *Sources) PutSourceTempo(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68635,6 +85793,17 @@ func (s *Sources) PutSourceTempo(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68704,7 +85873,7 @@ func (s *Sources) PutSourceTempo(ctx context.Context, request operations.PutSour } // PutSourceTheGuardianAPI - Update a Source fully -func (s *Sources) PutSourceTheGuardianAPI(ctx context.Context, request operations.PutSourceTheGuardianAPIRequest) (*operations.PutSourceTheGuardianAPIResponse, error) { +func (s *Sources) PutSourceTheGuardianAPI(ctx context.Context, request operations.PutSourceTheGuardianAPIRequest, opts ...operations.Option) (*operations.PutSourceTheGuardianAPIResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTheGuardianApi", @@ -68712,6 +85881,17 @@ func (s *Sources) PutSourceTheGuardianAPI(ctx context.Context, request operation SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68723,6 +85903,17 @@ func (s *Sources) PutSourceTheGuardianAPI(ctx context.Context, request operation return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68792,7 +85983,7 @@ func (s *Sources) PutSourceTheGuardianAPI(ctx context.Context, request operation } // PutSourceTiktokMarketing - Update a Source fully -func (s *Sources) PutSourceTiktokMarketing(ctx context.Context, request operations.PutSourceTiktokMarketingRequest) (*operations.PutSourceTiktokMarketingResponse, error) { +func (s *Sources) PutSourceTiktokMarketing(ctx context.Context, request operations.PutSourceTiktokMarketingRequest, opts ...operations.Option) (*operations.PutSourceTiktokMarketingResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTiktokMarketing", @@ -68800,6 +85991,17 @@ func (s *Sources) PutSourceTiktokMarketing(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68811,6 +86013,17 @@ func (s *Sources) PutSourceTiktokMarketing(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68880,7 +86093,7 @@ func (s *Sources) PutSourceTiktokMarketing(ctx context.Context, request operatio } // PutSourceTrello - Update a Source fully -func (s *Sources) PutSourceTrello(ctx context.Context, request operations.PutSourceTrelloRequest) (*operations.PutSourceTrelloResponse, error) { +func (s *Sources) PutSourceTrello(ctx context.Context, request operations.PutSourceTrelloRequest, opts ...operations.Option) (*operations.PutSourceTrelloResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTrello", @@ -68888,6 +86101,17 @@ func (s *Sources) PutSourceTrello(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68899,6 +86123,17 @@ func (s *Sources) PutSourceTrello(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -68968,7 +86203,7 @@ func (s *Sources) PutSourceTrello(ctx context.Context, request operations.PutSou } // PutSourceTrustpilot - Update a Source fully -func (s *Sources) PutSourceTrustpilot(ctx context.Context, request operations.PutSourceTrustpilotRequest) (*operations.PutSourceTrustpilotResponse, error) { +func (s *Sources) PutSourceTrustpilot(ctx context.Context, request operations.PutSourceTrustpilotRequest, opts ...operations.Option) (*operations.PutSourceTrustpilotResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTrustpilot", @@ -68976,6 +86211,17 @@ func (s *Sources) PutSourceTrustpilot(ctx context.Context, request operations.Pu SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -68987,6 +86233,17 @@ func (s *Sources) PutSourceTrustpilot(ctx context.Context, request operations.Pu return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69056,7 +86313,7 @@ func (s *Sources) PutSourceTrustpilot(ctx context.Context, request operations.Pu } // PutSourceTvmazeSchedule - Update a Source fully -func (s *Sources) PutSourceTvmazeSchedule(ctx context.Context, request operations.PutSourceTvmazeScheduleRequest) (*operations.PutSourceTvmazeScheduleResponse, error) { +func (s *Sources) PutSourceTvmazeSchedule(ctx context.Context, request operations.PutSourceTvmazeScheduleRequest, opts ...operations.Option) (*operations.PutSourceTvmazeScheduleResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTvmazeSchedule", @@ -69064,6 +86321,17 @@ func (s *Sources) PutSourceTvmazeSchedule(ctx context.Context, request operation SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69075,6 +86343,17 @@ func (s *Sources) PutSourceTvmazeSchedule(ctx context.Context, request operation return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69144,7 +86423,7 @@ func (s *Sources) PutSourceTvmazeSchedule(ctx context.Context, request operation } // PutSourceTwilio - Update a Source fully -func (s *Sources) PutSourceTwilio(ctx context.Context, request operations.PutSourceTwilioRequest) (*operations.PutSourceTwilioResponse, error) { +func (s *Sources) PutSourceTwilio(ctx context.Context, request operations.PutSourceTwilioRequest, opts ...operations.Option) (*operations.PutSourceTwilioResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTwilio", @@ -69152,6 +86431,17 @@ func (s *Sources) PutSourceTwilio(ctx context.Context, request operations.PutSou SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69163,6 +86453,17 @@ func (s *Sources) PutSourceTwilio(ctx context.Context, request operations.PutSou return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69232,7 +86533,7 @@ func (s *Sources) PutSourceTwilio(ctx context.Context, request operations.PutSou } // PutSourceTwilioTaskrouter - Update a Source fully -func (s *Sources) PutSourceTwilioTaskrouter(ctx context.Context, request operations.PutSourceTwilioTaskrouterRequest) (*operations.PutSourceTwilioTaskrouterResponse, error) { +func (s *Sources) PutSourceTwilioTaskrouter(ctx context.Context, request operations.PutSourceTwilioTaskrouterRequest, opts ...operations.Option) (*operations.PutSourceTwilioTaskrouterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTwilioTaskrouter", @@ -69240,6 +86541,17 @@ func (s *Sources) PutSourceTwilioTaskrouter(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69251,6 +86563,17 @@ func (s *Sources) PutSourceTwilioTaskrouter(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69320,7 +86643,7 @@ func (s *Sources) PutSourceTwilioTaskrouter(ctx context.Context, request operati } // PutSourceTwitter - Update a Source fully -func (s *Sources) PutSourceTwitter(ctx context.Context, request operations.PutSourceTwitterRequest) (*operations.PutSourceTwitterResponse, error) { +func (s *Sources) PutSourceTwitter(ctx context.Context, request operations.PutSourceTwitterRequest, opts ...operations.Option) (*operations.PutSourceTwitterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTwitter", @@ -69328,6 +86651,17 @@ func (s *Sources) PutSourceTwitter(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69339,6 +86673,17 @@ func (s *Sources) PutSourceTwitter(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69408,7 +86753,7 @@ func (s *Sources) PutSourceTwitter(ctx context.Context, request operations.PutSo } // PutSourceTypeform - Update a Source fully -func (s *Sources) PutSourceTypeform(ctx context.Context, request operations.PutSourceTypeformRequest) (*operations.PutSourceTypeformResponse, error) { +func (s *Sources) PutSourceTypeform(ctx context.Context, request operations.PutSourceTypeformRequest, opts ...operations.Option) (*operations.PutSourceTypeformResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceTypeform", @@ -69416,6 +86761,17 @@ func (s *Sources) PutSourceTypeform(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69427,6 +86783,17 @@ func (s *Sources) PutSourceTypeform(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69496,7 +86863,7 @@ func (s *Sources) PutSourceTypeform(ctx context.Context, request operations.PutS } // PutSourceUsCensus - Update a Source fully -func (s *Sources) PutSourceUsCensus(ctx context.Context, request operations.PutSourceUsCensusRequest) (*operations.PutSourceUsCensusResponse, error) { +func (s *Sources) PutSourceUsCensus(ctx context.Context, request operations.PutSourceUsCensusRequest, opts ...operations.Option) (*operations.PutSourceUsCensusResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceUsCensus", @@ -69504,6 +86871,17 @@ func (s *Sources) PutSourceUsCensus(ctx context.Context, request operations.PutS SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69515,6 +86893,17 @@ func (s *Sources) PutSourceUsCensus(ctx context.Context, request operations.PutS return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69584,7 +86973,7 @@ func (s *Sources) PutSourceUsCensus(ctx context.Context, request operations.PutS } // PutSourceVantage - Update a Source fully -func (s *Sources) PutSourceVantage(ctx context.Context, request operations.PutSourceVantageRequest) (*operations.PutSourceVantageResponse, error) { +func (s *Sources) PutSourceVantage(ctx context.Context, request operations.PutSourceVantageRequest, opts ...operations.Option) (*operations.PutSourceVantageResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceVantage", @@ -69592,6 +86981,17 @@ func (s *Sources) PutSourceVantage(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69603,6 +87003,17 @@ func (s *Sources) PutSourceVantage(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69672,7 +87083,7 @@ func (s *Sources) PutSourceVantage(ctx context.Context, request operations.PutSo } // PutSourceWebflow - Update a Source fully -func (s *Sources) PutSourceWebflow(ctx context.Context, request operations.PutSourceWebflowRequest) (*operations.PutSourceWebflowResponse, error) { +func (s *Sources) PutSourceWebflow(ctx context.Context, request operations.PutSourceWebflowRequest, opts ...operations.Option) (*operations.PutSourceWebflowResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceWebflow", @@ -69680,6 +87091,17 @@ func (s *Sources) PutSourceWebflow(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69691,6 +87113,17 @@ func (s *Sources) PutSourceWebflow(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69760,7 +87193,7 @@ func (s *Sources) PutSourceWebflow(ctx context.Context, request operations.PutSo } // PutSourceWhiskyHunter - Update a Source fully -func (s *Sources) PutSourceWhiskyHunter(ctx context.Context, request operations.PutSourceWhiskyHunterRequest) (*operations.PutSourceWhiskyHunterResponse, error) { +func (s *Sources) PutSourceWhiskyHunter(ctx context.Context, request operations.PutSourceWhiskyHunterRequest, opts ...operations.Option) (*operations.PutSourceWhiskyHunterResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceWhiskyHunter", @@ -69768,6 +87201,17 @@ func (s *Sources) PutSourceWhiskyHunter(ctx context.Context, request operations. SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69779,6 +87223,17 @@ func (s *Sources) PutSourceWhiskyHunter(ctx context.Context, request operations. return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69848,7 +87303,7 @@ func (s *Sources) PutSourceWhiskyHunter(ctx context.Context, request operations. } // PutSourceWikipediaPageviews - Update a Source fully -func (s *Sources) PutSourceWikipediaPageviews(ctx context.Context, request operations.PutSourceWikipediaPageviewsRequest) (*operations.PutSourceWikipediaPageviewsResponse, error) { +func (s *Sources) PutSourceWikipediaPageviews(ctx context.Context, request operations.PutSourceWikipediaPageviewsRequest, opts ...operations.Option) (*operations.PutSourceWikipediaPageviewsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceWikipediaPageviews", @@ -69856,6 +87311,17 @@ func (s *Sources) PutSourceWikipediaPageviews(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69867,6 +87333,17 @@ func (s *Sources) PutSourceWikipediaPageviews(ctx context.Context, request opera return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -69936,7 +87413,7 @@ func (s *Sources) PutSourceWikipediaPageviews(ctx context.Context, request opera } // PutSourceWoocommerce - Update a Source fully -func (s *Sources) PutSourceWoocommerce(ctx context.Context, request operations.PutSourceWoocommerceRequest) (*operations.PutSourceWoocommerceResponse, error) { +func (s *Sources) PutSourceWoocommerce(ctx context.Context, request operations.PutSourceWoocommerceRequest, opts ...operations.Option) (*operations.PutSourceWoocommerceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceWoocommerce", @@ -69944,6 +87421,17 @@ func (s *Sources) PutSourceWoocommerce(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -69955,6 +87443,17 @@ func (s *Sources) PutSourceWoocommerce(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70024,7 +87523,7 @@ func (s *Sources) PutSourceWoocommerce(ctx context.Context, request operations.P } // PutSourceXkcd - Update a Source fully -func (s *Sources) PutSourceXkcd(ctx context.Context, request operations.PutSourceXkcdRequest) (*operations.PutSourceXkcdResponse, error) { +func (s *Sources) PutSourceXkcd(ctx context.Context, request operations.PutSourceXkcdRequest, opts ...operations.Option) (*operations.PutSourceXkcdResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceXkcd", @@ -70032,6 +87531,17 @@ func (s *Sources) PutSourceXkcd(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70043,6 +87553,17 @@ func (s *Sources) PutSourceXkcd(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70112,7 +87633,7 @@ func (s *Sources) PutSourceXkcd(ctx context.Context, request operations.PutSourc } // PutSourceYandexMetrica - Update a Source fully -func (s *Sources) PutSourceYandexMetrica(ctx context.Context, request operations.PutSourceYandexMetricaRequest) (*operations.PutSourceYandexMetricaResponse, error) { +func (s *Sources) PutSourceYandexMetrica(ctx context.Context, request operations.PutSourceYandexMetricaRequest, opts ...operations.Option) (*operations.PutSourceYandexMetricaResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceYandexMetrica", @@ -70120,6 +87641,17 @@ func (s *Sources) PutSourceYandexMetrica(ctx context.Context, request operations SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70131,6 +87663,17 @@ func (s *Sources) PutSourceYandexMetrica(ctx context.Context, request operations return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70200,7 +87743,7 @@ func (s *Sources) PutSourceYandexMetrica(ctx context.Context, request operations } // PutSourceYotpo - Update a Source fully -func (s *Sources) PutSourceYotpo(ctx context.Context, request operations.PutSourceYotpoRequest) (*operations.PutSourceYotpoResponse, error) { +func (s *Sources) PutSourceYotpo(ctx context.Context, request operations.PutSourceYotpoRequest, opts ...operations.Option) (*operations.PutSourceYotpoResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceYotpo", @@ -70208,6 +87751,17 @@ func (s *Sources) PutSourceYotpo(ctx context.Context, request operations.PutSour SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70219,6 +87773,17 @@ func (s *Sources) PutSourceYotpo(ctx context.Context, request operations.PutSour return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70288,7 +87853,7 @@ func (s *Sources) PutSourceYotpo(ctx context.Context, request operations.PutSour } // PutSourceYoutubeAnalytics - Update a Source fully -func (s *Sources) PutSourceYoutubeAnalytics(ctx context.Context, request operations.PutSourceYoutubeAnalyticsRequest) (*operations.PutSourceYoutubeAnalyticsResponse, error) { +func (s *Sources) PutSourceYoutubeAnalytics(ctx context.Context, request operations.PutSourceYoutubeAnalyticsRequest, opts ...operations.Option) (*operations.PutSourceYoutubeAnalyticsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceYoutubeAnalytics", @@ -70296,6 +87861,17 @@ func (s *Sources) PutSourceYoutubeAnalytics(ctx context.Context, request operati SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70307,6 +87883,17 @@ func (s *Sources) PutSourceYoutubeAnalytics(ctx context.Context, request operati return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70376,7 +87963,7 @@ func (s *Sources) PutSourceYoutubeAnalytics(ctx context.Context, request operati } // PutSourceZendeskChat - Update a Source fully -func (s *Sources) PutSourceZendeskChat(ctx context.Context, request operations.PutSourceZendeskChatRequest) (*operations.PutSourceZendeskChatResponse, error) { +func (s *Sources) PutSourceZendeskChat(ctx context.Context, request operations.PutSourceZendeskChatRequest, opts ...operations.Option) (*operations.PutSourceZendeskChatResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZendeskChat", @@ -70384,6 +87971,17 @@ func (s *Sources) PutSourceZendeskChat(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70395,6 +87993,17 @@ func (s *Sources) PutSourceZendeskChat(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70464,7 +88073,7 @@ func (s *Sources) PutSourceZendeskChat(ctx context.Context, request operations.P } // PutSourceZendeskSell - Update a Source fully -func (s *Sources) PutSourceZendeskSell(ctx context.Context, request operations.PutSourceZendeskSellRequest) (*operations.PutSourceZendeskSellResponse, error) { +func (s *Sources) PutSourceZendeskSell(ctx context.Context, request operations.PutSourceZendeskSellRequest, opts ...operations.Option) (*operations.PutSourceZendeskSellResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZendeskSell", @@ -70472,6 +88081,17 @@ func (s *Sources) PutSourceZendeskSell(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70483,6 +88103,17 @@ func (s *Sources) PutSourceZendeskSell(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70552,7 +88183,7 @@ func (s *Sources) PutSourceZendeskSell(ctx context.Context, request operations.P } // PutSourceZendeskSunshine - Update a Source fully -func (s *Sources) PutSourceZendeskSunshine(ctx context.Context, request operations.PutSourceZendeskSunshineRequest) (*operations.PutSourceZendeskSunshineResponse, error) { +func (s *Sources) PutSourceZendeskSunshine(ctx context.Context, request operations.PutSourceZendeskSunshineRequest, opts ...operations.Option) (*operations.PutSourceZendeskSunshineResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZendeskSunshine", @@ -70560,6 +88191,17 @@ func (s *Sources) PutSourceZendeskSunshine(ctx context.Context, request operatio SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70571,6 +88213,17 @@ func (s *Sources) PutSourceZendeskSunshine(ctx context.Context, request operatio return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70640,7 +88293,7 @@ func (s *Sources) PutSourceZendeskSunshine(ctx context.Context, request operatio } // PutSourceZendeskSupport - Update a Source fully -func (s *Sources) PutSourceZendeskSupport(ctx context.Context, request operations.PutSourceZendeskSupportRequest) (*operations.PutSourceZendeskSupportResponse, error) { +func (s *Sources) PutSourceZendeskSupport(ctx context.Context, request operations.PutSourceZendeskSupportRequest, opts ...operations.Option) (*operations.PutSourceZendeskSupportResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZendeskSupport", @@ -70648,6 +88301,17 @@ func (s *Sources) PutSourceZendeskSupport(ctx context.Context, request operation SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70659,6 +88323,17 @@ func (s *Sources) PutSourceZendeskSupport(ctx context.Context, request operation return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70728,7 +88403,7 @@ func (s *Sources) PutSourceZendeskSupport(ctx context.Context, request operation } // PutSourceZendeskTalk - Update a Source fully -func (s *Sources) PutSourceZendeskTalk(ctx context.Context, request operations.PutSourceZendeskTalkRequest) (*operations.PutSourceZendeskTalkResponse, error) { +func (s *Sources) PutSourceZendeskTalk(ctx context.Context, request operations.PutSourceZendeskTalkRequest, opts ...operations.Option) (*operations.PutSourceZendeskTalkResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZendeskTalk", @@ -70736,6 +88411,17 @@ func (s *Sources) PutSourceZendeskTalk(ctx context.Context, request operations.P SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70747,6 +88433,17 @@ func (s *Sources) PutSourceZendeskTalk(ctx context.Context, request operations.P return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70816,7 +88513,7 @@ func (s *Sources) PutSourceZendeskTalk(ctx context.Context, request operations.P } // PutSourceZenloop - Update a Source fully -func (s *Sources) PutSourceZenloop(ctx context.Context, request operations.PutSourceZenloopRequest) (*operations.PutSourceZenloopResponse, error) { +func (s *Sources) PutSourceZenloop(ctx context.Context, request operations.PutSourceZenloopRequest, opts ...operations.Option) (*operations.PutSourceZenloopResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZenloop", @@ -70824,6 +88521,17 @@ func (s *Sources) PutSourceZenloop(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70835,6 +88543,17 @@ func (s *Sources) PutSourceZenloop(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70904,7 +88623,7 @@ func (s *Sources) PutSourceZenloop(ctx context.Context, request operations.PutSo } // PutSourceZohoCrm - Update a Source fully -func (s *Sources) PutSourceZohoCrm(ctx context.Context, request operations.PutSourceZohoCrmRequest) (*operations.PutSourceZohoCrmResponse, error) { +func (s *Sources) PutSourceZohoCrm(ctx context.Context, request operations.PutSourceZohoCrmRequest, opts ...operations.Option) (*operations.PutSourceZohoCrmResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZohoCrm", @@ -70912,6 +88631,17 @@ func (s *Sources) PutSourceZohoCrm(ctx context.Context, request operations.PutSo SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -70923,6 +88653,17 @@ func (s *Sources) PutSourceZohoCrm(ctx context.Context, request operations.PutSo return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -70992,7 +88733,7 @@ func (s *Sources) PutSourceZohoCrm(ctx context.Context, request operations.PutSo } // PutSourceZoom - Update a Source fully -func (s *Sources) PutSourceZoom(ctx context.Context, request operations.PutSourceZoomRequest) (*operations.PutSourceZoomResponse, error) { +func (s *Sources) PutSourceZoom(ctx context.Context, request operations.PutSourceZoomRequest, opts ...operations.Option) (*operations.PutSourceZoomResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "putSourceZoom", @@ -71000,6 +88741,17 @@ func (s *Sources) PutSourceZoom(ctx context.Context, request operations.PutSourc SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/sources/{sourceId}", request, nil) if err != nil { @@ -71011,6 +88763,17 @@ func (s *Sources) PutSourceZoom(ctx context.Context, request operations.PutSourc return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/streams.go b/internal/sdk/streams.go index 6bc212a5f..63d700a97 100644 --- a/internal/sdk/streams.go +++ b/internal/sdk/streams.go @@ -27,7 +27,7 @@ func newStreams(sdkConfig sdkConfiguration) *Streams { } // GetStreamProperties - Get stream properties -func (s *Streams) GetStreamProperties(ctx context.Context, request operations.GetStreamPropertiesRequest) (*operations.GetStreamPropertiesResponse, error) { +func (s *Streams) GetStreamProperties(ctx context.Context, request operations.GetStreamPropertiesRequest, opts ...operations.Option) (*operations.GetStreamPropertiesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getStreamProperties", @@ -35,12 +35,34 @@ func (s *Streams) GetStreamProperties(ctx context.Context, request operations.Ge SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/streams") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/users.go b/internal/sdk/users.go index 63d45dd52..cdf0eddf5 100644 --- a/internal/sdk/users.go +++ b/internal/sdk/users.go @@ -28,7 +28,7 @@ func newUsers(sdkConfig sdkConfiguration) *Users { // ListUsersWithinAnOrganization - List all users within an organization // Organization Admin user can list all users within the same organization. Also provide filtering on a list of user IDs or/and a list of user emails. -func (s *Users) ListUsersWithinAnOrganization(ctx context.Context, request operations.ListUsersWithinAnOrganizationRequest) (*operations.ListUsersWithinAnOrganizationResponse, error) { +func (s *Users) ListUsersWithinAnOrganization(ctx context.Context, request operations.ListUsersWithinAnOrganizationRequest, opts ...operations.Option) (*operations.ListUsersWithinAnOrganizationResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listUsersWithinAnOrganization", @@ -36,12 +36,34 @@ func (s *Users) ListUsersWithinAnOrganization(ctx context.Context, request opera SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/users") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) diff --git a/internal/sdk/workspaces.go b/internal/sdk/workspaces.go index 0ebdfde91..411538c24 100644 --- a/internal/sdk/workspaces.go +++ b/internal/sdk/workspaces.go @@ -29,7 +29,7 @@ func newWorkspaces(sdkConfig sdkConfiguration) *Workspaces { // CreateOrUpdateWorkspaceOAuthCredentials - Create OAuth override credentials for a workspace and source type. // Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. // In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination. -func (s *Workspaces) CreateOrUpdateWorkspaceOAuthCredentials(ctx context.Context, request operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest) (*operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse, error) { +func (s *Workspaces) CreateOrUpdateWorkspaceOAuthCredentials(ctx context.Context, request operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest, opts ...operations.Option) (*operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createOrUpdateWorkspaceOAuthCredentials", @@ -37,6 +37,17 @@ func (s *Workspaces) CreateOrUpdateWorkspaceOAuthCredentials(ctx context.Context SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/workspaces/{workspaceId}/oauthCredentials", request, nil) if err != nil { @@ -48,6 +59,17 @@ func (s *Workspaces) CreateOrUpdateWorkspaceOAuthCredentials(ctx context.Context return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PUT", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -117,7 +139,7 @@ func (s *Workspaces) CreateOrUpdateWorkspaceOAuthCredentials(ctx context.Context } // CreateWorkspace - Create a workspace -func (s *Workspaces) CreateWorkspace(ctx context.Context, request shared.WorkspaceCreateRequest) (*operations.CreateWorkspaceResponse, error) { +func (s *Workspaces) CreateWorkspace(ctx context.Context, request shared.WorkspaceCreateRequest, opts ...operations.Option) (*operations.CreateWorkspaceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "createWorkspace", @@ -125,6 +147,17 @@ func (s *Workspaces) CreateWorkspace(ctx context.Context, request shared.Workspa SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/workspaces") if err != nil { @@ -136,6 +169,17 @@ func (s *Workspaces) CreateWorkspace(ctx context.Context, request shared.Workspa return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "POST", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -215,7 +259,7 @@ func (s *Workspaces) CreateWorkspace(ctx context.Context, request shared.Workspa } // DeleteWorkspace - Delete a Workspace -func (s *Workspaces) DeleteWorkspace(ctx context.Context, request operations.DeleteWorkspaceRequest) (*operations.DeleteWorkspaceResponse, error) { +func (s *Workspaces) DeleteWorkspace(ctx context.Context, request operations.DeleteWorkspaceRequest, opts ...operations.Option) (*operations.DeleteWorkspaceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "deleteWorkspace", @@ -223,12 +267,34 @@ func (s *Workspaces) DeleteWorkspace(ctx context.Context, request operations.Del SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/workspaces/{workspaceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "DELETE", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -297,7 +363,7 @@ func (s *Workspaces) DeleteWorkspace(ctx context.Context, request operations.Del } // GetWorkspace - Get Workspace details -func (s *Workspaces) GetWorkspace(ctx context.Context, request operations.GetWorkspaceRequest) (*operations.GetWorkspaceResponse, error) { +func (s *Workspaces) GetWorkspace(ctx context.Context, request operations.GetWorkspaceRequest, opts ...operations.Option) (*operations.GetWorkspaceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "getWorkspace", @@ -305,12 +371,34 @@ func (s *Workspaces) GetWorkspace(ctx context.Context, request operations.GetWor SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/workspaces/{workspaceId}", request, nil) if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -389,7 +477,7 @@ func (s *Workspaces) GetWorkspace(ctx context.Context, request operations.GetWor } // ListWorkspaces - List workspaces -func (s *Workspaces) ListWorkspaces(ctx context.Context, request operations.ListWorkspacesRequest) (*operations.ListWorkspacesResponse, error) { +func (s *Workspaces) ListWorkspaces(ctx context.Context, request operations.ListWorkspacesRequest, opts ...operations.Option) (*operations.ListWorkspacesResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "listWorkspaces", @@ -397,12 +485,34 @@ func (s *Workspaces) ListWorkspaces(ctx context.Context, request operations.List SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := url.JoinPath(baseURL, "/workspaces") if err != nil { return nil, fmt.Errorf("error generating URL: %w", err) } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) if err != nil { return nil, fmt.Errorf("error creating request: %w", err) @@ -485,7 +595,7 @@ func (s *Workspaces) ListWorkspaces(ctx context.Context, request operations.List } // UpdateWorkspace - Update a workspace -func (s *Workspaces) UpdateWorkspace(ctx context.Context, request operations.UpdateWorkspaceRequest) (*operations.UpdateWorkspaceResponse, error) { +func (s *Workspaces) UpdateWorkspace(ctx context.Context, request operations.UpdateWorkspaceRequest, opts ...operations.Option) (*operations.UpdateWorkspaceResponse, error) { hookCtx := hooks.HookContext{ Context: ctx, OperationID: "updateWorkspace", @@ -493,6 +603,17 @@ func (s *Workspaces) UpdateWorkspace(ctx context.Context, request operations.Upd SecuritySource: s.sdkConfiguration.Security, } + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) opURL, err := utils.GenerateURL(ctx, baseURL, "/workspaces/{workspaceId}", request, nil) if err != nil { @@ -504,6 +625,17 @@ func (s *Workspaces) UpdateWorkspace(ctx context.Context, request operations.Upd return nil, err } + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + req, err := http.NewRequestWithContext(ctx, "PATCH", opURL, bodyReader) if err != nil { return nil, fmt.Errorf("error creating request: %w", err)