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

package shared

import (
	"encoding/json"
	"errors"
	"fmt"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
	"time"
)

type SourceGoogleDriveUpdateSchemasAuthType string

const (
	SourceGoogleDriveUpdateSchemasAuthTypeService SourceGoogleDriveUpdateSchemasAuthType = "Service"
)

func (e SourceGoogleDriveUpdateSchemasAuthType) ToPointer() *SourceGoogleDriveUpdateSchemasAuthType {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasAuthType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "Service":
		*e = SourceGoogleDriveUpdateSchemasAuthType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasAuthType: %v", v)
	}
}

type SourceGoogleDriveUpdateServiceAccountKeyAuthentication struct {
	authType *SourceGoogleDriveUpdateSchemasAuthType `const:"Service" json:"auth_type"`
	// The JSON key of the service account to use for authorization. Read more <a href="https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys">here</a>.
	ServiceAccountInfo string `json:"service_account_info"`
}

func (s SourceGoogleDriveUpdateServiceAccountKeyAuthentication) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateServiceAccountKeyAuthentication) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateServiceAccountKeyAuthentication) GetAuthType() *SourceGoogleDriveUpdateSchemasAuthType {
	return SourceGoogleDriveUpdateSchemasAuthTypeService.ToPointer()
}

func (o *SourceGoogleDriveUpdateServiceAccountKeyAuthentication) GetServiceAccountInfo() string {
	if o == nil {
		return ""
	}
	return o.ServiceAccountInfo
}

type SourceGoogleDriveUpdateAuthType string

const (
	SourceGoogleDriveUpdateAuthTypeClient SourceGoogleDriveUpdateAuthType = "Client"
)

func (e SourceGoogleDriveUpdateAuthType) ToPointer() *SourceGoogleDriveUpdateAuthType {
	return &e
}
func (e *SourceGoogleDriveUpdateAuthType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "Client":
		*e = SourceGoogleDriveUpdateAuthType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateAuthType: %v", v)
	}
}

type SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth struct {
	authType *SourceGoogleDriveUpdateAuthType `const:"Client" json:"auth_type"`
	// Client ID for the Google Drive API
	ClientID string `json:"client_id"`
	// Client Secret for the Google Drive API
	ClientSecret string `json:"client_secret"`
	// Refresh Token for the Google Drive API
	RefreshToken string `json:"refresh_token"`
}

func (s SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) GetAuthType() *SourceGoogleDriveUpdateAuthType {
	return SourceGoogleDriveUpdateAuthTypeClient.ToPointer()
}

func (o *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) GetClientID() string {
	if o == nil {
		return ""
	}
	return o.ClientID
}

func (o *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) GetClientSecret() string {
	if o == nil {
		return ""
	}
	return o.ClientSecret
}

func (o *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) GetRefreshToken() string {
	if o == nil {
		return ""
	}
	return o.RefreshToken
}

type SourceGoogleDriveUpdateAuthenticationType string

const (
	SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateAuthenticateViaGoogleOAuth      SourceGoogleDriveUpdateAuthenticationType = "source-google-drive-update_Authenticate via Google (OAuth)"
	SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateServiceAccountKeyAuthentication SourceGoogleDriveUpdateAuthenticationType = "source-google-drive-update_Service Account Key Authentication"
)

// SourceGoogleDriveUpdateAuthentication - Credentials for connecting to the Google Drive API
type SourceGoogleDriveUpdateAuthentication struct {
	SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth      *SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth      `queryParam:"inline"`
	SourceGoogleDriveUpdateServiceAccountKeyAuthentication *SourceGoogleDriveUpdateServiceAccountKeyAuthentication `queryParam:"inline"`

	Type SourceGoogleDriveUpdateAuthenticationType
}

func CreateSourceGoogleDriveUpdateAuthenticationSourceGoogleDriveUpdateAuthenticateViaGoogleOAuth(sourceGoogleDriveUpdateAuthenticateViaGoogleOAuth SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth) SourceGoogleDriveUpdateAuthentication {
	typ := SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateAuthenticateViaGoogleOAuth

	return SourceGoogleDriveUpdateAuthentication{
		SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth: &sourceGoogleDriveUpdateAuthenticateViaGoogleOAuth,
		Type: typ,
	}
}

func CreateSourceGoogleDriveUpdateAuthenticationSourceGoogleDriveUpdateServiceAccountKeyAuthentication(sourceGoogleDriveUpdateServiceAccountKeyAuthentication SourceGoogleDriveUpdateServiceAccountKeyAuthentication) SourceGoogleDriveUpdateAuthentication {
	typ := SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateServiceAccountKeyAuthentication

	return SourceGoogleDriveUpdateAuthentication{
		SourceGoogleDriveUpdateServiceAccountKeyAuthentication: &sourceGoogleDriveUpdateServiceAccountKeyAuthentication,
		Type: typ,
	}
}

func (u *SourceGoogleDriveUpdateAuthentication) UnmarshalJSON(data []byte) error {

	var sourceGoogleDriveUpdateServiceAccountKeyAuthentication SourceGoogleDriveUpdateServiceAccountKeyAuthentication = SourceGoogleDriveUpdateServiceAccountKeyAuthentication{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateServiceAccountKeyAuthentication, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateServiceAccountKeyAuthentication = &sourceGoogleDriveUpdateServiceAccountKeyAuthentication
		u.Type = SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateServiceAccountKeyAuthentication
		return nil
	}

	var sourceGoogleDriveUpdateAuthenticateViaGoogleOAuth SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth = SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateAuthenticateViaGoogleOAuth, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth = &sourceGoogleDriveUpdateAuthenticateViaGoogleOAuth
		u.Type = SourceGoogleDriveUpdateAuthenticationTypeSourceGoogleDriveUpdateAuthenticateViaGoogleOAuth
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleDriveUpdateAuthentication", string(data))
}

func (u SourceGoogleDriveUpdateAuthentication) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateAuthenticateViaGoogleOAuth, "", true)
	}

	if u.SourceGoogleDriveUpdateServiceAccountKeyAuthentication != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateServiceAccountKeyAuthentication, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleDriveUpdateAuthentication: all fields are null")
}

type SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType string

const (
	SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryTypeUsePermissionsTransfer SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType = "use_permissions_transfer"
)

func (e SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType) ToPointer() *SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "use_permissions_transfer":
		*e = SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType: %v", v)
	}
}

// SourceGoogleDriveUpdateReplicatePermissionsACL - Sends one identity stream and one for more permissions (ACL) streams to the destination. This data can be used in downstream systems to recreate permission restrictions mirroring the original source.
type SourceGoogleDriveUpdateReplicatePermissionsACL struct {
	deliveryType *SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType `const:"use_permissions_transfer" json:"delivery_type"`
	// The Google domain of the identities.
	Domain *string `json:"domain,omitempty"`
	// This data can be used in downstream systems to recreate permission restrictions mirroring the original source
	IncludeIdentitiesStream *bool `default:"true" json:"include_identities_stream"`
}

func (s SourceGoogleDriveUpdateReplicatePermissionsACL) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateReplicatePermissionsACL) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateReplicatePermissionsACL) GetDeliveryType() *SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryType {
	return SourceGoogleDriveUpdateSchemasDeliveryMethodDeliveryTypeUsePermissionsTransfer.ToPointer()
}

func (o *SourceGoogleDriveUpdateReplicatePermissionsACL) GetDomain() *string {
	if o == nil {
		return nil
	}
	return o.Domain
}

func (o *SourceGoogleDriveUpdateReplicatePermissionsACL) GetIncludeIdentitiesStream() *bool {
	if o == nil {
		return nil
	}
	return o.IncludeIdentitiesStream
}

type SourceGoogleDriveUpdateSchemasDeliveryType string

const (
	SourceGoogleDriveUpdateSchemasDeliveryTypeUseFileTransfer SourceGoogleDriveUpdateSchemasDeliveryType = "use_file_transfer"
)

func (e SourceGoogleDriveUpdateSchemasDeliveryType) ToPointer() *SourceGoogleDriveUpdateSchemasDeliveryType {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasDeliveryType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "use_file_transfer":
		*e = SourceGoogleDriveUpdateSchemasDeliveryType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasDeliveryType: %v", v)
	}
}

// SourceGoogleDriveUpdateCopyRawFiles - Copy raw files without parsing their contents. Bits are copied into the destination exactly as they appeared in the source. Recommended for use with unstructured text data, non-text and compressed files.
type SourceGoogleDriveUpdateCopyRawFiles struct {
	deliveryType *SourceGoogleDriveUpdateSchemasDeliveryType `const:"use_file_transfer" json:"delivery_type"`
	// If enabled, sends subdirectory folder structure along with source file names to the destination. Otherwise, files will be synced by their names only. This option is ignored when file-based replication is not enabled.
	PreserveDirectoryStructure *bool `default:"true" json:"preserve_directory_structure"`
}

func (s SourceGoogleDriveUpdateCopyRawFiles) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateCopyRawFiles) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateCopyRawFiles) GetDeliveryType() *SourceGoogleDriveUpdateSchemasDeliveryType {
	return SourceGoogleDriveUpdateSchemasDeliveryTypeUseFileTransfer.ToPointer()
}

func (o *SourceGoogleDriveUpdateCopyRawFiles) GetPreserveDirectoryStructure() *bool {
	if o == nil {
		return nil
	}
	return o.PreserveDirectoryStructure
}

type SourceGoogleDriveUpdateDeliveryType string

const (
	SourceGoogleDriveUpdateDeliveryTypeUseRecordsTransfer SourceGoogleDriveUpdateDeliveryType = "use_records_transfer"
)

func (e SourceGoogleDriveUpdateDeliveryType) ToPointer() *SourceGoogleDriveUpdateDeliveryType {
	return &e
}
func (e *SourceGoogleDriveUpdateDeliveryType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "use_records_transfer":
		*e = SourceGoogleDriveUpdateDeliveryType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateDeliveryType: %v", v)
	}
}

// SourceGoogleDriveUpdateReplicateRecords - Recommended - Extract and load structured records into your destination of choice. This is the classic method of moving data in Airbyte. It allows for blocking and hashing individual fields or files from a structured schema. Data can be flattened, typed and deduped depending on the destination.
type SourceGoogleDriveUpdateReplicateRecords struct {
	deliveryType *SourceGoogleDriveUpdateDeliveryType `const:"use_records_transfer" json:"delivery_type"`
}

func (s SourceGoogleDriveUpdateReplicateRecords) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateReplicateRecords) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateReplicateRecords) GetDeliveryType() *SourceGoogleDriveUpdateDeliveryType {
	return SourceGoogleDriveUpdateDeliveryTypeUseRecordsTransfer.ToPointer()
}

type SourceGoogleDriveUpdateDeliveryMethodType string

const (
	SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicateRecords        SourceGoogleDriveUpdateDeliveryMethodType = "source-google-drive-update_Replicate Records"
	SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateCopyRawFiles            SourceGoogleDriveUpdateDeliveryMethodType = "source-google-drive-update_Copy Raw Files"
	SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicatePermissionsACL SourceGoogleDriveUpdateDeliveryMethodType = "source-google-drive-update_Replicate Permissions ACL"
)

type SourceGoogleDriveUpdateDeliveryMethod struct {
	SourceGoogleDriveUpdateReplicateRecords        *SourceGoogleDriveUpdateReplicateRecords        `queryParam:"inline"`
	SourceGoogleDriveUpdateCopyRawFiles            *SourceGoogleDriveUpdateCopyRawFiles            `queryParam:"inline"`
	SourceGoogleDriveUpdateReplicatePermissionsACL *SourceGoogleDriveUpdateReplicatePermissionsACL `queryParam:"inline"`

	Type SourceGoogleDriveUpdateDeliveryMethodType
}

func CreateSourceGoogleDriveUpdateDeliveryMethodSourceGoogleDriveUpdateReplicateRecords(sourceGoogleDriveUpdateReplicateRecords SourceGoogleDriveUpdateReplicateRecords) SourceGoogleDriveUpdateDeliveryMethod {
	typ := SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicateRecords

	return SourceGoogleDriveUpdateDeliveryMethod{
		SourceGoogleDriveUpdateReplicateRecords: &sourceGoogleDriveUpdateReplicateRecords,
		Type:                                    typ,
	}
}

func CreateSourceGoogleDriveUpdateDeliveryMethodSourceGoogleDriveUpdateCopyRawFiles(sourceGoogleDriveUpdateCopyRawFiles SourceGoogleDriveUpdateCopyRawFiles) SourceGoogleDriveUpdateDeliveryMethod {
	typ := SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateCopyRawFiles

	return SourceGoogleDriveUpdateDeliveryMethod{
		SourceGoogleDriveUpdateCopyRawFiles: &sourceGoogleDriveUpdateCopyRawFiles,
		Type:                                typ,
	}
}

func CreateSourceGoogleDriveUpdateDeliveryMethodSourceGoogleDriveUpdateReplicatePermissionsACL(sourceGoogleDriveUpdateReplicatePermissionsACL SourceGoogleDriveUpdateReplicatePermissionsACL) SourceGoogleDriveUpdateDeliveryMethod {
	typ := SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicatePermissionsACL

	return SourceGoogleDriveUpdateDeliveryMethod{
		SourceGoogleDriveUpdateReplicatePermissionsACL: &sourceGoogleDriveUpdateReplicatePermissionsACL,
		Type: typ,
	}
}

func (u *SourceGoogleDriveUpdateDeliveryMethod) UnmarshalJSON(data []byte) error {

	var sourceGoogleDriveUpdateReplicateRecords SourceGoogleDriveUpdateReplicateRecords = SourceGoogleDriveUpdateReplicateRecords{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateReplicateRecords, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateReplicateRecords = &sourceGoogleDriveUpdateReplicateRecords
		u.Type = SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicateRecords
		return nil
	}

	var sourceGoogleDriveUpdateCopyRawFiles SourceGoogleDriveUpdateCopyRawFiles = SourceGoogleDriveUpdateCopyRawFiles{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateCopyRawFiles, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateCopyRawFiles = &sourceGoogleDriveUpdateCopyRawFiles
		u.Type = SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateCopyRawFiles
		return nil
	}

	var sourceGoogleDriveUpdateReplicatePermissionsACL SourceGoogleDriveUpdateReplicatePermissionsACL = SourceGoogleDriveUpdateReplicatePermissionsACL{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateReplicatePermissionsACL, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateReplicatePermissionsACL = &sourceGoogleDriveUpdateReplicatePermissionsACL
		u.Type = SourceGoogleDriveUpdateDeliveryMethodTypeSourceGoogleDriveUpdateReplicatePermissionsACL
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleDriveUpdateDeliveryMethod", string(data))
}

func (u SourceGoogleDriveUpdateDeliveryMethod) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleDriveUpdateReplicateRecords != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateReplicateRecords, "", true)
	}

	if u.SourceGoogleDriveUpdateCopyRawFiles != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateCopyRawFiles, "", true)
	}

	if u.SourceGoogleDriveUpdateReplicatePermissionsACL != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateReplicatePermissionsACL, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleDriveUpdateDeliveryMethod: all fields are null")
}

type SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype string

const (
	SourceGoogleDriveUpdateSchemasStreamsFormatFormat6FiletypeExcel SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype = "excel"
)

func (e SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype) ToPointer() *SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "excel":
		*e = SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype: %v", v)
	}
}

type SourceGoogleDriveUpdateExcelFormat struct {
	filetype *SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype `const:"excel" json:"filetype"`
}

func (s SourceGoogleDriveUpdateExcelFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateExcelFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateExcelFormat) GetFiletype() *SourceGoogleDriveUpdateSchemasStreamsFormatFormat6Filetype {
	return SourceGoogleDriveUpdateSchemasStreamsFormatFormat6FiletypeExcel.ToPointer()
}

type SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype string

const (
	SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletypeUnstructured SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype = "unstructured"
)

func (e SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype) ToPointer() *SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "unstructured":
		*e = SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype: %v", v)
	}
}

type SourceGoogleDriveUpdateMode string

const (
	SourceGoogleDriveUpdateModeLocal SourceGoogleDriveUpdateMode = "local"
)

func (e SourceGoogleDriveUpdateMode) ToPointer() *SourceGoogleDriveUpdateMode {
	return &e
}
func (e *SourceGoogleDriveUpdateMode) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "local":
		*e = SourceGoogleDriveUpdateMode(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateMode: %v", v)
	}
}

// SourceGoogleDriveUpdateLocal - Process files locally, supporting `fast` and `ocr` modes. This is the default option.
type SourceGoogleDriveUpdateLocal struct {
	mode *SourceGoogleDriveUpdateMode `const:"local" json:"mode"`
}

func (s SourceGoogleDriveUpdateLocal) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateLocal) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateLocal) GetMode() *SourceGoogleDriveUpdateMode {
	return SourceGoogleDriveUpdateModeLocal.ToPointer()
}

type SourceGoogleDriveUpdateProcessingType string

const (
	SourceGoogleDriveUpdateProcessingTypeSourceGoogleDriveUpdateLocal SourceGoogleDriveUpdateProcessingType = "source-google-drive-update_Local"
)

// SourceGoogleDriveUpdateProcessing - Processing configuration
type SourceGoogleDriveUpdateProcessing struct {
	SourceGoogleDriveUpdateLocal *SourceGoogleDriveUpdateLocal `queryParam:"inline"`

	Type SourceGoogleDriveUpdateProcessingType
}

func CreateSourceGoogleDriveUpdateProcessingSourceGoogleDriveUpdateLocal(sourceGoogleDriveUpdateLocal SourceGoogleDriveUpdateLocal) SourceGoogleDriveUpdateProcessing {
	typ := SourceGoogleDriveUpdateProcessingTypeSourceGoogleDriveUpdateLocal

	return SourceGoogleDriveUpdateProcessing{
		SourceGoogleDriveUpdateLocal: &sourceGoogleDriveUpdateLocal,
		Type:                         typ,
	}
}

func (u *SourceGoogleDriveUpdateProcessing) UnmarshalJSON(data []byte) error {

	var sourceGoogleDriveUpdateLocal SourceGoogleDriveUpdateLocal = SourceGoogleDriveUpdateLocal{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateLocal, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateLocal = &sourceGoogleDriveUpdateLocal
		u.Type = SourceGoogleDriveUpdateProcessingTypeSourceGoogleDriveUpdateLocal
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleDriveUpdateProcessing", string(data))
}

func (u SourceGoogleDriveUpdateProcessing) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleDriveUpdateLocal != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateLocal, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleDriveUpdateProcessing: all fields are null")
}

// SourceGoogleDriveUpdateParsingStrategy - 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
type SourceGoogleDriveUpdateParsingStrategy string

const (
	SourceGoogleDriveUpdateParsingStrategyAuto    SourceGoogleDriveUpdateParsingStrategy = "auto"
	SourceGoogleDriveUpdateParsingStrategyFast    SourceGoogleDriveUpdateParsingStrategy = "fast"
	SourceGoogleDriveUpdateParsingStrategyOcrOnly SourceGoogleDriveUpdateParsingStrategy = "ocr_only"
	SourceGoogleDriveUpdateParsingStrategyHiRes   SourceGoogleDriveUpdateParsingStrategy = "hi_res"
)

func (e SourceGoogleDriveUpdateParsingStrategy) ToPointer() *SourceGoogleDriveUpdateParsingStrategy {
	return &e
}
func (e *SourceGoogleDriveUpdateParsingStrategy) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "auto":
		fallthrough
	case "fast":
		fallthrough
	case "ocr_only":
		fallthrough
	case "hi_res":
		*e = SourceGoogleDriveUpdateParsingStrategy(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateParsingStrategy: %v", v)
	}
}

// SourceGoogleDriveUpdateUnstructuredDocumentFormat - Extract text from document formats (.pdf, .docx, .md, .pptx) and emit as one record per file.
type SourceGoogleDriveUpdateUnstructuredDocumentFormat struct {
	filetype *SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype `const:"unstructured" json:"filetype"`
	// Processing configuration
	Processing *SourceGoogleDriveUpdateProcessing `json:"processing,omitempty"`
	// 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.
	SkipUnprocessableFiles *bool `default:"true" json:"skip_unprocessable_files"`
	// 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
	Strategy *SourceGoogleDriveUpdateParsingStrategy `default:"auto" json:"strategy"`
}

func (s SourceGoogleDriveUpdateUnstructuredDocumentFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateUnstructuredDocumentFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateUnstructuredDocumentFormat) GetFiletype() *SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletype {
	return SourceGoogleDriveUpdateSchemasStreamsFormatFormatFiletypeUnstructured.ToPointer()
}

func (o *SourceGoogleDriveUpdateUnstructuredDocumentFormat) GetProcessing() *SourceGoogleDriveUpdateProcessing {
	if o == nil {
		return nil
	}
	return o.Processing
}

func (o *SourceGoogleDriveUpdateUnstructuredDocumentFormat) GetSkipUnprocessableFiles() *bool {
	if o == nil {
		return nil
	}
	return o.SkipUnprocessableFiles
}

func (o *SourceGoogleDriveUpdateUnstructuredDocumentFormat) GetStrategy() *SourceGoogleDriveUpdateParsingStrategy {
	if o == nil {
		return nil
	}
	return o.Strategy
}

type SourceGoogleDriveUpdateSchemasStreamsFormatFiletype string

const (
	SourceGoogleDriveUpdateSchemasStreamsFormatFiletypeParquet SourceGoogleDriveUpdateSchemasStreamsFormatFiletype = "parquet"
)

func (e SourceGoogleDriveUpdateSchemasStreamsFormatFiletype) ToPointer() *SourceGoogleDriveUpdateSchemasStreamsFormatFiletype {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasStreamsFormatFiletype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "parquet":
		*e = SourceGoogleDriveUpdateSchemasStreamsFormatFiletype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasStreamsFormatFiletype: %v", v)
	}
}

type SourceGoogleDriveUpdateParquetFormat struct {
	// Whether to convert decimal fields to floats. There is a loss of precision when converting decimals to floats, so this is not recommended.
	DecimalAsFloat *bool                                                `default:"false" json:"decimal_as_float"`
	filetype       *SourceGoogleDriveUpdateSchemasStreamsFormatFiletype `const:"parquet" json:"filetype"`
}

func (s SourceGoogleDriveUpdateParquetFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateParquetFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateParquetFormat) GetDecimalAsFloat() *bool {
	if o == nil {
		return nil
	}
	return o.DecimalAsFloat
}

func (o *SourceGoogleDriveUpdateParquetFormat) GetFiletype() *SourceGoogleDriveUpdateSchemasStreamsFormatFiletype {
	return SourceGoogleDriveUpdateSchemasStreamsFormatFiletypeParquet.ToPointer()
}

type SourceGoogleDriveUpdateSchemasStreamsFiletype string

const (
	SourceGoogleDriveUpdateSchemasStreamsFiletypeJsonl SourceGoogleDriveUpdateSchemasStreamsFiletype = "jsonl"
)

func (e SourceGoogleDriveUpdateSchemasStreamsFiletype) ToPointer() *SourceGoogleDriveUpdateSchemasStreamsFiletype {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasStreamsFiletype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "jsonl":
		*e = SourceGoogleDriveUpdateSchemasStreamsFiletype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasStreamsFiletype: %v", v)
	}
}

type SourceGoogleDriveUpdateJsonlFormat struct {
	filetype *SourceGoogleDriveUpdateSchemasStreamsFiletype `const:"jsonl" json:"filetype"`
}

func (s SourceGoogleDriveUpdateJsonlFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateJsonlFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateJsonlFormat) GetFiletype() *SourceGoogleDriveUpdateSchemasStreamsFiletype {
	return SourceGoogleDriveUpdateSchemasStreamsFiletypeJsonl.ToPointer()
}

type SourceGoogleDriveUpdateSchemasFiletype string

const (
	SourceGoogleDriveUpdateSchemasFiletypeCsv SourceGoogleDriveUpdateSchemasFiletype = "csv"
)

func (e SourceGoogleDriveUpdateSchemasFiletype) ToPointer() *SourceGoogleDriveUpdateSchemasFiletype {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasFiletype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "csv":
		*e = SourceGoogleDriveUpdateSchemasFiletype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasFiletype: %v", v)
	}
}

type SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType string

const (
	SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionTypeUserProvided SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType = "User Provided"
)

func (e SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType) ToPointer() *SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "User Provided":
		*e = SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType: %v", v)
	}
}

type SourceGoogleDriveUpdateUserProvided struct {
	// The column names that will be used while emitting the CSV records
	ColumnNames          []string                                                   `json:"column_names"`
	headerDefinitionType *SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType `const:"User Provided" json:"header_definition_type"`
}

func (s SourceGoogleDriveUpdateUserProvided) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateUserProvided) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateUserProvided) GetColumnNames() []string {
	if o == nil {
		return []string{}
	}
	return o.ColumnNames
}

func (o *SourceGoogleDriveUpdateUserProvided) GetHeaderDefinitionType() *SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionType {
	return SourceGoogleDriveUpdateSchemasStreamsHeaderDefinitionTypeUserProvided.ToPointer()
}

type SourceGoogleDriveUpdateSchemasHeaderDefinitionType string

const (
	SourceGoogleDriveUpdateSchemasHeaderDefinitionTypeAutogenerated SourceGoogleDriveUpdateSchemasHeaderDefinitionType = "Autogenerated"
)

func (e SourceGoogleDriveUpdateSchemasHeaderDefinitionType) ToPointer() *SourceGoogleDriveUpdateSchemasHeaderDefinitionType {
	return &e
}
func (e *SourceGoogleDriveUpdateSchemasHeaderDefinitionType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "Autogenerated":
		*e = SourceGoogleDriveUpdateSchemasHeaderDefinitionType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateSchemasHeaderDefinitionType: %v", v)
	}
}

type SourceGoogleDriveUpdateAutogenerated struct {
	headerDefinitionType *SourceGoogleDriveUpdateSchemasHeaderDefinitionType `const:"Autogenerated" json:"header_definition_type"`
}

func (s SourceGoogleDriveUpdateAutogenerated) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateAutogenerated) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateAutogenerated) GetHeaderDefinitionType() *SourceGoogleDriveUpdateSchemasHeaderDefinitionType {
	return SourceGoogleDriveUpdateSchemasHeaderDefinitionTypeAutogenerated.ToPointer()
}

type SourceGoogleDriveUpdateHeaderDefinitionType string

const (
	SourceGoogleDriveUpdateHeaderDefinitionTypeFromCsv SourceGoogleDriveUpdateHeaderDefinitionType = "From CSV"
)

func (e SourceGoogleDriveUpdateHeaderDefinitionType) ToPointer() *SourceGoogleDriveUpdateHeaderDefinitionType {
	return &e
}
func (e *SourceGoogleDriveUpdateHeaderDefinitionType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "From CSV":
		*e = SourceGoogleDriveUpdateHeaderDefinitionType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateHeaderDefinitionType: %v", v)
	}
}

type SourceGoogleDriveUpdateFromCSV struct {
	headerDefinitionType *SourceGoogleDriveUpdateHeaderDefinitionType `const:"From CSV" json:"header_definition_type"`
}

func (s SourceGoogleDriveUpdateFromCSV) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateFromCSV) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateFromCSV) GetHeaderDefinitionType() *SourceGoogleDriveUpdateHeaderDefinitionType {
	return SourceGoogleDriveUpdateHeaderDefinitionTypeFromCsv.ToPointer()
}

type SourceGoogleDriveUpdateCSVHeaderDefinitionType string

const (
	SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateFromCSV       SourceGoogleDriveUpdateCSVHeaderDefinitionType = "source-google-drive-update_From CSV"
	SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateAutogenerated SourceGoogleDriveUpdateCSVHeaderDefinitionType = "source-google-drive-update_Autogenerated"
	SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateUserProvided  SourceGoogleDriveUpdateCSVHeaderDefinitionType = "source-google-drive-update_User Provided"
)

// SourceGoogleDriveUpdateCSVHeaderDefinition - 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.
type SourceGoogleDriveUpdateCSVHeaderDefinition struct {
	SourceGoogleDriveUpdateFromCSV       *SourceGoogleDriveUpdateFromCSV       `queryParam:"inline"`
	SourceGoogleDriveUpdateAutogenerated *SourceGoogleDriveUpdateAutogenerated `queryParam:"inline"`
	SourceGoogleDriveUpdateUserProvided  *SourceGoogleDriveUpdateUserProvided  `queryParam:"inline"`

	Type SourceGoogleDriveUpdateCSVHeaderDefinitionType
}

func CreateSourceGoogleDriveUpdateCSVHeaderDefinitionSourceGoogleDriveUpdateFromCSV(sourceGoogleDriveUpdateFromCSV SourceGoogleDriveUpdateFromCSV) SourceGoogleDriveUpdateCSVHeaderDefinition {
	typ := SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateFromCSV

	return SourceGoogleDriveUpdateCSVHeaderDefinition{
		SourceGoogleDriveUpdateFromCSV: &sourceGoogleDriveUpdateFromCSV,
		Type:                           typ,
	}
}

func CreateSourceGoogleDriveUpdateCSVHeaderDefinitionSourceGoogleDriveUpdateAutogenerated(sourceGoogleDriveUpdateAutogenerated SourceGoogleDriveUpdateAutogenerated) SourceGoogleDriveUpdateCSVHeaderDefinition {
	typ := SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateAutogenerated

	return SourceGoogleDriveUpdateCSVHeaderDefinition{
		SourceGoogleDriveUpdateAutogenerated: &sourceGoogleDriveUpdateAutogenerated,
		Type:                                 typ,
	}
}

func CreateSourceGoogleDriveUpdateCSVHeaderDefinitionSourceGoogleDriveUpdateUserProvided(sourceGoogleDriveUpdateUserProvided SourceGoogleDriveUpdateUserProvided) SourceGoogleDriveUpdateCSVHeaderDefinition {
	typ := SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateUserProvided

	return SourceGoogleDriveUpdateCSVHeaderDefinition{
		SourceGoogleDriveUpdateUserProvided: &sourceGoogleDriveUpdateUserProvided,
		Type:                                typ,
	}
}

func (u *SourceGoogleDriveUpdateCSVHeaderDefinition) UnmarshalJSON(data []byte) error {

	var sourceGoogleDriveUpdateFromCSV SourceGoogleDriveUpdateFromCSV = SourceGoogleDriveUpdateFromCSV{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateFromCSV, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateFromCSV = &sourceGoogleDriveUpdateFromCSV
		u.Type = SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateFromCSV
		return nil
	}

	var sourceGoogleDriveUpdateAutogenerated SourceGoogleDriveUpdateAutogenerated = SourceGoogleDriveUpdateAutogenerated{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateAutogenerated, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateAutogenerated = &sourceGoogleDriveUpdateAutogenerated
		u.Type = SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateAutogenerated
		return nil
	}

	var sourceGoogleDriveUpdateUserProvided SourceGoogleDriveUpdateUserProvided = SourceGoogleDriveUpdateUserProvided{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateUserProvided, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateUserProvided = &sourceGoogleDriveUpdateUserProvided
		u.Type = SourceGoogleDriveUpdateCSVHeaderDefinitionTypeSourceGoogleDriveUpdateUserProvided
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleDriveUpdateCSVHeaderDefinition", string(data))
}

func (u SourceGoogleDriveUpdateCSVHeaderDefinition) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleDriveUpdateFromCSV != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateFromCSV, "", true)
	}

	if u.SourceGoogleDriveUpdateAutogenerated != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateAutogenerated, "", true)
	}

	if u.SourceGoogleDriveUpdateUserProvided != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateUserProvided, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleDriveUpdateCSVHeaderDefinition: all fields are null")
}

type SourceGoogleDriveUpdateCSVFormat struct {
	// The character delimiting individual cells in the CSV data. This may only be a 1-character string. For tab-delimited data enter '\t'.
	Delimiter *string `default:"," json:"delimiter"`
	// Whether two quotes in a quoted CSV value denote a single quote in the data.
	DoubleQuote *bool `default:"true" json:"double_quote"`
	// The character encoding of the CSV data. Leave blank to default to <strong>UTF8</strong>. See <a href="https://docs.python.org/3/library/codecs.html#standard-encodings" target="_blank">list of python encodings</a> for allowable options.
	Encoding *string `default:"utf8" json:"encoding"`
	// The character used for escaping special characters. To disallow escaping, leave this field blank.
	EscapeChar *string `json:"escape_char,omitempty"`
	// A set of case-sensitive strings that should be interpreted as false values.
	FalseValues []string                                `json:"false_values,omitempty"`
	filetype    *SourceGoogleDriveUpdateSchemasFiletype `const:"csv" json:"filetype"`
	// 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.
	HeaderDefinition *SourceGoogleDriveUpdateCSVHeaderDefinition `json:"header_definition,omitempty"`
	// Whether to ignore errors that occur when the number of fields in the CSV does not match the number of columns in the schema.
	IgnoreErrorsOnFieldsMismatch *bool `default:"false" json:"ignore_errors_on_fields_mismatch"`
	// 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.
	NullValues []string `json:"null_values,omitempty"`
	// The character used for quoting CSV values. To disallow quoting, make this field blank.
	QuoteChar *string `default:"\"" json:"quote_char"`
	// The number of rows to skip after the header row.
	SkipRowsAfterHeader *int64 `default:"0" json:"skip_rows_after_header"`
	// The number of rows to skip before the header row. For example, if the header row is on the 3rd row, enter 2 in this field.
	SkipRowsBeforeHeader *int64 `default:"0" json:"skip_rows_before_header"`
	// 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.
	StringsCanBeNull *bool `default:"true" json:"strings_can_be_null"`
	// A set of case-sensitive strings that should be interpreted as true values.
	TrueValues []string `json:"true_values,omitempty"`
}

func (s SourceGoogleDriveUpdateCSVFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateCSVFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetDelimiter() *string {
	if o == nil {
		return nil
	}
	return o.Delimiter
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetDoubleQuote() *bool {
	if o == nil {
		return nil
	}
	return o.DoubleQuote
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetEncoding() *string {
	if o == nil {
		return nil
	}
	return o.Encoding
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetEscapeChar() *string {
	if o == nil {
		return nil
	}
	return o.EscapeChar
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetFalseValues() []string {
	if o == nil {
		return nil
	}
	return o.FalseValues
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetFiletype() *SourceGoogleDriveUpdateSchemasFiletype {
	return SourceGoogleDriveUpdateSchemasFiletypeCsv.ToPointer()
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetHeaderDefinition() *SourceGoogleDriveUpdateCSVHeaderDefinition {
	if o == nil {
		return nil
	}
	return o.HeaderDefinition
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetIgnoreErrorsOnFieldsMismatch() *bool {
	if o == nil {
		return nil
	}
	return o.IgnoreErrorsOnFieldsMismatch
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetNullValues() []string {
	if o == nil {
		return nil
	}
	return o.NullValues
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetQuoteChar() *string {
	if o == nil {
		return nil
	}
	return o.QuoteChar
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetSkipRowsAfterHeader() *int64 {
	if o == nil {
		return nil
	}
	return o.SkipRowsAfterHeader
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetSkipRowsBeforeHeader() *int64 {
	if o == nil {
		return nil
	}
	return o.SkipRowsBeforeHeader
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetStringsCanBeNull() *bool {
	if o == nil {
		return nil
	}
	return o.StringsCanBeNull
}

func (o *SourceGoogleDriveUpdateCSVFormat) GetTrueValues() []string {
	if o == nil {
		return nil
	}
	return o.TrueValues
}

type SourceGoogleDriveUpdateFiletype string

const (
	SourceGoogleDriveUpdateFiletypeAvro SourceGoogleDriveUpdateFiletype = "avro"
)

func (e SourceGoogleDriveUpdateFiletype) ToPointer() *SourceGoogleDriveUpdateFiletype {
	return &e
}
func (e *SourceGoogleDriveUpdateFiletype) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "avro":
		*e = SourceGoogleDriveUpdateFiletype(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateFiletype: %v", v)
	}
}

type SourceGoogleDriveUpdateAvroFormat struct {
	// Whether to convert double fields to strings. This is recommended if you have decimal numbers with a high degree of precision because there can be a loss precision when handling floating point numbers.
	DoubleAsString *bool                            `default:"false" json:"double_as_string"`
	filetype       *SourceGoogleDriveUpdateFiletype `const:"avro" json:"filetype"`
}

func (s SourceGoogleDriveUpdateAvroFormat) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateAvroFormat) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, true); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateAvroFormat) GetDoubleAsString() *bool {
	if o == nil {
		return nil
	}
	return o.DoubleAsString
}

func (o *SourceGoogleDriveUpdateAvroFormat) GetFiletype() *SourceGoogleDriveUpdateFiletype {
	return SourceGoogleDriveUpdateFiletypeAvro.ToPointer()
}

type SourceGoogleDriveUpdateFormatType string

const (
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateAvroFormat                 SourceGoogleDriveUpdateFormatType = "source-google-drive-update_Avro Format"
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateCSVFormat                  SourceGoogleDriveUpdateFormatType = "source-google-drive-update_CSV Format"
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateJsonlFormat                SourceGoogleDriveUpdateFormatType = "source-google-drive-update_Jsonl Format"
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateParquetFormat              SourceGoogleDriveUpdateFormatType = "source-google-drive-update_Parquet Format"
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateUnstructuredDocumentFormat SourceGoogleDriveUpdateFormatType = "source-google-drive-update_Unstructured Document Format"
	SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateExcelFormat                SourceGoogleDriveUpdateFormatType = "source-google-drive-update_Excel Format"
)

// SourceGoogleDriveUpdateFormat - The configuration options that are used to alter how to read incoming files that deviate from the standard formatting.
type SourceGoogleDriveUpdateFormat struct {
	SourceGoogleDriveUpdateAvroFormat                 *SourceGoogleDriveUpdateAvroFormat                 `queryParam:"inline"`
	SourceGoogleDriveUpdateCSVFormat                  *SourceGoogleDriveUpdateCSVFormat                  `queryParam:"inline"`
	SourceGoogleDriveUpdateJsonlFormat                *SourceGoogleDriveUpdateJsonlFormat                `queryParam:"inline"`
	SourceGoogleDriveUpdateParquetFormat              *SourceGoogleDriveUpdateParquetFormat              `queryParam:"inline"`
	SourceGoogleDriveUpdateUnstructuredDocumentFormat *SourceGoogleDriveUpdateUnstructuredDocumentFormat `queryParam:"inline"`
	SourceGoogleDriveUpdateExcelFormat                *SourceGoogleDriveUpdateExcelFormat                `queryParam:"inline"`

	Type SourceGoogleDriveUpdateFormatType
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateAvroFormat(sourceGoogleDriveUpdateAvroFormat SourceGoogleDriveUpdateAvroFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateAvroFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateAvroFormat: &sourceGoogleDriveUpdateAvroFormat,
		Type:                              typ,
	}
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateCSVFormat(sourceGoogleDriveUpdateCSVFormat SourceGoogleDriveUpdateCSVFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateCSVFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateCSVFormat: &sourceGoogleDriveUpdateCSVFormat,
		Type:                             typ,
	}
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateJsonlFormat(sourceGoogleDriveUpdateJsonlFormat SourceGoogleDriveUpdateJsonlFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateJsonlFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateJsonlFormat: &sourceGoogleDriveUpdateJsonlFormat,
		Type:                               typ,
	}
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateParquetFormat(sourceGoogleDriveUpdateParquetFormat SourceGoogleDriveUpdateParquetFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateParquetFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateParquetFormat: &sourceGoogleDriveUpdateParquetFormat,
		Type:                                 typ,
	}
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateUnstructuredDocumentFormat(sourceGoogleDriveUpdateUnstructuredDocumentFormat SourceGoogleDriveUpdateUnstructuredDocumentFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateUnstructuredDocumentFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateUnstructuredDocumentFormat: &sourceGoogleDriveUpdateUnstructuredDocumentFormat,
		Type: typ,
	}
}

func CreateSourceGoogleDriveUpdateFormatSourceGoogleDriveUpdateExcelFormat(sourceGoogleDriveUpdateExcelFormat SourceGoogleDriveUpdateExcelFormat) SourceGoogleDriveUpdateFormat {
	typ := SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateExcelFormat

	return SourceGoogleDriveUpdateFormat{
		SourceGoogleDriveUpdateExcelFormat: &sourceGoogleDriveUpdateExcelFormat,
		Type:                               typ,
	}
}

func (u *SourceGoogleDriveUpdateFormat) UnmarshalJSON(data []byte) error {

	var sourceGoogleDriveUpdateJsonlFormat SourceGoogleDriveUpdateJsonlFormat = SourceGoogleDriveUpdateJsonlFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateJsonlFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateJsonlFormat = &sourceGoogleDriveUpdateJsonlFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateJsonlFormat
		return nil
	}

	var sourceGoogleDriveUpdateExcelFormat SourceGoogleDriveUpdateExcelFormat = SourceGoogleDriveUpdateExcelFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateExcelFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateExcelFormat = &sourceGoogleDriveUpdateExcelFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateExcelFormat
		return nil
	}

	var sourceGoogleDriveUpdateAvroFormat SourceGoogleDriveUpdateAvroFormat = SourceGoogleDriveUpdateAvroFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateAvroFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateAvroFormat = &sourceGoogleDriveUpdateAvroFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateAvroFormat
		return nil
	}

	var sourceGoogleDriveUpdateParquetFormat SourceGoogleDriveUpdateParquetFormat = SourceGoogleDriveUpdateParquetFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateParquetFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateParquetFormat = &sourceGoogleDriveUpdateParquetFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateParquetFormat
		return nil
	}

	var sourceGoogleDriveUpdateUnstructuredDocumentFormat SourceGoogleDriveUpdateUnstructuredDocumentFormat = SourceGoogleDriveUpdateUnstructuredDocumentFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateUnstructuredDocumentFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateUnstructuredDocumentFormat = &sourceGoogleDriveUpdateUnstructuredDocumentFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateUnstructuredDocumentFormat
		return nil
	}

	var sourceGoogleDriveUpdateCSVFormat SourceGoogleDriveUpdateCSVFormat = SourceGoogleDriveUpdateCSVFormat{}
	if err := utils.UnmarshalJSON(data, &sourceGoogleDriveUpdateCSVFormat, "", true, true); err == nil {
		u.SourceGoogleDriveUpdateCSVFormat = &sourceGoogleDriveUpdateCSVFormat
		u.Type = SourceGoogleDriveUpdateFormatTypeSourceGoogleDriveUpdateCSVFormat
		return nil
	}

	return fmt.Errorf("could not unmarshal `%s` into any supported union types for SourceGoogleDriveUpdateFormat", string(data))
}

func (u SourceGoogleDriveUpdateFormat) MarshalJSON() ([]byte, error) {
	if u.SourceGoogleDriveUpdateAvroFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateAvroFormat, "", true)
	}

	if u.SourceGoogleDriveUpdateCSVFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateCSVFormat, "", true)
	}

	if u.SourceGoogleDriveUpdateJsonlFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateJsonlFormat, "", true)
	}

	if u.SourceGoogleDriveUpdateParquetFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateParquetFormat, "", true)
	}

	if u.SourceGoogleDriveUpdateUnstructuredDocumentFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateUnstructuredDocumentFormat, "", true)
	}

	if u.SourceGoogleDriveUpdateExcelFormat != nil {
		return utils.MarshalJSON(u.SourceGoogleDriveUpdateExcelFormat, "", true)
	}

	return nil, errors.New("could not marshal union type SourceGoogleDriveUpdateFormat: all fields are null")
}

// SourceGoogleDriveUpdateValidationPolicy - The name of the validation policy that dictates sync behavior when a record does not adhere to the stream schema.
type SourceGoogleDriveUpdateValidationPolicy string

const (
	SourceGoogleDriveUpdateValidationPolicyEmitRecord      SourceGoogleDriveUpdateValidationPolicy = "Emit Record"
	SourceGoogleDriveUpdateValidationPolicySkipRecord      SourceGoogleDriveUpdateValidationPolicy = "Skip Record"
	SourceGoogleDriveUpdateValidationPolicyWaitForDiscover SourceGoogleDriveUpdateValidationPolicy = "Wait for Discover"
)

func (e SourceGoogleDriveUpdateValidationPolicy) ToPointer() *SourceGoogleDriveUpdateValidationPolicy {
	return &e
}
func (e *SourceGoogleDriveUpdateValidationPolicy) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "Emit Record":
		fallthrough
	case "Skip Record":
		fallthrough
	case "Wait for Discover":
		*e = SourceGoogleDriveUpdateValidationPolicy(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceGoogleDriveUpdateValidationPolicy: %v", v)
	}
}

type SourceGoogleDriveUpdateFileBasedStreamConfig struct {
	// When the state history of the file store is full, syncs will only read files that were last modified in the provided day range.
	DaysToSyncIfHistoryIsFull *int64 `default:"3" json:"days_to_sync_if_history_is_full"`
	// The configuration options that are used to alter how to read incoming files that deviate from the standard formatting.
	Format SourceGoogleDriveUpdateFormat `json:"format"`
	// The pattern used to specify which files should be selected from the file system. For more information on glob pattern matching look <a href="https://en.wikipedia.org/wiki/Glob_(programming)">here</a>.
	Globs []string `json:"globs,omitempty"`
	// The schema that will be used to validate records extracted from the file. This will override the stream schema that is auto-detected from incoming files.
	InputSchema *string `json:"input_schema,omitempty"`
	// The name of the stream.
	Name string `json:"name"`
	// The number of resent files which will be used to discover the schema for this stream.
	RecentNFilesToReadForSchemaDiscovery *int64 `json:"recent_n_files_to_read_for_schema_discovery,omitempty"`
	// When enabled, syncs will not validate or structure records against the stream's schema.
	Schemaless *bool `default:"false" json:"schemaless"`
	// The name of the validation policy that dictates sync behavior when a record does not adhere to the stream schema.
	ValidationPolicy *SourceGoogleDriveUpdateValidationPolicy `default:"Emit Record" json:"validation_policy"`
}

func (s SourceGoogleDriveUpdateFileBasedStreamConfig) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdateFileBasedStreamConfig) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetDaysToSyncIfHistoryIsFull() *int64 {
	if o == nil {
		return nil
	}
	return o.DaysToSyncIfHistoryIsFull
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetFormat() SourceGoogleDriveUpdateFormat {
	if o == nil {
		return SourceGoogleDriveUpdateFormat{}
	}
	return o.Format
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetGlobs() []string {
	if o == nil {
		return nil
	}
	return o.Globs
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetInputSchema() *string {
	if o == nil {
		return nil
	}
	return o.InputSchema
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetName() string {
	if o == nil {
		return ""
	}
	return o.Name
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetRecentNFilesToReadForSchemaDiscovery() *int64 {
	if o == nil {
		return nil
	}
	return o.RecentNFilesToReadForSchemaDiscovery
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetSchemaless() *bool {
	if o == nil {
		return nil
	}
	return o.Schemaless
}

func (o *SourceGoogleDriveUpdateFileBasedStreamConfig) GetValidationPolicy() *SourceGoogleDriveUpdateValidationPolicy {
	if o == nil {
		return nil
	}
	return o.ValidationPolicy
}

// SourceGoogleDriveUpdate - Used during spec; allows the developer to configure the cloud provider specific options
// that are needed when users configure a file-based source.
type SourceGoogleDriveUpdate struct {
	// Credentials for connecting to the Google Drive API
	Credentials    SourceGoogleDriveUpdateAuthentication  `json:"credentials"`
	DeliveryMethod *SourceGoogleDriveUpdateDeliveryMethod `json:"delivery_method,omitempty"`
	// URL for the folder you want to sync. Using individual streams and glob patterns, it's possible to only sync a subset of all files located in the folder.
	FolderURL string `json:"folder_url"`
	// UTC date and time in the format 2017-01-25T00:00:00.000000Z. Any file modified before this date will not be replicated.
	StartDate *time.Time `json:"start_date,omitempty"`
	// Each instance of this configuration defines a <a href="https://docs.airbyte.com/cloud/core-concepts#stream">stream</a>. Use this to define which files belong in the stream, their format, and how they should be parsed and validated. When sending data to warehouse destination such as Snowflake or BigQuery, each stream is a separate table.
	Streams []SourceGoogleDriveUpdateFileBasedStreamConfig `json:"streams"`
}

func (s SourceGoogleDriveUpdate) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceGoogleDriveUpdate) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *SourceGoogleDriveUpdate) GetCredentials() SourceGoogleDriveUpdateAuthentication {
	if o == nil {
		return SourceGoogleDriveUpdateAuthentication{}
	}
	return o.Credentials
}

func (o *SourceGoogleDriveUpdate) GetDeliveryMethod() *SourceGoogleDriveUpdateDeliveryMethod {
	if o == nil {
		return nil
	}
	return o.DeliveryMethod
}

func (o *SourceGoogleDriveUpdate) GetFolderURL() string {
	if o == nil {
		return ""
	}
	return o.FolderURL
}

func (o *SourceGoogleDriveUpdate) GetStartDate() *time.Time {
	if o == nil {
		return nil
	}
	return o.StartDate
}

func (o *SourceGoogleDriveUpdate) GetStreams() []SourceGoogleDriveUpdateFileBasedStreamConfig {
	if o == nil {
		return []SourceGoogleDriveUpdateFileBasedStreamConfig{}
	}
	return o.Streams
}
