Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync BigQueryDataTransferConfig to pinned googleapis version #3335

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,33 @@ type EncryptionConfiguration struct {
KmsKeyRef *refv1beta1.KMSCryptoKeyRef `json:"kmsKeyRef,omitempty"`
}

// +kcc:proto=google.rpc.Status
type Status struct {
// The status code, which should be an enum value of
// [google.rpc.Code][google.rpc.Code].
Code *int32 `json:"code,omitempty"`

// A developer-facing error message, which should be in English. Any
// user-facing error message should be localized and sent in the
// [google.rpc.Status.details][google.rpc.Status.details] field, or localized
// by the client.
Message *string `json:"message,omitempty"`

/* NOTYET
// A list of messages that carry the error details. There is a common set of
// message types for APIs to use.
Details []Any `json:"details,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I ask why we comment this out? The Any struct seems to be good (though the name is confusing) https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/3335/files#diff-bed80b84c2e759102b2daf0a568eea2dd1d8309634dea509f245721d4684a350R102

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t spend much time on this field because it’s an output field that can be added later if needed. This PR was created quickly to unblock another PR and was put together in a very short timeframe.

*/
}

// +kcc:proto=google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule
type EventDrivenSchedule struct {
// Pub/Sub subscription used to receive events.
// Only Google Cloud Storage data source support this option.
// Format: projects/{project}/subscriptions/{subscription}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comment needs to be updated to resource reference

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

PubSubSubscriptionRef *refv1beta1.PubSubSubscriptionRef `json:"pubSubSubscriptionRef,omitempty"`
}

// BigQueryDataTransferConfigSpec defines the desired state of BigQueryDataTransferConfig
// +kcc:proto=google.cloud.bigquery.datatransfer.v1.TransferConfig
type BigQueryDataTransferConfigSpec struct {
Expand Down Expand Up @@ -110,6 +137,12 @@ type BigQueryDataTransferConfigSpec struct {
// Note that not all data sources support service account credentials when creating a transfer config.
// For the latest list of data sources, please refer to https://cloud.google.com/bigquery/docs/use-service-accounts.
ServiceAccountRef *refv1beta1.IAMServiceAccountRef `json:"serviceAccountRef,omitempty"`

// V2 options customizing different types of data transfer schedule.
// This field supports existing time-based and manual transfer schedule. Also
// supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used
// together with ScheduleOptions/Schedule.
ScheduleOptionsV2 *ScheduleOptionsV2 `json:"scheduleOptionsV2,omitempty"`
}

type Parent struct {
Expand Down Expand Up @@ -169,6 +202,10 @@ type BigQueryDataTransferConfigObservedState struct {

// Deprecated. Unique ID of the user on whose behalf transfer is done.
UserID *int64 `json:"userID,omitempty"`

// Output only. Error code with detailed information about reason of the
// latest config failure.
Error *Status `json:"error,omitempty"`
}

// +genclient
Expand Down
85 changes: 85 additions & 0 deletions apis/bigquerydatatransfer/v1beta1/types.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

155 changes: 155 additions & 0 deletions apis/bigquerydatatransfer/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading