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

package shared

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

type SourceCouchbaseUpdate struct {
	// The name of the bucket to sync data from
	Bucket string `json:"bucket"`
	// The connection string for the Couchbase server (e.g., couchbase://localhost or couchbases://example.com)
	ConnectionString string `json:"connection_string"`
	// The password to use for authentication
	Password string `json:"password"`
	// The date from which you'd like to replicate data for incremental streams, in the format YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. If not set, all data will be replicated.
	StartDate *time.Time `json:"start_date,omitempty"`
	// The username to use for authentication
	Username string `json:"username"`
}

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

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

func (o *SourceCouchbaseUpdate) GetBucket() string {
	if o == nil {
		return ""
	}
	return o.Bucket
}

func (o *SourceCouchbaseUpdate) GetConnectionString() string {
	if o == nil {
		return ""
	}
	return o.ConnectionString
}

func (o *SourceCouchbaseUpdate) GetPassword() string {
	if o == nil {
		return ""
	}
	return o.Password
}

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

func (o *SourceCouchbaseUpdate) GetUsername() string {
	if o == nil {
		return ""
	}
	return o.Username
}
