// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package provider

import (
	tfTypes "github.com/airbytehq/terraform-provider-airbyte/internal/provider/types"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/models/shared"
	"github.com/hashicorp/terraform-plugin-framework/types"
)

func (r *DestinationGcsResourceModel) ToSharedDestinationGcsCreateRequest() *shared.DestinationGcsCreateRequest {
	var name string
	name = r.Name.ValueString()

	definitionID := new(string)
	if !r.DefinitionID.IsUnknown() && !r.DefinitionID.IsNull() {
		*definitionID = r.DefinitionID.ValueString()
	} else {
		definitionID = nil
	}
	var workspaceID string
	workspaceID = r.WorkspaceID.ValueString()

	var credential shared.DestinationGcsAuthentication
	var hmacKey *shared.HMACKey
	if r.Configuration.Credential.HMACKey != nil {
		credentialType := new(shared.CredentialType)
		if !r.Configuration.Credential.HMACKey.CredentialType.IsUnknown() && !r.Configuration.Credential.HMACKey.CredentialType.IsNull() {
			*credentialType = shared.CredentialType(r.Configuration.Credential.HMACKey.CredentialType.ValueString())
		} else {
			credentialType = nil
		}
		var hmacKeyAccessID string
		hmacKeyAccessID = r.Configuration.Credential.HMACKey.HmacKeyAccessID.ValueString()

		var hmacKeySecret string
		hmacKeySecret = r.Configuration.Credential.HMACKey.HmacKeySecret.ValueString()

		hmacKey = &shared.HMACKey{
			CredentialType:  credentialType,
			HmacKeyAccessID: hmacKeyAccessID,
			HmacKeySecret:   hmacKeySecret,
		}
	}
	if hmacKey != nil {
		credential = shared.DestinationGcsAuthentication{
			HMACKey: hmacKey,
		}
	}
	var format shared.DestinationGcsOutputFormat
	var avroApacheAvro *shared.AvroApacheAvro
	if r.Configuration.Format.AvroApacheAvro != nil {
		var compressionCodec shared.CompressionCodec
		var noCompression *shared.NoCompression
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression != nil {
			codec := new(shared.Codec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.IsNull() {
				*codec = shared.Codec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.ValueString())
			} else {
				codec = nil
			}
			noCompression = &shared.NoCompression{
				Codec: codec,
			}
		}
		if noCompression != nil {
			compressionCodec = shared.CompressionCodec{
				NoCompression: noCompression,
			}
		}
		var deflate *shared.Deflate
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate != nil {
			codec1 := new(shared.DestinationGcsCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.IsNull() {
				*codec1 = shared.DestinationGcsCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.ValueString())
			} else {
				codec1 = nil
			}
			compressionLevel := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.IsNull() {
				*compressionLevel = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.ValueInt64()
			} else {
				compressionLevel = nil
			}
			deflate = &shared.Deflate{
				Codec:            codec1,
				CompressionLevel: compressionLevel,
			}
		}
		if deflate != nil {
			compressionCodec = shared.CompressionCodec{
				Deflate: deflate,
			}
		}
		var bzip2 *shared.Bzip2
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2 != nil {
			codec2 := new(shared.DestinationGcsSchemasCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.IsNull() {
				*codec2 = shared.DestinationGcsSchemasCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.ValueString())
			} else {
				codec2 = nil
			}
			bzip2 = &shared.Bzip2{
				Codec: codec2,
			}
		}
		if bzip2 != nil {
			compressionCodec = shared.CompressionCodec{
				Bzip2: bzip2,
			}
		}
		var xz *shared.Xz
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz != nil {
			codec3 := new(shared.DestinationGcsSchemasFormatCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.IsNull() {
				*codec3 = shared.DestinationGcsSchemasFormatCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.ValueString())
			} else {
				codec3 = nil
			}
			compressionLevel1 := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.IsNull() {
				*compressionLevel1 = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.ValueInt64()
			} else {
				compressionLevel1 = nil
			}
			xz = &shared.Xz{
				Codec:            codec3,
				CompressionLevel: compressionLevel1,
			}
		}
		if xz != nil {
			compressionCodec = shared.CompressionCodec{
				Xz: xz,
			}
		}
		var zstandard *shared.Zstandard
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard != nil {
			codec4 := new(shared.DestinationGcsSchemasFormatOutputFormatCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.IsNull() {
				*codec4 = shared.DestinationGcsSchemasFormatOutputFormatCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.ValueString())
			} else {
				codec4 = nil
			}
			compressionLevel2 := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.IsNull() {
				*compressionLevel2 = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.ValueInt64()
			} else {
				compressionLevel2 = nil
			}
			includeChecksum := new(bool)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.IsNull() {
				*includeChecksum = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.ValueBool()
			} else {
				includeChecksum = nil
			}
			zstandard = &shared.Zstandard{
				Codec:            codec4,
				CompressionLevel: compressionLevel2,
				IncludeChecksum:  includeChecksum,
			}
		}
		if zstandard != nil {
			compressionCodec = shared.CompressionCodec{
				Zstandard: zstandard,
			}
		}
		var snappy *shared.Snappy
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy != nil {
			codec5 := new(shared.DestinationGcsSchemasFormatOutputFormat1Codec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.IsNull() {
				*codec5 = shared.DestinationGcsSchemasFormatOutputFormat1Codec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.ValueString())
			} else {
				codec5 = nil
			}
			snappy = &shared.Snappy{
				Codec: codec5,
			}
		}
		if snappy != nil {
			compressionCodec = shared.CompressionCodec{
				Snappy: snappy,
			}
		}
		formatType := new(shared.DestinationGcsFormatType)
		if !r.Configuration.Format.AvroApacheAvro.FormatType.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.FormatType.IsNull() {
			*formatType = shared.DestinationGcsFormatType(r.Configuration.Format.AvroApacheAvro.FormatType.ValueString())
		} else {
			formatType = nil
		}
		avroApacheAvro = &shared.AvroApacheAvro{
			CompressionCodec: compressionCodec,
			FormatType:       formatType,
		}
	}
	if avroApacheAvro != nil {
		format = shared.DestinationGcsOutputFormat{
			AvroApacheAvro: avroApacheAvro,
		}
	}
	var destinationGcsCSVCommaSeparatedValues *shared.DestinationGcsCSVCommaSeparatedValues
	if r.Configuration.Format.CSVCommaSeparatedValues != nil {
		var compression *shared.Compression
		if r.Configuration.Format.CSVCommaSeparatedValues.Compression != nil {
			var destinationGcsNoCompression *shared.DestinationGcsNoCompression
			if r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression != nil {
				compressionType := new(shared.CompressionType)
				if !r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.IsNull() {
					*compressionType = shared.CompressionType(r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.ValueString())
				} else {
					compressionType = nil
				}
				destinationGcsNoCompression = &shared.DestinationGcsNoCompression{
					CompressionType: compressionType,
				}
			}
			if destinationGcsNoCompression != nil {
				compression = &shared.Compression{
					DestinationGcsNoCompression: destinationGcsNoCompression,
				}
			}
			var gzip *shared.Gzip
			if r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip != nil {
				compressionType1 := new(shared.DestinationGcsCompressionType)
				if !r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.IsNull() {
					*compressionType1 = shared.DestinationGcsCompressionType(r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.ValueString())
				} else {
					compressionType1 = nil
				}
				gzip = &shared.Gzip{
					CompressionType: compressionType1,
				}
			}
			if gzip != nil {
				compression = &shared.Compression{
					Gzip: gzip,
				}
			}
		}
		flattening := new(shared.Normalization)
		if !r.Configuration.Format.CSVCommaSeparatedValues.Flattening.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Flattening.IsNull() {
			*flattening = shared.Normalization(r.Configuration.Format.CSVCommaSeparatedValues.Flattening.ValueString())
		} else {
			flattening = nil
		}
		formatType1 := new(shared.DestinationGcsSchemasFormatType)
		if !r.Configuration.Format.CSVCommaSeparatedValues.FormatType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.FormatType.IsNull() {
			*formatType1 = shared.DestinationGcsSchemasFormatType(r.Configuration.Format.CSVCommaSeparatedValues.FormatType.ValueString())
		} else {
			formatType1 = nil
		}
		destinationGcsCSVCommaSeparatedValues = &shared.DestinationGcsCSVCommaSeparatedValues{
			Compression: compression,
			Flattening:  flattening,
			FormatType:  formatType1,
		}
	}
	if destinationGcsCSVCommaSeparatedValues != nil {
		format = shared.DestinationGcsOutputFormat{
			DestinationGcsCSVCommaSeparatedValues: destinationGcsCSVCommaSeparatedValues,
		}
	}
	var destinationGcsJSONLinesNewlineDelimitedJSON *shared.DestinationGcsJSONLinesNewlineDelimitedJSON
	if r.Configuration.Format.JSONLinesNewlineDelimitedJSON != nil {
		var compression1 *shared.DestinationGcsCompression
		if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression != nil {
			var destinationGcsSchemasNoCompression *shared.DestinationGcsSchemasNoCompression
			if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression != nil {
				compressionType2 := new(shared.DestinationGcsSchemasCompressionType)
				if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.IsNull() {
					*compressionType2 = shared.DestinationGcsSchemasCompressionType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.ValueString())
				} else {
					compressionType2 = nil
				}
				destinationGcsSchemasNoCompression = &shared.DestinationGcsSchemasNoCompression{
					CompressionType: compressionType2,
				}
			}
			if destinationGcsSchemasNoCompression != nil {
				compression1 = &shared.DestinationGcsCompression{
					DestinationGcsSchemasNoCompression: destinationGcsSchemasNoCompression,
				}
			}
			var destinationGcsGZIP *shared.DestinationGcsGZIP
			if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip != nil {
				compressionType3 := new(shared.DestinationGcsSchemasFormatCompressionType)
				if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.IsNull() {
					*compressionType3 = shared.DestinationGcsSchemasFormatCompressionType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.ValueString())
				} else {
					compressionType3 = nil
				}
				destinationGcsGZIP = &shared.DestinationGcsGZIP{
					CompressionType: compressionType3,
				}
			}
			if destinationGcsGZIP != nil {
				compression1 = &shared.DestinationGcsCompression{
					DestinationGcsGZIP: destinationGcsGZIP,
				}
			}
		}
		formatType2 := new(shared.DestinationGcsSchemasFormatFormatType)
		if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.IsNull() {
			*formatType2 = shared.DestinationGcsSchemasFormatFormatType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.ValueString())
		} else {
			formatType2 = nil
		}
		destinationGcsJSONLinesNewlineDelimitedJSON = &shared.DestinationGcsJSONLinesNewlineDelimitedJSON{
			Compression: compression1,
			FormatType:  formatType2,
		}
	}
	if destinationGcsJSONLinesNewlineDelimitedJSON != nil {
		format = shared.DestinationGcsOutputFormat{
			DestinationGcsJSONLinesNewlineDelimitedJSON: destinationGcsJSONLinesNewlineDelimitedJSON,
		}
	}
	var destinationGcsParquetColumnarStorage *shared.DestinationGcsParquetColumnarStorage
	if r.Configuration.Format.ParquetColumnarStorage != nil {
		blockSizeMb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.IsNull() {
			*blockSizeMb = r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.ValueInt64()
		} else {
			blockSizeMb = nil
		}
		compressionCodec1 := new(shared.DestinationGcsCompressionCodec)
		if !r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.IsNull() {
			*compressionCodec1 = shared.DestinationGcsCompressionCodec(r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.ValueString())
		} else {
			compressionCodec1 = nil
		}
		dictionaryEncoding := new(bool)
		if !r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.IsNull() {
			*dictionaryEncoding = r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.ValueBool()
		} else {
			dictionaryEncoding = nil
		}
		dictionaryPageSizeKb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.IsNull() {
			*dictionaryPageSizeKb = r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.ValueInt64()
		} else {
			dictionaryPageSizeKb = nil
		}
		formatType3 := new(shared.DestinationGcsSchemasFormatOutputFormatFormatType)
		if !r.Configuration.Format.ParquetColumnarStorage.FormatType.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.FormatType.IsNull() {
			*formatType3 = shared.DestinationGcsSchemasFormatOutputFormatFormatType(r.Configuration.Format.ParquetColumnarStorage.FormatType.ValueString())
		} else {
			formatType3 = nil
		}
		maxPaddingSizeMb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.IsNull() {
			*maxPaddingSizeMb = r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.ValueInt64()
		} else {
			maxPaddingSizeMb = nil
		}
		pageSizeKb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.IsNull() {
			*pageSizeKb = r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.ValueInt64()
		} else {
			pageSizeKb = nil
		}
		destinationGcsParquetColumnarStorage = &shared.DestinationGcsParquetColumnarStorage{
			BlockSizeMb:          blockSizeMb,
			CompressionCodec:     compressionCodec1,
			DictionaryEncoding:   dictionaryEncoding,
			DictionaryPageSizeKb: dictionaryPageSizeKb,
			FormatType:           formatType3,
			MaxPaddingSizeMb:     maxPaddingSizeMb,
			PageSizeKb:           pageSizeKb,
		}
	}
	if destinationGcsParquetColumnarStorage != nil {
		format = shared.DestinationGcsOutputFormat{
			DestinationGcsParquetColumnarStorage: destinationGcsParquetColumnarStorage,
		}
	}
	var gcsBucketName string
	gcsBucketName = r.Configuration.GcsBucketName.ValueString()

	var gcsBucketPath string
	gcsBucketPath = r.Configuration.GcsBucketPath.ValueString()

	gcsBucketRegion := new(shared.GCSBucketRegion)
	if !r.Configuration.GcsBucketRegion.IsUnknown() && !r.Configuration.GcsBucketRegion.IsNull() {
		*gcsBucketRegion = shared.GCSBucketRegion(r.Configuration.GcsBucketRegion.ValueString())
	} else {
		gcsBucketRegion = nil
	}
	configuration := shared.DestinationGcs{
		Credential:      credential,
		Format:          format,
		GcsBucketName:   gcsBucketName,
		GcsBucketPath:   gcsBucketPath,
		GcsBucketRegion: gcsBucketRegion,
	}
	out := shared.DestinationGcsCreateRequest{
		Name:          name,
		DefinitionID:  definitionID,
		WorkspaceID:   workspaceID,
		Configuration: configuration,
	}
	return &out
}

func (r *DestinationGcsResourceModel) RefreshFromSharedDestinationResponse(resp *shared.DestinationResponse) {
	if resp != nil {
		r.CreatedAt = types.Int64Value(resp.CreatedAt)
		r.DefinitionID = types.StringValue(resp.DefinitionID)
		r.DestinationID = types.StringValue(resp.DestinationID)
		r.DestinationType = types.StringValue(resp.DestinationType)
		r.Name = types.StringValue(resp.Name)
		if resp.ResourceAllocation == nil {
			r.ResourceAllocation = nil
		} else {
			r.ResourceAllocation = &tfTypes.ScopedResourceRequirements{}
			if resp.ResourceAllocation.Default == nil {
				r.ResourceAllocation.Default = nil
			} else {
				r.ResourceAllocation.Default = &tfTypes.ResourceRequirements{}
				r.ResourceAllocation.Default.CPULimit = types.StringPointerValue(resp.ResourceAllocation.Default.CPULimit)
				r.ResourceAllocation.Default.CPURequest = types.StringPointerValue(resp.ResourceAllocation.Default.CPURequest)
				r.ResourceAllocation.Default.EphemeralStorageLimit = types.StringPointerValue(resp.ResourceAllocation.Default.EphemeralStorageLimit)
				r.ResourceAllocation.Default.EphemeralStorageRequest = types.StringPointerValue(resp.ResourceAllocation.Default.EphemeralStorageRequest)
				r.ResourceAllocation.Default.MemoryLimit = types.StringPointerValue(resp.ResourceAllocation.Default.MemoryLimit)
				r.ResourceAllocation.Default.MemoryRequest = types.StringPointerValue(resp.ResourceAllocation.Default.MemoryRequest)
			}
			r.ResourceAllocation.JobSpecific = []tfTypes.JobTypeResourceLimit{}
			if len(r.ResourceAllocation.JobSpecific) > len(resp.ResourceAllocation.JobSpecific) {
				r.ResourceAllocation.JobSpecific = r.ResourceAllocation.JobSpecific[:len(resp.ResourceAllocation.JobSpecific)]
			}
			for jobSpecificCount, jobSpecificItem := range resp.ResourceAllocation.JobSpecific {
				var jobSpecific1 tfTypes.JobTypeResourceLimit
				jobSpecific1.JobType = types.StringValue(string(jobSpecificItem.JobType))
				jobSpecific1.ResourceRequirements.CPULimit = types.StringPointerValue(jobSpecificItem.ResourceRequirements.CPULimit)
				jobSpecific1.ResourceRequirements.CPURequest = types.StringPointerValue(jobSpecificItem.ResourceRequirements.CPURequest)
				jobSpecific1.ResourceRequirements.EphemeralStorageLimit = types.StringPointerValue(jobSpecificItem.ResourceRequirements.EphemeralStorageLimit)
				jobSpecific1.ResourceRequirements.EphemeralStorageRequest = types.StringPointerValue(jobSpecificItem.ResourceRequirements.EphemeralStorageRequest)
				jobSpecific1.ResourceRequirements.MemoryLimit = types.StringPointerValue(jobSpecificItem.ResourceRequirements.MemoryLimit)
				jobSpecific1.ResourceRequirements.MemoryRequest = types.StringPointerValue(jobSpecificItem.ResourceRequirements.MemoryRequest)
				if jobSpecificCount+1 > len(r.ResourceAllocation.JobSpecific) {
					r.ResourceAllocation.JobSpecific = append(r.ResourceAllocation.JobSpecific, jobSpecific1)
				} else {
					r.ResourceAllocation.JobSpecific[jobSpecificCount].JobType = jobSpecific1.JobType
					r.ResourceAllocation.JobSpecific[jobSpecificCount].ResourceRequirements = jobSpecific1.ResourceRequirements
				}
			}
		}
		r.WorkspaceID = types.StringValue(resp.WorkspaceID)
	}
}

func (r *DestinationGcsResourceModel) ToSharedDestinationGcsPutRequest() *shared.DestinationGcsPutRequest {
	var name string
	name = r.Name.ValueString()

	var workspaceID string
	workspaceID = r.WorkspaceID.ValueString()

	var credential shared.DestinationGcsUpdateAuthentication
	var destinationGcsUpdateHMACKey *shared.DestinationGcsUpdateHMACKey
	if r.Configuration.Credential.HMACKey != nil {
		credentialType := new(shared.DestinationGcsUpdateCredentialType)
		if !r.Configuration.Credential.HMACKey.CredentialType.IsUnknown() && !r.Configuration.Credential.HMACKey.CredentialType.IsNull() {
			*credentialType = shared.DestinationGcsUpdateCredentialType(r.Configuration.Credential.HMACKey.CredentialType.ValueString())
		} else {
			credentialType = nil
		}
		var hmacKeyAccessID string
		hmacKeyAccessID = r.Configuration.Credential.HMACKey.HmacKeyAccessID.ValueString()

		var hmacKeySecret string
		hmacKeySecret = r.Configuration.Credential.HMACKey.HmacKeySecret.ValueString()

		destinationGcsUpdateHMACKey = &shared.DestinationGcsUpdateHMACKey{
			CredentialType:  credentialType,
			HmacKeyAccessID: hmacKeyAccessID,
			HmacKeySecret:   hmacKeySecret,
		}
	}
	if destinationGcsUpdateHMACKey != nil {
		credential = shared.DestinationGcsUpdateAuthentication{
			DestinationGcsUpdateHMACKey: destinationGcsUpdateHMACKey,
		}
	}
	var format shared.DestinationGcsUpdateOutputFormat
	var destinationGcsUpdateAvroApacheAvro *shared.DestinationGcsUpdateAvroApacheAvro
	if r.Configuration.Format.AvroApacheAvro != nil {
		var compressionCodec shared.DestinationGcsUpdateCompressionCodec
		var destinationGcsUpdateNoCompression *shared.DestinationGcsUpdateNoCompression
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression != nil {
			codec := new(shared.DestinationGcsUpdateCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.IsNull() {
				*codec = shared.DestinationGcsUpdateCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.NoCompression.Codec.ValueString())
			} else {
				codec = nil
			}
			destinationGcsUpdateNoCompression = &shared.DestinationGcsUpdateNoCompression{
				Codec: codec,
			}
		}
		if destinationGcsUpdateNoCompression != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateNoCompression: destinationGcsUpdateNoCompression,
			}
		}
		var destinationGcsUpdateDeflate *shared.DestinationGcsUpdateDeflate
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate != nil {
			codec1 := new(shared.DestinationGcsUpdateSchemasCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.IsNull() {
				*codec1 = shared.DestinationGcsUpdateSchemasCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.Codec.ValueString())
			} else {
				codec1 = nil
			}
			compressionLevel := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.IsNull() {
				*compressionLevel = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Deflate.CompressionLevel.ValueInt64()
			} else {
				compressionLevel = nil
			}
			destinationGcsUpdateDeflate = &shared.DestinationGcsUpdateDeflate{
				Codec:            codec1,
				CompressionLevel: compressionLevel,
			}
		}
		if destinationGcsUpdateDeflate != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateDeflate: destinationGcsUpdateDeflate,
			}
		}
		var destinationGcsUpdateBzip2 *shared.DestinationGcsUpdateBzip2
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2 != nil {
			codec2 := new(shared.DestinationGcsUpdateSchemasFormatCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.IsNull() {
				*codec2 = shared.DestinationGcsUpdateSchemasFormatCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Bzip2.Codec.ValueString())
			} else {
				codec2 = nil
			}
			destinationGcsUpdateBzip2 = &shared.DestinationGcsUpdateBzip2{
				Codec: codec2,
			}
		}
		if destinationGcsUpdateBzip2 != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateBzip2: destinationGcsUpdateBzip2,
			}
		}
		var destinationGcsUpdateXz *shared.DestinationGcsUpdateXz
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz != nil {
			codec3 := new(shared.DestinationGcsUpdateSchemasFormatOutputFormatCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.IsNull() {
				*codec3 = shared.DestinationGcsUpdateSchemasFormatOutputFormatCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.Codec.ValueString())
			} else {
				codec3 = nil
			}
			compressionLevel1 := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.IsNull() {
				*compressionLevel1 = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Xz.CompressionLevel.ValueInt64()
			} else {
				compressionLevel1 = nil
			}
			destinationGcsUpdateXz = &shared.DestinationGcsUpdateXz{
				Codec:            codec3,
				CompressionLevel: compressionLevel1,
			}
		}
		if destinationGcsUpdateXz != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateXz: destinationGcsUpdateXz,
			}
		}
		var destinationGcsUpdateZstandard *shared.DestinationGcsUpdateZstandard
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard != nil {
			codec4 := new(shared.DestinationGcsUpdateSchemasFormatOutputFormat1Codec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.IsNull() {
				*codec4 = shared.DestinationGcsUpdateSchemasFormatOutputFormat1Codec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.Codec.ValueString())
			} else {
				codec4 = nil
			}
			compressionLevel2 := new(int64)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.IsNull() {
				*compressionLevel2 = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.CompressionLevel.ValueInt64()
			} else {
				compressionLevel2 = nil
			}
			includeChecksum := new(bool)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.IsNull() {
				*includeChecksum = r.Configuration.Format.AvroApacheAvro.CompressionCodec.Zstandard.IncludeChecksum.ValueBool()
			} else {
				includeChecksum = nil
			}
			destinationGcsUpdateZstandard = &shared.DestinationGcsUpdateZstandard{
				Codec:            codec4,
				CompressionLevel: compressionLevel2,
				IncludeChecksum:  includeChecksum,
			}
		}
		if destinationGcsUpdateZstandard != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateZstandard: destinationGcsUpdateZstandard,
			}
		}
		var destinationGcsUpdateSnappy *shared.DestinationGcsUpdateSnappy
		if r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy != nil {
			codec5 := new(shared.DestinationGcsUpdateSchemasFormatOutputFormat1CompressionCodecCodec)
			if !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.IsNull() {
				*codec5 = shared.DestinationGcsUpdateSchemasFormatOutputFormat1CompressionCodecCodec(r.Configuration.Format.AvroApacheAvro.CompressionCodec.Snappy.Codec.ValueString())
			} else {
				codec5 = nil
			}
			destinationGcsUpdateSnappy = &shared.DestinationGcsUpdateSnappy{
				Codec: codec5,
			}
		}
		if destinationGcsUpdateSnappy != nil {
			compressionCodec = shared.DestinationGcsUpdateCompressionCodec{
				DestinationGcsUpdateSnappy: destinationGcsUpdateSnappy,
			}
		}
		formatType := new(shared.DestinationGcsUpdateFormatType)
		if !r.Configuration.Format.AvroApacheAvro.FormatType.IsUnknown() && !r.Configuration.Format.AvroApacheAvro.FormatType.IsNull() {
			*formatType = shared.DestinationGcsUpdateFormatType(r.Configuration.Format.AvroApacheAvro.FormatType.ValueString())
		} else {
			formatType = nil
		}
		destinationGcsUpdateAvroApacheAvro = &shared.DestinationGcsUpdateAvroApacheAvro{
			CompressionCodec: compressionCodec,
			FormatType:       formatType,
		}
	}
	if destinationGcsUpdateAvroApacheAvro != nil {
		format = shared.DestinationGcsUpdateOutputFormat{
			DestinationGcsUpdateAvroApacheAvro: destinationGcsUpdateAvroApacheAvro,
		}
	}
	var destinationGcsUpdateCSVCommaSeparatedValues *shared.DestinationGcsUpdateCSVCommaSeparatedValues
	if r.Configuration.Format.CSVCommaSeparatedValues != nil {
		var compression *shared.DestinationGcsUpdateCompression
		if r.Configuration.Format.CSVCommaSeparatedValues.Compression != nil {
			var destinationGcsUpdateSchemasNoCompression *shared.DestinationGcsUpdateSchemasNoCompression
			if r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression != nil {
				compressionType := new(shared.DestinationGcsUpdateCompressionType)
				if !r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.IsNull() {
					*compressionType = shared.DestinationGcsUpdateCompressionType(r.Configuration.Format.CSVCommaSeparatedValues.Compression.NoCompression.CompressionType.ValueString())
				} else {
					compressionType = nil
				}
				destinationGcsUpdateSchemasNoCompression = &shared.DestinationGcsUpdateSchemasNoCompression{
					CompressionType: compressionType,
				}
			}
			if destinationGcsUpdateSchemasNoCompression != nil {
				compression = &shared.DestinationGcsUpdateCompression{
					DestinationGcsUpdateSchemasNoCompression: destinationGcsUpdateSchemasNoCompression,
				}
			}
			var destinationGcsUpdateGZIP *shared.DestinationGcsUpdateGZIP
			if r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip != nil {
				compressionType1 := new(shared.DestinationGcsUpdateSchemasCompressionType)
				if !r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.IsNull() {
					*compressionType1 = shared.DestinationGcsUpdateSchemasCompressionType(r.Configuration.Format.CSVCommaSeparatedValues.Compression.Gzip.CompressionType.ValueString())
				} else {
					compressionType1 = nil
				}
				destinationGcsUpdateGZIP = &shared.DestinationGcsUpdateGZIP{
					CompressionType: compressionType1,
				}
			}
			if destinationGcsUpdateGZIP != nil {
				compression = &shared.DestinationGcsUpdateCompression{
					DestinationGcsUpdateGZIP: destinationGcsUpdateGZIP,
				}
			}
		}
		flattening := new(shared.DestinationGcsUpdateNormalization)
		if !r.Configuration.Format.CSVCommaSeparatedValues.Flattening.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.Flattening.IsNull() {
			*flattening = shared.DestinationGcsUpdateNormalization(r.Configuration.Format.CSVCommaSeparatedValues.Flattening.ValueString())
		} else {
			flattening = nil
		}
		formatType1 := new(shared.DestinationGcsUpdateSchemasFormatType)
		if !r.Configuration.Format.CSVCommaSeparatedValues.FormatType.IsUnknown() && !r.Configuration.Format.CSVCommaSeparatedValues.FormatType.IsNull() {
			*formatType1 = shared.DestinationGcsUpdateSchemasFormatType(r.Configuration.Format.CSVCommaSeparatedValues.FormatType.ValueString())
		} else {
			formatType1 = nil
		}
		destinationGcsUpdateCSVCommaSeparatedValues = &shared.DestinationGcsUpdateCSVCommaSeparatedValues{
			Compression: compression,
			Flattening:  flattening,
			FormatType:  formatType1,
		}
	}
	if destinationGcsUpdateCSVCommaSeparatedValues != nil {
		format = shared.DestinationGcsUpdateOutputFormat{
			DestinationGcsUpdateCSVCommaSeparatedValues: destinationGcsUpdateCSVCommaSeparatedValues,
		}
	}
	var destinationGcsUpdateJSONLinesNewlineDelimitedJSON *shared.DestinationGcsUpdateJSONLinesNewlineDelimitedJSON
	if r.Configuration.Format.JSONLinesNewlineDelimitedJSON != nil {
		var compression1 *shared.DestinationGcsUpdateSchemasCompression
		if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression != nil {
			var destinationGcsUpdateSchemasFormatNoCompression *shared.DestinationGcsUpdateSchemasFormatNoCompression
			if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression != nil {
				compressionType2 := new(shared.DestinationGcsUpdateSchemasFormatCompressionType)
				if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.IsNull() {
					*compressionType2 = shared.DestinationGcsUpdateSchemasFormatCompressionType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.NoCompression.CompressionType.ValueString())
				} else {
					compressionType2 = nil
				}
				destinationGcsUpdateSchemasFormatNoCompression = &shared.DestinationGcsUpdateSchemasFormatNoCompression{
					CompressionType: compressionType2,
				}
			}
			if destinationGcsUpdateSchemasFormatNoCompression != nil {
				compression1 = &shared.DestinationGcsUpdateSchemasCompression{
					DestinationGcsUpdateSchemasFormatNoCompression: destinationGcsUpdateSchemasFormatNoCompression,
				}
			}
			var destinationGcsUpdateSchemasGZIP *shared.DestinationGcsUpdateSchemasGZIP
			if r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip != nil {
				compressionType3 := new(shared.DestinationGcsUpdateSchemasFormatOutputFormatCompressionType)
				if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.IsNull() {
					*compressionType3 = shared.DestinationGcsUpdateSchemasFormatOutputFormatCompressionType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.Compression.Gzip.CompressionType.ValueString())
				} else {
					compressionType3 = nil
				}
				destinationGcsUpdateSchemasGZIP = &shared.DestinationGcsUpdateSchemasGZIP{
					CompressionType: compressionType3,
				}
			}
			if destinationGcsUpdateSchemasGZIP != nil {
				compression1 = &shared.DestinationGcsUpdateSchemasCompression{
					DestinationGcsUpdateSchemasGZIP: destinationGcsUpdateSchemasGZIP,
				}
			}
		}
		formatType2 := new(shared.DestinationGcsUpdateSchemasFormatFormatType)
		if !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.IsUnknown() && !r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.IsNull() {
			*formatType2 = shared.DestinationGcsUpdateSchemasFormatFormatType(r.Configuration.Format.JSONLinesNewlineDelimitedJSON.FormatType.ValueString())
		} else {
			formatType2 = nil
		}
		destinationGcsUpdateJSONLinesNewlineDelimitedJSON = &shared.DestinationGcsUpdateJSONLinesNewlineDelimitedJSON{
			Compression: compression1,
			FormatType:  formatType2,
		}
	}
	if destinationGcsUpdateJSONLinesNewlineDelimitedJSON != nil {
		format = shared.DestinationGcsUpdateOutputFormat{
			DestinationGcsUpdateJSONLinesNewlineDelimitedJSON: destinationGcsUpdateJSONLinesNewlineDelimitedJSON,
		}
	}
	var destinationGcsUpdateParquetColumnarStorage *shared.DestinationGcsUpdateParquetColumnarStorage
	if r.Configuration.Format.ParquetColumnarStorage != nil {
		blockSizeMb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.IsNull() {
			*blockSizeMb = r.Configuration.Format.ParquetColumnarStorage.BlockSizeMb.ValueInt64()
		} else {
			blockSizeMb = nil
		}
		compressionCodec1 := new(shared.DestinationGcsUpdateSchemasCompressionCodec)
		if !r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.IsNull() {
			*compressionCodec1 = shared.DestinationGcsUpdateSchemasCompressionCodec(r.Configuration.Format.ParquetColumnarStorage.CompressionCodec.ValueString())
		} else {
			compressionCodec1 = nil
		}
		dictionaryEncoding := new(bool)
		if !r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.IsNull() {
			*dictionaryEncoding = r.Configuration.Format.ParquetColumnarStorage.DictionaryEncoding.ValueBool()
		} else {
			dictionaryEncoding = nil
		}
		dictionaryPageSizeKb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.IsNull() {
			*dictionaryPageSizeKb = r.Configuration.Format.ParquetColumnarStorage.DictionaryPageSizeKb.ValueInt64()
		} else {
			dictionaryPageSizeKb = nil
		}
		formatType3 := new(shared.DestinationGcsUpdateSchemasFormatOutputFormatFormatType)
		if !r.Configuration.Format.ParquetColumnarStorage.FormatType.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.FormatType.IsNull() {
			*formatType3 = shared.DestinationGcsUpdateSchemasFormatOutputFormatFormatType(r.Configuration.Format.ParquetColumnarStorage.FormatType.ValueString())
		} else {
			formatType3 = nil
		}
		maxPaddingSizeMb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.IsNull() {
			*maxPaddingSizeMb = r.Configuration.Format.ParquetColumnarStorage.MaxPaddingSizeMb.ValueInt64()
		} else {
			maxPaddingSizeMb = nil
		}
		pageSizeKb := new(int64)
		if !r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.IsUnknown() && !r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.IsNull() {
			*pageSizeKb = r.Configuration.Format.ParquetColumnarStorage.PageSizeKb.ValueInt64()
		} else {
			pageSizeKb = nil
		}
		destinationGcsUpdateParquetColumnarStorage = &shared.DestinationGcsUpdateParquetColumnarStorage{
			BlockSizeMb:          blockSizeMb,
			CompressionCodec:     compressionCodec1,
			DictionaryEncoding:   dictionaryEncoding,
			DictionaryPageSizeKb: dictionaryPageSizeKb,
			FormatType:           formatType3,
			MaxPaddingSizeMb:     maxPaddingSizeMb,
			PageSizeKb:           pageSizeKb,
		}
	}
	if destinationGcsUpdateParquetColumnarStorage != nil {
		format = shared.DestinationGcsUpdateOutputFormat{
			DestinationGcsUpdateParquetColumnarStorage: destinationGcsUpdateParquetColumnarStorage,
		}
	}
	var gcsBucketName string
	gcsBucketName = r.Configuration.GcsBucketName.ValueString()

	var gcsBucketPath string
	gcsBucketPath = r.Configuration.GcsBucketPath.ValueString()

	gcsBucketRegion := new(shared.DestinationGCSUpdateGCSBucketRegion)
	if !r.Configuration.GcsBucketRegion.IsUnknown() && !r.Configuration.GcsBucketRegion.IsNull() {
		*gcsBucketRegion = shared.DestinationGCSUpdateGCSBucketRegion(r.Configuration.GcsBucketRegion.ValueString())
	} else {
		gcsBucketRegion = nil
	}
	configuration := shared.DestinationGcsUpdate{
		Credential:      credential,
		Format:          format,
		GcsBucketName:   gcsBucketName,
		GcsBucketPath:   gcsBucketPath,
		GcsBucketRegion: gcsBucketRegion,
	}
	out := shared.DestinationGcsPutRequest{
		Name:          name,
		WorkspaceID:   workspaceID,
		Configuration: configuration,
	}
	return &out
}
