1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.datacatalog.lineage.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/longrunning/operations.proto";
24import "google/protobuf/empty.proto";
25import "google/protobuf/field_mask.proto";
26import "google/protobuf/struct.proto";
27import "google/protobuf/timestamp.proto";
28
29option csharp_namespace = "Google.Cloud.DataCatalog.Lineage.V1";
30option go_package = "cloud.google.com/go/datacatalog/lineage/apiv1/lineagepb;lineagepb";
31option java_multiple_files = true;
32option java_outer_classname = "LineageProto";
33option java_package = "com.google.cloud.datacatalog.lineage.v1";
34option php_namespace = "Google\\Cloud\\DataCatalog\\Lineage\\V1";
35option ruby_package = "Google::Cloud::DataCatalog::Lineage::V1";
36
37// Lineage is used to track data flows between assets over time. You can
38// create [LineageEvents][google.cloud.datacatalog.lineage.v1.LineageEvent]
39// to record lineage between multiple sources and a single target, for
40// example, when table data is based on data from multiple tables.
41service Lineage {
42  option (google.api.default_host) = "datalineage.googleapis.com";
43  option (google.api.oauth_scopes) =
44      "https://www.googleapis.com/auth/cloud-platform";
45
46  // Creates a new process.
47  rpc CreateProcess(CreateProcessRequest) returns (Process) {
48    option (google.api.http) = {
49      post: "/v1/{parent=projects/*/locations/*}/processes"
50      body: "process"
51    };
52    option (google.api.method_signature) = "parent,process";
53  }
54
55  // Updates a process.
56  rpc UpdateProcess(UpdateProcessRequest) returns (Process) {
57    option (google.api.http) = {
58      patch: "/v1/{process.name=projects/*/locations/*/processes/*}"
59      body: "process"
60    };
61    option (google.api.method_signature) = "process,update_mask";
62  }
63
64  // Gets the details of the specified process.
65  rpc GetProcess(GetProcessRequest) returns (Process) {
66    option (google.api.http) = {
67      get: "/v1/{name=projects/*/locations/*/processes/*}"
68    };
69    option (google.api.method_signature) = "name";
70  }
71
72  // List processes in the given project and location. List order is descending
73  // by insertion time.
74  rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse) {
75    option (google.api.http) = {
76      get: "/v1/{parent=projects/*/locations/*}/processes"
77    };
78    option (google.api.method_signature) = "parent";
79  }
80
81  // Deletes the process with the specified name.
82  rpc DeleteProcess(DeleteProcessRequest)
83      returns (google.longrunning.Operation) {
84    option (google.api.http) = {
85      delete: "/v1/{name=projects/*/locations/*/processes/*}"
86    };
87    option (google.api.method_signature) = "name";
88    option (google.longrunning.operation_info) = {
89      response_type: "google.protobuf.Empty"
90      metadata_type: "google.cloud.datacatalog.lineage.v1.OperationMetadata"
91    };
92  }
93
94  // Creates a new run.
95  rpc CreateRun(CreateRunRequest) returns (Run) {
96    option (google.api.http) = {
97      post: "/v1/{parent=projects/*/locations/*/processes/*}/runs"
98      body: "run"
99    };
100    option (google.api.method_signature) = "parent,run";
101  }
102
103  // Updates a run.
104  rpc UpdateRun(UpdateRunRequest) returns (Run) {
105    option (google.api.http) = {
106      patch: "/v1/{run.name=projects/*/locations/*/processes/*/runs/*}"
107      body: "run"
108    };
109    option (google.api.method_signature) = "run,update_mask";
110  }
111
112  // Gets the details of the specified run.
113  rpc GetRun(GetRunRequest) returns (Run) {
114    option (google.api.http) = {
115      get: "/v1/{name=projects/*/locations/*/processes/*/runs/*}"
116    };
117    option (google.api.method_signature) = "name";
118  }
119
120  // Lists runs in the given project and location. List order is descending by
121  // `start_time`.
122  rpc ListRuns(ListRunsRequest) returns (ListRunsResponse) {
123    option (google.api.http) = {
124      get: "/v1/{parent=projects/*/locations/*/processes/*}/runs"
125    };
126    option (google.api.method_signature) = "parent";
127  }
128
129  // Deletes the run with the specified name.
130  rpc DeleteRun(DeleteRunRequest) returns (google.longrunning.Operation) {
131    option (google.api.http) = {
132      delete: "/v1/{name=projects/*/locations/*/processes/*/runs/*}"
133    };
134    option (google.api.method_signature) = "name";
135    option (google.longrunning.operation_info) = {
136      response_type: "google.protobuf.Empty"
137      metadata_type: "google.cloud.datacatalog.lineage.v1.OperationMetadata"
138    };
139  }
140
141  // Creates a new lineage event.
142  rpc CreateLineageEvent(CreateLineageEventRequest) returns (LineageEvent) {
143    option (google.api.http) = {
144      post: "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents"
145      body: "lineage_event"
146    };
147    option (google.api.method_signature) = "parent,lineage_event";
148  }
149
150  // Gets details of a specified lineage event.
151  rpc GetLineageEvent(GetLineageEventRequest) returns (LineageEvent) {
152    option (google.api.http) = {
153      get: "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}"
154    };
155    option (google.api.method_signature) = "name";
156  }
157
158  // Lists lineage events in the given project and location. The list order is
159  // not defined.
160  rpc ListLineageEvents(ListLineageEventsRequest)
161      returns (ListLineageEventsResponse) {
162    option (google.api.http) = {
163      get: "/v1/{parent=projects/*/locations/*/processes/*/runs/*}/lineageEvents"
164    };
165    option (google.api.method_signature) = "parent";
166  }
167
168  // Deletes the lineage event with the specified name.
169  rpc DeleteLineageEvent(DeleteLineageEventRequest)
170      returns (google.protobuf.Empty) {
171    option (google.api.http) = {
172      delete: "/v1/{name=projects/*/locations/*/processes/*/runs/*/lineageEvents/*}"
173    };
174    option (google.api.method_signature) = "name";
175  }
176
177  // Retrieve a list of links connected to a specific asset.
178  // Links represent the data flow between **source** (upstream)
179  // and **target** (downstream) assets in transformation pipelines.
180  // Links are stored in the same project as the Lineage Events that create
181  // them.
182  //
183  // You can retrieve links in every project where you have the
184  // `datalineage.events.get` permission. The project provided in the URL
185  // is used for Billing and Quota.
186  rpc SearchLinks(SearchLinksRequest) returns (SearchLinksResponse) {
187    option (google.api.http) = {
188      post: "/v1/{parent=projects/*/locations/*}:searchLinks"
189      body: "*"
190    };
191  }
192
193  // Retrieve information about LineageProcesses associated with specific
194  // links. LineageProcesses are transformation pipelines that result in data
195  // flowing from **source** to **target** assets. Links between assets
196  // represent this operation.
197  //
198  // If you have specific link names, you can use this method to
199  // verify which LineageProcesses contribute to creating those links.
200  // See the
201  // [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks]
202  // method for more information on how to retrieve link name.
203  //
204  // You can retrieve the LineageProcess information in every project where you
205  // have the `datalineage.events.get` permission. The project provided in the
206  // URL is used for Billing and Quota.
207  rpc BatchSearchLinkProcesses(BatchSearchLinkProcessesRequest)
208      returns (BatchSearchLinkProcessesResponse) {
209    option (google.api.http) = {
210      post: "/v1/{parent=projects/*/locations/*}:batchSearchLinkProcesses"
211      body: "*"
212    };
213  }
214}
215
216// A process is the definition of a data transformation operation.
217message Process {
218  option (google.api.resource) = {
219    type: "datalineage.googleapis.com/Process"
220    pattern: "projects/{project}/locations/{location}/processes/{process}"
221  };
222
223  // Immutable. The resource name of the lineage process. Format:
224  // `projects/{project}/locations/{location}/processes/{process}`.
225  // Can be specified or auto-assigned.
226  // {process} must be not longer than 200 characters and only
227  // contain characters in a set: `a-zA-Z0-9_-:.`
228  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
229
230  // Optional. A human-readable name you can set to display in a user interface.
231  // Must be not longer than 200 characters and only contain UTF-8 letters
232  // or numbers, spaces or characters like `_-:&.`
233  string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
234
235  // Optional. The attributes of the process. Can be anything, for example,
236  // "author". Up to 100 attributes are allowed.
237  map<string, google.protobuf.Value> attributes = 3
238      [(google.api.field_behavior) = OPTIONAL];
239
240  // Optional. The origin of this process and its runs and lineage events.
241  Origin origin = 4 [(google.api.field_behavior) = OPTIONAL];
242}
243
244// A lineage run represents an execution of a process that creates
245// lineage events.
246message Run {
247  option (google.api.resource) = {
248    type: "datalineage.googleapis.com/Run"
249    pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}"
250  };
251
252  // The current state of the run.
253  enum State {
254    // The state is unknown. The true state may be any of the below or a
255    // different state that is not supported here explicitly.
256    UNKNOWN = 0;
257
258    // The run is still executing.
259    STARTED = 1;
260
261    // The run completed.
262    COMPLETED = 2;
263
264    // The run failed.
265    FAILED = 3;
266
267    // The run aborted.
268    ABORTED = 4;
269  }
270
271  // Immutable. The resource name of the run. Format:
272  // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
273  // Can be specified or auto-assigned.
274  // {run} must be not longer than 200 characters and only
275  // contain characters in a set: `a-zA-Z0-9_-:.`
276  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
277
278  // Optional. A human-readable name you can set to display in a user interface.
279  // Must be not longer than 1024 characters and only contain UTF-8 letters
280  // or numbers, spaces or characters like `_-:&.`
281  string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
282
283  // Optional. The attributes of the run. Can be anything, for example, a string
284  // with an SQL request. Up to 100 attributes are allowed.
285  map<string, google.protobuf.Value> attributes = 3
286      [(google.api.field_behavior) = OPTIONAL];
287
288  // Required. The timestamp of the start of the run.
289  google.protobuf.Timestamp start_time = 4
290      [(google.api.field_behavior) = REQUIRED];
291
292  // Optional. The timestamp of the end of the run.
293  google.protobuf.Timestamp end_time = 5
294      [(google.api.field_behavior) = OPTIONAL];
295
296  // Required. The state of the run.
297  State state = 6 [(google.api.field_behavior) = REQUIRED];
298}
299
300// A lineage event represents an operation on assets. Within the operation, the
301// data flows from the source to the target defined in the links field.
302message LineageEvent {
303  option (google.api.resource) = {
304    type: "datalineage.googleapis.com/LineageEvent"
305    pattern: "projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}"
306  };
307
308  // Immutable. The resource name of the lineage event.
309  // Format:
310  // `projects/{project}/locations/{location}/processes/{process}/runs/{run}/lineageEvents/{lineage_event}`.
311  // Can be specified or auto-assigned.
312  // {lineage_event} must be not longer than 200 characters and only
313  // contain characters in a set: `a-zA-Z0-9_-:.`
314  string name = 1 [(google.api.field_behavior) = IMMUTABLE];
315
316  // Optional. List of source-target pairs. Can't contain more than 100 tuples.
317  repeated EventLink links = 8 [(google.api.field_behavior) = OPTIONAL];
318
319  // Optional. The beginning of the transformation which resulted in this
320  // lineage event. For streaming scenarios, it should be the beginning of the
321  // period from which the lineage is being reported.
322  google.protobuf.Timestamp start_time = 6
323      [(google.api.field_behavior) = OPTIONAL];
324
325  // Optional. The end of the transformation which resulted in this lineage
326  // event.  For streaming scenarios, it should be the end of the period from
327  // which the lineage is being reported.
328  google.protobuf.Timestamp end_time = 7
329      [(google.api.field_behavior) = OPTIONAL];
330}
331
332// A lineage between source and target entities.
333message EventLink {
334  // Required. Reference to the source entity
335  EntityReference source = 1 [(google.api.field_behavior) = REQUIRED];
336
337  // Required. Reference to the target entity
338  EntityReference target = 2 [(google.api.field_behavior) = REQUIRED];
339}
340
341// The soft reference to everything you can attach a lineage event to.
342message EntityReference {
343  // Required. Fully Qualified Name of the entity. Useful for referencing
344  // entities that aren't represented as GCP resources, for example, tables in
345  // Dataproc Metastore API.
346  //
347  // Examples:
348  //
349  //   * `bigquery:dataset.project_id.dataset_id`
350  //   * `bigquery:table.project_id.dataset_id.table_id`
351  //   * `pubsub:project_id.topic_id`
352  //   * `dataproc_metastore:projectId.locationId.instanceId.databaseId.tableId`
353  string fully_qualified_name = 1 [(google.api.field_behavior) = REQUIRED];
354}
355
356// Metadata describing the operation.
357message OperationMetadata {
358  // An enum with the state of the operation.
359  enum State {
360    // Unused.
361    STATE_UNSPECIFIED = 0;
362
363    // The operation has been created but is not yet started.
364    PENDING = 1;
365
366    // The operation is underway.
367    RUNNING = 2;
368
369    // The operation completed successfully.
370    SUCCEEDED = 3;
371
372    // The operation is no longer running and did not succeed.
373    FAILED = 4;
374  }
375
376  // Type of the long running operation.
377  enum Type {
378    // Unused.
379    TYPE_UNSPECIFIED = 0;
380
381    // The resource deletion operation.
382    DELETE = 1;
383  }
384
385  // Output only. The current operation state.
386  State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
387
388  // Output only. The type of the operation being performed.
389  Type operation_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
390
391  // Output only. The [relative name]
392  // (https://cloud.google.com//apis/design/resource_names#relative_resource_name)
393  // of the resource being operated on.
394  string resource = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
395
396  // Output only. The UUID of the resource being operated on.
397  string resource_uuid = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
398
399  // Output only. The timestamp of the operation submission to the server.
400  google.protobuf.Timestamp create_time = 5
401      [(google.api.field_behavior) = OUTPUT_ONLY];
402
403  // Output only. The timestamp of the operation termination, regardless of its
404  // success. This field is unset if the operation is still ongoing.
405  google.protobuf.Timestamp end_time = 6
406      [(google.api.field_behavior) = OUTPUT_ONLY];
407}
408
409// Request message for
410// [CreateProcess][google.cloud.datacatalog.lineage.v1.CreateProcess].
411message CreateProcessRequest {
412  // Required. The name of the project and its location that should own the
413  // process.
414  string parent = 1 [
415    (google.api.field_behavior) = REQUIRED,
416    (google.api.resource_reference) = {
417      child_type: "datalineage.googleapis.com/Process"
418    }
419  ];
420
421  // Required. The process to create.
422  Process process = 2 [(google.api.field_behavior) = REQUIRED];
423
424  // A unique identifier for this request. Restricted to 36 ASCII characters.
425  // A random UUID is recommended. This request is idempotent only if a
426  // `request_id` is provided.
427  string request_id = 3;
428}
429
430// Request message for
431// [UpdateProcess][google.cloud.datacatalog.lineage.v1.UpdateProcess].
432message UpdateProcessRequest {
433  // Required. The lineage process to update.
434  //
435  // The process's `name` field is used to identify the process to update.
436  Process process = 1 [(google.api.field_behavior) = REQUIRED];
437
438  // The list of fields to update. Currently not used. The whole message is
439  // updated.
440  google.protobuf.FieldMask update_mask = 2;
441
442  // If set to true and the process is not found, the request inserts it.
443  bool allow_missing = 3;
444}
445
446// Request message for
447// [GetProcess][google.cloud.datacatalog.lineage.v1.GetProcess].
448message GetProcessRequest {
449  // Required. The name of the process to get.
450  string name = 1 [
451    (google.api.field_behavior) = REQUIRED,
452    (google.api.resource_reference) = {
453      type: "datalineage.googleapis.com/Process"
454    }
455  ];
456}
457
458// Request message for
459// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
460message ListProcessesRequest {
461  // Required. The name of the project and its location that owns this
462  // collection of processes.
463  string parent = 1 [
464    (google.api.field_behavior) = REQUIRED,
465    (google.api.resource_reference) = {
466      child_type: "datalineage.googleapis.com/Process"
467    }
468  ];
469
470  // The maximum number of processes to return. The service may return
471  // fewer than this value. If unspecified, at most 50 processes are
472  // returned. The maximum value is 100; values greater than 100 are cut to
473  // 100.
474  int32 page_size = 2;
475
476  // The page token received from a previous `ListProcesses` call. Specify
477  // it to get the next page.
478  //
479  // When paginating, all other parameters specified in this call must
480  // match the parameters of the call that provided the page token.
481  string page_token = 3;
482}
483
484// Response message for
485// [ListProcesses][google.cloud.datacatalog.lineage.v1.ListProcesses].
486message ListProcessesResponse {
487  // The processes from the specified project and location.
488  repeated Process processes = 1;
489
490  // The token to specify as `page_token` in the next call to get the next page.
491  // If this field is omitted, there are no subsequent pages.
492  string next_page_token = 2;
493}
494
495// Request message for
496// [DeleteProcess][google.cloud.datacatalog.lineage.v1.DeleteProcess].
497message DeleteProcessRequest {
498  // Required. The name of the process to delete.
499  string name = 1 [
500    (google.api.field_behavior) = REQUIRED,
501    (google.api.resource_reference) = {
502      type: "datalineage.googleapis.com/Process"
503    }
504  ];
505
506  // If set to true and the process is not found, the request
507  // succeeds but the server doesn't perform any actions.
508  bool allow_missing = 2;
509}
510
511// Request message for
512// [CreateRun][google.cloud.datacatalog.lineage.v1.CreateRun].
513message CreateRunRequest {
514  // Required. The name of the process that should own the run.
515  string parent = 1 [
516    (google.api.field_behavior) = REQUIRED,
517    (google.api.resource_reference) = {
518      child_type: "datalineage.googleapis.com/Run"
519    }
520  ];
521
522  // Required. The run to create.
523  Run run = 2 [(google.api.field_behavior) = REQUIRED];
524
525  // A unique identifier for this request. Restricted to 36 ASCII characters.
526  // A random UUID is recommended. This request is idempotent only if a
527  // `request_id` is provided.
528  string request_id = 3;
529}
530
531// Request message for
532// [UpdateRun][google.cloud.datacatalog.lineage.v1.UpdateRun].
533message UpdateRunRequest {
534  // Required. The lineage run to update.
535  //
536  // The run's `name` field is used to identify the run to update.
537  //
538  // Format:
539  // `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
540  Run run = 1 [(google.api.field_behavior) = REQUIRED];
541
542  // The list of fields to update. Currently not used. The whole message is
543  // updated.
544  google.protobuf.FieldMask update_mask = 2;
545}
546
547// Request message for
548// [GetRun][google.cloud.datacatalog.lineage.v1.GetRun].
549message GetRunRequest {
550  // Required. The name of the run to get.
551  string name = 1 [
552    (google.api.field_behavior) = REQUIRED,
553    (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" }
554  ];
555}
556
557// Request message for
558// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
559message ListRunsRequest {
560  // Required. The name of process that owns this collection of runs.
561  string parent = 1 [
562    (google.api.field_behavior) = REQUIRED,
563    (google.api.resource_reference) = {
564      child_type: "datalineage.googleapis.com/Run"
565    }
566  ];
567
568  // The maximum number of runs to return. The service may return
569  // fewer than this value. If unspecified, at most 50 runs are
570  // returned. The maximum value is 100; values greater than 100 are cut to
571  // 100.
572  int32 page_size = 2;
573
574  // The page token received from a previous `ListRuns` call. Specify
575  // it to get the next page.
576  //
577  // When paginating, all other parameters specified in this call must
578  // match the parameters of the call that provided the page token.
579  string page_token = 3;
580}
581
582// Response message for
583// [ListRuns][google.cloud.datacatalog.lineage.v1.ListRuns].
584message ListRunsResponse {
585  // The runs from the specified project and location.
586  repeated Run runs = 1;
587
588  // The token to specify as `page_token` in the next call to get the next page.
589  // If this field is omitted, there are no subsequent pages.
590  string next_page_token = 2;
591}
592
593// Request message for
594// [DeleteRun][google.cloud.datacatalog.lineage.v1.DeleteRun].
595message DeleteRunRequest {
596  // Required. The name of the run to delete.
597  string name = 1 [
598    (google.api.field_behavior) = REQUIRED,
599    (google.api.resource_reference) = { type: "datalineage.googleapis.com/Run" }
600  ];
601
602  // If set to true and the run is not found, the request
603  // succeeds but the server doesn't perform any actions.
604  bool allow_missing = 2;
605}
606
607// Request message for
608// [CreateLineageEvent][google.cloud.datacatalog.lineage.v1.CreateLineageEvent].
609message CreateLineageEventRequest {
610  // Required. The name of the run that should own the lineage event.
611  string parent = 1 [
612    (google.api.field_behavior) = REQUIRED,
613    (google.api.resource_reference) = {
614      child_type: "datalineage.googleapis.com/LineageEvent"
615    }
616  ];
617
618  // Required. The lineage event to create.
619  LineageEvent lineage_event = 2 [(google.api.field_behavior) = REQUIRED];
620
621  // A unique identifier for this request. Restricted to 36 ASCII characters.
622  // A random UUID is recommended. This request is idempotent only if a
623  // `request_id` is provided.
624  string request_id = 3;
625}
626
627// Request message for
628// [GetLineageEvent][google.cloud.datacatalog.lineage.v1.GetLineageEvent].
629message GetLineageEventRequest {
630  // Required. The name of the lineage event to get.
631  string name = 1 [
632    (google.api.field_behavior) = REQUIRED,
633    (google.api.resource_reference) = {
634      type: "datalineage.googleapis.com/LineageEvent"
635    }
636  ];
637}
638
639// Request message for
640// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
641message ListLineageEventsRequest {
642  // Required. The name of the run that owns the collection of lineage events to
643  // get.
644  string parent = 1 [
645    (google.api.field_behavior) = REQUIRED,
646    (google.api.resource_reference) = {
647      child_type: "datalineage.googleapis.com/LineageEvent"
648    }
649  ];
650
651  // The maximum number of lineage events to return.
652  //
653  // The service may return fewer events than this value.
654  // If unspecified, at most 50 events are returned. The maximum value is 100;
655  // values greater than 100 are cut to 100.
656  int32 page_size = 2;
657
658  // The page token received from a previous `ListLineageEvents` call. Specify
659  // it to get the next page.
660  //
661  // When paginating, all other parameters specified in this call must
662  // match the parameters of the call that provided the page token.
663  string page_token = 3;
664}
665
666// Response message for
667// [ListLineageEvents][google.cloud.datacatalog.lineage.v1.ListLineageEvents].
668message ListLineageEventsResponse {
669  // Lineage events from the specified project and location.
670  repeated LineageEvent lineage_events = 1;
671
672  // The token to specify as `page_token` in the next call to get the next page.
673  // If this field is omitted, there are no subsequent pages.
674  string next_page_token = 2;
675}
676
677// Request message for
678// [DeleteLineageEvent][google.cloud.datacatalog.lineage.v1.DeleteLineageEvent].
679message DeleteLineageEventRequest {
680  // Required. The name of the lineage event to delete.
681  string name = 1 [
682    (google.api.field_behavior) = REQUIRED,
683    (google.api.resource_reference) = {
684      type: "datalineage.googleapis.com/LineageEvent"
685    }
686  ];
687
688  // If set to true and the lineage event is not found, the request
689  // succeeds but the server doesn't perform any actions.
690  bool allow_missing = 2;
691}
692
693// Request message for
694// [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
695message SearchLinksRequest {
696  // Required. The project and location you want search in the format `projects/*/locations/*`
697  string parent = 1 [
698    (google.api.field_behavior) = REQUIRED,
699    (google.api.resource_reference) = {
700      child_type: "datalineage.googleapis.com/Process"
701    }
702  ];
703
704  // The asset for which you want to retrieve links.
705  oneof criteria {
706    // Optional. Send asset information in the **source** field to retrieve all
707    // links that lead from the specified asset to downstream assets.
708    EntityReference source = 4 [(google.api.field_behavior) = OPTIONAL];
709
710    // Optional. Send asset information in the **target** field to retrieve all
711    // links that lead from upstream assets to the specified asset.
712    EntityReference target = 5 [(google.api.field_behavior) = OPTIONAL];
713  }
714
715  // Optional. The maximum number of links to return in a single page of the
716  // response. A page may contain fewer links than this value. If unspecified,
717  // at most 10 links are returned.
718  //
719  // Maximum value is 100; values greater than 100 are reduced to 100.
720  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
721
722  // Optional. The page token received from a previous `SearchLinksRequest`
723  // call. Use it to get the next page.
724  //
725  // When requesting subsequent pages of a response, remember that
726  // all parameters must match the values you provided
727  // in the original request.
728  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
729}
730
731// Response message for
732// [SearchLinks][google.cloud.datacatalog.lineage.v1.Lineage.SearchLinks].
733message SearchLinksResponse {
734  // The list of links for a given asset. Can be empty if the asset has no
735  // relations of requested type (source or target).
736  repeated Link links = 1;
737
738  // The token to specify as `page_token` in the subsequent call to get the next
739  // page. Omitted if there are no more pages in the response.
740  string next_page_token = 2;
741}
742
743// Links represent the data flow between **source** (upstream)
744// and **target** (downstream) assets in transformation pipelines.
745//
746// Links are created when LineageEvents record data transformation between
747// related assets.
748message Link {
749  // Output only. Immutable. The name of the link. Format:
750  // `projects/{project}/locations/{location}/links/{link}`.
751  string name = 1 [
752    (google.api.field_behavior) = OUTPUT_ONLY,
753    (google.api.field_behavior) = IMMUTABLE
754  ];
755
756  // The pointer to the entity that is the **source** of this link.
757  EntityReference source = 2;
758
759  // The pointer to the entity that is the **target** of this link.
760  EntityReference target = 3;
761
762  // The start of the first event establishing this link.
763  google.protobuf.Timestamp start_time = 4;
764
765  // The end of the last event establishing this link.
766  google.protobuf.Timestamp end_time = 5;
767}
768
769// Request message for
770// [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
771message BatchSearchLinkProcessesRequest {
772  // Required. The project and location you want search in the format `projects/*/locations/*`
773  string parent = 1 [
774    (google.api.field_behavior) = REQUIRED,
775    (google.api.resource_reference) = {
776      child_type: "datalineage.googleapis.com/Process"
777    }
778  ];
779
780  // Required. An array of links to check for their associated LineageProcesses.
781  //
782  // The maximum number of items in this array is 100.
783  // If the request contains more than 100 links, it returns the
784  // `INVALID_ARGUMENT` error.
785  //
786  // Format: `projects/{project}/locations/{location}/links/{link}`.
787  repeated string links = 2 [(google.api.field_behavior) = REQUIRED];
788
789  // The maximum number of processes to return in a single page of the response.
790  // A page may contain fewer results than this value.
791  int32 page_size = 3;
792
793  // The page token received from a previous `BatchSearchLinkProcesses` call.
794  // Use it to get the next page.
795  //
796  // When requesting subsequent pages of a response, remember that
797  // all parameters must match the values you provided
798  // in the original request.
799  string page_token = 4;
800}
801
802// Response message for
803// [BatchSearchLinkProcesses][google.cloud.datacatalog.lineage.v1.Lineage.BatchSearchLinkProcesses].
804message BatchSearchLinkProcessesResponse {
805  // An array of processes associated with the specified links.
806  repeated ProcessLinks process_links = 1;
807
808  // The token to specify as `page_token` in the subsequent call to get the next
809  // page. Omitted if there are no more pages in the response.
810  string next_page_token = 2;
811}
812
813// Links associated with a specific process.
814message ProcessLinks {
815  // The process name in the format of
816  // `projects/{project}/locations/{location}/processes/{process}`.
817  string process = 1 [(google.api.resource_reference) = {
818    type: "datalineage.googleapis.com/Process"
819  }];
820
821  // An array containing link details objects of the links provided in
822  // the original request.
823  //
824  // A single process can result in creating multiple links.
825  // If any of the links you provide in the request are created by
826  // the same process, they all are included in this array.
827  repeated ProcessLinkInfo links = 2;
828}
829
830// Link details.
831message ProcessLinkInfo {
832  // The name of the link in the format of
833  // `projects/{project}/locations/{location}/links/{link}`.
834  string link = 1;
835
836  // The start of the first event establishing this link-process tuple.
837  google.protobuf.Timestamp start_time = 2;
838
839  // The end of the last event establishing this link-process tuple.
840  google.protobuf.Timestamp end_time = 3;
841}
842
843// Origin of a process.
844message Origin {
845  // Type of the source of a process.
846  enum SourceType {
847    // Source is Unspecified
848    SOURCE_TYPE_UNSPECIFIED = 0;
849
850    // A custom source
851    CUSTOM = 1;
852
853    // BigQuery
854    BIGQUERY = 2;
855
856    // Data Fusion
857    DATA_FUSION = 3;
858
859    // Composer
860    COMPOSER = 4;
861
862    // Looker Studio
863    LOOKER_STUDIO = 5;
864  }
865
866  // Type of the source.
867  SourceType source_type = 1;
868
869  // If the source_type isn't CUSTOM, the value of this field should be a GCP
870  // resource name of the system, which reports lineage. The project and
871  // location parts of the resource name must match the project and location of
872  // the lineage resource being created. Examples:
873  //
874  // - `{source_type: COMPOSER, name:
875  //   "projects/foo/locations/us/environments/bar"}`
876  // - `{source_type: BIGQUERY, name: "projects/foo/locations/eu"}`
877  // - `{source_type: CUSTOM,   name: "myCustomIntegration"}`
878  string name = 2;
879}
880