Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5438a17

Browse files
Google APIscopybara-github
authored andcommitted
feat: publish updated definitions for cloud/datafusion/v1 and cloud/datafusion/v1beta1
fix!: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1 service definition fix!: multiple fields now have field_behavior REQUIRED in cloud/datafusion/v1beta1 service definition Committer: @viacheslav-rostovtsev PiperOrigin-RevId: 421416031
1 parent 8675f5e commit 5438a17

File tree

2 files changed

+251
-107
lines changed

2 files changed

+251
-107
lines changed

google/cloud/datafusion/v1/datafusion.proto

Lines changed: 109 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,21 @@ option java_multiple_files = true;
3030
option java_package = "com.google.cloud.datafusion.v1";
3131
option php_namespace = "Google\\Cloud\\DataFusion\\V1";
3232
option ruby_package = "Google::Cloud::DataFusion::V1";
33+
option (google.api.resource_definition) = {
34+
type: "cloudkms.googleapis.com/CryptoKey"
35+
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
36+
};
3337

3438
// Service for creating and managing Data Fusion instances.
3539
// Data Fusion enables ETL developers to build code-free, data integration
3640
// pipelines via a point-and-click UI.
3741
service DataFusion {
3842
option (google.api.default_host) = "datafusion.googleapis.com";
39-
option (google.api.oauth_scopes) =
40-
"https://www.googleapis.com/auth/cloud-platform";
43+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
4144

4245
// Lists possible versions for Data Fusion instances in the specified project
4346
// and location.
44-
rpc ListAvailableVersions(ListAvailableVersionsRequest)
45-
returns (ListAvailableVersionsResponse) {
47+
rpc ListAvailableVersions(ListAvailableVersionsRequest) returns (ListAvailableVersionsResponse) {
4648
option (google.api.http) = {
4749
get: "/v1/{parent=projects/*/locations/*}/versions"
4850
};
@@ -64,8 +66,7 @@ service DataFusion {
6466
}
6567

6668
// Creates a new Data Fusion instance in the specified project and location.
67-
rpc CreateInstance(CreateInstanceRequest)
68-
returns (google.longrunning.Operation) {
69+
rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
6970
option (google.api.http) = {
7071
post: "/v1/{parent=projects/*/locations/*}/instances"
7172
body: "instance"
@@ -78,8 +79,7 @@ service DataFusion {
7879
}
7980

8081
// Deletes a single Date Fusion instance.
81-
rpc DeleteInstance(DeleteInstanceRequest)
82-
returns (google.longrunning.Operation) {
82+
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
8383
option (google.api.http) = {
8484
delete: "/v1/{name=projects/*/locations/*/instances/*}"
8585
};
@@ -91,8 +91,7 @@ service DataFusion {
9191
}
9292

9393
// Updates a single Data Fusion instance.
94-
rpc UpdateInstance(UpdateInstanceRequest)
95-
returns (google.longrunning.Operation) {
94+
rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
9695
option (google.api.http) = {
9796
patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
9897
body: "instance"
@@ -106,8 +105,7 @@ service DataFusion {
106105

107106
// Restart a single Data Fusion instance.
108107
// At the end of an operation instance is fully restarted.
109-
rpc RestartInstance(RestartInstanceRequest)
110-
returns (google.longrunning.Operation) {
108+
rpc RestartInstance(RestartInstanceRequest) returns (google.longrunning.Operation) {
111109
option (google.api.http) = {
112110
post: "/v1/{name=projects/*/locations/*/instances/*}:restart"
113111
body: "*"
@@ -141,6 +139,18 @@ message NetworkConfig {
141139
// The Data Fusion version. This proto message stores information about certain
142140
// Data Fusion version, which is used for Data Fusion version upgrade.
143141
message Version {
142+
// Each type represents the release availability of a CDF version
143+
enum Type {
144+
// Version does not have availability yet
145+
TYPE_UNSPECIFIED = 0;
146+
147+
// Version is under development and not considered stable
148+
TYPE_PREVIEW = 1;
149+
150+
// Version is available for public use
151+
TYPE_GENERAL_AVAILABILITY = 2;
152+
}
153+
144154
// The version number of the Data Fusion instance, such as '6.0.1.0'.
145155
string version_number = 1;
146156

@@ -149,6 +159,9 @@ message Version {
149159

150160
// Represents a list of available feature names for a given version.
151161
repeated string available_features = 3;
162+
163+
// Type represents the release availability of the version
164+
Type type = 4;
152165
}
153166

154167
// Identifies Data Fusion accelerators for an instance.
@@ -201,7 +214,9 @@ message CryptoKeyConfig {
201214
// The name of the key which is used to encrypt/decrypt customer data. For key
202215
// in Cloud KMS, the key should be in the format of
203216
// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
204-
string key_reference = 1;
217+
string key_reference = 1 [(google.api.resource_reference) = {
218+
type: "cloudkms.googleapis.com/CryptoKey"
219+
}];
205220
}
206221

207222
// Represents a Data Fusion instance.
@@ -267,11 +282,28 @@ message Instance {
267282

268283
// Instance is being auto-upgraded
269284
AUTO_UPGRADING = 9;
285+
286+
// Instance is disabled
287+
DISABLED = 10;
288+
}
289+
290+
// The reason for disabling the instance if the state is DISABLED.
291+
enum DisabledReason {
292+
// This is an unknown reason for disabling.
293+
DISABLED_REASON_UNSPECIFIED = 0;
294+
295+
// The KMS key used by the instance is either revoked or denied access to
296+
KMS_KEY_ISSUE = 1;
270297
}
271298

272299
// Output only. The name of this instance is in the form of
273300
// projects/{project}/locations/{location}/instances/{instance}.
274-
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
301+
string name = 1 [
302+
(google.api.field_behavior) = OUTPUT_ONLY,
303+
(google.api.resource_reference) = {
304+
type: "datafusion.googleapis.com/Instance"
305+
}
306+
];
275307

276308
// A description of this instance.
277309
string description = 2;
@@ -304,12 +336,10 @@ message Instance {
304336
map<string, string> options = 9;
305337

306338
// Output only. The time the instance was created.
307-
google.protobuf.Timestamp create_time = 10
308-
[(google.api.field_behavior) = OUTPUT_ONLY];
339+
google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
309340

310341
// Output only. The time the instance was last updated.
311-
google.protobuf.Timestamp update_time = 11
312-
[(google.api.field_behavior) = OUTPUT_ONLY];
342+
google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
313343

314344
// Output only. The current state of this Data Fusion instance.
315345
State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -328,10 +358,11 @@ message Instance {
328358
// Current version of the Data Fusion. Only specifiable in Update.
329359
string version = 16;
330360

331-
// Output only. Deprecated. Use tenant_project_id instead to extract the
332-
// tenant project ID.
333-
string service_account = 17
334-
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
361+
// Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
362+
string service_account = 17 [
363+
deprecated = true,
364+
(google.api.field_behavior) = OUTPUT_ONLY
365+
];
335366

336367
// Display name for an instance.
337368
string display_name = 18;
@@ -343,8 +374,7 @@ message Instance {
343374
// Output only. Endpoint on which the REST APIs is accessible.
344375
string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
345376

346-
// Output only. Cloud Storage bucket generated by Data Fusion in the customer
347-
// project.
377+
// Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
348378
string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
349379

350380
// List of accelerators enabled for this CDF instance.
@@ -369,15 +399,23 @@ message Instance {
369399
// The crypto key configuration. This field is used by the Customer-Managed
370400
// Encryption Keys (CMEK) feature.
371401
CryptoKeyConfig crypto_key_config = 28;
402+
403+
// Output only. If the instance state is DISABLED, the reason for disabling the instance.
404+
repeated DisabledReason disabled_reason = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
372405
}
373406

374407
// Request message for listing Data Fusion instances.
375408
message ListInstancesRequest {
376-
// The project and location for which to retrieve instance information
409+
// Required. The project and location for which to retrieve instance information
377410
// in the format projects/{project}/locations/{location}. If the location is
378411
// specified as '-' (wildcard), then all regions available to the project
379412
// are queried, and the results are aggregated.
380-
string parent = 1;
413+
string parent = 1 [
414+
(google.api.field_behavior) = REQUIRED,
415+
(google.api.resource_reference) = {
416+
type: "locations.googleapis.com/Location"
417+
}
418+
];
381419

382420
// The maximum number of items to return.
383421
int32 page_size = 2;
@@ -408,9 +446,14 @@ message ListInstancesResponse {
408446

409447
// Request message for the list available versions request.
410448
message ListAvailableVersionsRequest {
411-
// Required. The project and location for which to retrieve instance
412-
// information in the format projects/{project}/locations/{location}.
413-
string parent = 1 [(google.api.field_behavior) = REQUIRED];
449+
// Required. The project and location for which to retrieve instance information
450+
// in the format projects/{project}/locations/{location}.
451+
string parent = 1 [
452+
(google.api.field_behavior) = REQUIRED,
453+
(google.api.resource_reference) = {
454+
type: "locations.googleapis.com/Location"
455+
}
456+
];
414457

415458
// The maximum number of items to return.
416459
int32 page_size = 2;
@@ -437,36 +480,54 @@ message ListAvailableVersionsResponse {
437480

438481
// Request message for getting details about a Data Fusion instance.
439482
message GetInstanceRequest {
440-
// The instance resource name in the format
483+
// Required. The instance resource name in the format
441484
// projects/{project}/locations/{location}/instances/{instance}.
442-
string name = 1;
485+
string name = 1 [
486+
(google.api.field_behavior) = REQUIRED,
487+
(google.api.resource_reference) = {
488+
type: "datafusion.googleapis.com/Instance"
489+
}
490+
];
443491
}
444492

445493
// Request message for creating a Data Fusion instance.
446494
message CreateInstanceRequest {
447-
// The instance's project and location in the format
495+
// Required. The instance's project and location in the format
448496
// projects/{project}/locations/{location}.
449-
string parent = 1;
497+
string parent = 1 [
498+
(google.api.field_behavior) = REQUIRED,
499+
(google.api.resource_reference) = {
500+
type: "locations.googleapis.com/Location"
501+
}
502+
];
450503

451-
// The name of the instance to create.
452-
string instance_id = 2;
504+
// Required. The name of the instance to create.
505+
string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
453506

454507
// An instance resource.
455508
Instance instance = 3;
456509
}
457510

458511
// Request message for deleting a Data Fusion instance.
459512
message DeleteInstanceRequest {
460-
// The instance resource name in the format
513+
// Required. The instance resource name in the format
461514
// projects/{project}/locations/{location}/instances/{instance}
462-
string name = 1;
515+
string name = 1 [
516+
(google.api.field_behavior) = REQUIRED,
517+
(google.api.resource_reference) = {
518+
type: "datafusion.googleapis.com/Instance"
519+
}
520+
];
463521
}
464522

523+
// Request message for updating a Data Fusion instance.
524+
// Data Fusion allows updating the labels, options, and stack driver settings.
525+
// This is also used for CDF version upgrade.
465526
message UpdateInstanceRequest {
466-
// The instance resource that replaces the resource on the server. Currently,
527+
// Required. The instance resource that replaces the resource on the server. Currently,
467528
// Data Fusion only allows replacing labels, options, and stack driver
468529
// settings. All other fields will be ignored.
469-
Instance instance = 1;
530+
Instance instance = 1 [(google.api.field_behavior) = REQUIRED];
470531

471532
// Field mask is used to specify the fields that the update will overwrite
472533
// in an instance resource. The fields specified in the update_mask are
@@ -479,9 +540,14 @@ message UpdateInstanceRequest {
479540

480541
// Request message for restarting a Data Fusion instance.
481542
message RestartInstanceRequest {
482-
// Name of the Data Fusion instance which need to be restarted in the form of
543+
// Required. Name of the Data Fusion instance which need to be restarted in the form of
483544
// projects/{project}/locations/{location}/instances/{instance}
484-
string name = 1;
545+
string name = 1 [
546+
(google.api.field_behavior) = REQUIRED,
547+
(google.api.resource_reference) = {
548+
type: "datafusion.googleapis.com/Instance"
549+
}
550+
];
485551
}
486552

487553
// Represents the metadata of a long-running operation.
@@ -503,9 +569,8 @@ message OperationMetadata {
503569

504570
// Identifies whether the user has requested cancellation
505571
// of the operation. Operations that have successfully been cancelled
506-
// have [Operation.error][] value with a
507-
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
508-
// `Code.CANCELLED`.
572+
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
573+
// corresponding to `Code.CANCELLED`.
509574
bool requested_cancellation = 6;
510575

511576
// API version used to start the operation.

0 commit comments

Comments
 (0)