Skip to content

Commit

Permalink
feat: Automated regeneration of datalineage v1 client (#21313)
Browse files Browse the repository at this point in the history
Auto-created at 2025-01-08 01:21:41 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Jan 8, 2025
1 parent 4340b27 commit 2138f42
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 19 deletions.
8 changes: 8 additions & 0 deletions api_names_out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139090,6 +139090,11 @@
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessLinks/links": links
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessLinks/links/link": link
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessLinks/process": process
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse": google_cloud_datacatalog_lineage_v1_process_open_lineage_run_event_response
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse/lineageEvents": lineage_events
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse/lineageEvents/lineage_event": lineage_event
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse/process": process
"/datalineage:v1/GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse/run": run
"/datalineage:v1/GoogleCloudDatacatalogLineageV1Run": google_cloud_datacatalog_lineage_v1_run
"/datalineage:v1/GoogleCloudDatacatalogLineageV1Run/attributes": attributes
"/datalineage:v1/GoogleCloudDatacatalogLineageV1Run/attributes/attribute": attribute
Expand Down Expand Up @@ -139140,6 +139145,9 @@
"/datalineage:v1/datalineage.projects.locations.operations.list/name": name
"/datalineage:v1/datalineage.projects.locations.operations.list/pageSize": page_size
"/datalineage:v1/datalineage.projects.locations.operations.list/pageToken": page_token
"/datalineage:v1/datalineage.projects.locations.processOpenLineageRunEvent": process_project_location_open_lineage_run_event
"/datalineage:v1/datalineage.projects.locations.processOpenLineageRunEvent/parent": parent
"/datalineage:v1/datalineage.projects.locations.processOpenLineageRunEvent/requestId": request_id
"/datalineage:v1/datalineage.projects.locations.processes.create": create_project_location_process
"/datalineage:v1/datalineage.projects.locations.processes.create/parent": parent
"/datalineage:v1/datalineage.projects.locations.processes.create/requestId": request_id
Expand Down
5 changes: 5 additions & 0 deletions generated/google-apis-datalineage_v1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release history for google-apis-datalineage_v1

### v0.5.0 (2025-01-08)

* Regenerated from discovery document revision 20241202
* Regenerated using generator version 0.15.1

### v0.4.0 (2023-07-02)

* Regenerated from discovery document revision 20230623
Expand Down
4 changes: 2 additions & 2 deletions generated/google-apis-datalineage_v1/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ The [product documentation](https://cloud.google.com/data-catalog) may provide g

## Supported Ruby versions

This library is supported on Ruby 2.5+.
This library is supported on Ruby 2.7+.

Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.

## License

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Gem::Specification.new do |gem|
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = '>= 2.5'
gem.add_runtime_dependency "google-apis-core", ">= 0.11.0", "< 2.a"
gem.required_ruby_version = '>= 2.7'
gem.add_runtime_dependency "google-apis-core", ">= 0.15.0", "< 2.a"
end
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ class GoogleCloudDatacatalogLineageV1Origin
attr_accessor :name

# Type of the source. Use of a source_type other than `CUSTOM` for process
# creation or updating is highly discouraged, and may be restricted in the
# future without notice.
# creation or updating is highly discouraged. It might be restricted in the
# future without notice. There will be increase in cost if you use any of the
# source types other than `CUSTOM`.
# Corresponds to the JSON property `sourceType`
# @return [String]
attr_accessor :source_type
Expand Down Expand Up @@ -490,6 +491,40 @@ def update!(**args)
end
end

# Response message for ProcessOpenLineageRunEvent.
class GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse
include Google::Apis::Core::Hashable

# Created lineage event names. Format: `projects/`project`/locations/`location`/
# processes/`process`/runs/`run`/lineageEvents/`lineage_event``.
# Corresponds to the JSON property `lineageEvents`
# @return [Array<String>]
attr_accessor :lineage_events

# Created process name. Format: `projects/`project`/locations/`location`/
# processes/`process``.
# Corresponds to the JSON property `process`
# @return [String]
attr_accessor :process

# Created run name. Format: `projects/`project`/locations/`location`/processes/`
# process`/runs/`run``.
# Corresponds to the JSON property `run`
# @return [String]
attr_accessor :run

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@lineage_events = args[:lineage_events] if args.key?(:lineage_events)
@process = args[:process] if args.key?(:process)
@run = args[:run] if args.key?(:run)
end
end

# A lineage run represents an execution of a process that creates lineage events.
class GoogleCloudDatacatalogLineageV1Run
include Google::Apis::Core::Hashable
Expand Down Expand Up @@ -691,13 +726,13 @@ class GoogleLongrunningOperation
# @return [String]
attr_accessor :name

# The normal response of the operation in case of success. If the original
# method returns no data on success, such as `Delete`, the response is `google.
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
# the response should be the resource. For other methods, the response should
# have the type `XxxResponse`, where `Xxx` is the original method name. For
# example, if the original method name is `TakeSnapshot()`, the inferred
# response type is `TakeSnapshotResponse`.
# The normal, successful response of the operation. If the original method
# returns no data on success, such as `Delete`, the response is `google.protobuf.
# Empty`. If the original method is standard `Get`/`Create`/`Update`, the
# response should be the resource. For other methods, the response should have
# the type `XxxResponse`, where `Xxx` is the original method name. For example,
# if the original method name is `TakeSnapshot()`, the inferred response type is
# `TakeSnapshotResponse`.
# Corresponds to the JSON property `response`
# @return [Hash<String,Object>]
attr_accessor :response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ module Google
module Apis
module DatalineageV1
# Version of the google-apis-datalineage_v1 gem
GEM_VERSION = "0.4.0"
GEM_VERSION = "0.5.0"

# Version of the code generator used to generate this client
GENERATOR_VERSION = "0.12.0"
GENERATOR_VERSION = "0.15.1"

# Revision of the discovery document this client was generated from
REVISION = "20230623"
REVISION = "20241202"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class GoogleCloudDatacatalogLineageV1Run
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -289,6 +295,15 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse
# @private
class Representation < Google::Apis::Core::JsonRepresentation
collection :lineage_events, as: 'lineageEvents'
property :process, as: 'process'
property :run, as: 'run'
end
end

class GoogleCloudDatacatalogLineageV1Run
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module DatalineageV1
#
# @see https://cloud.google.com/data-catalog
class DatalineageService < Google::Apis::Core::BaseService
DEFAULT_ENDPOINT_TEMPLATE = "https://datalineage.$UNIVERSE_DOMAIN$/"

# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
Expand All @@ -43,7 +45,7 @@ class DatalineageService < Google::Apis::Core::BaseService
attr_accessor :quota_user

def initialize
super('https://datalineage.googleapis.com/', '',
super(DEFAULT_ENDPOINT_TEMPLATE, '',
client_name: 'google-apis-datalineage_v1',
client_version: Google::Apis::DatalineageV1::GEM_VERSION)
@batch_path = 'batch'
Expand Down Expand Up @@ -90,6 +92,45 @@ def batch_project_location_search_link_processes(parent, google_cloud_datacatalo
execute_or_queue_command(command, &block)
end

# Creates new lineage events together with their parents: process and run.
# Updates the process and run if they already exist. Mapped from Open Lineage
# specification: https://github.com/OpenLineage/OpenLineage/blob/main/spec/
# OpenLineage.json.
# @param [String] parent
# Required. The name of the project and its location that should own the process,
# run, and lineage event.
# @param [String] request_id
# A unique identifier for this request. Restricted to 36 ASCII characters. A
# random UUID is recommended. This request is idempotent only if a `request_id`
# is provided.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::DatalineageV1::GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::DatalineageV1::GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def process_project_location_open_lineage_run_event(parent, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}:processOpenLineageRunEvent', options)
command.response_representation = Google::Apis::DatalineageV1::GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse::Representation
command.response_class = Google::Apis::DatalineageV1::GoogleCloudDatacatalogLineageV1ProcessOpenLineageRunEventResponse
command.params['parent'] = parent unless parent.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Retrieve a list of links connected to a specific asset. Links represent the
# data flow between **source** (upstream) and **target** (downstream) assets in
# transformation pipelines. Links are stored in the same project as the Lineage
Expand Down Expand Up @@ -134,8 +175,8 @@ def search_project_location_links(parent, google_cloud_datacatalog_lineage_v1_se
# Clients can use Operations.GetOperation or other methods to check whether the
# cancellation succeeded or whether the operation completed despite cancellation.
# On successful cancellation, the operation is not deleted; instead, it becomes
# an operation with an Operation.error value with a google.rpc.Status.code of 1,
# corresponding to `Code.CANCELLED`.
# an operation with an Operation.error value with a google.rpc.Status.code of `1`
# , corresponding to `Code.CANCELLED`.
# @param [String] name
# The name of the operation resource to be cancelled.
# @param [Google::Apis::DatalineageV1::GoogleLongrunningCancelOperationRequest] google_longrunning_cancel_operation_request_object
Expand Down

0 comments on commit 2138f42

Please sign in to comment.