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