Skip to content

Commit

Permalink
chore: prefer non-conflicting union type names in go sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRooney committed Nov 8, 2023
1 parent 37a556f commit 0415dcd
Show file tree
Hide file tree
Showing 228 changed files with 5,625 additions and 5,627 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ TF_REATTACH_PROVIDERS=... terraform apply

<!-- Start Dev Containers -->



<!-- End Dev Containers -->

<!-- Placeholder for Future Speakeasy SDK Sections -->
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ features:
terraform:
additionalProperties: 0.1.1
constsAndDefaults: 0.1.1
core: 3.2.1
core: 3.3.0
globalSecurity: 2.81.1
globalServerURLs: 2.82.0
unions: 2.81.5
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/destination_awsdatalake_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (r *DestinationAwsDatalakeResourceModel) ToCreateSDKType() *shared.Destinat
}
if destinationAwsDatalakeIAMRole != nil {
credentials = shared.DestinationAwsDatalakeAuthenticationMode{
IAMRole: destinationAwsDatalakeIAMRole,
DestinationAwsDatalakeIAMRole: destinationAwsDatalakeIAMRole,
}
}
var destinationAwsDatalakeIAMUser *shared.DestinationAwsDatalakeIAMUser
Expand All @@ -45,7 +45,7 @@ func (r *DestinationAwsDatalakeResourceModel) ToCreateSDKType() *shared.Destinat
}
if destinationAwsDatalakeIAMUser != nil {
credentials = shared.DestinationAwsDatalakeAuthenticationMode{
IAMUser: destinationAwsDatalakeIAMUser,
DestinationAwsDatalakeIAMUser: destinationAwsDatalakeIAMUser,
}
}
var format *shared.DestinationAwsDatalakeOutputFormatWildcard
Expand All @@ -71,7 +71,7 @@ func (r *DestinationAwsDatalakeResourceModel) ToCreateSDKType() *shared.Destinat
}
if destinationAwsDatalakeJSONLinesNewlineDelimitedJSON != nil {
format = &shared.DestinationAwsDatalakeOutputFormatWildcard{
JSONLinesNewlineDelimitedJSON: destinationAwsDatalakeJSONLinesNewlineDelimitedJSON,
DestinationAwsDatalakeJSONLinesNewlineDelimitedJSON: destinationAwsDatalakeJSONLinesNewlineDelimitedJSON,
}
}
var destinationAwsDatalakeParquetColumnarStorage *shared.DestinationAwsDatalakeParquetColumnarStorage
Expand All @@ -95,7 +95,7 @@ func (r *DestinationAwsDatalakeResourceModel) ToCreateSDKType() *shared.Destinat
}
if destinationAwsDatalakeParquetColumnarStorage != nil {
format = &shared.DestinationAwsDatalakeOutputFormatWildcard{
ParquetColumnarStorage: destinationAwsDatalakeParquetColumnarStorage,
DestinationAwsDatalakeParquetColumnarStorage: destinationAwsDatalakeParquetColumnarStorage,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (r *DestinationAzureBlobStorageResourceModel) ToCreateSDKType() *shared.Des
}
if destinationAzureBlobStorageCSVCommaSeparatedValues != nil {
format = shared.DestinationAzureBlobStorageOutputFormat{
CSVCommaSeparatedValues: destinationAzureBlobStorageCSVCommaSeparatedValues,
DestinationAzureBlobStorageCSVCommaSeparatedValues: destinationAzureBlobStorageCSVCommaSeparatedValues,
}
}
var destinationAzureBlobStorageJSONLinesNewlineDelimitedJSON *shared.DestinationAzureBlobStorageJSONLinesNewlineDelimitedJSON
Expand All @@ -58,7 +58,7 @@ func (r *DestinationAzureBlobStorageResourceModel) ToCreateSDKType() *shared.Des
}
if destinationAzureBlobStorageJSONLinesNewlineDelimitedJSON != nil {
format = shared.DestinationAzureBlobStorageOutputFormat{
JSONLinesNewlineDelimitedJSON: destinationAzureBlobStorageJSONLinesNewlineDelimitedJSON,
DestinationAzureBlobStorageJSONLinesNewlineDelimitedJSON: destinationAzureBlobStorageJSONLinesNewlineDelimitedJSON,
}
}
configuration := shared.DestinationAzureBlobStorage{
Expand Down Expand Up @@ -136,7 +136,7 @@ func (r *DestinationAzureBlobStorageResourceModel) ToUpdateSDKType() *shared.Des
}
if destinationAzureBlobStorageUpdateJSONLinesNewlineDelimitedJSON != nil {
format = shared.OutputFormat{
JSONLinesNewlineDelimitedJSON: destinationAzureBlobStorageUpdateJSONLinesNewlineDelimitedJSON,
DestinationAzureBlobStorageUpdateJSONLinesNewlineDelimitedJSON: destinationAzureBlobStorageUpdateJSONLinesNewlineDelimitedJSON,
}
}
configuration := shared.DestinationAzureBlobStorageUpdate{
Expand Down
12 changes: 6 additions & 6 deletions internal/provider/destination_bigquery_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (r *DestinationBigqueryResourceModel) ToCreateSDKType() *shared.Destination
}
if destinationBigqueryStandardInserts != nil {
loadingMethod = &shared.DestinationBigqueryLoadingMethod{
StandardInserts: destinationBigqueryStandardInserts,
DestinationBigqueryStandardInserts: destinationBigqueryStandardInserts,
}
}
var destinationBigqueryGCSStaging *shared.DestinationBigqueryGCSStaging
Expand All @@ -47,7 +47,7 @@ func (r *DestinationBigqueryResourceModel) ToCreateSDKType() *shared.Destination
}
if destinationBigqueryHMACKey != nil {
credential = shared.DestinationBigqueryCredential{
HMACKey: destinationBigqueryHMACKey,
DestinationBigqueryHMACKey: destinationBigqueryHMACKey,
}
}
fileBufferCount := new(int64)
Expand All @@ -74,7 +74,7 @@ func (r *DestinationBigqueryResourceModel) ToCreateSDKType() *shared.Destination
}
if destinationBigqueryGCSStaging != nil {
loadingMethod = &shared.DestinationBigqueryLoadingMethod{
GCSStaging: destinationBigqueryGCSStaging,
DestinationBigqueryGCSStaging: destinationBigqueryGCSStaging,
}
}
}
Expand Down Expand Up @@ -139,7 +139,7 @@ func (r *DestinationBigqueryResourceModel) ToUpdateSDKType() *shared.Destination
}
if destinationBigqueryUpdateStandardInserts != nil {
loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{
StandardInserts: destinationBigqueryUpdateStandardInserts,
DestinationBigqueryUpdateStandardInserts: destinationBigqueryUpdateStandardInserts,
}
}
var destinationBigqueryUpdateGCSStaging *shared.DestinationBigqueryUpdateGCSStaging
Expand All @@ -156,7 +156,7 @@ func (r *DestinationBigqueryResourceModel) ToUpdateSDKType() *shared.Destination
}
if destinationBigqueryUpdateHMACKey != nil {
credential = shared.DestinationBigqueryUpdateCredential{
HMACKey: destinationBigqueryUpdateHMACKey,
DestinationBigqueryUpdateHMACKey: destinationBigqueryUpdateHMACKey,
}
}
fileBufferCount := new(int64)
Expand All @@ -183,7 +183,7 @@ func (r *DestinationBigqueryResourceModel) ToUpdateSDKType() *shared.Destination
}
if destinationBigqueryUpdateGCSStaging != nil {
loadingMethod = &shared.DestinationBigqueryUpdateLoadingMethod{
GCSStaging: destinationBigqueryUpdateGCSStaging,
DestinationBigqueryUpdateGCSStaging: destinationBigqueryUpdateGCSStaging,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToCreateSDKType() *shared
}
if destinationBigqueryDenormalizedStandardInserts != nil {
loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{
StandardInserts: destinationBigqueryDenormalizedStandardInserts,
DestinationBigqueryDenormalizedStandardInserts: destinationBigqueryDenormalizedStandardInserts,
}
}
var destinationBigqueryDenormalizedGCSStaging *shared.DestinationBigqueryDenormalizedGCSStaging
Expand All @@ -52,7 +52,7 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToCreateSDKType() *shared
}
if destinationBigqueryDenormalizedHMACKey != nil {
credential = shared.DestinationBigqueryDenormalizedCredential{
HMACKey: destinationBigqueryDenormalizedHMACKey,
DestinationBigqueryDenormalizedHMACKey: destinationBigqueryDenormalizedHMACKey,
}
}
fileBufferCount := new(int64)
Expand All @@ -79,7 +79,7 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToCreateSDKType() *shared
}
if destinationBigqueryDenormalizedGCSStaging != nil {
loadingMethod = &shared.DestinationBigqueryDenormalizedLoadingMethod{
GCSStaging: destinationBigqueryDenormalizedGCSStaging,
DestinationBigqueryDenormalizedGCSStaging: destinationBigqueryDenormalizedGCSStaging,
}
}
}
Expand Down Expand Up @@ -152,7 +152,7 @@ func (r *DestinationBigqueryDenormalizedResourceModel) ToUpdateSDKType() *shared
}
if destinationBigqueryDenormalizedUpdateHMACKey != nil {
credential = shared.Credential{
HMACKey: destinationBigqueryDenormalizedUpdateHMACKey,
DestinationBigqueryDenormalizedUpdateHMACKey: destinationBigqueryDenormalizedUpdateHMACKey,
}
}
fileBufferCount := new(int64)
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/destination_clickhouse_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (r *DestinationClickhouseResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationClickhouseNoTunnel != nil {
tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{
NoTunnel: destinationClickhouseNoTunnel,
DestinationClickhouseNoTunnel: destinationClickhouseNoTunnel,
}
}
var destinationClickhouseSSHKeyAuthentication *shared.DestinationClickhouseSSHKeyAuthentication
Expand All @@ -59,7 +59,7 @@ func (r *DestinationClickhouseResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationClickhouseSSHKeyAuthentication != nil {
tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{
SSHKeyAuthentication: destinationClickhouseSSHKeyAuthentication,
DestinationClickhouseSSHKeyAuthentication: destinationClickhouseSSHKeyAuthentication,
}
}
var destinationClickhousePasswordAuthentication *shared.DestinationClickhousePasswordAuthentication
Expand All @@ -82,7 +82,7 @@ func (r *DestinationClickhouseResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationClickhousePasswordAuthentication != nil {
tunnelMethod = &shared.DestinationClickhouseSSHTunnelMethod{
PasswordAuthentication: destinationClickhousePasswordAuthentication,
DestinationClickhousePasswordAuthentication: destinationClickhousePasswordAuthentication,
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/destination_databricks_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (r *DestinationDatabricksResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationDatabricksRecommendedManagedTables != nil {
dataSource = shared.DestinationDatabricksDataSource{
RecommendedManagedTables: destinationDatabricksRecommendedManagedTables,
DestinationDatabricksRecommendedManagedTables: destinationDatabricksRecommendedManagedTables,
}
}
var destinationDatabricksAmazonS3 *shared.DestinationDatabricksAmazonS3
Expand Down Expand Up @@ -53,7 +53,7 @@ func (r *DestinationDatabricksResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationDatabricksAmazonS3 != nil {
dataSource = shared.DestinationDatabricksDataSource{
AmazonS3: destinationDatabricksAmazonS3,
DestinationDatabricksAmazonS3: destinationDatabricksAmazonS3,
}
}
var destinationDatabricksAzureBlobStorage *shared.DestinationDatabricksAzureBlobStorage
Expand All @@ -76,7 +76,7 @@ func (r *DestinationDatabricksResourceModel) ToCreateSDKType() *shared.Destinati
}
if destinationDatabricksAzureBlobStorage != nil {
dataSource = shared.DestinationDatabricksDataSource{
AzureBlobStorage: destinationDatabricksAzureBlobStorage,
DestinationDatabricksAzureBlobStorage: destinationDatabricksAzureBlobStorage,
}
}
database := new(string)
Expand Down Expand Up @@ -208,7 +208,7 @@ func (r *DestinationDatabricksResourceModel) ToUpdateSDKType() *shared.Destinati
}
if destinationDatabricksUpdateAzureBlobStorage != nil {
dataSource = shared.DataSource{
AzureBlobStorage: destinationDatabricksUpdateAzureBlobStorage,
DestinationDatabricksUpdateAzureBlobStorage: destinationDatabricksUpdateAzureBlobStorage,
}
}
database := new(string)
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/destination_devnull_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (r *DestinationDevNullResourceModel) ToCreateSDKType() *shared.DestinationD
}
if destinationDevNullSilent != nil {
testDestination = shared.DestinationDevNullTestDestination{
Silent: destinationDevNullSilent,
DestinationDevNullSilent: destinationDevNullSilent,
}
}
configuration := shared.DestinationDevNull{
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/destination_elasticsearch_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (r *DestinationElasticsearchResourceModel) ToCreateSDKType() *shared.Destin
}
if destinationElasticsearchAPIKeySecret != nil {
authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{
APIKeySecret: destinationElasticsearchAPIKeySecret,
DestinationElasticsearchAPIKeySecret: destinationElasticsearchAPIKeySecret,
}
}
var destinationElasticsearchUsernamePassword *shared.DestinationElasticsearchUsernamePassword
Expand All @@ -35,7 +35,7 @@ func (r *DestinationElasticsearchResourceModel) ToCreateSDKType() *shared.Destin
}
if destinationElasticsearchUsernamePassword != nil {
authenticationMethod = &shared.DestinationElasticsearchAuthenticationMethod{
UsernamePassword: destinationElasticsearchUsernamePassword,
DestinationElasticsearchUsernamePassword: destinationElasticsearchUsernamePassword,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/destination_firebolt_resource_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (r *DestinationFireboltResourceModel) ToCreateSDKType() *shared.Destination
}
if destinationFireboltSQLInserts != nil {
loadingMethod = &shared.DestinationFireboltLoadingMethod{
SQLInserts: destinationFireboltSQLInserts,
DestinationFireboltSQLInserts: destinationFireboltSQLInserts,
}
}
var destinationFireboltExternalTableViaS3 *shared.DestinationFireboltExternalTableViaS3
Expand All @@ -53,7 +53,7 @@ func (r *DestinationFireboltResourceModel) ToCreateSDKType() *shared.Destination
}
if destinationFireboltExternalTableViaS3 != nil {
loadingMethod = &shared.DestinationFireboltLoadingMethod{
ExternalTableViaS3: destinationFireboltExternalTableViaS3,
DestinationFireboltExternalTableViaS3: destinationFireboltExternalTableViaS3,
}
}
}
Expand Down
Loading

0 comments on commit 0415dcd

Please sign in to comment.