diff --git a/google-cloud-dataform-v1/.owlbot-manifest.json b/google-cloud-dataform-v1/.owlbot-manifest.json index 2e2061f93a2a..3a9e4212630c 100644 --- a/google-cloud-dataform-v1/.owlbot-manifest.json +++ b/google-cloud-dataform-v1/.owlbot-manifest.json @@ -19,20 +19,34 @@ "lib/google/cloud/dataform/v1/dataform.rb", "lib/google/cloud/dataform/v1/dataform/client.rb", "lib/google/cloud/dataform/v1/dataform/credentials.rb", + "lib/google/cloud/dataform/v1/dataform/operations.rb", "lib/google/cloud/dataform/v1/dataform/paths.rb", "lib/google/cloud/dataform/v1/dataform/rest.rb", "lib/google/cloud/dataform/v1/dataform/rest/client.rb", + "lib/google/cloud/dataform/v1/dataform/rest/operations.rb", "lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb", "lib/google/cloud/dataform/v1/dataform_pb.rb", "lib/google/cloud/dataform/v1/dataform_services_pb.rb", "lib/google/cloud/dataform/v1/rest.rb", "lib/google/cloud/dataform/v1/version.rb", + "lib/google/longrunning.rb", + "lib/google/longrunning/bindings_override.rb", + "lib/google/longrunning/operations.rb", + "lib/google/longrunning/operations/client.rb", + "lib/google/longrunning/operations/credentials.rb", + "lib/google/longrunning/operations/operations.rb", + "lib/google/longrunning/operations/rest.rb", + "lib/google/longrunning/operations/rest/client.rb", + "lib/google/longrunning/operations/rest/operations.rb", + "lib/google/longrunning/operations/rest/service_stub.rb", + "lib/google/longrunning/rest.rb", "proto_docs/README.md", "proto_docs/google/api/client.rb", "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/dataform/v1/dataform.rb", + "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", "proto_docs/google/protobuf/duration.rb", "proto_docs/google/protobuf/empty.rb", @@ -47,13 +61,19 @@ "snippets/dataform/commit_workspace_changes.rb", "snippets/dataform/compute_repository_access_token_status.rb", "snippets/dataform/create_compilation_result.rb", + "snippets/dataform/create_folder.rb", "snippets/dataform/create_release_config.rb", "snippets/dataform/create_repository.rb", + "snippets/dataform/create_team_folder.rb", "snippets/dataform/create_workflow_config.rb", "snippets/dataform/create_workflow_invocation.rb", "snippets/dataform/create_workspace.rb", + "snippets/dataform/delete_folder.rb", + "snippets/dataform/delete_folder_tree.rb", "snippets/dataform/delete_release_config.rb", "snippets/dataform/delete_repository.rb", + "snippets/dataform/delete_team_folder.rb", + "snippets/dataform/delete_team_folder_tree.rb", "snippets/dataform/delete_workflow_config.rb", "snippets/dataform/delete_workflow_invocation.rb", "snippets/dataform/delete_workspace.rb", @@ -64,8 +84,11 @@ "snippets/dataform/fetch_repository_history.rb", "snippets/dataform/get_compilation_result.rb", "snippets/dataform/get_config.rb", + "snippets/dataform/get_folder.rb", + "snippets/dataform/get_iam_policy.rb", "snippets/dataform/get_release_config.rb", "snippets/dataform/get_repository.rb", + "snippets/dataform/get_team_folder.rb", "snippets/dataform/get_workflow_config.rb", "snippets/dataform/get_workflow_invocation.rb", "snippets/dataform/get_workspace.rb", @@ -79,11 +102,16 @@ "snippets/dataform/make_directory.rb", "snippets/dataform/move_directory.rb", "snippets/dataform/move_file.rb", + "snippets/dataform/move_folder.rb", + "snippets/dataform/move_repository.rb", "snippets/dataform/pull_git_commits.rb", "snippets/dataform/push_git_commits.rb", "snippets/dataform/query_compilation_result_actions.rb", "snippets/dataform/query_directory_contents.rb", + "snippets/dataform/query_folder_contents.rb", "snippets/dataform/query_repository_directory_contents.rb", + "snippets/dataform/query_team_folder_contents.rb", + "snippets/dataform/query_user_root_contents.rb", "snippets/dataform/query_workflow_invocation_actions.rb", "snippets/dataform/read_file.rb", "snippets/dataform/read_repository_file.rb", @@ -91,15 +119,30 @@ "snippets/dataform/remove_file.rb", "snippets/dataform/reset_workspace_changes.rb", "snippets/dataform/search_files.rb", + "snippets/dataform/search_team_folders.rb", + "snippets/dataform/set_iam_policy.rb", + "snippets/dataform/test_iam_permissions.rb", "snippets/dataform/update_config.rb", + "snippets/dataform/update_folder.rb", "snippets/dataform/update_release_config.rb", "snippets/dataform/update_repository.rb", + "snippets/dataform/update_team_folder.rb", "snippets/dataform/update_workflow_config.rb", "snippets/dataform/write_file.rb", + "snippets/operations/cancel_operation.rb", + "snippets/operations/delete_operation.rb", + "snippets/operations/get_operation.rb", + "snippets/operations/list_operations.rb", + "snippets/operations/wait_operation.rb", "snippets/snippet_metadata_google.cloud.dataform.v1.json", + "snippets/snippet_metadata_google.longrunning.json", + "test/google/cloud/dataform/v1/dataform_operations_test.rb", "test/google/cloud/dataform/v1/dataform_paths_test.rb", "test/google/cloud/dataform/v1/dataform_rest_test.rb", "test/google/cloud/dataform/v1/dataform_test.rb", + "test/google/longrunning/operations_operations_test.rb", + "test/google/longrunning/operations_rest_test.rb", + "test/google/longrunning/operations_test.rb", "test/helper.rb" ], "static": [ diff --git a/google-cloud-dataform-v1/AUTHENTICATION.md b/google-cloud-dataform-v1/AUTHENTICATION.md index 43f05fb49632..91f83b42e5fa 100644 --- a/google-cloud-dataform-v1/AUTHENTICATION.md +++ b/google-cloud-dataform-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/dataform/v1" -client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| +client = ::Google::Longrunning::Operations::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/dataform/v1" -::Google::Cloud::Dataform::V1::Dataform::Client.configure do |config| +::Google::Longrunning::Operations::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::Dataform::V1::Dataform::Client.new +client = ::Google::Longrunning::Operations::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/dataform/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::Dataform::V1::Dataform::Client.new +client = ::Google::Longrunning::Operations::Client.new ``` ### Local ADC file diff --git a/google-cloud-dataform-v1/README.md b/google-cloud-dataform-v1/README.md index 0c7267718328..bd989cf181ba 100644 --- a/google-cloud-dataform-v1/README.md +++ b/google-cloud-dataform-v1/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/dataform/v1" -client = ::Google::Cloud::Dataform::V1::Dataform::Client.new -request = ::Google::Cloud::Dataform::V1::ListRepositoriesRequest.new # (request fields as keyword arguments...) -response = client.list_repositories request +client = ::Google::Longrunning::Operations::Client.new +request = ::Google::Longrunning::ListOperationsRequest.new # (request fields as keyword arguments...) +response = client.list_operations request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-dataform-v1/latest) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/cloud/dataform/v1" require "logger" -client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| +client = ::Google::Longrunning::Operations::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-dataform-v1/Rakefile b/google-cloud-dataform-v1/Rakefile index 4e47e1ecd2d5..f99f4a7f63e3 100644 --- a/google-cloud-dataform-v1/Rakefile +++ b/google-cloud-dataform-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| if project.nil? || keyfile.nil? fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" end - require "google/cloud/dataform/v1/dataform/credentials" - ::Google::Cloud::Dataform::V1::Dataform::Credentials.env_vars.each do |path| + require "google/longrunning/operations/credentials" + ::Google::Longrunning::Operations::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-dataform-v1/gapic_metadata.json b/google-cloud-dataform-v1/gapic_metadata.json index 5282728e605c..da5082c37f30 100644 --- a/google-cloud-dataform-v1/gapic_metadata.json +++ b/google-cloud-dataform-v1/gapic_metadata.json @@ -10,6 +10,81 @@ "grpc": { "libraryClient": "::Google::Cloud::Dataform::V1::Dataform::Client", "rpcs": { + "GetTeamFolder": { + "methods": [ + "get_team_folder" + ] + }, + "CreateTeamFolder": { + "methods": [ + "create_team_folder" + ] + }, + "UpdateTeamFolder": { + "methods": [ + "update_team_folder" + ] + }, + "DeleteTeamFolder": { + "methods": [ + "delete_team_folder" + ] + }, + "DeleteTeamFolderTree": { + "methods": [ + "delete_team_folder_tree" + ] + }, + "QueryTeamFolderContents": { + "methods": [ + "query_team_folder_contents" + ] + }, + "SearchTeamFolders": { + "methods": [ + "search_team_folders" + ] + }, + "GetFolder": { + "methods": [ + "get_folder" + ] + }, + "CreateFolder": { + "methods": [ + "create_folder" + ] + }, + "UpdateFolder": { + "methods": [ + "update_folder" + ] + }, + "DeleteFolder": { + "methods": [ + "delete_folder" + ] + }, + "DeleteFolderTree": { + "methods": [ + "delete_folder_tree" + ] + }, + "QueryFolderContents": { + "methods": [ + "query_folder_contents" + ] + }, + "QueryUserRootContents": { + "methods": [ + "query_user_root_contents" + ] + }, + "MoveFolder": { + "methods": [ + "move_folder" + ] + }, "ListRepositories": { "methods": [ "list_repositories" @@ -35,6 +110,11 @@ "delete_repository" ] }, + "MoveRepository": { + "methods": [ + "move_repository" + ] + }, "CommitRepositoryChanges": { "methods": [ "commit_repository_changes" @@ -279,6 +359,21 @@ "methods": [ "update_config" ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] } } } diff --git a/google-cloud-dataform-v1/lib/google-cloud-dataform-v1.rb b/google-cloud-dataform-v1/lib/google-cloud-dataform-v1.rb index 02caeba0ab0b..2cc7d93a40d9 100644 --- a/google-cloud-dataform-v1/lib/google-cloud-dataform-v1.rb +++ b/google-cloud-dataform-v1/lib/google-cloud-dataform-v1.rb @@ -19,3 +19,4 @@ # This gem does not autoload during Bundler.require. To load this gem, # issue explicit require statements for the packages desired, e.g.: # require "google/cloud/dataform/v1" +# require "google/longrunning" diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb index e4e03b7f81fa..11e9fc857ba1 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/bindings_override.rb @@ -64,63 +64,6 @@ def self.configure body: nil ) ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] - ], - body: "*" - ) - ] default_config end yield @configure if block_given? diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform.rb index d8f6e21d99ec..e6d1cb98dbed 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform.rb @@ -24,6 +24,7 @@ require "google/cloud/dataform/v1/dataform/credentials" require "google/cloud/dataform/v1/dataform/paths" +require "google/cloud/dataform/v1/dataform/operations" require "google/cloud/dataform/v1/dataform/client" require "google/cloud/dataform/v1/dataform/rest" diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/client.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/client.rb index a4614ba0c22b..0900fb979f2a 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/client.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/client.rb @@ -152,6 +152,13 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + @dataform_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Dataform::V1::Dataform::Stub, credentials: credentials, @@ -164,57 +171,1532 @@ def initialize logger: @config.logger ) - @dataform_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end + @dataform_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataform_stub.endpoint + config.universe_domain = @dataform_stub.universe_domain + config.logger = @dataform_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataform_stub.endpoint + config.universe_domain = @dataform_stub.universe_domain + config.logger = @dataform_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataform::V1::Dataform::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dataform_stub.logger + end + + # Service calls + + ## + # Fetches a single TeamFolder. + # + # @overload get_team_folder(request, options = nil) + # Pass arguments to `get_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::GetTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::GetTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_team_folder(name: nil) + # Pass arguments to `get_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::GetTeamFolderRequest.new + # + # # Call the get_team_folder method. + # result = client.get_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def get_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_team_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :get_team_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new TeamFolder in a given project and location. + # + # @overload create_team_folder(request, options = nil) + # Pass arguments to `create_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::CreateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_team_folder(parent: nil, team_folder: nil) + # Pass arguments to `create_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location in which to create the TeamFolder. Must be in the + # format `projects/*/locations/*`. + # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash] + # Required. The TeamFolder to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new + # + # # Call the create_team_folder method. + # result = client.create_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def create_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_team_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :create_team_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a single TeamFolder. + # + # @overload update_team_folder(request, options = nil) + # Pass arguments to `update_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_team_folder(update_mask: nil, team_folder: nil) + # Pass arguments to `update_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields will be updated. + # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash] + # Required. The updated TeamFolder. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new + # + # # Call the update_team_folder method. + # result = client.update_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def update_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.team_folder&.name + header_params["team_folder.name"] = request.team_folder.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_team_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :update_team_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TeamFolder. + # + # @overload delete_team_folder(request, options = nil) + # Pass arguments to `delete_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_team_folder(name: nil) + # Pass arguments to `delete_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new + # + # # Call the delete_team_folder method. + # result = client.delete_team_folder request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_team_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :delete_team_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces, + # ReleaseConfigs, and WorkflowConfigs). + # + # @overload delete_team_folder_tree(request, options = nil) + # Pass arguments to `delete_team_folder_tree` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_team_folder_tree(name: nil, force: nil) + # Pass arguments to `delete_team_folder_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # Format: projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder} + # @param force [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new + # + # # Call the delete_team_folder_tree method. + # result = client.delete_team_folder_tree request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_team_folder_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_team_folder_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_team_folder_tree.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_team_folder_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :delete_team_folder_tree, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a given TeamFolder. + # + # @overload query_team_folder_contents(request, options = nil) + # Pass arguments to `query_team_folder_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_team_folder_contents(team_folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_team_folder_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param team_folder [::String] + # Required. Name of the team_folder whose contents to list. + # Format: `projects/*/locations/*/teamFolders/*`. + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryTeamFolderContents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryTeamFolderContents`, with the exception of `page_size`, must match + # the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: `display_name` (default), `create_time`, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new + # + # # Call the query_team_folder_contents method. + # result = client.query_team_folder_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry. + # p item + # end + # + def query_team_folder_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_team_folder_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.team_folder + header_params["team_folder"] = request.team_folder + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_team_folder_contents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_team_folder_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :query_team_folder_contents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_team_folder_contents, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all TeamFolders in a given location that the caller has access to + # and match the provided filter. + # + # @overload search_team_folders(request, options = nil) + # Pass arguments to `search_team_folders` via a request object, either of type + # {::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_team_folders(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `search_team_folders` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Location in which to query TeamFolders. + # Format: `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of TeamFolders to return. The server may return + # fewer items than requested. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Page token received from a previous `SearchTeamFolders` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTeamFolders`, with the exception of `page_size`, must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Supported keywords: `display_name` (default), `create_time`, + # `last_modified_time`. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new + # + # # Call the search_team_folders method. + # result = client.search_team_folders request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult. + # p item + # end + # + def search_team_folders request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_team_folders.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.location + header_params["location"] = request.location + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_team_folders.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_team_folders.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :search_team_folders, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataform_stub, :search_team_folders, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a single Folder. + # + # @overload get_folder(request, options = nil) + # Pass arguments to `get_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::GetFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::GetFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_folder(name: nil) + # Pass arguments to `get_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::GetFolderRequest.new + # + # # Call the get_folder method. + # result = client.get_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def get_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :get_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Folder in a given project and location. + # + # @overload create_folder(request, options = nil) + # Pass arguments to `create_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::CreateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::CreateFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_folder(parent: nil, folder: nil) + # Pass arguments to `create_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location in which to create the Folder. Must be in the format + # `projects/*/locations/*`. + # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash] + # Required. The Folder to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::CreateFolderRequest.new + # + # # Call the create_folder method. + # result = client.create_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def create_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :create_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a single Folder. + # + # @overload update_folder(request, options = nil) + # Pass arguments to `update_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::UpdateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::UpdateFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_folder(update_mask: nil, folder: nil) + # Pass arguments to `update_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields that can be updated, will be updated. A few fields cannot be + # updated and will be ignored if specified in the update_mask (e.g. + # parent_name, team_folder_name). + # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash] + # Required. The updated Folder. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new + # + # # Call the update_folder method. + # result = client.update_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def update_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.folder&.name + header_params["folder.name"] = request.folder.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :update_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Folder. + # + # @overload delete_folder(request, options = nil) + # Pass arguments to `delete_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_folder(name: nil) + # Pass arguments to `delete_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new + # + # # Call the delete_folder method. + # result = client.delete_folder request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :delete_folder, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Folder with its contents (Folders, Repositories, Workspaces, + # ReleaseConfigs, and WorkflowConfigs). + # + # @overload delete_folder_tree(request, options = nil) + # Pass arguments to `delete_folder_tree` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_folder_tree(name: nil, force: nil) + # Pass arguments to `delete_folder_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder} + # @param force [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new + # + # # Call the delete_folder_tree method. + # result = client.delete_folder_tree request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_folder_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_folder_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_folder_tree.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_folder_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :delete_folder_tree, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a given Folder. + # + # @overload query_folder_contents(request, options = nil) + # Pass arguments to `query_folder_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_folder_contents(folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_folder_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param folder [::String] + # Required. Name of the folder whose contents to list. + # Format: projects/*/locations/*/folders/* + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryFolderContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryFolderContents`, with the exception of `page_size`, must match the + # call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), create_time, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new + # + # # Call the query_folder_contents method. + # result = client.query_folder_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry. + # p item + # end + # + def query_folder_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_folder_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataform_stub.endpoint - config.universe_domain = @dataform_stub.universe_domain - config.logger = @dataform_stub.logger if config.respond_to? :logger= + header_params = {} + if request.folder + header_params["folder"] = request.folder end - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataform_stub.endpoint - config.universe_domain = @dataform_stub.universe_domain - config.logger = @dataform_stub.logger if config.respond_to? :logger= + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_folder_contents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_folder_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :query_folder_contents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_folder_contents, request, response, operation, options + yield response, operation if block_given? + throw :response, response end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) end ## - # Get the associated client for mix-in of the Locations. + # Returns the contents of a caller's root folder in a given location. + # The root folder contains all resources that are created by the user and not + # contained in any other folder. # - # @return [Google::Cloud::Location::Locations::Client] + # @overload query_user_root_contents(request, options = nil) + # Pass arguments to `query_user_root_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest} or an equivalent Hash. # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. + # @param request [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @return [Google::Iam::V1::IAMPolicy::Client] + # @overload query_user_root_contents(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_user_root_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). # - attr_reader :iam_policy_client + # @param location [::String] + # Required. Location of the user root folder whose contents to list. + # Format: projects/*/locations/* + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryUserRootContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryUserRootFolderContents`, with the exception of `page_size`, must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), created_at, + # last_modified_at. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new + # + # # Call the query_user_root_contents method. + # result = client.query_user_root_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry. + # p item + # end + # + def query_user_root_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.query_user_root_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.location + header_params["location"] = request.location + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_user_root_contents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_user_root_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :query_user_root_contents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @dataform_stub, :query_user_root_contents, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end ## - # The logger used for request/response debug logging. + # Moves a Folder to a new Folder, TeamFolder, or the root location. # - # @return [Logger] + # @overload move_folder(request, options = nil) + # Pass arguments to `move_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::MoveFolderRequest} or an equivalent Hash. # - def logger - @dataform_stub.logger - end + # @param request [::Google::Cloud::Dataform::V1::MoveFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_folder(name: nil, destination_containing_folder: nil) + # Pass arguments to `move_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full resource name of the Folder to move. + # @param destination_containing_folder [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # Folder to. Can be in the format of: "" to move into the root User folder, + # `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::MoveFolderRequest.new + # + # # Call the move_folder method. + # result = client.move_folder request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def move_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # Service calls + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.move_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.move_folder.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :move_folder, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end ## # Lists Repositories in a given project and location. @@ -618,9 +2100,13 @@ def update_repository request, options = nil # @param name [::String] # Required. The repository's name. # @param force [::Boolean] - # Optional. If set to true, any child resources of this repository will also - # be deleted. (Otherwise, the request will only succeed if the repository has - # no child resources.) + # Optional. If set to true, child resources of this repository (compilation + # results and workflow invocations) will also be deleted. Otherwise, the + # request will only succeed if the repository has no child resources. + # + # **Note:** *This flag doesn't support deletion of workspaces, release + # configs or workflow configs. If any of such resources exists in the + # repository, the request will fail.*. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] @@ -645,16 +2131,113 @@ def update_repository request, options = nil # # The returned object is of type Google::Protobuf::Empty. # p result # - def delete_repository request, options = nil + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :delete_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves a Repository to a new location. + # + # @overload move_repository(request, options = nil) + # Pass arguments to `move_repository` via a request object, either of type + # {::Google::Cloud::Dataform::V1::MoveRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::MoveRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_repository(name: nil, destination_containing_folder: nil) + # Pass arguments to `move_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full resource name of the repository to move. + # @param destination_containing_folder [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # repository to. Can be in the format of: "" to move into the root User + # folder, `projects/*/locations/*/folders/*`, + # `projects/*/locations/*/teamFolders/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new + # + # # Call the move_repository method. + # result = client.move_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def move_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveRepositoryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults - metadata = @config.rpcs.delete_repository.metadata.to_h + metadata = @config.rpcs.move_repository.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -671,16 +2254,18 @@ def delete_repository request, options = nil request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + options.apply_defaults timeout: @config.rpcs.move_repository.timeout, metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy + retry_policy: @config.rpcs.move_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @dataform_stub.call_rpc :delete_repository, request, options: options do |response, operation| + @dataform_stub.call_rpc :move_repository, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options yield response, operation if block_given? + throw :response, response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) @@ -2347,7 +3932,7 @@ def fetch_file_diff request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil) + # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil, view: nil) # Pass arguments to `query_directory_contents` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -2368,6 +3953,11 @@ def fetch_file_diff request, options = nil # When paginating, all other parameters provided to # `QueryDirectoryContents`, with the exception of `page_size`, must match the # call that provided the page token. + # @param view [::Google::Cloud::Dataform::V1::DirectoryContentsView] + # Optional. Specifies the metadata to return for each directory entry. + # If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`. + # Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by + # CMEK-protected workspaces. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1::DirectoryEntry>] @@ -5206,6 +6796,294 @@ def update_config request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the Dataform API. # @@ -5222,17 +7100,17 @@ def update_config request, options = nil # @example # # # Modify the global config, setting the timeout for - # # list_repositories to 20 seconds, + # # get_team_folder to 20 seconds, # # and all remaining timeouts to 10 seconds. # ::Google::Cloud::Dataform::V1::Dataform::Client.configure do |config| # config.timeout = 10.0 - # config.rpcs.list_repositories.timeout = 20.0 + # config.rpcs.get_team_folder.timeout = 20.0 # end # # # Apply the above configuration only to a new client. # client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| # config.timeout = 10.0 - # config.rpcs.list_repositories.timeout = 20.0 + # config.rpcs.get_team_folder.timeout = 20.0 # end # # @!attribute [rw] endpoint @@ -5389,6 +7267,81 @@ def channel_pool # trigger a retry. # class Rpcs + ## + # RPC-specific configuration for `get_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :get_team_folder + ## + # RPC-specific configuration for `create_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :create_team_folder + ## + # RPC-specific configuration for `update_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :update_team_folder + ## + # RPC-specific configuration for `delete_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_team_folder + ## + # RPC-specific configuration for `delete_team_folder_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_team_folder_tree + ## + # RPC-specific configuration for `query_team_folder_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_team_folder_contents + ## + # RPC-specific configuration for `search_team_folders` + # @return [::Gapic::Config::Method] + # + attr_reader :search_team_folders + ## + # RPC-specific configuration for `get_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :get_folder + ## + # RPC-specific configuration for `create_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :create_folder + ## + # RPC-specific configuration for `update_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :update_folder + ## + # RPC-specific configuration for `delete_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_folder + ## + # RPC-specific configuration for `delete_folder_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_folder_tree + ## + # RPC-specific configuration for `query_folder_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_folder_contents + ## + # RPC-specific configuration for `query_user_root_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_user_root_contents + ## + # RPC-specific configuration for `move_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :move_folder ## # RPC-specific configuration for `list_repositories` # @return [::Gapic::Config::Method] @@ -5415,6 +7368,11 @@ class Rpcs # attr_reader :delete_repository ## + # RPC-specific configuration for `move_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :move_repository + ## # RPC-specific configuration for `commit_repository_changes` # @return [::Gapic::Config::Method] # @@ -5659,9 +7617,54 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :update_config + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions # @private def initialize parent_rpcs = nil + get_team_folder_config = parent_rpcs.get_team_folder if parent_rpcs.respond_to? :get_team_folder + @get_team_folder = ::Gapic::Config::Method.new get_team_folder_config + create_team_folder_config = parent_rpcs.create_team_folder if parent_rpcs.respond_to? :create_team_folder + @create_team_folder = ::Gapic::Config::Method.new create_team_folder_config + update_team_folder_config = parent_rpcs.update_team_folder if parent_rpcs.respond_to? :update_team_folder + @update_team_folder = ::Gapic::Config::Method.new update_team_folder_config + delete_team_folder_config = parent_rpcs.delete_team_folder if parent_rpcs.respond_to? :delete_team_folder + @delete_team_folder = ::Gapic::Config::Method.new delete_team_folder_config + delete_team_folder_tree_config = parent_rpcs.delete_team_folder_tree if parent_rpcs.respond_to? :delete_team_folder_tree + @delete_team_folder_tree = ::Gapic::Config::Method.new delete_team_folder_tree_config + query_team_folder_contents_config = parent_rpcs.query_team_folder_contents if parent_rpcs.respond_to? :query_team_folder_contents + @query_team_folder_contents = ::Gapic::Config::Method.new query_team_folder_contents_config + search_team_folders_config = parent_rpcs.search_team_folders if parent_rpcs.respond_to? :search_team_folders + @search_team_folders = ::Gapic::Config::Method.new search_team_folders_config + get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder + @get_folder = ::Gapic::Config::Method.new get_folder_config + create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder + @create_folder = ::Gapic::Config::Method.new create_folder_config + update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder + @update_folder = ::Gapic::Config::Method.new update_folder_config + delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder + @delete_folder = ::Gapic::Config::Method.new delete_folder_config + delete_folder_tree_config = parent_rpcs.delete_folder_tree if parent_rpcs.respond_to? :delete_folder_tree + @delete_folder_tree = ::Gapic::Config::Method.new delete_folder_tree_config + query_folder_contents_config = parent_rpcs.query_folder_contents if parent_rpcs.respond_to? :query_folder_contents + @query_folder_contents = ::Gapic::Config::Method.new query_folder_contents_config + query_user_root_contents_config = parent_rpcs.query_user_root_contents if parent_rpcs.respond_to? :query_user_root_contents + @query_user_root_contents = ::Gapic::Config::Method.new query_user_root_contents_config + move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder + @move_folder = ::Gapic::Config::Method.new move_folder_config list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories @list_repositories = ::Gapic::Config::Method.new list_repositories_config get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository @@ -5672,6 +7675,8 @@ def initialize parent_rpcs = nil @update_repository = ::Gapic::Config::Method.new update_repository_config delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository @delete_repository = ::Gapic::Config::Method.new delete_repository_config + move_repository_config = parent_rpcs.move_repository if parent_rpcs.respond_to? :move_repository + @move_repository = ::Gapic::Config::Method.new move_repository_config commit_repository_changes_config = parent_rpcs.commit_repository_changes if parent_rpcs.respond_to? :commit_repository_changes @commit_repository_changes = ::Gapic::Config::Method.new commit_repository_changes_config read_repository_file_config = parent_rpcs.read_repository_file if parent_rpcs.respond_to? :read_repository_file @@ -5770,6 +7775,12 @@ def initialize parent_rpcs = nil @get_config = ::Gapic::Config::Method.new get_config_config update_config_config = parent_rpcs.update_config if parent_rpcs.respond_to? :update_config @update_config = ::Gapic::Config::Method.new update_config_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config yield self if block_given? end diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/operations.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/operations.rb new file mode 100644 index 000000000000..8944966e5175 --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Dataform + module V1 + module Dataform + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataform.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Dataform Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Dataform Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataform.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/paths.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/paths.rb index bfcc7c9d7da8..94cf7f506fab 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/paths.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/paths.rb @@ -106,6 +106,25 @@ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" end + ## + # Create a fully-qualified Folder resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/folders/{folder}` + # + # @param project [String] + # @param location [String] + # @param folder [String] + # + # @return [::String] + def folder_path project:, location:, folder: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/folders/#{folder}" + end + ## # Create a fully-qualified Location resource string. # @@ -201,6 +220,25 @@ def secret_version_path project:, secret:, version: "projects/#{project}/secrets/#{secret}/versions/#{version}" end + ## + # Create a fully-qualified TeamFolder resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/teamFolders/{team_folder}` + # + # @param project [String] + # @param location [String] + # @param team_folder [String] + # + # @return [::String] + def team_folder_path project:, location:, team_folder: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/teamFolders/#{team_folder}" + end + ## # Create a fully-qualified WorkflowConfig resource string. # diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest.rb index 9cf84e59dfc3..379f2c77916e 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest.rb @@ -25,6 +25,7 @@ require "google/cloud/dataform/v1/dataform/credentials" require "google/cloud/dataform/v1/dataform/paths" +require "google/cloud/dataform/v1/dataform/rest/operations" require "google/cloud/dataform/v1/dataform/rest/client" module Google diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/client.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/client.rb index 18df45f79914..9cb052734e05 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/client.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/client.rb @@ -149,6 +149,13 @@ def initialize @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + @operations_client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + @dataform_stub = ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, @@ -157,59 +164,1428 @@ def initialize logger: @config.logger ) - @dataform_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end + @dataform_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataform_stub.endpoint + config.universe_domain = @dataform_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @dataform_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @dataform_stub.endpoint + config.universe_domain = @dataform_stub.universe_domain + config.logger = @dataform_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Dataform::V1::Dataform::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dataform_stub.logger + end + + # Service calls + + ## + # Fetches a single TeamFolder. + # + # @overload get_team_folder(request, options = nil) + # Pass arguments to `get_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::GetTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::GetTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_team_folder(name: nil) + # Pass arguments to `get_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::GetTeamFolderRequest.new + # + # # Call the get_team_folder method. + # result = client.get_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def get_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_team_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.get_team_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new TeamFolder in a given project and location. + # + # @overload create_team_folder(request, options = nil) + # Pass arguments to `create_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::CreateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_team_folder(parent: nil, team_folder: nil) + # Pass arguments to `create_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location in which to create the TeamFolder. Must be in the + # format `projects/*/locations/*`. + # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash] + # Required. The TeamFolder to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new + # + # # Call the create_team_folder method. + # result = client.create_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def create_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_team_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.create_team_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a single TeamFolder. + # + # @overload update_team_folder(request, options = nil) + # Pass arguments to `update_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_team_folder(update_mask: nil, team_folder: nil) + # Pass arguments to `update_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields will be updated. + # @param team_folder [::Google::Cloud::Dataform::V1::TeamFolder, ::Hash] + # Required. The updated TeamFolder. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new + # + # # Call the update_team_folder method. + # result = client.update_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + # p result + # + def update_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_team_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.update_team_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single TeamFolder. + # + # @overload delete_team_folder(request, options = nil) + # Pass arguments to `delete_team_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_team_folder(name: nil) + # Pass arguments to `delete_team_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new + # + # # Call the delete_team_folder method. + # result = client.delete_team_folder request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_team_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_team_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_team_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_team_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.delete_team_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a TeamFolder with its contents (Folders, Repositories, Workspaces, + # ReleaseConfigs, and WorkflowConfigs). + # + # @overload delete_team_folder_tree(request, options = nil) + # Pass arguments to `delete_team_folder_tree` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_team_folder_tree(name: nil, force: nil) + # Pass arguments to `delete_team_folder_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The TeamFolder's name. + # Format: projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder} + # @param force [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new + # + # # Call the delete_team_folder_tree method. + # result = client.delete_team_folder_tree request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_team_folder_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_team_folder_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_team_folder_tree.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_team_folder_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.delete_team_folder_tree request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a given TeamFolder. + # + # @overload query_team_folder_contents(request, options = nil) + # Pass arguments to `query_team_folder_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_team_folder_contents(team_folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_team_folder_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param team_folder [::String] + # Required. Name of the team_folder whose contents to list. + # Format: `projects/*/locations/*/teamFolders/*`. + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryTeamFolderContents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryTeamFolderContents`, with the exception of `page_size`, must match + # the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: `display_name` (default), `create_time`, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new + # + # # Call the query_team_folder_contents method. + # result = client.query_team_folder_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry. + # p item + # end + # + def query_team_folder_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_team_folder_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_team_folder_contents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_team_folder_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.query_team_folder_contents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_team_folder_contents, "entries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all TeamFolders in a given location that the caller has access to + # and match the provided filter. + # + # @overload search_team_folders(request, options = nil) + # Pass arguments to `search_team_folders` via a request object, either of type + # {::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_team_folders(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `search_team_folders` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. Location in which to query TeamFolders. + # Format: `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. Maximum number of TeamFolders to return. The server may return + # fewer items than requested. If unspecified, the server will pick an + # appropriate default. + # @param page_token [::String] + # Optional. Page token received from a previous `SearchTeamFolders` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTeamFolders`, with the exception of `page_size`, must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Supported keywords: `display_name` (default), `create_time`, + # `last_modified_time`. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new + # + # # Call the search_team_folders method. + # result = client.search_team_folders request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult. + # p item + # end + # + def search_team_folders request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.search_team_folders.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_team_folders.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_team_folders.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.search_team_folders request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :search_team_folders, "results", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Fetches a single Folder. + # + # @overload get_folder(request, options = nil) + # Pass arguments to `get_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::GetFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::GetFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_folder(name: nil) + # Pass arguments to `get_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::GetFolderRequest.new + # + # # Call the get_folder method. + # result = client.get_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def get_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::GetFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.get_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Folder in a given project and location. + # + # @overload create_folder(request, options = nil) + # Pass arguments to `create_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::CreateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::CreateFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_folder(parent: nil, folder: nil) + # Pass arguments to `create_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The location in which to create the Folder. Must be in the format + # `projects/*/locations/*`. + # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash] + # Required. The Folder to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::CreateFolderRequest.new + # + # # Call the create_folder method. + # result = client.create_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def create_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::CreateFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.create_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a single Folder. + # + # @overload update_folder(request, options = nil) + # Pass arguments to `update_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::UpdateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::UpdateFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_folder(update_mask: nil, folder: nil) + # Pass arguments to `update_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields that can be updated, will be updated. A few fields cannot be + # updated and will be ignored if specified in the update_mask (e.g. + # parent_name, team_folder_name). + # @param folder [::Google::Cloud::Dataform::V1::Folder, ::Hash] + # Required. The updated Folder. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new + # + # # Call the update_folder method. + # result = client.update_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1::Folder. + # p result + # + def update_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::UpdateFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.update_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single Folder. + # + # @overload delete_folder(request, options = nil) + # Pass arguments to `delete_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_folder(name: nil) + # Pass arguments to `delete_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new + # + # # Call the delete_folder method. + # result = client.delete_folder request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.delete_folder request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Folder with its contents (Folders, Repositories, Workspaces, + # ReleaseConfigs, and WorkflowConfigs). + # + # @overload delete_folder_tree(request, options = nil) + # Pass arguments to `delete_folder_tree` via a request object, either of type + # {::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_folder_tree(name: nil, force: nil) + # Pass arguments to `delete_folder_tree` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The Folder's name. + # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder} + # @param force [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new + # + # # Call the delete_folder_tree method. + # result = client.delete_folder_tree request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_folder_tree request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_folder_tree.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_folder_tree.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_folder_tree.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.delete_folder_tree request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the contents of a given Folder. + # + # @overload query_folder_contents(request, options = nil) + # Pass arguments to `query_folder_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_folder_contents(folder: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_folder_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param folder [::String] + # Required. Name of the folder whose contents to list. + # Format: projects/*/locations/*/folders/* + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryFolderContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryFolderContents`, with the exception of `page_size`, must match the + # call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), create_time, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new + # + # # Call the query_folder_contents method. + # result = client.query_folder_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry. + # p item + # end + # + def query_folder_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataform_stub.endpoint - config.universe_domain = @dataform_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dataform_stub.logger if config.respond_to? :logger= - end + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @dataform_stub.endpoint - config.universe_domain = @dataform_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @dataform_stub.logger if config.respond_to? :logger= + # Customize the options with defaults + call_metadata = @config.rpcs.query_folder_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_folder_contents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_folder_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.query_folder_contents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_folder_contents, "entries", request, result, options + yield result, operation if block_given? + throw :response, result end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) end ## - # Get the associated client for mix-in of the Locations. + # Returns the contents of a caller's root folder in a given location. + # The root folder contains all resources that are created by the user and not + # contained in any other folder. # - # @return [Google::Cloud::Location::Locations::Rest::Client] + # @overload query_user_root_contents(request, options = nil) + # Pass arguments to `query_user_root_contents` via a request object, either of type + # {::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest} or an equivalent Hash. # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. + # @param request [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # @overload query_user_root_contents(location: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `query_user_root_contents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). # - attr_reader :iam_policy_client + # @param location [::String] + # Required. Location of the user root folder whose contents to list. + # Format: projects/*/locations/* + # @param page_size [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @param page_token [::String] + # Optional. Page token received from a previous `QueryUserRootContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryUserRootFolderContents`, with the exception of `page_size`, must + # match the call that provided the page token. + # @param order_by [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), created_at, + # last_modified_at. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @param filter [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new + # + # # Call the query_user_root_contents method. + # result = client.query_user_root_contents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry. + # p item + # end + # + def query_user_root_contents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.query_user_root_contents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_user_root_contents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_user_root_contents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.query_user_root_contents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_user_root_contents, "entries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end ## - # The logger used for request/response debug logging. + # Moves a Folder to a new Folder, TeamFolder, or the root location. # - # @return [Logger] + # @overload move_folder(request, options = nil) + # Pass arguments to `move_folder` via a request object, either of type + # {::Google::Cloud::Dataform::V1::MoveFolderRequest} or an equivalent Hash. # - def logger - @dataform_stub.logger - end + # @param request [::Google::Cloud::Dataform::V1::MoveFolderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload move_folder(name: nil, destination_containing_folder: nil) + # Pass arguments to `move_folder` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full resource name of the Folder to move. + # @param destination_containing_folder [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # Folder to. Can be in the format of: "" to move into the root User folder, + # `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::MoveFolderRequest.new + # + # # Call the move_folder method. + # result = client.move_folder request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def move_folder request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # Service calls + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveFolderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.move_folder.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.move_folder.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.move_folder.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.move_folder request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end ## # Lists Repositories in a given project and location. @@ -571,28 +1947,115 @@ def update_repository request, options = nil # Pass arguments to `delete_repository` via a request object, either of type # {::Google::Cloud::Dataform::V1::DeleteRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash] + # @param request [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_repository(name: nil, force: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The repository's name. + # @param force [::Boolean] + # Optional. If set to true, child resources of this repository (compilation + # results and workflow invocations) will also be deleted. Otherwise, the + # request will only succeed if the repository has no child resources. + # + # **Note:** *This flag doesn't support deletion of workspaces, release + # configs or workflow configs. If any of such resources exists in the + # repository, the request will fail.*. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_repository.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.delete_repository request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Moves a Repository to a new location. + # + # @overload move_repository(request, options = nil) + # Pass arguments to `move_repository` via a request object, either of type + # {::Google::Cloud::Dataform::V1::MoveRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1::MoveRepositoryRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload delete_repository(name: nil, force: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at + # @overload move_repository(name: nil, destination_containing_folder: nil) + # Pass arguments to `move_repository` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The repository's name. - # @param force [::Boolean] - # Optional. If set to true, any child resources of this repository will also - # be deleted. (Otherwise, the request will only succeed if the repository has - # no child resources.) + # Required. The full resource name of the repository to move. + # @param destination_containing_folder [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # repository to. Can be in the format of: "" to move into the root User + # folder, `projects/*/locations/*/folders/*`, + # `projects/*/locations/*/teamFolders/*` # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Gapic::Operation] # # @raise [::Google::Cloud::Error] if the REST call is aborted. # @@ -603,24 +2066,31 @@ def update_repository request, options = nil # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataform::V1::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result + # request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new + # + # # Call the move_repository method. + # result = client.move_repository request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end # - def delete_repository request, options = nil + def move_repository request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1::MoveRepositoryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults - call_metadata = @config.rpcs.delete_repository.metadata.to_h + call_metadata = @config.rpcs.move_repository.metadata.to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ @@ -631,16 +2101,18 @@ def delete_repository request, options = nil call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - options.apply_defaults timeout: @config.rpcs.delete_repository.timeout, + options.apply_defaults timeout: @config.rpcs.move_repository.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy + retry_policy: @config.rpcs.move_repository.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy - @dataform_stub.delete_repository request, options do |result, operation| + @dataform_stub.move_repository request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options yield result, operation if block_given? + throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) @@ -2181,7 +3653,7 @@ def fetch_file_diff request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil) + # @overload query_directory_contents(workspace: nil, path: nil, page_size: nil, page_token: nil, view: nil) # Pass arguments to `query_directory_contents` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). @@ -2202,6 +3674,11 @@ def fetch_file_diff request, options = nil # When paginating, all other parameters provided to # `QueryDirectoryContents`, with the exception of `page_size`, must match the # call that provided the page token. + # @param view [::Google::Cloud::Dataform::V1::DirectoryContentsView] + # Optional. Specifies the metadata to return for each directory entry. + # If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`. + # Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by + # CMEK-protected workspaces. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1::DirectoryEntry>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -4823,6 +6300,273 @@ def update_config request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a `NOT_FOUND` error. + # + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.test_iam_permissions request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + ## # Configuration class for the Dataform REST API. # @@ -4839,17 +6583,17 @@ def update_config request, options = nil # @example # # # Modify the global config, setting the timeout for - # # list_repositories to 20 seconds, + # # get_team_folder to 20 seconds, # # and all remaining timeouts to 10 seconds. # ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.configure do |config| # config.timeout = 10.0 - # config.rpcs.list_repositories.timeout = 20.0 + # config.rpcs.get_team_folder.timeout = 20.0 # end # # # Apply the above configuration only to a new client. # client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| # config.timeout = 10.0 - # config.rpcs.list_repositories.timeout = 20.0 + # config.rpcs.get_team_folder.timeout = 20.0 # end # # @!attribute [rw] endpoint @@ -4976,6 +6720,81 @@ def rpcs # trigger a retry. # class Rpcs + ## + # RPC-specific configuration for `get_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :get_team_folder + ## + # RPC-specific configuration for `create_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :create_team_folder + ## + # RPC-specific configuration for `update_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :update_team_folder + ## + # RPC-specific configuration for `delete_team_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_team_folder + ## + # RPC-specific configuration for `delete_team_folder_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_team_folder_tree + ## + # RPC-specific configuration for `query_team_folder_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_team_folder_contents + ## + # RPC-specific configuration for `search_team_folders` + # @return [::Gapic::Config::Method] + # + attr_reader :search_team_folders + ## + # RPC-specific configuration for `get_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :get_folder + ## + # RPC-specific configuration for `create_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :create_folder + ## + # RPC-specific configuration for `update_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :update_folder + ## + # RPC-specific configuration for `delete_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_folder + ## + # RPC-specific configuration for `delete_folder_tree` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_folder_tree + ## + # RPC-specific configuration for `query_folder_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_folder_contents + ## + # RPC-specific configuration for `query_user_root_contents` + # @return [::Gapic::Config::Method] + # + attr_reader :query_user_root_contents + ## + # RPC-specific configuration for `move_folder` + # @return [::Gapic::Config::Method] + # + attr_reader :move_folder ## # RPC-specific configuration for `list_repositories` # @return [::Gapic::Config::Method] @@ -5002,6 +6821,11 @@ class Rpcs # attr_reader :delete_repository ## + # RPC-specific configuration for `move_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :move_repository + ## # RPC-specific configuration for `commit_repository_changes` # @return [::Gapic::Config::Method] # @@ -5246,9 +7070,54 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :update_config + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions # @private def initialize parent_rpcs = nil + get_team_folder_config = parent_rpcs.get_team_folder if parent_rpcs.respond_to? :get_team_folder + @get_team_folder = ::Gapic::Config::Method.new get_team_folder_config + create_team_folder_config = parent_rpcs.create_team_folder if parent_rpcs.respond_to? :create_team_folder + @create_team_folder = ::Gapic::Config::Method.new create_team_folder_config + update_team_folder_config = parent_rpcs.update_team_folder if parent_rpcs.respond_to? :update_team_folder + @update_team_folder = ::Gapic::Config::Method.new update_team_folder_config + delete_team_folder_config = parent_rpcs.delete_team_folder if parent_rpcs.respond_to? :delete_team_folder + @delete_team_folder = ::Gapic::Config::Method.new delete_team_folder_config + delete_team_folder_tree_config = parent_rpcs.delete_team_folder_tree if parent_rpcs.respond_to? :delete_team_folder_tree + @delete_team_folder_tree = ::Gapic::Config::Method.new delete_team_folder_tree_config + query_team_folder_contents_config = parent_rpcs.query_team_folder_contents if parent_rpcs.respond_to? :query_team_folder_contents + @query_team_folder_contents = ::Gapic::Config::Method.new query_team_folder_contents_config + search_team_folders_config = parent_rpcs.search_team_folders if parent_rpcs.respond_to? :search_team_folders + @search_team_folders = ::Gapic::Config::Method.new search_team_folders_config + get_folder_config = parent_rpcs.get_folder if parent_rpcs.respond_to? :get_folder + @get_folder = ::Gapic::Config::Method.new get_folder_config + create_folder_config = parent_rpcs.create_folder if parent_rpcs.respond_to? :create_folder + @create_folder = ::Gapic::Config::Method.new create_folder_config + update_folder_config = parent_rpcs.update_folder if parent_rpcs.respond_to? :update_folder + @update_folder = ::Gapic::Config::Method.new update_folder_config + delete_folder_config = parent_rpcs.delete_folder if parent_rpcs.respond_to? :delete_folder + @delete_folder = ::Gapic::Config::Method.new delete_folder_config + delete_folder_tree_config = parent_rpcs.delete_folder_tree if parent_rpcs.respond_to? :delete_folder_tree + @delete_folder_tree = ::Gapic::Config::Method.new delete_folder_tree_config + query_folder_contents_config = parent_rpcs.query_folder_contents if parent_rpcs.respond_to? :query_folder_contents + @query_folder_contents = ::Gapic::Config::Method.new query_folder_contents_config + query_user_root_contents_config = parent_rpcs.query_user_root_contents if parent_rpcs.respond_to? :query_user_root_contents + @query_user_root_contents = ::Gapic::Config::Method.new query_user_root_contents_config + move_folder_config = parent_rpcs.move_folder if parent_rpcs.respond_to? :move_folder + @move_folder = ::Gapic::Config::Method.new move_folder_config list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories @list_repositories = ::Gapic::Config::Method.new list_repositories_config get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository @@ -5259,6 +7128,8 @@ def initialize parent_rpcs = nil @update_repository = ::Gapic::Config::Method.new update_repository_config delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository @delete_repository = ::Gapic::Config::Method.new delete_repository_config + move_repository_config = parent_rpcs.move_repository if parent_rpcs.respond_to? :move_repository + @move_repository = ::Gapic::Config::Method.new move_repository_config commit_repository_changes_config = parent_rpcs.commit_repository_changes if parent_rpcs.respond_to? :commit_repository_changes @commit_repository_changes = ::Gapic::Config::Method.new commit_repository_changes_config read_repository_file_config = parent_rpcs.read_repository_file if parent_rpcs.respond_to? :read_repository_file @@ -5357,6 +7228,12 @@ def initialize parent_rpcs = nil @get_config = ::Gapic::Config::Method.new get_config_config update_config_config = parent_rpcs.update_config if parent_rpcs.respond_to? :update_config @update_config = ::Gapic::Config::Method.new update_config_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config yield self if block_given? end diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/operations.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/operations.rb new file mode 100644 index 000000000000..1576b6fb66dd --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Dataform + module V1 + module Dataform + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "dataform.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Dataform Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Dataform Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "dataform.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb index d8a0c1d46fff..5021614a347a 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform/rest/service_stub.rb @@ -74,23 +74,23 @@ def logger stub: false end ## - # Baseline implementation for the list_repositories REST call + # Baseline implementation for the get_team_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListRepositoriesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::GetTeamFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListRepositoriesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListRepositoriesResponse] + # @return [::Google::Cloud::Dataform::V1::TeamFolder] # A result object deserialized from the server's reply - def list_repositories request_pb, options = nil + def get_team_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_get_team_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -102,11 +102,11 @@ def list_repositories request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_repositories", + method_name: "get_team_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::TeamFolder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -114,23 +114,23 @@ def list_repositories request_pb, options = nil end ## - # Baseline implementation for the get_repository REST call + # Baseline implementation for the create_team_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::Repository] + # @return [::Google::Cloud::Dataform::V1::TeamFolder] # A result object deserialized from the server's reply - def get_repository request_pb, options = nil + def create_team_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_create_team_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -142,11 +142,11 @@ def get_repository request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_repository", + method_name: "create_team_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::TeamFolder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -154,23 +154,23 @@ def get_repository request_pb, options = nil end ## - # Baseline implementation for the create_repository REST call + # Baseline implementation for the update_team_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] + # @yieldparam result [::Google::Cloud::Dataform::V1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::Repository] + # @return [::Google::Cloud::Dataform::V1::TeamFolder] # A result object deserialized from the server's reply - def create_repository request_pb, options = nil + def update_team_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_update_team_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -182,11 +182,11 @@ def create_repository request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_repository", + method_name: "update_team_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::TeamFolder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -194,23 +194,23 @@ def create_repository request_pb, options = nil end ## - # Baseline implementation for the update_repository REST call + # Baseline implementation for the delete_team_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::UpdateRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::Repository] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def update_repository request_pb, options = nil + def delete_team_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_team_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -222,11 +222,11 @@ def update_repository request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "update_repository", + method_name: "delete_team_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -234,23 +234,23 @@ def update_repository request_pb, options = nil end ## - # Baseline implementation for the delete_repository REST call + # Baseline implementation for the delete_team_folder_tree REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def delete_repository request_pb, options = nil + def delete_team_folder_tree request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_team_folder_tree_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -262,11 +262,11 @@ def delete_repository request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_repository", + method_name: "delete_team_folder_tree", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -274,23 +274,23 @@ def delete_repository request_pb, options = nil end ## - # Baseline implementation for the commit_repository_changes REST call + # Baseline implementation for the query_team_folder_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CommitRepositoryChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse] + # @return [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse] # A result object deserialized from the server's reply - def commit_repository_changes request_pb, options = nil + def query_team_folder_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_commit_repository_changes_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_query_team_folder_contents_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -302,11 +302,11 @@ def commit_repository_changes request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "commit_repository_changes", + method_name: "query_team_folder_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -314,23 +314,23 @@ def commit_repository_changes request_pb, options = nil end ## - # Baseline implementation for the read_repository_file REST call + # Baseline implementation for the search_team_folders REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ReadRepositoryFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse] + # @return [::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse] # A result object deserialized from the server's reply - def read_repository_file request_pb, options = nil + def search_team_folders request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_read_repository_file_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_search_team_folders_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -342,11 +342,11 @@ def read_repository_file request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "read_repository_file", + method_name: "search_team_folders", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -354,23 +354,23 @@ def read_repository_file request_pb, options = nil end ## - # Baseline implementation for the query_repository_directory_contents REST call + # Baseline implementation for the get_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::GetFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse] + # @return [::Google::Cloud::Dataform::V1::Folder] # A result object deserialized from the server's reply - def query_repository_directory_contents request_pb, options = nil + def get_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_query_repository_directory_contents_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_get_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -382,11 +382,11 @@ def query_repository_directory_contents request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "query_repository_directory_contents", + method_name: "get_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Folder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -394,23 +394,23 @@ def query_repository_directory_contents request_pb, options = nil end ## - # Baseline implementation for the fetch_repository_history REST call + # Baseline implementation for the create_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CreateFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse] + # @return [::Google::Cloud::Dataform::V1::Folder] # A result object deserialized from the server's reply - def fetch_repository_history request_pb, options = nil + def create_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_repository_history_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_create_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -422,11 +422,11 @@ def fetch_repository_history request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "fetch_repository_history", + method_name: "create_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Folder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -434,23 +434,23 @@ def fetch_repository_history request_pb, options = nil end ## - # Baseline implementation for the compute_repository_access_token_status REST call + # Baseline implementation for the update_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse] + # @return [::Google::Cloud::Dataform::V1::Folder] # A result object deserialized from the server's reply - def compute_repository_access_token_status request_pb, options = nil + def update_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_compute_repository_access_token_status_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_update_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -462,11 +462,11 @@ def compute_repository_access_token_status request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "compute_repository_access_token_status", + method_name: "update_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Folder.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -474,23 +474,23 @@ def compute_repository_access_token_status request_pb, options = nil end ## - # Baseline implementation for the fetch_remote_branches REST call + # Baseline implementation for the delete_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::FetchRemoteBranchesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def fetch_remote_branches request_pb, options = nil + def delete_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_remote_branches_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -502,11 +502,11 @@ def fetch_remote_branches request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "fetch_remote_branches", + method_name: "delete_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -514,23 +514,23 @@ def fetch_remote_branches request_pb, options = nil end ## - # Baseline implementation for the list_workspaces REST call + # Baseline implementation for the delete_folder_tree REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkspacesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkspacesResponse] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListWorkspacesResponse] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def list_workspaces request_pb, options = nil + def delete_folder_tree request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_workspaces_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_folder_tree_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -542,11 +542,11 @@ def list_workspaces request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_workspaces", + method_name: "delete_folder_tree", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListWorkspacesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -554,23 +554,23 @@ def list_workspaces request_pb, options = nil end ## - # Baseline implementation for the get_workspace REST call + # Baseline implementation for the query_folder_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Workspace] + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryFolderContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::Workspace] + # @return [::Google::Cloud::Dataform::V1::QueryFolderContentsResponse] # A result object deserialized from the server's reply - def get_workspace request_pb, options = nil + def query_folder_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_workspace_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_query_folder_contents_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -582,11 +582,11 @@ def get_workspace request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_workspace", + method_name: "query_folder_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Workspace.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -594,23 +594,23 @@ def get_workspace request_pb, options = nil end ## - # Baseline implementation for the create_workspace REST call + # Baseline implementation for the query_user_root_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Workspace] + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::Workspace] + # @return [::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse] # A result object deserialized from the server's reply - def create_workspace request_pb, options = nil + def query_user_root_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_workspace_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_query_user_root_contents_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -622,11 +622,11 @@ def create_workspace request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_workspace", + method_name: "query_user_root_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Workspace.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -634,23 +634,23 @@ def create_workspace request_pb, options = nil end ## - # Baseline implementation for the delete_workspace REST call + # Baseline implementation for the move_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::MoveFolderRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def delete_workspace request_pb, options = nil + def move_folder request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workspace_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_move_folder_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -662,11 +662,11 @@ def delete_workspace request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_workspace", + method_name: "move_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -674,23 +674,23 @@ def delete_workspace request_pb, options = nil end ## - # Baseline implementation for the install_npm_packages REST call + # Baseline implementation for the list_repositories REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::InstallNpmPackagesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ListRepositoriesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ListRepositoriesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse] + # @return [::Google::Cloud::Dataform::V1::ListRepositoriesResponse] # A result object deserialized from the server's reply - def install_npm_packages request_pb, options = nil + def list_repositories request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_install_npm_packages_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_list_repositories_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -702,11 +702,11 @@ def install_npm_packages request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "install_npm_packages", + method_name: "list_repositories", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -714,23 +714,23 @@ def install_npm_packages request_pb, options = nil end ## - # Baseline implementation for the pull_git_commits REST call + # Baseline implementation for the get_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::PullGitCommitsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::GetRepositoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::PullGitCommitsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::PullGitCommitsResponse] + # @return [::Google::Cloud::Dataform::V1::Repository] # A result object deserialized from the server's reply - def pull_git_commits request_pb, options = nil + def get_repository request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_pull_git_commits_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_get_repository_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -742,11 +742,11 @@ def pull_git_commits request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "pull_git_commits", + method_name: "get_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::PullGitCommitsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -754,23 +754,23 @@ def pull_git_commits request_pb, options = nil end ## - # Baseline implementation for the push_git_commits REST call + # Baseline implementation for the create_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::PushGitCommitsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CreateRepositoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::PushGitCommitsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::PushGitCommitsResponse] + # @return [::Google::Cloud::Dataform::V1::Repository] # A result object deserialized from the server's reply - def push_git_commits request_pb, options = nil + def create_repository request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_push_git_commits_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_create_repository_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -782,11 +782,11 @@ def push_git_commits request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "push_git_commits", + method_name: "create_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::PushGitCommitsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -794,23 +794,23 @@ def push_git_commits request_pb, options = nil end ## - # Baseline implementation for the fetch_file_git_statuses REST call + # Baseline implementation for the update_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::FetchFileGitStatusesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateRepositoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse] + # @return [::Google::Cloud::Dataform::V1::Repository] # A result object deserialized from the server's reply - def fetch_file_git_statuses request_pb, options = nil + def update_repository request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_file_git_statuses_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_update_repository_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -822,11 +822,11 @@ def fetch_file_git_statuses request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "fetch_file_git_statuses", + method_name: "update_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Repository.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -834,23 +834,23 @@ def fetch_file_git_statuses request_pb, options = nil end ## - # Baseline implementation for the fetch_git_ahead_behind REST call + # Baseline implementation for the delete_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::FetchGitAheadBehindRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteRepositoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def fetch_git_ahead_behind request_pb, options = nil + def delete_repository request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_ahead_behind_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_repository_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -862,11 +862,11 @@ def fetch_git_ahead_behind request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "fetch_git_ahead_behind", + method_name: "delete_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -874,23 +874,23 @@ def fetch_git_ahead_behind request_pb, options = nil end ## - # Baseline implementation for the commit_workspace_changes REST call + # Baseline implementation for the move_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::MoveRepositoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def commit_workspace_changes request_pb, options = nil + def move_repository request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_commit_workspace_changes_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_move_repository_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -902,11 +902,11 @@ def commit_workspace_changes request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "commit_workspace_changes", + method_name: "move_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -914,23 +914,23 @@ def commit_workspace_changes request_pb, options = nil end ## - # Baseline implementation for the reset_workspace_changes REST call + # Baseline implementation for the commit_repository_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CommitRepositoryChangesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse] + # @return [::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse] # A result object deserialized from the server's reply - def reset_workspace_changes request_pb, options = nil + def commit_repository_changes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_reset_workspace_changes_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_commit_repository_changes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -942,11 +942,11 @@ def reset_workspace_changes request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "reset_workspace_changes", + method_name: "commit_repository_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -954,23 +954,23 @@ def reset_workspace_changes request_pb, options = nil end ## - # Baseline implementation for the fetch_file_diff REST call + # Baseline implementation for the read_repository_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::FetchFileDiffRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ReadRepositoryFileRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::FetchFileDiffResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::FetchFileDiffResponse] + # @return [::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse] # A result object deserialized from the server's reply - def fetch_file_diff request_pb, options = nil + def read_repository_file request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_fetch_file_diff_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_read_repository_file_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -982,11 +982,11 @@ def fetch_file_diff request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "fetch_file_diff", + method_name: "read_repository_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::FetchFileDiffResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ReadRepositoryFileResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -994,23 +994,23 @@ def fetch_file_diff request_pb, options = nil end ## - # Baseline implementation for the query_directory_contents REST call + # Baseline implementation for the query_repository_directory_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse] + # @return [::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse] # A result object deserialized from the server's reply - def query_directory_contents request_pb, options = nil + def query_repository_directory_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_query_directory_contents_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_query_repository_directory_contents_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1022,11 +1022,11 @@ def query_directory_contents request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "query_directory_contents", + method_name: "query_repository_directory_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::QueryRepositoryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1034,23 +1034,23 @@ def query_directory_contents request_pb, options = nil end ## - # Baseline implementation for the search_files REST call + # Baseline implementation for the fetch_repository_history REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::SearchFilesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::SearchFilesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::SearchFilesResponse] + # @return [::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse] # A result object deserialized from the server's reply - def search_files request_pb, options = nil + def fetch_repository_history request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_search_files_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_repository_history_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1062,11 +1062,11 @@ def search_files request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "search_files", + method_name: "fetch_repository_history", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::SearchFilesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::FetchRepositoryHistoryResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1074,23 +1074,23 @@ def search_files request_pb, options = nil end ## - # Baseline implementation for the make_directory REST call + # Baseline implementation for the compute_repository_access_token_status REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::MakeDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::MakeDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::MakeDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse] # A result object deserialized from the server's reply - def make_directory request_pb, options = nil + def compute_repository_access_token_status request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_make_directory_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_compute_repository_access_token_status_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1102,11 +1102,11 @@ def make_directory request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "make_directory", + method_name: "compute_repository_access_token_status", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::MakeDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ComputeRepositoryAccessTokenStatusResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1114,23 +1114,23 @@ def make_directory request_pb, options = nil end ## - # Baseline implementation for the remove_directory REST call + # Baseline implementation for the fetch_remote_branches REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::RemoveDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::FetchRemoteBranchesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::RemoveDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::RemoveDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse] # A result object deserialized from the server's reply - def remove_directory request_pb, options = nil + def fetch_remote_branches request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_remove_directory_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_remote_branches_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1142,11 +1142,11 @@ def remove_directory request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "remove_directory", + method_name: "fetch_remote_branches", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::RemoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::FetchRemoteBranchesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1154,23 +1154,23 @@ def remove_directory request_pb, options = nil end ## - # Baseline implementation for the move_directory REST call + # Baseline implementation for the list_workspaces REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::MoveDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkspacesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::MoveDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkspacesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::MoveDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1::ListWorkspacesResponse] # A result object deserialized from the server's reply - def move_directory request_pb, options = nil + def list_workspaces request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_move_directory_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_list_workspaces_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1182,11 +1182,11 @@ def move_directory request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "move_directory", + method_name: "list_workspaces", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::MoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ListWorkspacesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1194,23 +1194,23 @@ def move_directory request_pb, options = nil end ## - # Baseline implementation for the read_file REST call + # Baseline implementation for the get_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ReadFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkspaceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ReadFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Workspace] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ReadFileResponse] + # @return [::Google::Cloud::Dataform::V1::Workspace] # A result object deserialized from the server's reply - def read_file request_pb, options = nil + def get_workspace request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_read_file_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_get_workspace_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1222,11 +1222,11 @@ def read_file request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "read_file", + method_name: "get_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ReadFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Workspace.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1234,23 +1234,23 @@ def read_file request_pb, options = nil end ## - # Baseline implementation for the remove_file REST call + # Baseline implementation for the create_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::RemoveFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkspaceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::RemoveFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::Workspace] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::RemoveFileResponse] + # @return [::Google::Cloud::Dataform::V1::Workspace] # A result object deserialized from the server's reply - def remove_file request_pb, options = nil + def create_workspace request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_remove_file_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_create_workspace_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1262,11 +1262,11 @@ def remove_file request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "remove_file", + method_name: "create_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::RemoveFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::Workspace.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1274,23 +1274,23 @@ def remove_file request_pb, options = nil end ## - # Baseline implementation for the move_file REST call + # Baseline implementation for the delete_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::MoveFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkspaceRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::MoveFileResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::MoveFileResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def move_file request_pb, options = nil + def delete_workspace request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_move_file_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workspace_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1302,11 +1302,11 @@ def move_file request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "move_file", + method_name: "delete_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::MoveFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1314,23 +1314,23 @@ def move_file request_pb, options = nil end ## - # Baseline implementation for the write_file REST call + # Baseline implementation for the install_npm_packages REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::WriteFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::InstallNpmPackagesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WriteFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WriteFileResponse] + # @return [::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse] # A result object deserialized from the server's reply - def write_file request_pb, options = nil + def install_npm_packages request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_write_file_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_install_npm_packages_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1342,11 +1342,11 @@ def write_file request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "write_file", + method_name: "install_npm_packages", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WriteFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::InstallNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1354,23 +1354,23 @@ def write_file request_pb, options = nil end ## - # Baseline implementation for the list_release_configs REST call + # Baseline implementation for the pull_git_commits REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListReleaseConfigsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::PullGitCommitsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::PullGitCommitsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse] + # @return [::Google::Cloud::Dataform::V1::PullGitCommitsResponse] # A result object deserialized from the server's reply - def list_release_configs request_pb, options = nil + def pull_git_commits request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_release_configs_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_pull_git_commits_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1382,11 +1382,11 @@ def list_release_configs request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_release_configs", + method_name: "pull_git_commits", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::PullGitCommitsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1394,23 +1394,23 @@ def list_release_configs request_pb, options = nil end ## - # Baseline implementation for the get_release_config REST call + # Baseline implementation for the push_git_commits REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::PushGitCommitsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::PushGitCommitsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1::PushGitCommitsResponse] # A result object deserialized from the server's reply - def get_release_config request_pb, options = nil + def push_git_commits request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_release_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_push_git_commits_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1422,11 +1422,11 @@ def get_release_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_release_config", + method_name: "push_git_commits", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::PushGitCommitsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1434,23 +1434,23 @@ def get_release_config request_pb, options = nil end ## - # Baseline implementation for the create_release_config REST call + # Baseline implementation for the fetch_file_git_statuses REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::FetchFileGitStatusesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse] # A result object deserialized from the server's reply - def create_release_config request_pb, options = nil + def fetch_file_git_statuses request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_release_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_file_git_statuses_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1462,11 +1462,11 @@ def create_release_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_release_config", + method_name: "fetch_file_git_statuses", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::FetchFileGitStatusesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1474,23 +1474,23 @@ def create_release_config request_pb, options = nil end ## - # Baseline implementation for the update_release_config REST call + # Baseline implementation for the fetch_git_ahead_behind REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::UpdateReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::FetchGitAheadBehindRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse] # A result object deserialized from the server's reply - def update_release_config request_pb, options = nil + def fetch_git_ahead_behind request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_update_release_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_git_ahead_behind_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1502,11 +1502,11 @@ def update_release_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "update_release_config", + method_name: "fetch_git_ahead_behind", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::FetchGitAheadBehindResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1514,23 +1514,23 @@ def update_release_config request_pb, options = nil end ## - # Baseline implementation for the delete_release_config REST call + # Baseline implementation for the commit_workspace_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::DeleteReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse] # A result object deserialized from the server's reply - def delete_release_config request_pb, options = nil + def commit_workspace_changes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_delete_release_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_commit_workspace_changes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1542,11 +1542,11 @@ def delete_release_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_release_config", + method_name: "commit_workspace_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::CommitWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1554,23 +1554,23 @@ def delete_release_config request_pb, options = nil end ## - # Baseline implementation for the list_compilation_results REST call + # Baseline implementation for the reset_workspace_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListCompilationResultsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListCompilationResultsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListCompilationResultsResponse] + # @return [::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse] # A result object deserialized from the server's reply - def list_compilation_results request_pb, options = nil + def reset_workspace_changes request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_compilation_results_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_reset_workspace_changes_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1582,11 +1582,11 @@ def list_compilation_results request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_compilation_results", + method_name: "reset_workspace_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListCompilationResultsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ResetWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1594,23 +1594,23 @@ def list_compilation_results request_pb, options = nil end ## - # Baseline implementation for the get_compilation_result REST call + # Baseline implementation for the fetch_file_diff REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetCompilationResultRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::FetchFileDiffRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::CompilationResult] + # @yieldparam result [::Google::Cloud::Dataform::V1::FetchFileDiffResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::CompilationResult] + # @return [::Google::Cloud::Dataform::V1::FetchFileDiffResponse] # A result object deserialized from the server's reply - def get_compilation_result request_pb, options = nil + def fetch_file_diff request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_compilation_result_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_fetch_file_diff_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1622,11 +1622,11 @@ def get_compilation_result request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_compilation_result", + method_name: "fetch_file_diff", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::FetchFileDiffResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1634,23 +1634,23 @@ def get_compilation_result request_pb, options = nil end ## - # Baseline implementation for the create_compilation_result REST call + # Baseline implementation for the query_directory_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateCompilationResultRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::CompilationResult] + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::CompilationResult] + # @return [::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse] # A result object deserialized from the server's reply - def create_compilation_result request_pb, options = nil + def query_directory_contents request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_compilation_result_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_query_directory_contents_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1662,11 +1662,11 @@ def create_compilation_result request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_compilation_result", + method_name: "query_directory_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::QueryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1674,23 +1674,23 @@ def create_compilation_result request_pb, options = nil end ## - # Baseline implementation for the query_compilation_result_actions REST call + # Baseline implementation for the search_files REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::SearchFilesRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::SearchFilesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse] + # @return [::Google::Cloud::Dataform::V1::SearchFilesResponse] # A result object deserialized from the server's reply - def query_compilation_result_actions request_pb, options = nil + def search_files request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_query_compilation_result_actions_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_search_files_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1702,11 +1702,11 @@ def query_compilation_result_actions request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "query_compilation_result_actions", + method_name: "search_files", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::SearchFilesResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1714,23 +1714,23 @@ def query_compilation_result_actions request_pb, options = nil end ## - # Baseline implementation for the list_workflow_configs REST call + # Baseline implementation for the make_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkflowConfigsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::MakeDirectoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::MakeDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse] + # @return [::Google::Cloud::Dataform::V1::MakeDirectoryResponse] # A result object deserialized from the server's reply - def list_workflow_configs request_pb, options = nil + def make_directory request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_configs_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_make_directory_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1742,11 +1742,11 @@ def list_workflow_configs request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_workflow_configs", + method_name: "make_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::MakeDirectoryResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1754,23 +1754,23 @@ def list_workflow_configs request_pb, options = nil end ## - # Baseline implementation for the get_workflow_config REST call + # Baseline implementation for the remove_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::RemoveDirectoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::RemoveDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1::RemoveDirectoryResponse] # A result object deserialized from the server's reply - def get_workflow_config request_pb, options = nil + def remove_directory request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_workflow_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_remove_directory_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1782,11 +1782,11 @@ def get_workflow_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_workflow_config", + method_name: "remove_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::RemoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1794,23 +1794,23 @@ def get_workflow_config request_pb, options = nil end ## - # Baseline implementation for the create_workflow_config REST call + # Baseline implementation for the move_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::MoveDirectoryRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::MoveDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1::MoveDirectoryResponse] # A result object deserialized from the server's reply - def create_workflow_config request_pb, options = nil + def move_directory request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_workflow_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_move_directory_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1822,11 +1822,11 @@ def create_workflow_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_workflow_config", + method_name: "move_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::MoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1834,23 +1834,23 @@ def create_workflow_config request_pb, options = nil end ## - # Baseline implementation for the update_workflow_config REST call + # Baseline implementation for the read_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::UpdateWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ReadFileRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1::ReadFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1::ReadFileResponse] # A result object deserialized from the server's reply - def update_workflow_config request_pb, options = nil + def read_file request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_update_workflow_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_read_file_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1862,11 +1862,11 @@ def update_workflow_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "update_workflow_config", + method_name: "read_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ReadFileResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1874,23 +1874,23 @@ def update_workflow_config request_pb, options = nil end ## - # Baseline implementation for the delete_workflow_config REST call + # Baseline implementation for the remove_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::RemoveFileRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1::RemoveFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1::RemoveFileResponse] # A result object deserialized from the server's reply - def delete_workflow_config request_pb, options = nil + def remove_file request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workflow_config_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_remove_file_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1902,11 +1902,11 @@ def delete_workflow_config request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_workflow_config", + method_name: "remove_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::RemoveFileResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1914,23 +1914,23 @@ def delete_workflow_config request_pb, options = nil end ## - # Baseline implementation for the list_workflow_invocations REST call + # Baseline implementation for the move_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::MoveFileRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::MoveFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse] + # @return [::Google::Cloud::Dataform::V1::MoveFileResponse] # A result object deserialized from the server's reply - def list_workflow_invocations request_pb, options = nil + def move_file request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_invocations_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_move_file_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1942,11 +1942,11 @@ def list_workflow_invocations request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "list_workflow_invocations", + method_name: "move_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::MoveFileResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1954,23 +1954,23 @@ def list_workflow_invocations request_pb, options = nil end ## - # Baseline implementation for the get_workflow_invocation REST call + # Baseline implementation for the write_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::WriteFileRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @yieldparam result [::Google::Cloud::Dataform::V1::WriteFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @return [::Google::Cloud::Dataform::V1::WriteFileResponse] # A result object deserialized from the server's reply - def get_workflow_invocation request_pb, options = nil + def write_file request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_get_workflow_invocation_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_write_file_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -1982,11 +1982,11 @@ def get_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "get_workflow_invocation", + method_name: "write_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::WriteFileResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -1994,23 +1994,23 @@ def get_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the create_workflow_invocation REST call + # Baseline implementation for the list_release_configs REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::ListReleaseConfigsRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @yieldparam result [::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @return [::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse] # A result object deserialized from the server's reply - def create_workflow_invocation request_pb, options = nil + def list_release_configs request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_create_workflow_invocation_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_list_release_configs_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -2022,11 +2022,11 @@ def create_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "create_workflow_invocation", + method_name: "list_release_configs", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ListReleaseConfigsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2034,23 +2034,23 @@ def create_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the delete_workflow_invocation REST call + # Baseline implementation for the get_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::GetReleaseConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] # A result object deserialized from the server's reply - def delete_workflow_invocation request_pb, options = nil + def get_release_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workflow_invocation_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_get_release_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -2062,11 +2062,11 @@ def delete_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_workflow_invocation", + method_name: "get_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2074,23 +2074,23 @@ def delete_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the cancel_workflow_invocation REST call + # Baseline implementation for the create_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::CreateReleaseConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse] + # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] # A result object deserialized from the server's reply - def cancel_workflow_invocation request_pb, options = nil + def create_release_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_workflow_invocation_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_create_release_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -2102,11 +2102,11 @@ def cancel_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "cancel_workflow_invocation", + method_name: "create_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2114,23 +2114,23 @@ def cancel_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the query_workflow_invocation_actions REST call + # Baseline implementation for the update_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateReleaseConfigRequest] # A request object representing the call parameters. Required. # @param options [::Gapic::CallOptions] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1::ReleaseConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse] + # @return [::Google::Cloud::Dataform::V1::ReleaseConfig] # A result object deserialized from the server's reply - def query_workflow_invocation_actions request_pb, options = nil + def update_release_config request_pb, options = nil raise ::ArgumentError, "request must be provided" if request_pb.nil? - verb, uri, query_string_params, body = ServiceStub.transcode_query_workflow_invocation_actions_request request_pb + verb, uri, query_string_params, body = ServiceStub.transcode_update_release_config_request request_pb query_string_params = if query_string_params.any? query_string_params.to_h { |p| p.split "=", 2 } else @@ -2142,11 +2142,51 @@ def query_workflow_invocation_actions request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "query_workflow_invocation_actions", + method_name: "update_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_release_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteReleaseConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_release_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_release_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_release_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2154,83 +2194,1125 @@ def query_workflow_invocation_actions request_pb, options = nil end ## - # Baseline implementation for the get_config REST call + # Baseline implementation for the list_compilation_results REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::ListCompilationResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::ListCompilationResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::ListCompilationResultsResponse] + # A result object deserialized from the server's reply + def list_compilation_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_compilation_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_compilation_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::ListCompilationResultsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_compilation_result REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetCompilationResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::CompilationResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::CompilationResult] + # A result object deserialized from the server's reply + def get_compilation_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_compilation_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_compilation_result", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_compilation_result REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CreateCompilationResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::CompilationResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::CompilationResult] + # A result object deserialized from the server's reply + def create_compilation_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_compilation_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_compilation_result", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_compilation_result_actions REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse] + # A result object deserialized from the server's reply + def query_compilation_result_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_compilation_result_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_compilation_result_actions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::QueryCompilationResultActionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workflow_configs REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkflowConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse] + # A result object deserialized from the server's reply + def list_workflow_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_configs_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workflow_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::ListWorkflowConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workflow_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkflowConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # A result object deserialized from the server's reply + def get_workflow_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workflow_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workflow_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_workflow_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkflowConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # A result object deserialized from the server's reply + def create_workflow_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workflow_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workflow_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workflow_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateWorkflowConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::WorkflowConfig] + # A result object deserialized from the server's reply + def update_workflow_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workflow_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workflow_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workflow_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkflowConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_workflow_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workflow_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workflow_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workflow_invocations REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse] + # A result object deserialized from the server's reply + def list_workflow_invocations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_invocations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workflow_invocations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::ListWorkflowInvocationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workflow_invocation REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetWorkflowInvocationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # A result object deserialized from the server's reply + def get_workflow_invocation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workflow_invocation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workflow_invocation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_workflow_invocation REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CreateWorkflowInvocationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::WorkflowInvocation] + # A result object deserialized from the server's reply + def create_workflow_invocation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workflow_invocation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_workflow_invocation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workflow_invocation REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteWorkflowInvocationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_workflow_invocation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workflow_invocation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workflow_invocation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_workflow_invocation REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse] + # A result object deserialized from the server's reply + def cancel_workflow_invocation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_workflow_invocation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_workflow_invocation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::CancelWorkflowInvocationResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_workflow_invocation_actions REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse] + # A result object deserialized from the server's reply + def query_workflow_invocation_actions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_workflow_invocation_actions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "query_workflow_invocation_actions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::QueryWorkflowInvocationActionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::Config] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::Config] + # A result object deserialized from the server's reply + def get_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::Config.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_config REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1::Config] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1::Config] + # A result object deserialized from the server's reply + def update_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_config_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1::Config.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_team_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetTeamFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_team_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_team_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CreateTeamFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_team_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/teamFolders", + body: "team_folder", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_team_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_team_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{team_folder.name}", + body: "team_folder", + matches: [ + ["team_folder.name", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_team_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_team_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_team_folder_tree REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_team_folder_tree_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:deleteTree", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_team_folder_contents REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_team_folder_contents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{team_folder}:queryContents", + matches: [ + ["team_folder", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_team_folders REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_team_folders_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{location}/teamFolders:search", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::GetFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::CreateFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/folders", + body: "folder", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::UpdateFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{folder.name}", + body: "folder", + matches: [ + ["folder.name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private # - # @param request_pb [::Google::Cloud::Dataform::V1::GetConfigRequest] + # GRPC transcoding helper method for the delete_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteFolderRequest] # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Config] - # @yieldparam operation [::Gapic::Rest::TransportOperation] + # GRPC transcoding helper method for the delete_folder_tree REST call # - # @return [::Google::Cloud::Dataform::V1::Config] - # A result object deserialized from the server's reply - def get_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Config.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end + # @param request_pb [::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_folder_tree_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:deleteTree", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb end ## - # Baseline implementation for the update_config REST call + # @private # - # @param request_pb [::Google::Cloud::Dataform::V1::UpdateConfigRequest] + # GRPC transcoding helper method for the query_folder_contents REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::QueryFolderContentsRequest] # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_folder_contents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{folder}:queryFolderContents", + matches: [ + ["folder", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Dataform::V1::Config] - # @yieldparam operation [::Gapic::Rest::TransportOperation] + # GRPC transcoding helper method for the query_user_root_contents REST call # - # @return [::Google::Cloud::Dataform::V1::Config] - # A result object deserialized from the server's reply - def update_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_config_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end + # @param request_pb [::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_user_root_contents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{location}:queryUserRootContents", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1::Config.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end + ## + # @private + # + # GRPC transcoding helper method for the move_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::MoveFolderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_folder_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb end ## @@ -2340,6 +3422,28 @@ def self.transcode_delete_repository_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the move_repository REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1::MoveRepositoryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_repository_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -3389,6 +4493,140 @@ def self.transcode_update_config_request request_pb ) transcoder.transcode request_pb end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform_pb.rb b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform_pb.rb index 1e5b02f61985..d0223b594bff 100644 --- a/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform_pb.rb +++ b/google-cloud-dataform-v1/lib/google/cloud/dataform/v1/dataform_pb.rb @@ -8,6 +8,9 @@ require 'google/api/client_pb' require 'google/api/field_behavior_pb' require 'google/api/resource_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' require 'google/protobuf/empty_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' @@ -15,7 +18,7 @@ require 'google/type/interval_pb' -descriptor_data = "\n\'google/cloud/dataform/v1/dataform.proto\x12\x18google.cloud.dataform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/interval.proto\"e\n\x13\x44\x61taEncryptionState\x12N\n\x14kms_key_version_name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x9e\r\n\nRepository\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12X\n\x13git_remote_settings\x18\x02 \x01(\x0b\x32\x36.google.cloud.dataform.v1.Repository.GitRemoteSettingsB\x03\xe0\x41\x01\x12\x66\n*npmrc_environment_variables_secret_version\x18\x03 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12p\n\x1fworkspace_compilation_overrides\x18\x04 \x01(\x0b\x32\x42.google.cloud.dataform.v1.Repository.WorkspaceCompilationOverridesB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x05 \x03(\x0b\x32\x30.google.cloud.dataform.v1.Repository.LabelsEntryB\x03\xe0\x41\x01\x12,\n\x1cset_authenticated_user_admin\x18\t \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04\x12\x1c\n\x0fservice_account\x18\n \x01(\tB\x03\xe0\x41\x01\x12?\n\x0ckms_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12Q\n\x15\x64\x61ta_encryption_state\x18\x0c \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xe7\x04\n\x11GitRemoteSettings\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0e\x64\x65\x66\x61ult_branch\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n#authentication_token_secret_version\x18\x03 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12v\n\x19ssh_authentication_config\x18\x05 \x01(\x0b\x32N.google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfigB\x03\xe0\x41\x01\x12_\n\x0ctoken_status\x18\x04 \x01(\x0e\x32\x42.google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatusB\x05\x18\x01\xe0\x41\x03\x1a\x94\x01\n\x17SshAuthenticationConfig\x12[\n\x1fuser_private_key_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1c\n\x0fhost_public_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"R\n\x0bTokenStatus\x12\x1c\n\x18TOKEN_STATUS_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\t\n\x05VALID\x10\x03\x1au\n\x1dWorkspaceCompilationOverrides\x12\x1d\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rschema_suffix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctable_prefix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x85\x01\xea\x41\x81\x01\n\"dataform.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}*\x0crepositories2\nrepositoryB\x14\n\x12_internal_metadata\"\xb1\x01\n\x17ListRepositoriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x18ListRepositoriesResponse\x12:\n\x0crepositories\x18\x01 \x03(\x0b\x32$.google.cloud.dataform.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"P\n\x14GetRepositoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"\xaf\x01\n\x17\x43reateRepositoryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12=\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryB\x03\xe0\x41\x02\"g\n\x17\x44\x65leteRepositoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x05\n\x1e\x43ommitRepositoryChangesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x46\n\x0f\x63ommit_metadata\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.CommitMetadataB\x03\xe0\x41\x02\x12%\n\x18required_head_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12j\n\x0f\x66ile_operations\x18\x03 \x03(\x0b\x32L.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperationsEntryB\x03\xe0\x41\x01\x1a\x9b\x02\n\rFileOperation\x12\x66\n\nwrite_file\x18\x01 \x01(\x0b\x32P.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFileH\x00\x12h\n\x0b\x64\x65lete_file\x18\x02 \x01(\x0b\x32Q.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFileH\x00\x1a\x1d\n\tWriteFile\x12\x10\n\x08\x63ontents\x18\x01 \x01(\x0c\x1a\x0c\n\nDeleteFileB\x0b\n\toperation\x1a}\n\x13\x46ileOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12U\n\x05value\x18\x02 \x01(\x0b\x32\x46.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation:\x02\x38\x01\"5\n\x1f\x43ommitRepositoryChangesResponse\x12\x12\n\ncommit_sha\x18\x01 \x01(\t\"\x81\x01\n\x19ReadRepositoryFileRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x17\n\ncommit_sha\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\".\n\x1aReadRepositoryFileResponse\x12\x10\n\x08\x63ontents\x18\x01 \x01(\x0c\"\xc0\x01\n\'QueryRepositoryDirectoryContentsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x17\n\ncommit_sha\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n(QueryRepositoryDirectoryContentsResponse\x12\x43\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.DirectoryEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1d\x46\x65tchRepositoryHistoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x1e\x46\x65tchRepositoryHistoryResponse\x12\x39\n\x07\x63ommits\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.CommitLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x0e\x43ommitLogEntry\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ncommit_sha\x18\x02 \x01(\t\x12\x36\n\x06\x61uthor\x18\x03 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthor\x12\x16\n\x0e\x63ommit_message\x18\x04 \x01(\t\"j\n\x0e\x43ommitMetadata\x12;\n\x06\x61uthor\x18\x01 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\x12\x1b\n\x0e\x63ommit_message\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n)ComputeRepositoryAccessTokenStatusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"\xe8\x01\n*ComputeRepositoryAccessTokenStatusResponse\x12\x66\n\x0ctoken_status\x18\x01 \x01(\x0e\x32P.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus\"R\n\x0bTokenStatus\x12\x1c\n\x18TOKEN_STATUS_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\t\n\x05VALID\x10\x03\"V\n\x1a\x46\x65tchRemoteBranchesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"/\n\x1b\x46\x65tchRemoteBranchesResponse\x12\x10\n\x08\x62ranches\x18\x01 \x03(\t\"\xfd\x02\n\tWorkspace\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x15\x64\x61ta_encryption_state\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:\x98\x01\xea\x41\x94\x01\n!dataform.googleapis.com/Workspace\x12Xprojects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}*\nworkspaces2\tworkspaceB\x14\n\x12_internal_metadata\"\xb0\x01\n\x15ListWorkspacesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x16ListWorkspacesResponse\x12\x37\n\nworkspaces\x18\x01 \x03(\x0b\x32#.google.cloud.dataform.v1.Workspace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x13GetWorkspaceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\xac\x01\n\x16\x43reateWorkspaceRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12;\n\tworkspace\x18\x02 \x01(\x0b\x32#.google.cloud.dataform.v1.WorkspaceB\x03\xe0\x41\x02\x12\x19\n\x0cworkspace_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x16\x44\x65leteWorkspaceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"=\n\x0c\x43ommitAuthor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\remail_address\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x15PullGitCommitsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\x06\x61uthor\x18\x03 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\"\x18\n\x16PullGitCommitsResponse\"l\n\x15PushGitCommitsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x18\n\x16PushGitCommitsResponse\"V\n\x1b\x46\x65tchFileGitStatusesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\xf7\x02\n\x1c\x46\x65tchFileGitStatusesResponse\x12n\n\x18uncommitted_file_changes\x18\x01 \x03(\x0b\x32L.google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange\x1a\xe6\x01\n\x15UncommittedFileChange\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x66\n\x05state\x18\x02 \x01(\x0e\x32R.google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.StateB\x03\xe0\x41\x03\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07\x44\x45LETED\x10\x02\x12\x0c\n\x08MODIFIED\x10\x03\x12\x11\n\rHAS_CONFLICTS\x10\x04\"q\n\x1a\x46\x65tchGitAheadBehindRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\"L\n\x1b\x46\x65tchGitAheadBehindResponse\x12\x15\n\rcommits_ahead\x18\x01 \x01(\x05\x12\x16\n\x0e\x63ommits_behind\x18\x02 \x01(\x05\"\xc6\x01\n\x1d\x43ommitWorkspaceChangesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12;\n\x06\x61uthor\x18\x04 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\x12\x1b\n\x0e\x63ommit_message\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x03 \x03(\tB\x03\xe0\x41\x01\" \n\x1e\x43ommitWorkspaceChangesResponse\"\x7f\n\x1cResetWorkspaceChangesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x12\n\x05paths\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63lean\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x1f\n\x1dResetWorkspaceChangesResponse\"g\n\x14\x46\x65tchFileDiffRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"/\n\x15\x46\x65tchFileDiffResponse\x12\x16\n\x0e\x66ormatted_diff\x18\x01 \x01(\t\"\xa1\x01\n\x1dQueryDirectoryContentsRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x1eQueryDirectoryContentsResponse\x12\x43\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.DirectoryEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\">\n\x0e\x44irectoryEntry\x12\x0e\n\x04\x66ile\x18\x01 \x01(\tH\x00\x12\x13\n\tdirectory\x18\x02 \x01(\tH\x00\x42\x07\n\x05\x65ntry\"\x98\x01\n\x12SearchFilesRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"s\n\x13SearchFilesResponse\x12>\n\x0esearch_results\x18\x01 \x03(\x0b\x32&.google.cloud.dataform.v1.SearchResult\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x0cSearchResult\x12:\n\x04\x66ile\x18\x01 \x01(\x0b\x32*.google.cloud.dataform.v1.FileSearchResultH\x00\x12\x44\n\tdirectory\x18\x02 \x01(\x0b\x32/.google.cloud.dataform.v1.DirectorySearchResultH\x00\x42\x07\n\x05\x65ntry\" \n\x10\x46ileSearchResult\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\x15\x44irectorySearchResult\x12\x0c\n\x04path\x18\x01 \x01(\t\"g\n\x14MakeDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15MakeDirectoryResponse\"i\n\x16RemoveDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x19\n\x17RemoveDirectoryResponse\"~\n\x14MoveDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08new_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15MoveDirectoryResponse\"y\n\x0fReadFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x03 \x01(\tB\x03\xe0\x41\x01\")\n\x10ReadFileResponse\x12\x15\n\rfile_contents\x18\x01 \x01(\x0c\"d\n\x11RemoveFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x14\n\x12RemoveFileResponse\"y\n\x0fMoveFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08new_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x12\n\x10MoveFileResponse\"z\n\x10WriteFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x63ontents\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\x13\n\x11WriteFileResponse\"Y\n\x19InstallNpmPackagesRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\x1c\n\x1aInstallNpmPackagesResponse\"\xe7\x06\n\rReleaseConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rgit_commitish\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x63ode_compilation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1.CodeCompilationConfigB\x03\xe0\x41\x01\x12\x1a\n\rcron_schedule\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12m\n recent_scheduled_release_records\x18\x05 \x03(\x0b\x32>.google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecordB\x03\xe0\x41\x03\x12U\n\x1arelease_compilation_result\x18\x06 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12\x15\n\x08\x64isabled\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x11internal_metadata\x18\t \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xd3\x01\n\x16ScheduledReleaseRecord\x12L\n\x12\x63ompilation_result\x18\x02 \x01(\tB.\xfa\x41+\n)dataform.googleapis.com/CompilationResultH\x00\x12*\n\x0c\x65rror_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x35\n\x0crelease_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x08\n\x06result:\xad\x01\xea\x41\xa9\x01\n%dataform.googleapis.com/ReleaseConfig\x12\x61projects/{project}/locations/{location}/repositories/{repository}/releaseConfigs/{release_config}*\x0ereleaseConfigs2\rreleaseConfigB\x14\n\x12_internal_metadata\"\x88\x01\n\x19ListReleaseConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x1aListReleaseConfigsResponse\x12@\n\x0frelease_configs\x18\x01 \x03(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x17GetReleaseConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\"\xbe\x01\n\x1a\x43reateReleaseConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x44\n\x0erelease_config\x18\x02 \x01(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfigB\x03\xe0\x41\x02\x12\x1e\n\x11release_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x98\x01\n\x1aUpdateReleaseConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x44\n\x0erelease_config\x18\x02 \x01(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfigB\x03\xe0\x41\x02\"Y\n\x1a\x44\x65leteReleaseConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\"\xef\x07\n\x11\x43ompilationResult\x12\x1c\n\rgit_commitish\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12>\n\tworkspace\x18\x03 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!dataform.googleapis.com/WorkspaceH\x00\x12G\n\x0erelease_config\x18\x07 \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12U\n\x17\x63ode_compilation_config\x18\x04 \x01(\x0b\x32/.google.cloud.dataform.v1.CodeCompilationConfigB\x03\xe0\x41\x05\x12$\n\x17resolved_git_commit_sha\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x64\x61taform_core_version\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12]\n\x12\x63ompilation_errors\x18\x06 \x03(\x0b\x32<.google.cloud.dataform.v1.CompilationResult.CompilationErrorB\x03\xe0\x41\x03\x12Q\n\x15\x64\x61ta_encryption_state\x18\t \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x1a\x8d\x01\n\x10\x43ompilationError\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05stack\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12<\n\raction_target\x18\x04 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03:\xc1\x01\xea\x41\xbd\x01\n)dataform.googleapis.com/CompilationResult\x12iprojects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}*\x12\x63ompilationResults2\x11\x63ompilationResultB\x08\n\x06sourceB\x14\n\x12_internal_metadata\"\xee\x03\n\x15\x43odeCompilationConfig\x12\x1d\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_schema\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_location\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ssertion_schema\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x04vars\x18\x04 \x03(\x0b\x32\x39.google.cloud.dataform.v1.CodeCompilationConfig.VarsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x64\x61tabase_suffix\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rschema_suffix\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctable_prefix\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1d\x62uiltin_assertion_name_prefix\x18\n \x01(\tB\x03\xe0\x41\x01\x12_\n default_notebook_runtime_options\x18\t \x01(\x0b\x32\x30.google.cloud.dataform.v1.NotebookRuntimeOptionsB\x03\xe0\x41\x01\x1a+\n\tVarsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb6\x01\n\x16NotebookRuntimeOptions\x12 \n\x11gcs_output_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12h\n%ai_platform_notebook_runtime_template\x18\x02 \x01(\tB9\xe0\x41\x01\xfa\x41\x33\n1aiplatform.googleapis.com/NotebookRuntimeTemplateB\x10\n\x0e\x65xecution_sink\"\xb8\x01\n\x1dListCompilationResultsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1eListCompilationResultsResponse\x12H\n\x13\x63ompilation_results\x18\x01 \x03(\x0b\x32+.google.cloud.dataform.v1.CompilationResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"^\n\x1bGetCompilationResultRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dataform.googleapis.com/CompilationResult\"\xaa\x01\n\x1e\x43reateCompilationResultRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12L\n\x12\x63ompilation_result\x18\x02 \x01(\x0b\x32+.google.cloud.dataform.v1.CompilationResultB\x03\xe0\x41\x02\"G\n\x06Target\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06schema\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe0\x02\n\x12RelationDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12N\n\x07\x63olumns\x18\x02 \x03(\x0b\x32=.google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor\x12Y\n\x0f\x62igquery_labels\x18\x03 \x03(\x0b\x32@.google.cloud.dataform.v1.RelationDescriptor.BigqueryLabelsEntry\x1aS\n\x10\x43olumnDescriptor\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1c\n\x14\x62igquery_policy_tags\x18\x03 \x03(\t\x1a\x35\n\x13\x42igqueryLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xba\x1b\n\x17\x43ompilationResultAction\x12N\n\x08relation\x18\x04 \x01(\x0b\x32:.google.cloud.dataform.v1.CompilationResultAction.RelationH\x00\x12R\n\noperations\x18\x05 \x01(\x0b\x32<.google.cloud.dataform.v1.CompilationResultAction.OperationsH\x00\x12P\n\tassertion\x18\x06 \x01(\x0b\x32;.google.cloud.dataform.v1.CompilationResultAction.AssertionH\x00\x12T\n\x0b\x64\x65\x63laration\x18\x07 \x01(\x0b\x32=.google.cloud.dataform.v1.CompilationResultAction.DeclarationH\x00\x12N\n\x08notebook\x18\x08 \x01(\x0b\x32:.google.cloud.dataform.v1.CompilationResultAction.NotebookH\x00\x12]\n\x10\x64\x61ta_preparation\x18\t \x01(\x0b\x32\x41.google.cloud.dataform.v1.CompilationResultAction.DataPreparationH\x00\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12:\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12#\n\x11internal_metadata\x18\n \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x1a\xc5\x08\n\x08Relation\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12I\n\x13relation_descriptor\x18\x04 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x12^\n\rrelation_type\x18\x05 \x01(\x0e\x32G.google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType\x12\x14\n\x0cselect_query\x18\x06 \x01(\t\x12\x16\n\x0epre_operations\x18\x07 \x03(\t\x12\x17\n\x0fpost_operations\x18\x08 \x03(\t\x12s\n\x18incremental_table_config\x18\t \x01(\x0b\x32Q.google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig\x12\x1c\n\x14partition_expression\x18\n \x01(\t\x12\x1b\n\x13\x63luster_expressions\x18\x0b \x03(\t\x12!\n\x19partition_expiration_days\x18\x0c \x01(\x05\x12 \n\x18require_partition_filter\x18\r \x01(\x08\x12m\n\x12\x61\x64\x64itional_options\x18\x0e \x03(\x0b\x32Q.google.cloud.dataform.v1.CompilationResultAction.Relation.AdditionalOptionsEntry\x1a\xd8\x01\n\x16IncrementalTableConfig\x12 \n\x18incremental_select_query\x18\x01 \x01(\t\x12\x18\n\x10refresh_disabled\x18\x02 \x01(\x08\x12\x18\n\x10unique_key_parts\x18\x03 \x03(\t\x12\x1f\n\x17update_partition_filter\x18\x04 \x01(\t\x12\"\n\x1aincremental_pre_operations\x18\x05 \x03(\t\x12#\n\x1bincremental_post_operations\x18\x06 \x03(\t\x1a\x38\n\x16\x41\x64\x64itionalOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x0cRelationType\x12\x1d\n\x19RELATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x08\n\x04VIEW\x10\x02\x12\x15\n\x11INCREMENTAL_TABLE\x10\x03\x12\x15\n\x11MATERIALIZED_VIEW\x10\x04\x1a\xda\x01\n\nOperations\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12I\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x12\x0f\n\x07queries\x18\x04 \x03(\t\x12\x12\n\nhas_output\x18\x05 \x01(\x08\x1a\x83\x02\n\tAssertion\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x37\n\rparent_action\x18\x05 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x14\n\x0cselect_query\x18\x04 \x01(\t\x12I\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x1aX\n\x0b\x44\x65\x63laration\x12I\n\x13relation_descriptor\x18\x01 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x1az\n\x08Notebook\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x03 \x01(\t\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xa7\x04\n\x0f\x44\x61taPreparation\x12\x17\n\rcontents_yaml\x18\x05 \x01(\tH\x00\x12g\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32O.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinitionH\x00\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xcd\x01\n\rSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12\x61\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32L.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable\x12J\n\x04load\x18\x03 \x01(\x0b\x32<.google.cloud.dataform.v1.CompilationResultAction.LoadConfig\x1aV\n\nErrorTable\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x42\x0c\n\ndefinition\x1a\xf0\x02\n\nLoadConfig\x12S\n\x07replace\x18\x01 \x01(\x0b\x32@.google.cloud.dataform.v1.CompilationResultAction.SimpleLoadModeH\x00\x12R\n\x06\x61ppend\x18\x02 \x01(\x0b\x32@.google.cloud.dataform.v1.CompilationResultAction.SimpleLoadModeH\x00\x12X\n\x07maximum\x18\x03 \x01(\x0b\x32\x45.google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadModeH\x00\x12W\n\x06unique\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadModeH\x00\x42\x06\n\x04mode\x1a\x10\n\x0eSimpleLoadMode\x1a%\n\x13IncrementalLoadMode\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\tB\x11\n\x0f\x63ompiled_objectB\x14\n\x12_internal_metadata\"\xad\x01\n$QueryCompilationResultActionsRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n%QueryCompilationResultActionsResponse\x12U\n\x1a\x63ompilation_result_actions\x18\x01 \x03(\x0b\x32\x31.google.cloud.dataform.v1.CompilationResultAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x07\n\x0eWorkflowConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0erelease_config\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\x12J\n\x11invocation_config\x18\x03 \x01(\x0b\x32*.google.cloud.dataform.v1.InvocationConfigB\x03\xe0\x41\x01\x12\x1a\n\rcron_schedule\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12r\n\"recent_scheduled_execution_records\x18\x05 \x03(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecordB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xd9\x01\n\x18ScheduledExecutionRecord\x12N\n\x13workflow_invocation\x18\x02 \x01(\tB/\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocationH\x00\x12*\n\x0c\x65rror_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x37\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x08\n\x06result:\xb2\x01\xea\x41\xae\x01\n&dataform.googleapis.com/WorkflowConfig\x12\x63projects/{project}/locations/{location}/repositories/{repository}/workflowConfigs/{workflow_config}*\x0fworkflowConfigs2\x0eworkflowConfigB\x14\n\x12_internal_metadata\"\xa0\x02\n\x10InvocationConfig\x12?\n\x10included_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x01\x12\x1a\n\rincluded_tags\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12-\n transitive_dependencies_included\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1etransitive_dependents_included\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x35\n(fully_refresh_incremental_tables_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x89\x01\n\x1aListWorkflowConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x1bListWorkflowConfigsResponse\x12\x42\n\x10workflow_configs\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x18GetWorkflowConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dataform.googleapis.com/WorkflowConfig\"\xc2\x01\n\x1b\x43reateWorkflowConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x46\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfigB\x03\xe0\x41\x02\x12\x1f\n\x12workflow_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9b\x01\n\x1bUpdateWorkflowConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x46\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfigB\x03\xe0\x41\x02\"[\n\x1b\x44\x65leteWorkflowConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dataform.googleapis.com/WorkflowConfig\"\xb9\x07\n\x12WorkflowInvocation\x12O\n\x12\x63ompilation_result\x18\x02 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)dataform.googleapis.com/CompilationResultH\x00\x12I\n\x0fworkflow_config\x18\x06 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&dataform.googleapis.com/WorkflowConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12J\n\x11invocation_config\x18\x03 \x01(\x0b\x32*.google.cloud.dataform.v1.InvocationConfigB\x03\xe0\x41\x05\x12\x46\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.dataform.v1.WorkflowInvocation.StateB\x03\xe0\x41\x03\x12\x35\n\x11invocation_timing\x18\x05 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12V\n\x1bresolved_compilation_result\x18\x07 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12Q\n\x15\x64\x61ta_encryption_state\x18\x08 \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tCANCELING\x10\x05:\xc6\x01\xea\x41\xc2\x01\n*dataform.googleapis.com/WorkflowInvocation\x12kprojects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}*\x13workflowInvocations2\x12workflowInvocationB\x14\n\x12\x63ompilation_sourceB\x14\n\x12_internal_metadata\"\xb9\x01\n\x1eListWorkflowInvocationsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n\x1fListWorkflowInvocationsResponse\x12J\n\x14workflow_invocations\x18\x01 \x03(\x0b\x32,.google.cloud.dataform.v1.WorkflowInvocation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"`\n\x1cGetWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"\xad\x01\n\x1f\x43reateWorkflowInvocationRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12N\n\x13workflow_invocation\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1.WorkflowInvocationB\x03\xe0\x41\x02\"c\n\x1f\x44\x65leteWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"c\n\x1f\x43\x61ncelWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"\"\n CancelWorkflowInvocationResponse\"\x9b\x10\n\x18WorkflowInvocationAction\x12\x61\n\x0f\x62igquery_action\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryActionB\x03\xe0\x41\x03H\x00\x12\x61\n\x0fnotebook_action\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowInvocationAction.NotebookActionB\x03\xe0\x41\x03H\x00\x12p\n\x17\x64\x61ta_preparation_action\x18\t \x01(\x0b\x32H.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationActionB\x03\xe0\x41\x03H\x00\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03\x12?\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03\x12L\n\x05state\x18\x04 \x01(\x0e\x32\x38.google.cloud.dataform.v1.WorkflowInvocationAction.StateB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x11invocation_timing\x18\x05 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\n \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x1a>\n\x0e\x42igQueryAction\x12\x17\n\nsql_script\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a<\n\x0eNotebookAction\x12\x15\n\x08\x63ontents\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x81\t\n\x15\x44\x61taPreparationAction\x12\x1c\n\rcontents_yaml\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12t\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32\\.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinitionH\x00\x12\x1a\n\rgenerated_sql\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x84\x02\n\x13\x41\x63tionSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12n\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32Y.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable\x12n\n\x0bload_config\x18\x03 \x01(\x0b\x32Y.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig\x1a\\\n\x10\x41\x63tionErrorTable\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x1a\xea\x03\n\x10\x41\x63tionLoadConfig\x12p\n\x07replace\x18\x01 \x01(\x0b\x32].google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12o\n\x06\x61ppend\x18\x02 \x01(\x0b\x32].google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12u\n\x07maximum\x18\x03 \x01(\x0b\x32\x62.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x12t\n\x06unique\x18\x04 \x01(\x0b\x32\x62.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x42\x06\n\x04mode\x1a\x16\n\x14\x41\x63tionSimpleLoadMode\x1a+\n\x19\x41\x63tionIncrementalLoadMode\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\tB\x0c\n\ndefinition\"f\n\x05State\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0b\n\x07SKIPPED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\r\n\tCANCELLED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x42\x08\n\x06\x61\x63tionB\x14\n\x12_internal_metadata\"\x9a\x01\n%QueryWorkflowInvocationActionsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n&QueryWorkflowInvocationActionsResponse\x12W\n\x1bworkflow_invocation_actions\x18\x01 \x03(\x0b\x32\x32.google.cloud.dataform.v1.WorkflowInvocationAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xca\x01\n\x06\x43onfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12G\n\x14\x64\x65\x66\x61ult_kms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey:d\xea\x41\x61\n\x1e\x64\x61taform.googleapis.com/Config\x12.projects/{project}/locations/{location}/config*\x07\x63onfigs2\x06\x63onfig\"H\n\x10GetConfigRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Config\"\x82\x01\n\x13UpdateConfigRequest\x12\x35\n\x06\x63onfig\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.ConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\x8b[\n\x08\x44\x61taform\x12\xbc\x01\n\x10ListRepositories\x12\x31.google.cloud.dataform.v1.ListRepositoriesRequest\x1a\x32.google.cloud.dataform.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xa6\x01\n\rGetRepository\x12..google.cloud.dataform.v1.GetRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xd3\x01\n\x10\x43reateRepository\x12\x31.google.cloud.dataform.v1.CreateRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"f\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xd5\x01\n\x10UpdateRepository\x12\x31.google.cloud.dataform.v1.UpdateRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x9e\x01\n\x10\x44\x65leteRepository\x12\x31.google.cloud.dataform.v1.DeleteRepositoryRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xd2\x01\n\x17\x43ommitRepositoryChanges\x12\x38.google.cloud.dataform.v1.CommitRepositoryChangesRequest\x1a\x39.google.cloud.dataform.v1.CommitRepositoryChangesResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/repositories/*}:commit:\x01*\x12\xc2\x01\n\x12ReadRepositoryFile\x12\x33.google.cloud.dataform.v1.ReadRepositoryFileRequest\x1a\x34.google.cloud.dataform.v1.ReadRepositoryFileResponse\"A\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*}:readFile\x12\xfa\x01\n QueryRepositoryDirectoryContents\x12\x41.google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest\x1a\x42.google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents\x12\xd2\x01\n\x16\x46\x65tchRepositoryHistory\x12\x37.google.cloud.dataform.v1.FetchRepositoryHistoryRequest\x1a\x38.google.cloud.dataform.v1.FetchRepositoryHistoryResponse\"E\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/repositories/*}:fetchHistory\x12\x82\x02\n\"ComputeRepositoryAccessTokenStatus\x12\x43.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest\x1a\x44.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus\x12\xd0\x01\n\x13\x46\x65tchRemoteBranches\x12\x34.google.cloud.dataform.v1.FetchRemoteBranchesRequest\x1a\x35.google.cloud.dataform.v1.FetchRemoteBranchesResponse\"L\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches\x12\xc3\x01\n\x0eListWorkspaces\x12/.google.cloud.dataform.v1.ListWorkspacesRequest\x1a\x30.google.cloud.dataform.v1.ListWorkspacesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/repositories/*}/workspaces\x12\xb0\x01\n\x0cGetWorkspace\x12-.google.cloud.dataform.v1.GetWorkspaceRequest\x1a#.google.cloud.dataform.v1.Workspace\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xda\x01\n\x0f\x43reateWorkspace\x12\x30.google.cloud.dataform.v1.CreateWorkspaceRequest\x1a#.google.cloud.dataform.v1.Workspace\"p\xda\x41\x1dparent,workspace,workspace_id\x82\xd3\xe4\x93\x02J\"=/v1/{parent=projects/*/locations/*/repositories/*}/workspaces:\tworkspace\x12\xa9\x01\n\x0f\x44\x65leteWorkspace\x12\x30.google.cloud.dataform.v1.DeleteWorkspaceRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xe1\x01\n\x12InstallNpmPackages\x12\x33.google.cloud.dataform.v1.InstallNpmPackagesRequest\x1a\x34.google.cloud.dataform.v1.InstallNpmPackagesResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages:\x01*\x12\xc2\x01\n\x0ePullGitCommits\x12/.google.cloud.dataform.v1.PullGitCommitsRequest\x1a\x30.google.cloud.dataform.v1.PullGitCommitsResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull:\x01*\x12\xc2\x01\n\x0ePushGitCommits\x12/.google.cloud.dataform.v1.PushGitCommitsRequest\x1a\x30.google.cloud.dataform.v1.PushGitCommitsResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push:\x01*\x12\xe1\x01\n\x14\x46\x65tchFileGitStatuses\x12\x35.google.cloud.dataform.v1.FetchFileGitStatusesRequest\x1a\x36.google.cloud.dataform.v1.FetchFileGitStatusesResponse\"Z\x82\xd3\xe4\x93\x02T\x12R/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses\x12\xdd\x01\n\x13\x46\x65tchGitAheadBehind\x12\x34.google.cloud.dataform.v1.FetchGitAheadBehindRequest\x1a\x35.google.cloud.dataform.v1.FetchGitAheadBehindResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind\x12\xdc\x01\n\x16\x43ommitWorkspaceChanges\x12\x37.google.cloud.dataform.v1.CommitWorkspaceChangesRequest\x1a\x38.google.cloud.dataform.v1.CommitWorkspaceChangesResponse\"O\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit:\x01*\x12\xd8\x01\n\x15ResetWorkspaceChanges\x12\x36.google.cloud.dataform.v1.ResetWorkspaceChangesRequest\x1a\x37.google.cloud.dataform.v1.ResetWorkspaceChangesResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset:\x01*\x12\xca\x01\n\rFetchFileDiff\x12..google.cloud.dataform.v1.FetchFileDiffRequest\x1a/.google.cloud.dataform.v1.FetchFileDiffResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff\x12\xee\x01\n\x16QueryDirectoryContents\x12\x37.google.cloud.dataform.v1.QueryDirectoryContentsRequest\x1a\x38.google.cloud.dataform.v1.QueryDirectoryContentsResponse\"a\x82\xd3\xe4\x93\x02[\x12Y/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents\x12\xc2\x01\n\x0bSearchFiles\x12,.google.cloud.dataform.v1.SearchFilesRequest\x1a-.google.cloud.dataform.v1.SearchFilesResponse\"V\x82\xd3\xe4\x93\x02P\x12N/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:searchFiles\x12\xcd\x01\n\rMakeDirectory\x12..google.cloud.dataform.v1.MakeDirectoryRequest\x1a/.google.cloud.dataform.v1.MakeDirectoryResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory:\x01*\x12\xd5\x01\n\x0fRemoveDirectory\x12\x30.google.cloud.dataform.v1.RemoveDirectoryRequest\x1a\x31.google.cloud.dataform.v1.RemoveDirectoryResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory:\x01*\x12\xcd\x01\n\rMoveDirectory\x12..google.cloud.dataform.v1.MoveDirectoryRequest\x1a/.google.cloud.dataform.v1.MoveDirectoryResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory:\x01*\x12\xb6\x01\n\x08ReadFile\x12).google.cloud.dataform.v1.ReadFileRequest\x1a*.google.cloud.dataform.v1.ReadFileResponse\"S\x82\xd3\xe4\x93\x02M\x12K/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile\x12\xc1\x01\n\nRemoveFile\x12+.google.cloud.dataform.v1.RemoveFileRequest\x1a,.google.cloud.dataform.v1.RemoveFileResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile:\x01*\x12\xb9\x01\n\x08MoveFile\x12).google.cloud.dataform.v1.MoveFileRequest\x1a*.google.cloud.dataform.v1.MoveFileResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile:\x01*\x12\xbd\x01\n\tWriteFile\x12*.google.cloud.dataform.v1.WriteFileRequest\x1a+.google.cloud.dataform.v1.WriteFileResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile:\x01*\x12\xd3\x01\n\x12ListReleaseConfigs\x12\x33.google.cloud.dataform.v1.ListReleaseConfigsRequest\x1a\x34.google.cloud.dataform.v1.ListReleaseConfigsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs\x12\xc0\x01\n\x10GetReleaseConfig\x12\x31.google.cloud.dataform.v1.GetReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xfa\x01\n\x13\x43reateReleaseConfig\x12\x34.google.cloud.dataform.v1.CreateReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"\x83\x01\xda\x41\'parent,release_config,release_config_id\x82\xd3\xe4\x93\x02S\"A/v1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs:\x0erelease_config\x12\xfc\x01\n\x13UpdateReleaseConfig\x12\x34.google.cloud.dataform.v1.UpdateReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"\x85\x01\xda\x41\x1arelease_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32P/v1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}:\x0erelease_config\x12\xb5\x01\n\x13\x44\x65leteReleaseConfig\x12\x34.google.cloud.dataform.v1.DeleteReleaseConfigRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xe3\x01\n\x16ListCompilationResults\x12\x37.google.cloud.dataform.v1.ListCompilationResultsRequest\x1a\x38.google.cloud.dataform.v1.ListCompilationResultsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1/{parent=projects/*/locations/*/repositories/*}/compilationResults\x12\xd0\x01\n\x14GetCompilationResult\x12\x35.google.cloud.dataform.v1.GetCompilationResultRequest\x1a+.google.cloud.dataform.v1.CompilationResult\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/repositories/*/compilationResults/*}\x12\xff\x01\n\x17\x43reateCompilationResult\x12\x38.google.cloud.dataform.v1.CreateCompilationResultRequest\x1a+.google.cloud.dataform.v1.CompilationResult\"}\xda\x41\x19parent,compilation_result\x82\xd3\xe4\x93\x02[\"E/v1/{parent=projects/*/locations/*/repositories/*}/compilationResults:\x12\x63ompilation_result\x12\xf5\x01\n\x1dQueryCompilationResultActions\x12>.google.cloud.dataform.v1.QueryCompilationResultActionsRequest\x1a?.google.cloud.dataform.v1.QueryCompilationResultActionsResponse\"S\x82\xd3\xe4\x93\x02M\x12K/v1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query\x12\xd7\x01\n\x13ListWorkflowConfigs\x12\x34.google.cloud.dataform.v1.ListWorkflowConfigsRequest\x1a\x35.google.cloud.dataform.v1.ListWorkflowConfigsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs\x12\xc4\x01\n\x11GetWorkflowConfig\x12\x32.google.cloud.dataform.v1.GetWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\x81\x02\n\x14\x43reateWorkflowConfig\x12\x35.google.cloud.dataform.v1.CreateWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"\x87\x01\xda\x41)parent,workflow_config,workflow_config_id\x82\xd3\xe4\x93\x02U\"B/v1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs:\x0fworkflow_config\x12\x83\x02\n\x14UpdateWorkflowConfig\x12\x35.google.cloud.dataform.v1.UpdateWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"\x89\x01\xda\x41\x1bworkflow_config,update_mask\x82\xd3\xe4\x93\x02\x65\x32R/v1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}:\x0fworkflow_config\x12\xb8\x01\n\x14\x44\x65leteWorkflowConfig\x12\x35.google.cloud.dataform.v1.DeleteWorkflowConfigRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\xe7\x01\n\x17ListWorkflowInvocations\x12\x38.google.cloud.dataform.v1.ListWorkflowInvocationsRequest\x1a\x39.google.cloud.dataform.v1.ListWorkflowInvocationsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations\x12\xd4\x01\n\x15GetWorkflowInvocation\x12\x36.google.cloud.dataform.v1.GetWorkflowInvocationRequest\x1a,.google.cloud.dataform.v1.WorkflowInvocation\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\x86\x02\n\x18\x43reateWorkflowInvocation\x12\x39.google.cloud.dataform.v1.CreateWorkflowInvocationRequest\x1a,.google.cloud.dataform.v1.WorkflowInvocation\"\x80\x01\xda\x41\x1aparent,workflow_invocation\x82\xd3\xe4\x93\x02]\"F/v1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations:\x13workflow_invocation\x12\xc4\x01\n\x18\x44\x65leteWorkflowInvocation\x12\x39.google.cloud.dataform.v1.DeleteWorkflowInvocationRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\xeb\x01\n\x18\x43\x61ncelWorkflowInvocation\x12\x39.google.cloud.dataform.v1.CancelWorkflowInvocationRequest\x1a:.google.cloud.dataform.v1.CancelWorkflowInvocationResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel:\x01*\x12\xf9\x01\n\x1eQueryWorkflowInvocationActions\x12?.google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest\x1a@.google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query\x12\x92\x01\n\tGetConfig\x12*.google.cloud.dataform.v1.GetConfigRequest\x1a .google.cloud.dataform.v1.Config\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/config}\x12\xb5\x01\n\x0cUpdateConfig\x12-.google.cloud.dataform.v1.UpdateConfigRequest\x1a .google.cloud.dataform.v1.Config\"T\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02\x39\x32//v1/{config.name=projects/*/locations/*/config}:\x06\x63onfig\x1at\xca\x41\x17\x64\x61taform.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xde\x05\n\x1c\x63om.google.cloud.dataform.v1B\rDataformProtoP\x01Z8cloud.google.com/go/dataform/apiv1/dataformpb;dataformpb\xaa\x02\x18Google.Cloud.Dataform.V1\xca\x02\x18Google\\Cloud\\Dataform\\V1\xea\x02\x1bGoogle::Cloud::Dataform::V1\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41\x91\x01\n1aiplatform.googleapis.com/NotebookRuntimeTemplate\x12\\projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}b\x06proto3" +descriptor_data = "\n\'google/cloud/dataform/v1/dataform.proto\x12\x18google.cloud.dataform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x1agoogle/type/interval.proto\"e\n\x13\x44\x61taEncryptionState\x12N\n\x14kms_key_version_name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\"\x92\x0e\n\nRepository\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12#\n\x11\x63ontaining_folder\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\"\n\x10team_folder_name\x18\x12 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x34\n\x0b\x63reate_time\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12X\n\x13git_remote_settings\x18\x02 \x01(\x0b\x32\x36.google.cloud.dataform.v1.Repository.GitRemoteSettingsB\x03\xe0\x41\x01\x12\x66\n*npmrc_environment_variables_secret_version\x18\x03 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12p\n\x1fworkspace_compilation_overrides\x18\x04 \x01(\x0b\x32\x42.google.cloud.dataform.v1.Repository.WorkspaceCompilationOverridesB\x03\xe0\x41\x01\x12\x45\n\x06labels\x18\x05 \x03(\x0b\x32\x30.google.cloud.dataform.v1.Repository.LabelsEntryB\x03\xe0\x41\x01\x12,\n\x1cset_authenticated_user_admin\x18\t \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04\x12\x1c\n\x0fservice_account\x18\n \x01(\tB\x03\xe0\x41\x01\x12?\n\x0ckms_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12Q\n\x15\x64\x61ta_encryption_state\x18\x0c \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a\xe7\x04\n\x11GitRemoteSettings\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0e\x64\x65\x66\x61ult_branch\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12_\n#authentication_token_secret_version\x18\x03 \x01(\tB2\xe0\x41\x01\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12v\n\x19ssh_authentication_config\x18\x05 \x01(\x0b\x32N.google.cloud.dataform.v1.Repository.GitRemoteSettings.SshAuthenticationConfigB\x03\xe0\x41\x01\x12_\n\x0ctoken_status\x18\x04 \x01(\x0e\x32\x42.google.cloud.dataform.v1.Repository.GitRemoteSettings.TokenStatusB\x05\x18\x01\xe0\x41\x03\x1a\x94\x01\n\x17SshAuthenticationConfig\x12[\n\x1fuser_private_key_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1c\n\x0fhost_public_key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"R\n\x0bTokenStatus\x12\x1c\n\x18TOKEN_STATUS_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\t\n\x05VALID\x10\x03\x1au\n\x1dWorkspaceCompilationOverrides\x12\x1d\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rschema_suffix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctable_prefix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x85\x01\xea\x41\x81\x01\n\"dataform.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}*\x0crepositories2\nrepositoryB\x14\n\x12_containing_folderB\x13\n\x11_team_folder_nameB\x14\n\x12_internal_metadata\"3\n\x17PrivateResourceMetadata\x12\x18\n\x0buser_scoped\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"\xb1\x01\n\x17ListRepositoriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x84\x01\n\x18ListRepositoriesResponse\x12:\n\x0crepositories\x18\x01 \x03(\x0b\x32$.google.cloud.dataform.v1.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa4\x01\n\x15MoveRepositoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12/\n\x1d\x64\x65stination_containing_folder\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42 \n\x1e_destination_containing_folder\"P\n\x14GetRepositoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"\xaf\x01\n\x17\x43reateRepositoryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8e\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12=\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryB\x03\xe0\x41\x02\"g\n\x17\x44\x65leteRepositoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xd2\x05\n\x1e\x43ommitRepositoryChangesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x46\n\x0f\x63ommit_metadata\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.CommitMetadataB\x03\xe0\x41\x02\x12%\n\x18required_head_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12j\n\x0f\x66ile_operations\x18\x03 \x03(\x0b\x32L.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperationsEntryB\x03\xe0\x41\x01\x1a\x9b\x02\n\rFileOperation\x12\x66\n\nwrite_file\x18\x01 \x01(\x0b\x32P.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.WriteFileH\x00\x12h\n\x0b\x64\x65lete_file\x18\x02 \x01(\x0b\x32Q.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation.DeleteFileH\x00\x1a\x1d\n\tWriteFile\x12\x10\n\x08\x63ontents\x18\x01 \x01(\x0c\x1a\x0c\n\nDeleteFileB\x0b\n\toperation\x1a}\n\x13\x46ileOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12U\n\x05value\x18\x02 \x01(\x0b\x32\x46.google.cloud.dataform.v1.CommitRepositoryChangesRequest.FileOperation:\x02\x38\x01\"5\n\x1f\x43ommitRepositoryChangesResponse\x12\x12\n\ncommit_sha\x18\x01 \x01(\t\"\x81\x01\n\x19ReadRepositoryFileRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x17\n\ncommit_sha\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x02\".\n\x1aReadRepositoryFileResponse\x12\x10\n\x08\x63ontents\x18\x01 \x01(\x0c\"\xc0\x01\n\'QueryRepositoryDirectoryContentsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x17\n\ncommit_sha\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x88\x01\n(QueryRepositoryDirectoryContentsResponse\x12\x43\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.DirectoryEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x1d\x46\x65tchRepositoryHistoryRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x05 \x01(\tB\x03\xe0\x41\x01\"t\n\x1e\x46\x65tchRepositoryHistoryResponse\x12\x39\n\x07\x63ommits\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.CommitLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa5\x01\n\x0e\x43ommitLogEntry\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ncommit_sha\x18\x02 \x01(\t\x12\x36\n\x06\x61uthor\x18\x03 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthor\x12\x16\n\x0e\x63ommit_message\x18\x04 \x01(\t\"j\n\x0e\x43ommitMetadata\x12;\n\x06\x61uthor\x18\x01 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\x12\x1b\n\x0e\x63ommit_message\x18\x02 \x01(\tB\x03\xe0\x41\x01\"e\n)ComputeRepositoryAccessTokenStatusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"\xff\x01\n*ComputeRepositoryAccessTokenStatusResponse\x12\x66\n\x0ctoken_status\x18\x01 \x01(\x0e\x32P.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse.TokenStatus\"i\n\x0bTokenStatus\x12\x1c\n\x18TOKEN_STATUS_UNSPECIFIED\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x0b\n\x07INVALID\x10\x02\x12\t\n\x05VALID\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\"V\n\x1a\x46\x65tchRemoteBranchesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\"/\n\x1b\x46\x65tchRemoteBranchesResponse\x12\x10\n\x08\x62ranches\x18\x01 \x03(\t\"\x8b\x04\n\tWorkspace\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x15\x64\x61ta_encryption_state\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\rdisable_moves\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12Y\n\x19private_resource_metadata\x18\x08 \x01(\x0b\x32\x31.google.cloud.dataform.v1.PrivateResourceMetadataB\x03\xe0\x41\x03:\x98\x01\xea\x41\x94\x01\n!dataform.googleapis.com/Workspace\x12Xprojects/{project}/locations/{location}/repositories/{repository}/workspaces/{workspace}*\nworkspaces2\tworkspaceB\x14\n\x12_internal_metadataB\x10\n\x0e_disable_moves\"\xb0\x01\n\x15ListWorkspacesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x16ListWorkspacesResponse\x12\x37\n\nworkspaces\x18\x01 \x03(\x0b\x32#.google.cloud.dataform.v1.Workspace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x13GetWorkspaceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\xac\x01\n\x16\x43reateWorkspaceRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12;\n\tworkspace\x18\x02 \x01(\x0b\x32#.google.cloud.dataform.v1.WorkspaceB\x03\xe0\x41\x02\x12\x19\n\x0cworkspace_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Q\n\x16\x44\x65leteWorkspaceRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"=\n\x0c\x43ommitAuthor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\remail_address\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xa9\x01\n\x15PullGitCommitsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12;\n\x06\x61uthor\x18\x03 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\"\x18\n\x16PullGitCommitsResponse\"l\n\x15PushGitCommitsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x18\n\x16PushGitCommitsResponse\"V\n\x1b\x46\x65tchFileGitStatusesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\xf7\x02\n\x1c\x46\x65tchFileGitStatusesResponse\x12n\n\x18uncommitted_file_changes\x18\x01 \x03(\x0b\x32L.google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange\x1a\xe6\x01\n\x15UncommittedFileChange\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x66\n\x05state\x18\x02 \x01(\x0e\x32R.google.cloud.dataform.v1.FetchFileGitStatusesResponse.UncommittedFileChange.StateB\x03\xe0\x41\x03\"W\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07\x44\x45LETED\x10\x02\x12\x0c\n\x08MODIFIED\x10\x03\x12\x11\n\rHAS_CONFLICTS\x10\x04\"q\n\x1a\x46\x65tchGitAheadBehindRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x1a\n\rremote_branch\x18\x02 \x01(\tB\x03\xe0\x41\x01\"L\n\x1b\x46\x65tchGitAheadBehindResponse\x12\x15\n\rcommits_ahead\x18\x01 \x01(\x05\x12\x16\n\x0e\x63ommits_behind\x18\x02 \x01(\x05\"\xc6\x01\n\x1d\x43ommitWorkspaceChangesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12;\n\x06\x61uthor\x18\x04 \x01(\x0b\x32&.google.cloud.dataform.v1.CommitAuthorB\x03\xe0\x41\x02\x12\x1b\n\x0e\x63ommit_message\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05paths\x18\x03 \x03(\tB\x03\xe0\x41\x01\" \n\x1e\x43ommitWorkspaceChangesResponse\"\x7f\n\x1cResetWorkspaceChangesRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x12\n\x05paths\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63lean\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x1f\n\x1dResetWorkspaceChangesResponse\"g\n\x14\x46\x65tchFileDiffRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"/\n\x15\x46\x65tchFileDiffResponse\x12\x16\n\x0e\x66ormatted_diff\x18\x01 \x01(\t\"\xe5\x01\n\x1dQueryDirectoryContentsRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x04view\x18\x05 \x01(\x0e\x32/.google.cloud.dataform.v1.DirectoryContentsViewB\x03\xe0\x41\x01\"~\n\x1eQueryDirectoryContentsResponse\x12\x43\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.DirectoryEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x83\x01\n\x0e\x44irectoryEntry\x12\x0e\n\x04\x66ile\x18\x01 \x01(\tH\x00\x12\x13\n\tdirectory\x18\x02 \x01(\tH\x00\x12\x43\n\x08metadata\x18\x03 \x01(\x0b\x32\x31.google.cloud.dataform.v1.FilesystemEntryMetadataB\x07\n\x05\x65ntry\"h\n\x17\x46ilesystemEntryMetadata\x12\x17\n\nsize_bytes\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x98\x01\n\x12SearchFilesRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"s\n\x13SearchFilesResponse\x12>\n\x0esearch_results\x18\x01 \x03(\x0b\x32&.google.cloud.dataform.v1.SearchResult\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n\x0cSearchResult\x12:\n\x04\x66ile\x18\x01 \x01(\x0b\x32*.google.cloud.dataform.v1.FileSearchResultH\x00\x12\x44\n\tdirectory\x18\x02 \x01(\x0b\x32/.google.cloud.dataform.v1.DirectorySearchResultH\x00\x42\x07\n\x05\x65ntry\" \n\x10\x46ileSearchResult\x12\x0c\n\x04path\x18\x01 \x01(\t\"%\n\x15\x44irectorySearchResult\x12\x0c\n\x04path\x18\x01 \x01(\t\"g\n\x14MakeDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15MakeDirectoryResponse\"i\n\x16RemoveDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x19\n\x17RemoveDirectoryResponse\"~\n\x14MoveDirectoryRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08new_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x17\n\x15MoveDirectoryResponse\"y\n\x0fReadFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x03 \x01(\tB\x03\xe0\x41\x01\")\n\x10ReadFileResponse\x12\x15\n\rfile_contents\x18\x01 \x01(\x0c\"d\n\x11RemoveFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x14\n\x12RemoveFileResponse\"y\n\x0fMoveFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08new_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x12\n\x10MoveFileResponse\"z\n\x10WriteFileRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08\x63ontents\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x02\"\x13\n\x11WriteFileResponse\"Y\n\x19InstallNpmPackagesRequest\x12<\n\tworkspace\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!dataform.googleapis.com/Workspace\"\x1c\n\x1aInstallNpmPackagesResponse\"\xe7\x06\n\rReleaseConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rgit_commitish\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12U\n\x17\x63ode_compilation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1.CodeCompilationConfigB\x03\xe0\x41\x01\x12\x1a\n\rcron_schedule\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12m\n recent_scheduled_release_records\x18\x05 \x03(\x0b\x32>.google.cloud.dataform.v1.ReleaseConfig.ScheduledReleaseRecordB\x03\xe0\x41\x03\x12U\n\x1arelease_compilation_result\x18\x06 \x01(\tB1\xe0\x41\x01\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12\x15\n\x08\x64isabled\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12#\n\x11internal_metadata\x18\t \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xd3\x01\n\x16ScheduledReleaseRecord\x12L\n\x12\x63ompilation_result\x18\x02 \x01(\tB.\xfa\x41+\n)dataform.googleapis.com/CompilationResultH\x00\x12*\n\x0c\x65rror_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x35\n\x0crelease_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x08\n\x06result:\xad\x01\xea\x41\xa9\x01\n%dataform.googleapis.com/ReleaseConfig\x12\x61projects/{project}/locations/{location}/repositories/{repository}/releaseConfigs/{release_config}*\x0ereleaseConfigs2\rreleaseConfigB\x14\n\x12_internal_metadata\"\x88\x01\n\x19ListReleaseConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8c\x01\n\x1aListReleaseConfigsResponse\x12@\n\x0frelease_configs\x18\x01 \x03(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"V\n\x17GetReleaseConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\"\xbe\x01\n\x1a\x43reateReleaseConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x44\n\x0erelease_config\x18\x02 \x01(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfigB\x03\xe0\x41\x02\x12\x1e\n\x11release_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x98\x01\n\x1aUpdateReleaseConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x44\n\x0erelease_config\x18\x02 \x01(\x0b\x32\'.google.cloud.dataform.v1.ReleaseConfigB\x03\xe0\x41\x02\"Y\n\x1a\x44\x65leteReleaseConfigRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\"\xca\x08\n\x11\x43ompilationResult\x12\x1c\n\rgit_commitish\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x00\x12>\n\tworkspace\x18\x03 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!dataform.googleapis.com/WorkspaceH\x00\x12G\n\x0erelease_config\x18\x07 \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12U\n\x17\x63ode_compilation_config\x18\x04 \x01(\x0b\x32/.google.cloud.dataform.v1.CodeCompilationConfigB\x03\xe0\x41\x05\x12$\n\x17resolved_git_commit_sha\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x64\x61taform_core_version\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12]\n\x12\x63ompilation_errors\x18\x06 \x03(\x0b\x32<.google.cloud.dataform.v1.CompilationResult.CompilationErrorB\x03\xe0\x41\x03\x12Q\n\x15\x64\x61ta_encryption_state\x18\t \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12Y\n\x19private_resource_metadata\x18\x0c \x01(\x0b\x32\x31.google.cloud.dataform.v1.PrivateResourceMetadataB\x03\xe0\x41\x03\x1a\x8d\x01\n\x10\x43ompilationError\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05stack\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12<\n\raction_target\x18\x04 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03:\xc1\x01\xea\x41\xbd\x01\n)dataform.googleapis.com/CompilationResult\x12iprojects/{project}/locations/{location}/repositories/{repository}/compilationResults/{compilation_result}*\x12\x63ompilationResults2\x11\x63ompilationResultB\x08\n\x06sourceB\x14\n\x12_internal_metadata\"\xee\x03\n\x15\x43odeCompilationConfig\x12\x1d\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_schema\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65\x66\x61ult_location\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x61ssertion_schema\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x04vars\x18\x04 \x03(\x0b\x32\x39.google.cloud.dataform.v1.CodeCompilationConfig.VarsEntryB\x03\xe0\x41\x01\x12\x1c\n\x0f\x64\x61tabase_suffix\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rschema_suffix\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0ctable_prefix\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12*\n\x1d\x62uiltin_assertion_name_prefix\x18\n \x01(\tB\x03\xe0\x41\x01\x12_\n default_notebook_runtime_options\x18\t \x01(\x0b\x32\x30.google.cloud.dataform.v1.NotebookRuntimeOptionsB\x03\xe0\x41\x01\x1a+\n\tVarsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb6\x01\n\x16NotebookRuntimeOptions\x12 \n\x11gcs_output_bucket\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x12h\n%ai_platform_notebook_runtime_template\x18\x02 \x01(\tB9\xe0\x41\x01\xfa\x41\x33\n1aiplatform.googleapis.com/NotebookRuntimeTemplateB\x10\n\x0e\x65xecution_sink\"\xb8\x01\n\x1dListCompilationResultsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1eListCompilationResultsResponse\x12H\n\x13\x63ompilation_results\x18\x01 \x03(\x0b\x32+.google.cloud.dataform.v1.CompilationResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"^\n\x1bGetCompilationResultRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dataform.googleapis.com/CompilationResult\"\xaa\x01\n\x1e\x43reateCompilationResultRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12L\n\x12\x63ompilation_result\x18\x02 \x01(\x0b\x32+.google.cloud.dataform.v1.CompilationResultB\x03\xe0\x41\x02\"G\n\x06Target\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06schema\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xe0\x02\n\x12RelationDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12N\n\x07\x63olumns\x18\x02 \x03(\x0b\x32=.google.cloud.dataform.v1.RelationDescriptor.ColumnDescriptor\x12Y\n\x0f\x62igquery_labels\x18\x03 \x03(\x0b\x32@.google.cloud.dataform.v1.RelationDescriptor.BigqueryLabelsEntry\x1aS\n\x10\x43olumnDescriptor\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1c\n\x14\x62igquery_policy_tags\x18\x03 \x03(\t\x1a\x35\n\x13\x42igqueryLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa3\x1e\n\x17\x43ompilationResultAction\x12N\n\x08relation\x18\x04 \x01(\x0b\x32:.google.cloud.dataform.v1.CompilationResultAction.RelationH\x00\x12R\n\noperations\x18\x05 \x01(\x0b\x32<.google.cloud.dataform.v1.CompilationResultAction.OperationsH\x00\x12P\n\tassertion\x18\x06 \x01(\x0b\x32;.google.cloud.dataform.v1.CompilationResultAction.AssertionH\x00\x12T\n\x0b\x64\x65\x63laration\x18\x07 \x01(\x0b\x32=.google.cloud.dataform.v1.CompilationResultAction.DeclarationH\x00\x12N\n\x08notebook\x18\x08 \x01(\x0b\x32:.google.cloud.dataform.v1.CompilationResultAction.NotebookH\x00\x12]\n\x10\x64\x61ta_preparation\x18\t \x01(\x0b\x32\x41.google.cloud.dataform.v1.CompilationResultAction.DataPreparationH\x00\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12:\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12#\n\x11internal_metadata\x18\n \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x1a\xae\x0b\n\x08Relation\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12I\n\x13relation_descriptor\x18\x04 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x12^\n\rrelation_type\x18\x05 \x01(\x0e\x32G.google.cloud.dataform.v1.CompilationResultAction.Relation.RelationType\x12\x14\n\x0cselect_query\x18\x06 \x01(\t\x12\x16\n\x0epre_operations\x18\x07 \x03(\t\x12\x17\n\x0fpost_operations\x18\x08 \x03(\t\x12s\n\x18incremental_table_config\x18\t \x01(\x0b\x32Q.google.cloud.dataform.v1.CompilationResultAction.Relation.IncrementalTableConfig\x12\x1c\n\x14partition_expression\x18\n \x01(\t\x12\x1b\n\x13\x63luster_expressions\x18\x0b \x03(\t\x12!\n\x19partition_expiration_days\x18\x0c \x01(\x05\x12 \n\x18require_partition_filter\x18\r \x01(\x08\x12m\n\x12\x61\x64\x64itional_options\x18\x0e \x03(\x0b\x32Q.google.cloud.dataform.v1.CompilationResultAction.Relation.AdditionalOptionsEntry\x12\x17\n\nconnection\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x0ctable_format\x18\x10 \x01(\x0e\x32\x46.google.cloud.dataform.v1.CompilationResultAction.Relation.TableFormatB\x03\xe0\x41\x01\x12_\n\x0b\x66ile_format\x18\x11 \x01(\x0e\x32\x45.google.cloud.dataform.v1.CompilationResultAction.Relation.FileFormatB\x03\xe0\x41\x01\x12\x18\n\x0bstorage_uri\x18\x12 \x01(\tB\x03\xe0\x41\x01\x1a\xd8\x01\n\x16IncrementalTableConfig\x12 \n\x18incremental_select_query\x18\x01 \x01(\t\x12\x18\n\x10refresh_disabled\x18\x02 \x01(\x08\x12\x18\n\x10unique_key_parts\x18\x03 \x03(\t\x12\x1f\n\x17update_partition_filter\x18\x04 \x01(\t\x12\"\n\x1aincremental_pre_operations\x18\x05 \x03(\t\x12#\n\x1bincremental_post_operations\x18\x06 \x03(\t\x1a\x38\n\x16\x41\x64\x64itionalOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"p\n\x0cRelationType\x12\x1d\n\x19RELATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\x08\n\x04VIEW\x10\x02\x12\x15\n\x11INCREMENTAL_TABLE\x10\x03\x12\x15\n\x11MATERIALIZED_VIEW\x10\x04\"8\n\x0bTableFormat\x12\x1c\n\x18TABLE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07ICEBERG\x10\x01\"6\n\nFileFormat\x12\x1b\n\x17\x46ILE_FORMAT_UNSPECIFIED\x10\x00\x12\x0b\n\x07PARQUET\x10\x01\x1a\xda\x01\n\nOperations\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12I\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x12\x0f\n\x07queries\x18\x04 \x03(\t\x12\x12\n\nhas_output\x18\x05 \x01(\x08\x1a\x83\x02\n\tAssertion\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x37\n\rparent_action\x18\x05 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x14\n\x0cselect_query\x18\x04 \x01(\t\x12I\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x1aX\n\x0b\x44\x65\x63laration\x12I\n\x13relation_descriptor\x18\x01 \x01(\x0b\x32,.google.cloud.dataform.v1.RelationDescriptor\x1az\n\x08Notebook\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x10\n\x08\x63ontents\x18\x03 \x01(\t\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xa7\x04\n\x0f\x44\x61taPreparation\x12\x17\n\rcontents_yaml\x18\x05 \x01(\tH\x00\x12g\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32O.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.SqlDefinitionH\x00\x12<\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xcd\x01\n\rSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12\x61\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32L.google.cloud.dataform.v1.CompilationResultAction.DataPreparation.ErrorTable\x12J\n\x04load\x18\x03 \x01(\x0b\x32<.google.cloud.dataform.v1.CompilationResultAction.LoadConfig\x1aV\n\nErrorTable\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x42\x0c\n\ndefinition\x1a\xf0\x02\n\nLoadConfig\x12S\n\x07replace\x18\x01 \x01(\x0b\x32@.google.cloud.dataform.v1.CompilationResultAction.SimpleLoadModeH\x00\x12R\n\x06\x61ppend\x18\x02 \x01(\x0b\x32@.google.cloud.dataform.v1.CompilationResultAction.SimpleLoadModeH\x00\x12X\n\x07maximum\x18\x03 \x01(\x0b\x32\x45.google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadModeH\x00\x12W\n\x06unique\x18\x04 \x01(\x0b\x32\x45.google.cloud.dataform.v1.CompilationResultAction.IncrementalLoadModeH\x00\x42\x06\n\x04mode\x1a\x10\n\x0eSimpleLoadMode\x1a%\n\x13IncrementalLoadMode\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\tB\x11\n\x0f\x63ompiled_objectB\x14\n\x12_internal_metadata\"\xad\x01\n$QueryCompilationResultActionsRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x97\x01\n%QueryCompilationResultActionsResponse\x12U\n\x1a\x63ompilation_result_actions\x18\x01 \x03(\x0b\x32\x31.google.cloud.dataform.v1.CompilationResultAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x07\n\x0eWorkflowConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x45\n\x0erelease_config\x18\x02 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%dataform.googleapis.com/ReleaseConfig\x12J\n\x11invocation_config\x18\x03 \x01(\x0b\x32*.google.cloud.dataform.v1.InvocationConfigB\x03\xe0\x41\x01\x12\x1a\n\rcron_schedule\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\ttime_zone\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12r\n\"recent_scheduled_execution_records\x18\x05 \x03(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowConfig.ScheduledExecutionRecordB\x03\xe0\x41\x03\x12\x15\n\x08\x64isabled\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xd9\x01\n\x18ScheduledExecutionRecord\x12N\n\x13workflow_invocation\x18\x02 \x01(\tB/\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocationH\x00\x12*\n\x0c\x65rror_status\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x37\n\x0e\x65xecution_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\x08\n\x06result:\xb2\x01\xea\x41\xae\x01\n&dataform.googleapis.com/WorkflowConfig\x12\x63projects/{project}/locations/{location}/repositories/{repository}/workflowConfigs/{workflow_config}*\x0fworkflowConfigs2\x0eworkflowConfigB\x14\n\x12_internal_metadata\"\xdc\x03\n\x10InvocationConfig\x12?\n\x10included_targets\x18\x01 \x03(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x01\x12\x1a\n\rincluded_tags\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12-\n transitive_dependencies_included\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12+\n\x1etransitive_dependents_included\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x35\n(fully_refresh_incremental_tables_enabled\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x0equery_priority\x18\t \x01(\x0e\x32\x38.google.cloud.dataform.v1.InvocationConfig.QueryPriorityB\x03\xe0\x41\x01H\x00\x88\x01\x01\"K\n\rQueryPriority\x12\x1e\n\x1aQUERY_PRIORITY_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINTERACTIVE\x10\x01\x12\t\n\x05\x42\x41TCH\x10\x02\x42\x11\n\x0f_query_priority\"\x89\x01\n\x1aListWorkflowConfigsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x8f\x01\n\x1bListWorkflowConfigsResponse\x12\x42\n\x10workflow_configs\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x18GetWorkflowConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dataform.googleapis.com/WorkflowConfig\"\xc2\x01\n\x1b\x43reateWorkflowConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x46\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfigB\x03\xe0\x41\x02\x12\x1f\n\x12workflow_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9b\x01\n\x1bUpdateWorkflowConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x46\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32(.google.cloud.dataform.v1.WorkflowConfigB\x03\xe0\x41\x02\"[\n\x1b\x44\x65leteWorkflowConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&dataform.googleapis.com/WorkflowConfig\"\x94\x08\n\x12WorkflowInvocation\x12O\n\x12\x63ompilation_result\x18\x02 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)dataform.googleapis.com/CompilationResultH\x00\x12I\n\x0fworkflow_config\x18\x06 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&dataform.googleapis.com/WorkflowConfigH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12J\n\x11invocation_config\x18\x03 \x01(\x0b\x32*.google.cloud.dataform.v1.InvocationConfigB\x03\xe0\x41\x05\x12\x46\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.dataform.v1.WorkflowInvocation.StateB\x03\xe0\x41\x03\x12\x35\n\x11invocation_timing\x18\x05 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12V\n\x1bresolved_compilation_result\x18\x07 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)dataform.googleapis.com/CompilationResult\x12Q\n\x15\x64\x61ta_encryption_state\x18\x08 \x01(\x0b\x32-.google.cloud.dataform.v1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12Y\n\x19private_resource_metadata\x18\n \x01(\x0b\x32\x31.google.cloud.dataform.v1.PrivateResourceMetadataB\x03\xe0\x41\x03\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\r\n\tCANCELING\x10\x05:\xc6\x01\xea\x41\xc2\x01\n*dataform.googleapis.com/WorkflowInvocation\x12kprojects/{project}/locations/{location}/repositories/{repository}/workflowInvocations/{workflow_invocation}*\x13workflowInvocations2\x12workflowInvocationB\x14\n\x12\x63ompilation_sourceB\x14\n\x12_internal_metadata\"\xb9\x01\n\x1eListWorkflowInvocationsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x9b\x01\n\x1fListWorkflowInvocationsResponse\x12J\n\x14workflow_invocations\x18\x01 \x03(\x0b\x32,.google.cloud.dataform.v1.WorkflowInvocation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"`\n\x1cGetWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"\xad\x01\n\x1f\x43reateWorkflowInvocationRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12N\n\x13workflow_invocation\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1.WorkflowInvocationB\x03\xe0\x41\x02\"c\n\x1f\x44\x65leteWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"c\n\x1f\x43\x61ncelWorkflowInvocationRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\"\"\n CancelWorkflowInvocationResponse\"\x9b\x10\n\x18WorkflowInvocationAction\x12\x61\n\x0f\x62igquery_action\x18\x06 \x01(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowInvocationAction.BigQueryActionB\x03\xe0\x41\x03H\x00\x12\x61\n\x0fnotebook_action\x18\x08 \x01(\x0b\x32\x41.google.cloud.dataform.v1.WorkflowInvocationAction.NotebookActionB\x03\xe0\x41\x03H\x00\x12p\n\x17\x64\x61ta_preparation_action\x18\t \x01(\x0b\x32H.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationActionB\x03\xe0\x41\x03H\x00\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03\x12?\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.TargetB\x03\xe0\x41\x03\x12L\n\x05state\x18\x04 \x01(\x0e\x32\x38.google.cloud.dataform.v1.WorkflowInvocationAction.StateB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x11invocation_timing\x18\x05 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\n \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x1a>\n\x0e\x42igQueryAction\x12\x17\n\nsql_script\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a<\n\x0eNotebookAction\x12\x15\n\x08\x63ontents\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x81\t\n\x15\x44\x61taPreparationAction\x12\x1c\n\rcontents_yaml\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12t\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32\\.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSqlDefinitionH\x00\x12\x1a\n\rgenerated_sql\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06job_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x1a\x84\x02\n\x13\x41\x63tionSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12n\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32Y.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable\x12n\n\x0bload_config\x18\x03 \x01(\x0b\x32Y.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig\x1a\\\n\x10\x41\x63tionErrorTable\x12\x30\n\x06target\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x1a\xea\x03\n\x10\x41\x63tionLoadConfig\x12p\n\x07replace\x18\x01 \x01(\x0b\x32].google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12o\n\x06\x61ppend\x18\x02 \x01(\x0b\x32].google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12u\n\x07maximum\x18\x03 \x01(\x0b\x32\x62.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x12t\n\x06unique\x18\x04 \x01(\x0b\x32\x62.google.cloud.dataform.v1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x42\x06\n\x04mode\x1a\x16\n\x14\x41\x63tionSimpleLoadMode\x1a+\n\x19\x41\x63tionIncrementalLoadMode\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\tB\x0c\n\ndefinition\"f\n\x05State\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0b\n\x07SKIPPED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\r\n\tCANCELLED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x42\x08\n\x06\x61\x63tionB\x14\n\x12_internal_metadata\"\x9a\x01\n%QueryWorkflowInvocationActionsRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*dataform.googleapis.com/WorkflowInvocation\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x9a\x01\n&QueryWorkflowInvocationActionsResponse\x12W\n\x1bworkflow_invocation_actions\x18\x01 \x03(\x0b\x32\x32.google.cloud.dataform.v1.WorkflowInvocationAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x85\x02\n\x06\x43onfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12G\n\x14\x64\x65\x66\x61ult_kms_key_name\x18\x02 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12#\n\x11internal_metadata\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:d\xea\x41\x61\n\x1e\x64\x61taform.googleapis.com/Config\x12.projects/{project}/locations/{location}/config*\x07\x63onfigs2\x06\x63onfigB\x14\n\x12_internal_metadata\"H\n\x10GetConfigRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Config\"\x82\x01\n\x13UpdateConfigRequest\x12\x35\n\x06\x63onfig\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.ConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xcf\x03\n\x06\x46older\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x11\x63ontaining_folder\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10team_folder_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\'\n\x15\x63reator_iam_principal\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01:n\xea\x41k\n\x1e\x64\x61taform.googleapis.com/Folder\x12\x38projects/{project}/locations/{location}/folders/{folder}*\x07\x66olders2\x06\x66olderB\x14\n\x12_internal_metadataB\x18\n\x16_creator_iam_principal\"\x87\x01\n\x13\x43reateFolderRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x35\n\x06\x66older\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.FolderB\x03\xe0\x41\x02\"\x9c\x01\n\x11MoveFolderRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Folder\x12/\n\x1d\x64\x65stination_containing_folder\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42 \n\x1e_destination_containing_folder\"H\n\x10GetFolderRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Folder\"\x82\x01\n\x13UpdateFolderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x35\n\x06\x66older\x18\x02 \x01(\x0b\x32 .google.cloud.dataform.v1.FolderB\x03\xe0\x41\x02\"K\n\x13\x44\x65leteFolderRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Folder\"c\n\x17\x44\x65leteFolderTreeRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Folder\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"k\n\x1b\x44\x65leteTeamFolderTreeRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/TeamFolder\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xe2\x02\n\x18\x44\x65leteFolderTreeMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12L\n\x05state\x18\x04 \x01(\x0e\x32\x38.google.cloud.dataform.v1.DeleteFolderTreeMetadata.StateB\x03\xe0\x41\x03\x12\x1d\n\x10percent_complete\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\"[\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\xb1\x01\n\x1aQueryFolderContentsRequest\x12\x36\n\x06\x66older\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x64\x61taform.googleapis.com/Folder\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x02\n\x1bQueryFolderContentsResponse\x12Z\n\x07\x65ntries\x18\x01 \x03(\x0b\x32I.google.cloud.dataform.v1.QueryFolderContentsResponse.FolderContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x8e\x01\n\x13\x46olderContentsEntry\x12\x32\n\x06\x66older\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.FolderH\x00\x12:\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryH\x00\x42\x07\n\x05\x65ntry\"\xb8\x01\n\x1cQueryUserRootContentsRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xa3\x02\n\x1dQueryUserRootContentsResponse\x12Z\n\x07\x65ntries\x18\x01 \x03(\x0b\x32I.google.cloud.dataform.v1.QueryUserRootContentsResponse.RootContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x8c\x01\n\x11RootContentsEntry\x12\x32\n\x06\x66older\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.FolderH\x00\x12:\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryH\x00\x42\x07\n\x05\x65ntry\"\xab\x03\n\nTeamFolder\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\'\n\x15\x63reator_iam_principal\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01:\x84\x01\xea\x41\x80\x01\n\"dataform.googleapis.com/TeamFolder\x12\x41projects/{project}/locations/{location}/teamFolders/{team_folder}*\x0bteamFolders2\nteamFolderB\x14\n\x12_internal_metadataB\x18\n\x16_creator_iam_principal\"\x94\x01\n\x17\x43reateTeamFolderRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12>\n\x0bteam_folder\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.TeamFolderB\x03\xe0\x41\x02\"P\n\x14GetTeamFolderRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/TeamFolder\"\x8f\x01\n\x17UpdateTeamFolderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12>\n\x0bteam_folder\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.TeamFolderB\x03\xe0\x41\x02\"S\n\x17\x44\x65leteTeamFolderRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/TeamFolder\"\xbe\x01\n\x1eQueryTeamFolderContentsRequest\x12?\n\x0bteam_folder\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/TeamFolder\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xb3\x02\n\x1fQueryTeamFolderContentsResponse\x12\x62\n\x07\x65ntries\x18\x01 \x03(\x0b\x32Q.google.cloud.dataform.v1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x92\x01\n\x17TeamFolderContentsEntry\x12\x32\n\x06\x66older\x18\x01 \x01(\x0b\x32 .google.cloud.dataform.v1.FolderH\x00\x12:\n\nrepository\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.RepositoryH\x00\x42\x07\n\x05\x65ntry\"\xb4\x01\n\x18SearchTeamFoldersRequest\x12;\n\x08location\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\xf1\x01\n\x19SearchTeamFoldersResponse\x12[\n\x07results\x18\x01 \x03(\x0b\x32J.google.cloud.dataform.v1.SearchTeamFoldersResponse.TeamFolderSearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a^\n\x16TeamFolderSearchResult\x12;\n\x0bteam_folder\x18\x02 \x01(\x0b\x32$.google.cloud.dataform.v1.TeamFolderH\x00\x42\x07\n\x05\x65ntry\"\xca\x02\n\x12MoveFolderMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.cloud.dataform.v1.MoveFolderMetadata.State\x12\x18\n\x10percent_complete\x18\x05 \x01(\x05\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"\xd2\x02\n\x16MoveRepositoryMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x05state\x18\x04 \x01(\x0e\x32\x36.google.cloud.dataform.v1.MoveRepositoryMetadata.State\x12\x18\n\x10percent_complete\x18\x05 \x01(\x05\"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINITIALIZED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04*\x89\x01\n\x15\x44irectoryContentsView\x12\'\n#DIRECTORY_CONTENTS_VIEW_UNSPECIFIED\x10\x00\x12!\n\x1d\x44IRECTORY_CONTENTS_VIEW_BASIC\x10\x01\x12$\n DIRECTORY_CONTENTS_VIEW_METADATA\x10\x02\x32\xe3}\n\x08\x44\x61taform\x12\xa5\x01\n\rGetTeamFolder\x12..google.cloud.dataform.v1.GetTeamFolderRequest\x1a$.google.cloud.dataform.v1.TeamFolder\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/teamFolders/*}\x12\xc6\x01\n\x10\x43reateTeamFolder\x12\x31.google.cloud.dataform.v1.CreateTeamFolderRequest\x1a$.google.cloud.dataform.v1.TeamFolder\"Y\xda\x41\x12parent,team_folder\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/teamFolders:\x0bteam_folder\x12\xd7\x01\n\x10UpdateTeamFolder\x12\x31.google.cloud.dataform.v1.UpdateTeamFolderRequest\x1a$.google.cloud.dataform.v1.TeamFolder\"j\xda\x41\x17team_folder,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{team_folder.name=projects/*/locations/*/teamFolders/*}:\x0bteam_folder\x12\x9d\x01\n\x10\x44\x65leteTeamFolder\x12\x31.google.cloud.dataform.v1.DeleteTeamFolderRequest\x1a\x16.google.protobuf.Empty\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/teamFolders/*}\x12\xf5\x01\n\x14\x44\x65leteTeamFolderTree\x12\x35.google.cloud.dataform.v1.DeleteTeamFolderTreeRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41\x31\n\x15google.protobuf.Empty\x12\x18\x44\x65leteFolderTreeMetadata\xda\x41\nname,force\x82\xd3\xe4\x93\x02?\":/v1/{name=projects/*/locations/*/teamFolders/*}:deleteTree:\x01*\x12\xea\x01\n\x17QueryTeamFolderContents\x12\x38.google.cloud.dataform.v1.QueryTeamFolderContentsRequest\x1a\x39.google.cloud.dataform.v1.QueryTeamFolderContentsResponse\"Z\xda\x41\x0bteam_folder\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{team_folder=projects/*/locations/*/teamFolders/*}:queryContents\x12\xbe\x01\n\x11SearchTeamFolders\x12\x32.google.cloud.dataform.v1.SearchTeamFoldersRequest\x1a\x33.google.cloud.dataform.v1.SearchTeamFoldersResponse\"@\x82\xd3\xe4\x93\x02:\x12\x38/v1/{location=projects/*/locations/*}/teamFolders:search\x12\x95\x01\n\tGetFolder\x12*.google.cloud.dataform.v1.GetFolderRequest\x1a .google.cloud.dataform.v1.Folder\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/folders/*}\x12\xac\x01\n\x0c\x43reateFolder\x12-.google.cloud.dataform.v1.CreateFolderRequest\x1a .google.cloud.dataform.v1.Folder\"K\xda\x41\rparent,folder\x82\xd3\xe4\x93\x02\x35\"+/v1/{parent=projects/*/locations/*}/folders:\x06\x66older\x12\xb8\x01\n\x0cUpdateFolder\x12-.google.cloud.dataform.v1.UpdateFolderRequest\x1a .google.cloud.dataform.v1.Folder\"W\xda\x41\x12\x66older,update_mask\x82\xd3\xe4\x93\x02<22/v1/{folder.name=projects/*/locations/*/folders/*}:\x06\x66older\x12\x91\x01\n\x0c\x44\x65leteFolder\x12-.google.cloud.dataform.v1.DeleteFolderRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/folders/*}\x12\xe9\x01\n\x10\x44\x65leteFolderTree\x12\x31.google.cloud.dataform.v1.DeleteFolderTreeRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x31\n\x15google.protobuf.Empty\x12\x18\x44\x65leteFolderTreeMetadata\xda\x41\nname,force\x82\xd3\xe4\x93\x02;\"6/v1/{name=projects/*/locations/*/folders/*}:deleteTree:\x01*\x12\xd6\x01\n\x13QueryFolderContents\x12\x34.google.cloud.dataform.v1.QueryFolderContentsRequest\x1a\x35.google.cloud.dataform.v1.QueryFolderContentsResponse\"R\xda\x41\x06\x66older\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{folder=projects/*/locations/*/folders/*}:queryFolderContents\x12\xd8\x01\n\x15QueryUserRootContents\x12\x36.google.cloud.dataform.v1.QueryUserRootContentsRequest\x1a\x37.google.cloud.dataform.v1.QueryUserRootContentsResponse\"N\xda\x41\x08location\x82\xd3\xe4\x93\x02=\x12;/v1/{location=projects/*/locations/*}:queryUserRootContents\x12\xe9\x01\n\nMoveFolder\x12+.google.cloud.dataform.v1.MoveFolderRequest\x1a\x1d.google.longrunning.Operation\"\x8e\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12MoveFolderMetadata\xda\x41\"name,destination_containing_folder\x82\xd3\xe4\x93\x02\x35\"0/v1/{name=projects/*/locations/*/folders/*}:move:\x01*\x12\xbc\x01\n\x10ListRepositories\x12\x31.google.cloud.dataform.v1.ListRepositoriesRequest\x1a\x32.google.cloud.dataform.v1.ListRepositoriesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/repositories\x12\xa6\x01\n\rGetRepository\x12..google.cloud.dataform.v1.GetRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/repositories/*}\x12\xd3\x01\n\x10\x43reateRepository\x12\x31.google.cloud.dataform.v1.CreateRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"f\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xd5\x01\n\x10UpdateRepository\x12\x31.google.cloud.dataform.v1.UpdateRepositoryRequest\x1a$.google.cloud.dataform.v1.Repository\"h\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\x9e\x01\n\x10\x44\x65leteRepository\x12\x31.google.cloud.dataform.v1.DeleteRepositoryRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xfa\x01\n\x0eMoveRepository\x12/.google.cloud.dataform.v1.MoveRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x97\x01\xca\x41/\n\x15google.protobuf.Empty\x12\x16MoveRepositoryMetadata\xda\x41\"name,destination_containing_folder\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/repositories/*}:move:\x01*\x12\xd2\x01\n\x17\x43ommitRepositoryChanges\x12\x38.google.cloud.dataform.v1.CommitRepositoryChangesRequest\x1a\x39.google.cloud.dataform.v1.CommitRepositoryChangesResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/repositories/*}:commit:\x01*\x12\xc2\x01\n\x12ReadRepositoryFile\x12\x33.google.cloud.dataform.v1.ReadRepositoryFileRequest\x1a\x34.google.cloud.dataform.v1.ReadRepositoryFileResponse\"A\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/repositories/*}:readFile\x12\xfa\x01\n QueryRepositoryDirectoryContents\x12\x41.google.cloud.dataform.v1.QueryRepositoryDirectoryContentsRequest\x1a\x42.google.cloud.dataform.v1.QueryRepositoryDirectoryContentsResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents\x12\xd2\x01\n\x16\x46\x65tchRepositoryHistory\x12\x37.google.cloud.dataform.v1.FetchRepositoryHistoryRequest\x1a\x38.google.cloud.dataform.v1.FetchRepositoryHistoryResponse\"E\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/repositories/*}:fetchHistory\x12\x82\x02\n\"ComputeRepositoryAccessTokenStatus\x12\x43.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusRequest\x1a\x44.google.cloud.dataform.v1.ComputeRepositoryAccessTokenStatusResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus\x12\xd0\x01\n\x13\x46\x65tchRemoteBranches\x12\x34.google.cloud.dataform.v1.FetchRemoteBranchesRequest\x1a\x35.google.cloud.dataform.v1.FetchRemoteBranchesResponse\"L\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches\x12\xc3\x01\n\x0eListWorkspaces\x12/.google.cloud.dataform.v1.ListWorkspacesRequest\x1a\x30.google.cloud.dataform.v1.ListWorkspacesResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/repositories/*}/workspaces\x12\xb0\x01\n\x0cGetWorkspace\x12-.google.cloud.dataform.v1.GetWorkspaceRequest\x1a#.google.cloud.dataform.v1.Workspace\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xda\x01\n\x0f\x43reateWorkspace\x12\x30.google.cloud.dataform.v1.CreateWorkspaceRequest\x1a#.google.cloud.dataform.v1.Workspace\"p\xda\x41\x1dparent,workspace,workspace_id\x82\xd3\xe4\x93\x02J\"=/v1/{parent=projects/*/locations/*/repositories/*}/workspaces:\tworkspace\x12\xa9\x01\n\x0f\x44\x65leteWorkspace\x12\x30.google.cloud.dataform.v1.DeleteWorkspaceRequest\x1a\x16.google.protobuf.Empty\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xe1\x01\n\x12InstallNpmPackages\x12\x33.google.cloud.dataform.v1.InstallNpmPackagesRequest\x1a\x34.google.cloud.dataform.v1.InstallNpmPackagesResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages:\x01*\x12\xc2\x01\n\x0ePullGitCommits\x12/.google.cloud.dataform.v1.PullGitCommitsRequest\x1a\x30.google.cloud.dataform.v1.PullGitCommitsResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull:\x01*\x12\xc2\x01\n\x0ePushGitCommits\x12/.google.cloud.dataform.v1.PushGitCommitsRequest\x1a\x30.google.cloud.dataform.v1.PushGitCommitsResponse\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push:\x01*\x12\xe1\x01\n\x14\x46\x65tchFileGitStatuses\x12\x35.google.cloud.dataform.v1.FetchFileGitStatusesRequest\x1a\x36.google.cloud.dataform.v1.FetchFileGitStatusesResponse\"Z\x82\xd3\xe4\x93\x02T\x12R/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses\x12\xdd\x01\n\x13\x46\x65tchGitAheadBehind\x12\x34.google.cloud.dataform.v1.FetchGitAheadBehindRequest\x1a\x35.google.cloud.dataform.v1.FetchGitAheadBehindResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind\x12\xdc\x01\n\x16\x43ommitWorkspaceChanges\x12\x37.google.cloud.dataform.v1.CommitWorkspaceChangesRequest\x1a\x38.google.cloud.dataform.v1.CommitWorkspaceChangesResponse\"O\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit:\x01*\x12\xd8\x01\n\x15ResetWorkspaceChanges\x12\x36.google.cloud.dataform.v1.ResetWorkspaceChangesRequest\x1a\x37.google.cloud.dataform.v1.ResetWorkspaceChangesResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset:\x01*\x12\xca\x01\n\rFetchFileDiff\x12..google.cloud.dataform.v1.FetchFileDiffRequest\x1a/.google.cloud.dataform.v1.FetchFileDiffResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff\x12\xee\x01\n\x16QueryDirectoryContents\x12\x37.google.cloud.dataform.v1.QueryDirectoryContentsRequest\x1a\x38.google.cloud.dataform.v1.QueryDirectoryContentsResponse\"a\x82\xd3\xe4\x93\x02[\x12Y/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents\x12\xc2\x01\n\x0bSearchFiles\x12,.google.cloud.dataform.v1.SearchFilesRequest\x1a-.google.cloud.dataform.v1.SearchFilesResponse\"V\x82\xd3\xe4\x93\x02P\x12N/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:searchFiles\x12\xcd\x01\n\rMakeDirectory\x12..google.cloud.dataform.v1.MakeDirectoryRequest\x1a/.google.cloud.dataform.v1.MakeDirectoryResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory:\x01*\x12\xd5\x01\n\x0fRemoveDirectory\x12\x30.google.cloud.dataform.v1.RemoveDirectoryRequest\x1a\x31.google.cloud.dataform.v1.RemoveDirectoryResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory:\x01*\x12\xcd\x01\n\rMoveDirectory\x12..google.cloud.dataform.v1.MoveDirectoryRequest\x1a/.google.cloud.dataform.v1.MoveDirectoryResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory:\x01*\x12\xb6\x01\n\x08ReadFile\x12).google.cloud.dataform.v1.ReadFileRequest\x1a*.google.cloud.dataform.v1.ReadFileResponse\"S\x82\xd3\xe4\x93\x02M\x12K/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile\x12\xc1\x01\n\nRemoveFile\x12+.google.cloud.dataform.v1.RemoveFileRequest\x1a,.google.cloud.dataform.v1.RemoveFileResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile:\x01*\x12\xb9\x01\n\x08MoveFile\x12).google.cloud.dataform.v1.MoveFileRequest\x1a*.google.cloud.dataform.v1.MoveFileResponse\"V\x82\xd3\xe4\x93\x02P\"K/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile:\x01*\x12\xbd\x01\n\tWriteFile\x12*.google.cloud.dataform.v1.WriteFileRequest\x1a+.google.cloud.dataform.v1.WriteFileResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile:\x01*\x12\xd3\x01\n\x12ListReleaseConfigs\x12\x33.google.cloud.dataform.v1.ListReleaseConfigsRequest\x1a\x34.google.cloud.dataform.v1.ListReleaseConfigsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs\x12\xc0\x01\n\x10GetReleaseConfig\x12\x31.google.cloud.dataform.v1.GetReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xfa\x01\n\x13\x43reateReleaseConfig\x12\x34.google.cloud.dataform.v1.CreateReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"\x83\x01\xda\x41\'parent,release_config,release_config_id\x82\xd3\xe4\x93\x02S\"A/v1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs:\x0erelease_config\x12\xfc\x01\n\x13UpdateReleaseConfig\x12\x34.google.cloud.dataform.v1.UpdateReleaseConfigRequest\x1a\'.google.cloud.dataform.v1.ReleaseConfig\"\x85\x01\xda\x41\x1arelease_config,update_mask\x82\xd3\xe4\x93\x02\x62\x32P/v1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}:\x0erelease_config\x12\xb5\x01\n\x13\x44\x65leteReleaseConfig\x12\x34.google.cloud.dataform.v1.DeleteReleaseConfigRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xe3\x01\n\x16ListCompilationResults\x12\x37.google.cloud.dataform.v1.ListCompilationResultsRequest\x1a\x38.google.cloud.dataform.v1.ListCompilationResultsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1/{parent=projects/*/locations/*/repositories/*}/compilationResults\x12\xd0\x01\n\x14GetCompilationResult\x12\x35.google.cloud.dataform.v1.GetCompilationResultRequest\x1a+.google.cloud.dataform.v1.CompilationResult\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G\x12\x45/v1/{name=projects/*/locations/*/repositories/*/compilationResults/*}\x12\xff\x01\n\x17\x43reateCompilationResult\x12\x38.google.cloud.dataform.v1.CreateCompilationResultRequest\x1a+.google.cloud.dataform.v1.CompilationResult\"}\xda\x41\x19parent,compilation_result\x82\xd3\xe4\x93\x02[\"E/v1/{parent=projects/*/locations/*/repositories/*}/compilationResults:\x12\x63ompilation_result\x12\xf5\x01\n\x1dQueryCompilationResultActions\x12>.google.cloud.dataform.v1.QueryCompilationResultActionsRequest\x1a?.google.cloud.dataform.v1.QueryCompilationResultActionsResponse\"S\x82\xd3\xe4\x93\x02M\x12K/v1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query\x12\xd7\x01\n\x13ListWorkflowConfigs\x12\x34.google.cloud.dataform.v1.ListWorkflowConfigsRequest\x1a\x35.google.cloud.dataform.v1.ListWorkflowConfigsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs\x12\xc4\x01\n\x11GetWorkflowConfig\x12\x32.google.cloud.dataform.v1.GetWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\x81\x02\n\x14\x43reateWorkflowConfig\x12\x35.google.cloud.dataform.v1.CreateWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"\x87\x01\xda\x41)parent,workflow_config,workflow_config_id\x82\xd3\xe4\x93\x02U\"B/v1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs:\x0fworkflow_config\x12\x83\x02\n\x14UpdateWorkflowConfig\x12\x35.google.cloud.dataform.v1.UpdateWorkflowConfigRequest\x1a(.google.cloud.dataform.v1.WorkflowConfig\"\x89\x01\xda\x41\x1bworkflow_config,update_mask\x82\xd3\xe4\x93\x02\x65\x32R/v1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}:\x0fworkflow_config\x12\xb8\x01\n\x14\x44\x65leteWorkflowConfig\x12\x35.google.cloud.dataform.v1.DeleteWorkflowConfigRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\xe7\x01\n\x17ListWorkflowInvocations\x12\x38.google.cloud.dataform.v1.ListWorkflowInvocationsRequest\x1a\x39.google.cloud.dataform.v1.ListWorkflowInvocationsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations\x12\xd4\x01\n\x15GetWorkflowInvocation\x12\x36.google.cloud.dataform.v1.GetWorkflowInvocationRequest\x1a,.google.cloud.dataform.v1.WorkflowInvocation\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\x86\x02\n\x18\x43reateWorkflowInvocation\x12\x39.google.cloud.dataform.v1.CreateWorkflowInvocationRequest\x1a,.google.cloud.dataform.v1.WorkflowInvocation\"\x80\x01\xda\x41\x1aparent,workflow_invocation\x82\xd3\xe4\x93\x02]\"F/v1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations:\x13workflow_invocation\x12\xc4\x01\n\x18\x44\x65leteWorkflowInvocation\x12\x39.google.cloud.dataform.v1.DeleteWorkflowInvocationRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\xeb\x01\n\x18\x43\x61ncelWorkflowInvocation\x12\x39.google.cloud.dataform.v1.CancelWorkflowInvocationRequest\x1a:.google.cloud.dataform.v1.CancelWorkflowInvocationResponse\"X\x82\xd3\xe4\x93\x02R\"M/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel:\x01*\x12\xf9\x01\n\x1eQueryWorkflowInvocationActions\x12?.google.cloud.dataform.v1.QueryWorkflowInvocationActionsRequest\x1a@.google.cloud.dataform.v1.QueryWorkflowInvocationActionsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query\x12\x92\x01\n\tGetConfig\x12*.google.cloud.dataform.v1.GetConfigRequest\x1a .google.cloud.dataform.v1.Config\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/config}\x12\xb5\x01\n\x0cUpdateConfig\x12-.google.cloud.dataform.v1.UpdateConfigRequest\x1a .google.cloud.dataform.v1.Config\"T\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02\x39\x32//v1/{config.name=projects/*/locations/*/config}:\x06\x63onfig\x12\xf7\x02\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xab\x02\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x99\x02\x12\x41/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicyZP\x12N/v1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:getIamPolicyZ>\x12] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "longrunning.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/credentials.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/credentials.rb new file mode 100644 index 000000000000..7076d1962dc3 --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/credentials.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Longrunning + module Operations + # Credentials for the Operations API. + class Credentials < ::Google::Auth::Credentials + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/operations.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/operations.rb new file mode 100644 index 000000000000..6b2d5f7cecff --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/operations.rb @@ -0,0 +1,837 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Longrunning + module Operations + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "longrunning.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Operations Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Operations Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "longrunning.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/rest.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest.rb new file mode 100644 index 000000000000..ff6597693b4e --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataform/v1/version" +require "google/longrunning/bindings_override" + +require "google/longrunning/operations/credentials" +require "google/longrunning/operations/rest/operations" +require "google/longrunning/operations/rest/client" + +module Google + module Longrunning + ## + # Manages long-running operations with an API service. + # + # When an API method normally takes long time to complete, it can be designed + # to return {::Google::Longrunning::Operation Operation} to the client, and the + # client can use this interface to receive the real response asynchronously by + # polling the operation resource, or pass the operation resource to another API + # (such as Pub/Sub API) to receive the response. Any API service that returns + # long-running operations should implement the `Operations` interface so + # developers can have a consistent client experience. + # + # To load this service and instantiate a REST client: + # + # require "google/longrunning/operations/rest" + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + module Operations + # Client for the REST transport + module Rest + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/longrunning/operations/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/client.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/client.rb new file mode 100644 index 000000000000..088db9bb5d0c --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/client.rb @@ -0,0 +1,776 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/longrunning/operations_pb" +require "google/longrunning/operations/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Longrunning + module Operations + module Rest + ## + # REST client for the Operations service. + # + # Manages long-running operations with an API service. + # + # When an API method normally takes long time to complete, it can be designed + # to return {::Google::Longrunning::Operation Operation} to the client, and the + # client can use this interface to receive the real response asynchronously by + # polling the operation resource, or pass the operation resource to another API + # (such as Pub/Sub API) to receive the response. Any API service that returns + # long-running operations should implement the `Operations` interface so + # developers can have a consistent client experience. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "longrunning.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configure the Operations Client class. + # + # See {::Google::Longrunning::Operations::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Operations clients + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Longrunning"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Operations Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Longrunning::Operations::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = ::Google::Longrunning::Operations::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @operations_stub = ::Google::Longrunning::Operations::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @operations_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @operations_stub.endpoint + config.universe_domain = @operations_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @operations_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @operations_stub.endpoint + config.universe_domain = @operations_stub.universe_domain + config.logger = @operations_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Longrunning::Operations::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @operations_stub.logger + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "longrunning.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/operations.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/operations.rb new file mode 100644 index 000000000000..f5539db81ab3 --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/operations.rb @@ -0,0 +1,921 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Longrunning + module Operations + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "longrunning.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Operations Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the Operations Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Dataform::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "longrunning.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/service_stub.rb b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/service_stub.rb new file mode 100644 index 000000000000..0a616d856150 --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/operations/rest/service_stub.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/longrunning/operations_pb" + +module Google + module Longrunning + module Operations + module Rest + ## + # REST service stub for the Operations service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end +end diff --git a/google-cloud-dataform-v1/lib/google/longrunning/rest.rb b/google-cloud-dataform-v1/lib/google/longrunning/rest.rb new file mode 100644 index 000000000000..1abb8352800b --- /dev/null +++ b/google-cloud-dataform-v1/lib/google/longrunning/rest.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/longrunning/operations/rest" +require "google/longrunning/bindings_override" +require "google/cloud/dataform/v1/version" + +module Google + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/longrunning/rest" + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + module Longrunning + end +end diff --git a/google-cloud-dataform-v1/proto_docs/google/api/client.rb b/google-cloud-dataform-v1/proto_docs/google/api/client.rb index c6b6b60729c9..30c954fb0d5c 100644 --- a/google-cloud-dataform-v1/proto_docs/google/api/client.rb +++ b/google-cloud-dataform-v1/proto_docs/google/api/client.rb @@ -31,6 +31,8 @@ module Api # @!attribute [rw] selective_gapic_generation # @return [::Google::Api::SelectiveGapicGeneration] # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. class CommonLanguageSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -141,9 +143,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +158,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. @@ -190,6 +193,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +335,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +363,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... # @!attribute [rw] long_running # @return [::Google::Api::MethodSettings::LongRunning] # Describes settings to use for long-running operations when generating @@ -356,14 +375,14 @@ class RenamedServicesEntry # # Example of a YAML configuration:: # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes # @!attribute [rw] auto_populated_fields # @return [::Array<::String>] # List of top-level fields of the request message, that should be @@ -372,11 +391,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -411,6 +443,8 @@ class LongRunning # This message is used to configure the generation of a subset of the RPCs in # a service for client libraries. + # + # Note: This feature should not be used in most cases. # @!attribute [rw] methods # @return [::Array<::String>] # An allowlist of the fully qualified names of RPCs that should be included @@ -428,6 +462,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +574,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-dataform-v1/proto_docs/google/cloud/dataform/v1/dataform.rb b/google-cloud-dataform-v1/proto_docs/google/cloud/dataform/v1/dataform.rb index a2f85a7dd6ef..768cbea46de7 100644 --- a/google-cloud-dataform-v1/proto_docs/google/cloud/dataform/v1/dataform.rb +++ b/google-cloud-dataform-v1/proto_docs/google/cloud/dataform/v1/dataform.rb @@ -35,6 +35,19 @@ class DataEncryptionState # @!attribute [rw] name # @return [::String] # Identifier. The repository's name. + # @!attribute [rw] containing_folder + # @return [::String] + # Optional. The name of the containing folder of the repository. + # The field is immutable and it can be modified via a MoveRepository + # operation. + # Format: `projects/*/locations/*/folders/*`. or + # `projects/*/locations/*/teamFolders/*`. + # @!attribute [r] team_folder_name + # @return [::String] + # Output only. The resource name of the TeamFolder that this Repository is + # associated with. This should take the format: + # projects/\\{project}/locations/\\{location}/teamFolders/\\{teamFolder}. If this + # is not set, the Repository is not associated with a TeamFolder. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The timestamp of when the repository was created. @@ -168,6 +181,16 @@ class LabelsEntry end end + # Metadata used to identify if a resource is user scoped. + # @!attribute [r] user_scoped + # @return [::Boolean] + # Output only. If true, this resource is user-scoped, meaning it is either a + # workspace or sourced from a workspace. + class PrivateResourceMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # `ListRepositories` request message. # @!attribute [rw] parent # @return [::String] @@ -215,6 +238,21 @@ class ListRepositoriesResponse extend ::Google::Protobuf::MessageExts::ClassMethods end + # `MoveRepository` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The full resource name of the repository to move. + # @!attribute [rw] destination_containing_folder + # @return [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # repository to. Can be in the format of: "" to move into the root User + # folder, `projects/*/locations/*/folders/*`, + # `projects/*/locations/*/teamFolders/*` + class MoveRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # `GetRepository` request message. # @!attribute [rw] name # @return [::String] @@ -260,9 +298,13 @@ class UpdateRepositoryRequest # Required. The repository's name. # @!attribute [rw] force # @return [::Boolean] - # Optional. If set to true, any child resources of this repository will also - # be deleted. (Otherwise, the request will only succeed if the repository has - # no child resources.) + # Optional. If set to true, child resources of this repository (compilation + # results and workflow invocations) will also be deleted. Otherwise, the + # request will only succeed if the repository has no child resources. + # + # **Note:** *This flag doesn't support deletion of workspaces, release + # configs or workflow configs. If any of such resources exists in the + # repository, the request will fail.*. class DeleteRepositoryRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -503,6 +545,9 @@ module TokenStatus # The token was used successfully to authenticate against the Git remote. VALID = 3 + + # The token is not accessible due to permission issues. + PERMISSION_DENIED = 4 end end @@ -540,6 +585,14 @@ class FetchRemoteBranchesResponse # Output only. All the metadata information that is used internally to serve # the resource. For example: timestamps, flags, status fields, etc. The # format of this field is a JSON string. + # @!attribute [rw] disable_moves + # @return [::Boolean] + # Optional. If set to true, workspaces will not be moved if its linked + # Repository is moved. Instead, it will be deleted. + # @!attribute [r] private_resource_metadata + # @return [::Google::Cloud::Dataform::V1::PrivateResourceMetadata] + # Output only. Metadata indicating whether this resource is user-scoped. For + # `Workspace` resources, the `user_scoped` field is always `true`. class Workspace include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -847,6 +900,12 @@ class FetchFileDiffResponse # When paginating, all other parameters provided to # `QueryDirectoryContents`, with the exception of `page_size`, must match the # call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Dataform::V1::DirectoryContentsView] + # Optional. Specifies the metadata to return for each directory entry. + # If unspecified, the default is `DIRECTORY_CONTENTS_VIEW_BASIC`. + # Currently the `DIRECTORY_CONTENTS_VIEW_METADATA` view is not supported by + # CMEK-protected workspaces. class QueryDirectoryContentsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -876,11 +935,27 @@ class QueryDirectoryContentsResponse # A child directory in the directory. # # Note: The following fields are mutually exclusive: `directory`, `file`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Dataform::V1::FilesystemEntryMetadata] + # Entry with metadata. class DirectoryEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # Represents metadata for a single entry in a filesystem. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. Provides the size of the entry in bytes. For directories, this + # will be 0. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Represents the time of the last modification of the entry. + class FilesystemEntryMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Configuration containing file search request parameters. # @!attribute [rw] workspace # @return [::String] @@ -1332,6 +1407,11 @@ class DeleteReleaseConfigRequest # Output only. All the metadata information that is used internally to serve # the resource. For example: timestamps, flags, status fields, etc. The # format of this field is a JSON string. + # @!attribute [r] private_resource_metadata + # @return [::Google::Cloud::Dataform::V1::PrivateResourceMetadata] + # Output only. Metadata indicating whether this resource is user-scoped. + # `CompilationResult` resource is `user_scoped` only if it is sourced + # from a workspace. class CompilationResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1647,6 +1727,24 @@ class CompilationResultAction # options clause of a create table/view statement. See # https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language # for more information on which options are supported. + # @!attribute [rw] connection + # @return [::String] + # Optional. The connection specifying the credentials to be used to read + # and write to external storage, such as Cloud Storage. The connection can + # have the form `{project}.{location}.{connection_id}` or + # `projects/{project}/locations/{location}/connections/{connection_id}`, + # or be set to DEFAULT. + # @!attribute [rw] table_format + # @return [::Google::Cloud::Dataform::V1::CompilationResultAction::Relation::TableFormat] + # Optional. The table format for the BigQuery table. + # @!attribute [rw] file_format + # @return [::Google::Cloud::Dataform::V1::CompilationResultAction::Relation::FileFormat] + # Optional. The file format for the BigQuery table. + # @!attribute [rw] storage_uri + # @return [::String] + # Optional. The fully qualified location prefix of the external folder + # where table data is stored. The URI should be in the format + # `gs://bucket/path_to_table/`. class Relation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -1709,6 +1807,24 @@ module RelationType # The relation is a materialized view. MATERIALIZED_VIEW = 4 end + + # Supported table formats for BigQuery tables. + module TableFormat + # Default value. + TABLE_FORMAT_UNSPECIFIED = 0 + + # Apache Iceberg format. + ICEBERG = 1 + end + + # Supported file formats for BigQuery tables. + module FileFormat + # Default value. + FILE_FORMAT_UNSPECIFIED = 0 + + # Apache Parquet format. + PARQUET = 1 + end end # Represents a list of arbitrary database operations. @@ -2026,9 +2142,30 @@ class ScheduledExecutionRecord # @!attribute [rw] service_account # @return [::String] # Optional. The service account to run workflow invocations under. + # @!attribute [rw] query_priority + # @return [::Google::Cloud::Dataform::V1::InvocationConfig::QueryPriority] + # Optional. Specifies the priority for query execution in BigQuery. + # More information can be found at + # https://cloud.google.com/bigquery/docs/running-queries#queries. class InvocationConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of priority for query execution in BigQuery. + module QueryPriority + # Default value. This value is unused. + QUERY_PRIORITY_UNSPECIFIED = 0 + + # Query will be executed in BigQuery with interactive priority. + # More information can be found at + # https://cloud.google.com/bigquery/docs/running-queries#queries. + INTERACTIVE = 1 + + # Query will be executed in BigQuery with batch priority. + # More information can be found at + # https://cloud.google.com/bigquery/docs/running-queries#batchqueries. + BATCH = 2 + end end # `ListWorkflowConfigs` request message. @@ -2157,6 +2294,11 @@ class DeleteWorkflowConfigRequest # Output only. All the metadata information that is used internally to serve # the resource. For example: timestamps, flags, status fields, etc. The # format of this field is a JSON string. + # @!attribute [r] private_resource_metadata + # @return [::Google::Cloud::Dataform::V1::PrivateResourceMetadata] + # Output only. Metadata indicating whether this resource is user-scoped. + # `WorkflowInvocation` resource is `user_scoped` only if it is sourced + # from a compilation result and the compilation result is user-scoped. class WorkflowInvocation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2521,6 +2663,11 @@ class QueryWorkflowInvocationActionsResponse # @return [::String] # Optional. The default KMS key that is used if no encryption key is provided # when a repository is created. + # @!attribute [r] internal_metadata + # @return [::String] + # Output only. All the metadata information that is used internally to serve + # the resource. For example: timestamps, flags, status fields, etc. The + # format of this field is a JSON string. class Config include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -2546,6 +2693,615 @@ class UpdateConfigRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Represents a Dataform Folder. This is a resource that is used to organize + # Files and other Folders and provide hierarchical access controls. + # @!attribute [rw] name + # @return [::String] + # Identifier. The Folder's name. + # @!attribute [rw] display_name + # @return [::String] + # Required. The Folder's user-friendly name. + # @!attribute [rw] containing_folder + # @return [::String] + # Optional. The containing Folder resource name. This should take + # the format: projects/\\{project}/locations/\\{location}/folders/\\{folder}, + # projects/\\{project}/locations/\\{location}/teamFolders/\\{teamFolder}, or just + # projects/\\{project}/locations/\\{location} if this is a root Folder. This + # field can only be updated through MoveFolder. + # @!attribute [r] team_folder_name + # @return [::String] + # Output only. The resource name of the TeamFolder that this Folder is + # associated with. This should take the format: + # projects/\\{project}/locations/\\{location}/teamFolders/\\{teamFolder}. If this + # is not set, the Folder is not associated with a TeamFolder and is a + # UserFolder. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the Folder was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the Folder was last updated. + # @!attribute [r] internal_metadata + # @return [::String] + # Output only. All the metadata information that is used internally to serve + # the resource. For example: timestamps, flags, status fields, etc. The + # format of this field is a JSON string. + # @!attribute [r] creator_iam_principal + # @return [::String] + # Output only. The IAM principal identifier of the creator of the Folder. + class Folder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CreateFolder` request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The location in which to create the Folder. Must be in the format + # `projects/*/locations/*`. + # @!attribute [rw] folder + # @return [::Google::Cloud::Dataform::V1::Folder] + # Required. The Folder to create. + class CreateFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `MoveFolder` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The full resource name of the Folder to move. + # @!attribute [rw] destination_containing_folder + # @return [::String] + # Optional. The name of the Folder, TeamFolder, or root location to move the + # Folder to. Can be in the format of: "" to move into the root User folder, + # `projects/*/locations/*/folders/*`, `projects/*/locations/*/teamFolders/*` + class MoveFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `GetFolder` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The Folder's name. + class GetFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateFolder` request message. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields that can be updated, will be updated. A few fields cannot be + # updated and will be ignored if specified in the update_mask (e.g. + # parent_name, team_folder_name). + # @!attribute [rw] folder + # @return [::Google::Cloud::Dataform::V1::Folder] + # Required. The updated Folder. + class UpdateFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DeleteFolder` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The Folder's name. + class DeleteFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DeleteFolderTree` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The Folder's name. + # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder} + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + class DeleteFolderTreeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DeleteTeamFolderTree` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The TeamFolder's name. + # Format: projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder} + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If `false` (default): The operation will fail if any + # Repository within the folder hierarchy has associated Release Configs or + # Workflow Configs. + # + # If `true`: The operation will attempt to delete everything, including any + # Release Configs and Workflow Configs linked to Repositories within the + # folder hierarchy. This permanently removes schedules and resources. + class DeleteTeamFolderTreeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains metadata about the progress of the DeleteFolderTree Long-running + # operations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Resource name of the target of the operation. + # Format: projects/\\{project}/locations/\\{location}/folders/\\{folder} or + # projects/\\{project}/locations/\\{location}/teamFolders/\\{team_folder} + # @!attribute [r] state + # @return [::Google::Cloud::Dataform::V1::DeleteFolderTreeMetadata::State] + # Output only. The state of the operation. + # @!attribute [r] percent_complete + # @return [::Integer] + # Output only. Percent complete of the operation [0, 100]. + class DeleteFolderTreeMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Different states of the DeleteFolderTree operation. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The operation was initialized and recorded by the server, but not yet + # started. + INITIALIZED = 1 + + # The operation is in progress. + IN_PROGRESS = 2 + + # The operation has completed successfully. + SUCCEEDED = 3 + + # The operation has failed. + FAILED = 4 + end + end + + # `QueryFolderContents` request message. + # @!attribute [rw] folder + # @return [::String] + # Required. Name of the folder whose contents to list. + # Format: projects/*/locations/*/folders/* + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `QueryFolderContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryFolderContents`, with the exception of `page_size`, must match the + # call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), create_time, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @!attribute [rw] filter + # @return [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + class QueryFolderContentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `QueryFolderContents` response message. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry>] + # List of entries in the folder. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class QueryFolderContentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single content entry. + # @!attribute [rw] folder + # @return [::Google::Cloud::Dataform::V1::Folder] + # A subfolder. + # + # Note: The following fields are mutually exclusive: `folder`, `repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] repository + # @return [::Google::Cloud::Dataform::V1::Repository] + # A repository. + # + # Note: The following fields are mutually exclusive: `repository`, `folder`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class FolderContentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `QueryUserRootContents` request message. + # @!attribute [rw] location + # @return [::String] + # Required. Location of the user root folder whose contents to list. + # Format: projects/*/locations/* + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `QueryUserRootContents` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryUserRootFolderContents`, with the exception of `page_size`, must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: display_name (default), created_at, + # last_modified_at. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @!attribute [rw] filter + # @return [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + class QueryUserRootContentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `QueryUserRootContents` response message. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry>] + # List of entries in the folder. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class QueryUserRootContentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single content entry. + # @!attribute [rw] folder + # @return [::Google::Cloud::Dataform::V1::Folder] + # A subfolder. + # + # Note: The following fields are mutually exclusive: `folder`, `repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] repository + # @return [::Google::Cloud::Dataform::V1::Repository] + # A repository. + # + # Note: The following fields are mutually exclusive: `repository`, `folder`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RootContentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a Dataform TeamFolder. This is a resource that sits at the project + # level and is used to organize Repositories and Folders with hierarchical + # access controls. They provide a team context and stricter access controls. + # @!attribute [rw] name + # @return [::String] + # Identifier. The TeamFolder's name. + # @!attribute [rw] display_name + # @return [::String] + # Required. The TeamFolder's user-friendly name. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the TeamFolder was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the TeamFolder was last updated. + # @!attribute [r] internal_metadata + # @return [::String] + # Output only. All the metadata information that is used internally to serve + # the resource. For example: timestamps, flags, status fields, etc. The + # format of this field is a JSON string. + # @!attribute [r] creator_iam_principal + # @return [::String] + # Output only. The IAM principal identifier of the creator of the TeamFolder. + class TeamFolder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `CreateTeamFolder` request message. + # @!attribute [rw] parent + # @return [::String] + # Required. The location in which to create the TeamFolder. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] team_folder + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # Required. The TeamFolder to create. + class CreateTeamFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `GetTeamFolder` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The TeamFolder's name. + class GetTeamFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `UpdateTeamFolder` request message. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Specifies the fields to be updated in the Folder. If left unset, + # all fields will be updated. + # @!attribute [rw] team_folder + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # Required. The updated TeamFolder. + class UpdateTeamFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `DeleteTeamFolder` request message. + # @!attribute [rw] name + # @return [::String] + # Required. The TeamFolder's name. + class DeleteTeamFolderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `QueryTeamFolderContents` request message. + # @!attribute [rw] team_folder + # @return [::String] + # Required. Name of the team_folder whose contents to list. + # Format: `projects/*/locations/*/teamFolders/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of paths to return. The server may return fewer + # items than requested. If unspecified, the server will pick an appropriate + # default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `QueryTeamFolderContents` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `QueryTeamFolderContents`, with the exception of `page_size`, must match + # the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to additionally sort results by. + # Will order Folders before Repositories, and then by `order_by` in ascending + # order. Supported keywords: `display_name` (default), `create_time`, + # last_modified_time. + # Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @!attribute [rw] filter + # @return [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + class QueryTeamFolderContentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `QueryTeamFolderContents` response message. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # List of entries in the TeamFolder. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class QueryTeamFolderContentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single content entry. + # @!attribute [rw] folder + # @return [::Google::Cloud::Dataform::V1::Folder] + # A subfolder. + # + # Note: The following fields are mutually exclusive: `folder`, `repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] repository + # @return [::Google::Cloud::Dataform::V1::Repository] + # A repository. + # + # Note: The following fields are mutually exclusive: `repository`, `folder`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TeamFolderContentsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `SearchTeamFolders` request message. + # @!attribute [rw] location + # @return [::String] + # Required. Location in which to query TeamFolders. + # Format: `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of TeamFolders to return. The server may return + # fewer items than requested. If unspecified, the server will pick an + # appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Page token received from a previous `SearchTeamFolders` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `SearchTeamFolders`, with the exception of `page_size`, must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field to additionally sort results by. + # Supported keywords: `display_name` (default), `create_time`, + # `last_modified_time`. Examples: + # - `orderBy="display_name"` + # - `orderBy="display_name desc"` + # @!attribute [rw] filter + # @return [::String] + # Optional. Optional filtering for the returned list. Filtering is currently + # only supported on the `display_name` field. + # + # Example: + # - `filter="display_name="MyFolder""` + class SearchTeamFoldersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `SearchTeamFolders` response message. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # List of TeamFolders that match the search query. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class SearchTeamFoldersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a single content entry. + # @!attribute [rw] team_folder + # @return [::Google::Cloud::Dataform::V1::TeamFolder] + # A TeamFolder resource that is in the project / location. + class TeamFolderSearchResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains metadata about the progress of the MoveFolder Long-running + # operations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataform::V1::MoveFolderMetadata::State] + # The state of the move. + # @!attribute [rw] percent_complete + # @return [::Integer] + # Percent complete of the move [0, 100]. + class MoveFolderMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Different states of the move. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The move was initialized and recorded by the server, but not yet started. + INITIALIZED = 1 + + # The move is in progress. + IN_PROGRESS = 2 + + # The move has completed successfully. + SUCCESS = 3 + + # The move has failed. + FAILED = 4 + end + end + + # Contains metadata about the progress of the MoveRepository Long-running + # operations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Dataform::V1::MoveRepositoryMetadata::State] + # The state of the move. + # @!attribute [rw] percent_complete + # @return [::Integer] + # Percent complete of the move [0, 100]. + class MoveRepositoryMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Different states of the move. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The move was initialized and recorded by the server, but not yet started. + INITIALIZED = 1 + + # The move is in progress. + IN_PROGRESS = 2 + + # The move has completed successfully. + SUCCESS = 3 + + # The move has failed. + FAILED = 4 + end + end + + # Represents the level of detail to return for directory contents. + module DirectoryContentsView + # The default / unset value. Defaults to DIRECTORY_CONTENTS_VIEW_BASIC. + DIRECTORY_CONTENTS_VIEW_UNSPECIFIED = 0 + + # Includes only the file or directory name. This is the default behavior. + DIRECTORY_CONTENTS_VIEW_BASIC = 1 + + # Includes all metadata for each file or directory. Currently not supported + # by CMEK-protected workspaces. + DIRECTORY_CONTENTS_VIEW_METADATA = 2 + end end end end diff --git a/google-cloud-dataform-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-dataform-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/google-cloud-dataform-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # 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`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/google-cloud-dataform-v1/snippets/dataform/create_folder.rb b/google-cloud-dataform-v1/snippets/dataform/create_folder.rb new file mode 100644 index 000000000000..3c2f8f0e4f94 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/create_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_CreateFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the create_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#create_folder. +# +def create_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::CreateFolderRequest.new + + # Call the create_folder method. + result = client.create_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::Folder. + p result +end +# [END dataform_v1_generated_Dataform_CreateFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/create_team_folder.rb b/google-cloud-dataform-v1/snippets/dataform/create_team_folder.rb new file mode 100644 index 000000000000..4cb79ef5ac63 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/create_team_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_CreateTeamFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the create_team_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#create_team_folder. +# +def create_team_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new + + # Call the create_team_folder method. + result = client.create_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + p result +end +# [END dataform_v1_generated_Dataform_CreateTeamFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/delete_folder.rb b/google-cloud-dataform-v1/snippets/dataform/delete_folder.rb new file mode 100644 index 000000000000..b77ee48d1380 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/delete_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_DeleteFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the delete_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#delete_folder. +# +def delete_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::DeleteFolderRequest.new + + # Call the delete_folder method. + result = client.delete_folder request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataform_v1_generated_Dataform_DeleteFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/delete_folder_tree.rb b/google-cloud-dataform-v1/snippets/dataform/delete_folder_tree.rb new file mode 100644 index 000000000000..b2e3907a8605 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/delete_folder_tree.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_DeleteFolderTree_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the delete_folder_tree call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#delete_folder_tree. +# +def delete_folder_tree + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new + + # Call the delete_folder_tree method. + result = client.delete_folder_tree request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Dataform_DeleteFolderTree_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/delete_team_folder.rb b/google-cloud-dataform-v1/snippets/dataform/delete_team_folder.rb new file mode 100644 index 000000000000..45cfe3a54207 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/delete_team_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_DeleteTeamFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the delete_team_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder. +# +def delete_team_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new + + # Call the delete_team_folder method. + result = client.delete_team_folder request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataform_v1_generated_Dataform_DeleteTeamFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/delete_team_folder_tree.rb b/google-cloud-dataform-v1/snippets/dataform/delete_team_folder_tree.rb new file mode 100644 index 000000000000..9ef55af12135 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/delete_team_folder_tree.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_DeleteTeamFolderTree_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the delete_team_folder_tree call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder_tree. +# +def delete_team_folder_tree + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new + + # Call the delete_team_folder_tree method. + result = client.delete_team_folder_tree request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Dataform_DeleteTeamFolderTree_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/get_folder.rb b/google-cloud-dataform-v1/snippets/dataform/get_folder.rb new file mode 100644 index 000000000000..689877e96673 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/get_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_GetFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the get_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#get_folder. +# +def get_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::GetFolderRequest.new + + # Call the get_folder method. + result = client.get_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::Folder. + p result +end +# [END dataform_v1_generated_Dataform_GetFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/get_iam_policy.rb b/google-cloud-dataform-v1/snippets/dataform/get_iam_policy.rb new file mode 100644 index 000000000000..df48c36f2d16 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_GetIamPolicy_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the get_iam_policy call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataform_v1_generated_Dataform_GetIamPolicy_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/get_team_folder.rb b/google-cloud-dataform-v1/snippets/dataform/get_team_folder.rb new file mode 100644 index 000000000000..287238e52743 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/get_team_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_GetTeamFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the get_team_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#get_team_folder. +# +def get_team_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::GetTeamFolderRequest.new + + # Call the get_team_folder method. + result = client.get_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + p result +end +# [END dataform_v1_generated_Dataform_GetTeamFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/move_folder.rb b/google-cloud-dataform-v1/snippets/dataform/move_folder.rb new file mode 100644 index 000000000000..eebe84d46640 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/move_folder.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_MoveFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the move_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#move_folder. +# +def move_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::MoveFolderRequest.new + + # Call the move_folder method. + result = client.move_folder request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Dataform_MoveFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/move_repository.rb b/google-cloud-dataform-v1/snippets/dataform/move_repository.rb new file mode 100644 index 000000000000..4eca8dd9c54f --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/move_repository.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_MoveRepository_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the move_repository call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#move_repository. +# +def move_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::MoveRepositoryRequest.new + + # Call the move_repository method. + result = client.move_repository request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Dataform_MoveRepository_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/query_folder_contents.rb b/google-cloud-dataform-v1/snippets/dataform/query_folder_contents.rb new file mode 100644 index 000000000000..ad16707edc04 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/query_folder_contents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_QueryFolderContents_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the query_folder_contents call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#query_folder_contents. +# +def query_folder_contents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new + + # Call the query_folder_contents method. + result = client.query_folder_contents request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse::FolderContentsEntry. + p item + end +end +# [END dataform_v1_generated_Dataform_QueryFolderContents_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/query_team_folder_contents.rb b/google-cloud-dataform-v1/snippets/dataform/query_team_folder_contents.rb new file mode 100644 index 000000000000..90a3760b3221 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/query_team_folder_contents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_QueryTeamFolderContents_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the query_team_folder_contents call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#query_team_folder_contents. +# +def query_team_folder_contents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new + + # Call the query_team_folder_contents method. + result = client.query_team_folder_contents request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry. + p item + end +end +# [END dataform_v1_generated_Dataform_QueryTeamFolderContents_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/query_user_root_contents.rb b/google-cloud-dataform-v1/snippets/dataform/query_user_root_contents.rb new file mode 100644 index 000000000000..d070b3379fd4 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/query_user_root_contents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_QueryUserRootContents_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the query_user_root_contents call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#query_user_root_contents. +# +def query_user_root_contents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new + + # Call the query_user_root_contents method. + result = client.query_user_root_contents request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse::RootContentsEntry. + p item + end +end +# [END dataform_v1_generated_Dataform_QueryUserRootContents_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/search_team_folders.rb b/google-cloud-dataform-v1/snippets/dataform/search_team_folders.rb new file mode 100644 index 000000000000..4a5fa15a73e6 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/search_team_folders.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_SearchTeamFolders_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the search_team_folders call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#search_team_folders. +# +def search_team_folders + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new + + # Call the search_team_folders method. + result = client.search_team_folders request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse::TeamFolderSearchResult. + p item + end +end +# [END dataform_v1_generated_Dataform_SearchTeamFolders_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/set_iam_policy.rb b/google-cloud-dataform-v1/snippets/dataform/set_iam_policy.rb new file mode 100644 index 000000000000..335c8370204f --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_SetIamPolicy_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the set_iam_policy call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END dataform_v1_generated_Dataform_SetIamPolicy_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/test_iam_permissions.rb b/google-cloud-dataform-v1/snippets/dataform/test_iam_permissions.rb new file mode 100644 index 000000000000..9c833d143ff9 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/test_iam_permissions.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_TestIamPermissions_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the test_iam_permissions call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END dataform_v1_generated_Dataform_TestIamPermissions_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/update_folder.rb b/google-cloud-dataform-v1/snippets/dataform/update_folder.rb new file mode 100644 index 000000000000..f2f0cfad66fd --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/update_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_UpdateFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the update_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#update_folder. +# +def update_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::UpdateFolderRequest.new + + # Call the update_folder method. + result = client.update_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::Folder. + p result +end +# [END dataform_v1_generated_Dataform_UpdateFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/dataform/update_team_folder.rb b/google-cloud-dataform-v1/snippets/dataform/update_team_folder.rb new file mode 100644 index 000000000000..b98113a24978 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/dataform/update_team_folder.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Dataform_UpdateTeamFolder_sync] +require "google/cloud/dataform/v1" + +## +# Snippet for the update_team_folder call in the Dataform service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Dataform::V1::Dataform::Client#update_team_folder. +# +def update_team_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new + + # Call the update_team_folder method. + result = client.update_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1::TeamFolder. + p result +end +# [END dataform_v1_generated_Dataform_UpdateTeamFolder_sync] diff --git a/google-cloud-dataform-v1/snippets/operations/cancel_operation.rb b/google-cloud-dataform-v1/snippets/operations/cancel_operation.rb new file mode 100644 index 000000000000..ac17556a7c35 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/operations/cancel_operation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Operations_CancelOperation_sync] +require "google/longrunning" + +## +# Snippet for the cancel_operation call in the Operations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Longrunning::Operations::Client#cancel_operation. +# +def cancel_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Longrunning::Operations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Longrunning::CancelOperationRequest.new + + # Call the cancel_operation method. + result = client.cancel_operation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataform_v1_generated_Operations_CancelOperation_sync] diff --git a/google-cloud-dataform-v1/snippets/operations/delete_operation.rb b/google-cloud-dataform-v1/snippets/operations/delete_operation.rb new file mode 100644 index 000000000000..5a5ca99c1168 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/operations/delete_operation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Operations_DeleteOperation_sync] +require "google/longrunning" + +## +# Snippet for the delete_operation call in the Operations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Longrunning::Operations::Client#delete_operation. +# +def delete_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Longrunning::Operations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Longrunning::DeleteOperationRequest.new + + # Call the delete_operation method. + result = client.delete_operation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END dataform_v1_generated_Operations_DeleteOperation_sync] diff --git a/google-cloud-dataform-v1/snippets/operations/get_operation.rb b/google-cloud-dataform-v1/snippets/operations/get_operation.rb new file mode 100644 index 000000000000..cd1170168513 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/operations/get_operation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Operations_GetOperation_sync] +require "google/longrunning" + +## +# Snippet for the get_operation call in the Operations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Longrunning::Operations::Client#get_operation. +# +def get_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Longrunning::Operations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Longrunning::GetOperationRequest.new + + # Call the get_operation method. + result = client.get_operation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Operations_GetOperation_sync] diff --git a/google-cloud-dataform-v1/snippets/operations/list_operations.rb b/google-cloud-dataform-v1/snippets/operations/list_operations.rb new file mode 100644 index 000000000000..f9b07ec66d86 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/operations/list_operations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Operations_ListOperations_sync] +require "google/longrunning" + +## +# Snippet for the list_operations call in the Operations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Longrunning::Operations::Client#list_operations. +# +def list_operations + # Create a client object. The client can be reused for multiple calls. + client = Google::Longrunning::Operations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Longrunning::ListOperationsRequest.new + + # Call the list_operations method. + result = client.list_operations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Longrunning::Operation. + p item + end +end +# [END dataform_v1_generated_Operations_ListOperations_sync] diff --git a/google-cloud-dataform-v1/snippets/operations/wait_operation.rb b/google-cloud-dataform-v1/snippets/operations/wait_operation.rb new file mode 100644 index 000000000000..bbec9a28ddd7 --- /dev/null +++ b/google-cloud-dataform-v1/snippets/operations/wait_operation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START dataform_v1_generated_Operations_WaitOperation_sync] +require "google/longrunning" + +## +# Snippet for the wait_operation call in the Operations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Longrunning::Operations::Client#wait_operation. +# +def wait_operation + # Create a client object. The client can be reused for multiple calls. + client = Google::Longrunning::Operations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Longrunning::WaitOperationRequest.new + + # Call the wait_operation method. + result = client.wait_operation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END dataform_v1_generated_Operations_WaitOperation_sync] diff --git a/google-cloud-dataform-v1/snippets/snippet_metadata_google.cloud.dataform.v1.json b/google-cloud-dataform-v1/snippets/snippet_metadata_google.cloud.dataform.v1.json index 300717888282..f352d1a1275e 100644 --- a/google-cloud-dataform-v1/snippets/snippet_metadata_google.cloud.dataform.v1.json +++ b/google-cloud-dataform-v1/snippets/snippet_metadata_google.cloud.dataform.v1.json @@ -11,6 +11,606 @@ ] }, "snippets": [ + { + "region_tag": "dataform_v1_generated_Dataform_GetTeamFolder_sync", + "title": "Snippet for the get_team_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#get_team_folder.", + "file": "dataform/get_team_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_team_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#get_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::GetTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "GetTeamFolder", + "full_name": "google.cloud.dataform.v1.Dataform.GetTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_CreateTeamFolder_sync", + "title": "Snippet for the create_team_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#create_team_folder.", + "file": "dataform/create_team_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_team_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#create_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::CreateTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "CreateTeamFolder", + "full_name": "google.cloud.dataform.v1.Dataform.CreateTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_UpdateTeamFolder_sync", + "title": "Snippet for the update_team_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#update_team_folder.", + "file": "dataform/update_team_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_team_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#update_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "UpdateTeamFolder", + "full_name": "google.cloud.dataform.v1.Dataform.UpdateTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_DeleteTeamFolder_sync", + "title": "Snippet for the delete_team_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder.", + "file": "dataform/delete_team_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_team_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "DeleteTeamFolder", + "full_name": "google.cloud.dataform.v1.Dataform.DeleteTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_DeleteTeamFolderTree_sync", + "title": "Snippet for the delete_team_folder_tree call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder_tree.", + "file": "dataform/delete_team_folder_tree.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_team_folder_tree", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#delete_team_folder_tree", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "DeleteTeamFolderTree", + "full_name": "google.cloud.dataform.v1.Dataform.DeleteTeamFolderTree", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_QueryTeamFolderContents_sync", + "title": "Snippet for the query_team_folder_contents call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#query_team_folder_contents.", + "file": "dataform/query_team_folder_contents.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_team_folder_contents", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#query_team_folder_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "QueryTeamFolderContents", + "full_name": "google.cloud.dataform.v1.Dataform.QueryTeamFolderContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_SearchTeamFolders_sync", + "title": "Snippet for the search_team_folders call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#search_team_folders.", + "file": "dataform/search_team_folders.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_team_folders", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#search_team_folders", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "SearchTeamFolders", + "full_name": "google.cloud.dataform.v1.Dataform.SearchTeamFolders", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_GetFolder_sync", + "title": "Snippet for the get_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#get_folder.", + "file": "dataform/get_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#get_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::GetFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "GetFolder", + "full_name": "google.cloud.dataform.v1.Dataform.GetFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_CreateFolder_sync", + "title": "Snippet for the create_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#create_folder.", + "file": "dataform/create_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#create_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::CreateFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "CreateFolder", + "full_name": "google.cloud.dataform.v1.Dataform.CreateFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_UpdateFolder_sync", + "title": "Snippet for the update_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#update_folder.", + "file": "dataform/update_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#update_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::UpdateFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "UpdateFolder", + "full_name": "google.cloud.dataform.v1.Dataform.UpdateFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_DeleteFolder_sync", + "title": "Snippet for the delete_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#delete_folder.", + "file": "dataform/delete_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#delete_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::DeleteFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "DeleteFolder", + "full_name": "google.cloud.dataform.v1.Dataform.DeleteFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_DeleteFolderTree_sync", + "title": "Snippet for the delete_folder_tree call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#delete_folder_tree.", + "file": "dataform/delete_folder_tree.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_folder_tree", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#delete_folder_tree", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "DeleteFolderTree", + "full_name": "google.cloud.dataform.v1.Dataform.DeleteFolderTree", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_QueryFolderContents_sync", + "title": "Snippet for the query_folder_contents call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#query_folder_contents.", + "file": "dataform/query_folder_contents.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_folder_contents", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#query_folder_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::QueryFolderContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::QueryFolderContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "QueryFolderContents", + "full_name": "google.cloud.dataform.v1.Dataform.QueryFolderContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_QueryUserRootContents_sync", + "title": "Snippet for the query_user_root_contents call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#query_user_root_contents.", + "file": "dataform/query_user_root_contents.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_user_root_contents", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#query_user_root_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "QueryUserRootContents", + "full_name": "google.cloud.dataform.v1.Dataform.QueryUserRootContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_MoveFolder_sync", + "title": "Snippet for the move_folder call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#move_folder.", + "file": "dataform/move_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_folder", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#move_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::MoveFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "MoveFolder", + "full_name": "google.cloud.dataform.v1.Dataform.MoveFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "dataform_v1_generated_Dataform_ListRepositories_sync", "title": "Snippet for the list_repositories call in the Dataform service", @@ -211,6 +811,46 @@ } ] }, + { + "region_tag": "dataform_v1_generated_Dataform_MoveRepository_sync", + "title": "Snippet for the move_repository call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#move_repository.", + "file": "dataform/move_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_repository", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#move_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1::MoveRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "MoveRepository", + "full_name": "google.cloud.dataform.v1.Dataform.MoveRepository", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "dataform_v1_generated_Dataform_CommitRepositoryChanges_sync", "title": "Snippet for the commit_repository_changes call in the Dataform service", @@ -2170,6 +2810,126 @@ "type": "FULL" } ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#get_iam_policy.", + "file": "dataform/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.dataform.v1.Dataform.GetIamPolicy", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#set_iam_policy.", + "file": "dataform/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.dataform.v1.Dataform.SetIamPolicy", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Dataform_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the Dataform service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Dataform::V1::Dataform::Client#test_iam_permissions.", + "file": "dataform/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1::Dataform::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.dataform.v1.Dataform.TestIamPermissions", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-dataform-v1/snippets/snippet_metadata_google.longrunning.json b/google-cloud-dataform-v1/snippets/snippet_metadata_google.longrunning.json new file mode 100644 index 000000000000..2a7c8f5e757a --- /dev/null +++ b/google-cloud-dataform-v1/snippets/snippet_metadata_google.longrunning.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-dataform-v1", + "version": "0.3.0", + "language": "RUBY", + "apis": [ + { + "id": "google.longrunning", + "version": "longrunning" + } + ] + }, + "snippets": [ + { + "region_tag": "dataform_v1_generated_Operations_ListOperations_sync", + "title": "Snippet for the list_operations call in the Operations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Longrunning::Operations::Client#list_operations.", + "file": "operations/list_operations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_operations", + "full_name": "::Google::Longrunning::Operations::Client#list_operations", + "async": false, + "parameters": [ + { + "type": "::Google::Longrunning::ListOperationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::ListOperationsResponse", + "client": { + "short_name": "Operations::Client", + "full_name": "::Google::Longrunning::Operations::Client" + }, + "method": { + "short_name": "ListOperations", + "full_name": "google.longrunning.Operations.ListOperations", + "service": { + "short_name": "Operations", + "full_name": "google.longrunning.Operations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Operations_GetOperation_sync", + "title": "Snippet for the get_operation call in the Operations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Longrunning::Operations::Client#get_operation.", + "file": "operations/get_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_operation", + "full_name": "::Google::Longrunning::Operations::Client#get_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Longrunning::GetOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Operations::Client", + "full_name": "::Google::Longrunning::Operations::Client" + }, + "method": { + "short_name": "GetOperation", + "full_name": "google.longrunning.Operations.GetOperation", + "service": { + "short_name": "Operations", + "full_name": "google.longrunning.Operations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Operations_DeleteOperation_sync", + "title": "Snippet for the delete_operation call in the Operations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Longrunning::Operations::Client#delete_operation.", + "file": "operations/delete_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_operation", + "full_name": "::Google::Longrunning::Operations::Client#delete_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Longrunning::DeleteOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Operations::Client", + "full_name": "::Google::Longrunning::Operations::Client" + }, + "method": { + "short_name": "DeleteOperation", + "full_name": "google.longrunning.Operations.DeleteOperation", + "service": { + "short_name": "Operations", + "full_name": "google.longrunning.Operations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Operations_CancelOperation_sync", + "title": "Snippet for the cancel_operation call in the Operations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Longrunning::Operations::Client#cancel_operation.", + "file": "operations/cancel_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_operation", + "full_name": "::Google::Longrunning::Operations::Client#cancel_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Longrunning::CancelOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Operations::Client", + "full_name": "::Google::Longrunning::Operations::Client" + }, + "method": { + "short_name": "CancelOperation", + "full_name": "google.longrunning.Operations.CancelOperation", + "service": { + "short_name": "Operations", + "full_name": "google.longrunning.Operations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1_generated_Operations_WaitOperation_sync", + "title": "Snippet for the wait_operation call in the Operations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Longrunning::Operations::Client#wait_operation.", + "file": "operations/wait_operation.rb", + "language": "RUBY", + "client_method": { + "short_name": "wait_operation", + "full_name": "::Google::Longrunning::Operations::Client#wait_operation", + "async": false, + "parameters": [ + { + "type": "::Google::Longrunning::WaitOperationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Operations::Client", + "full_name": "::Google::Longrunning::Operations::Client" + }, + "method": { + "short_name": "WaitOperation", + "full_name": "google.longrunning.Operations.WaitOperation", + "service": { + "short_name": "Operations", + "full_name": "google.longrunning.Operations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_operations_test.rb b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_operations_test.rb new file mode 100644 index 000000000000..98458c3d1dbd --- /dev/null +++ b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/dataform/v1/dataform_pb" +require "google/cloud/dataform/v1/dataform_services_pb" +require "google/cloud/dataform/v1/dataform" + +class ::Google::Cloud::Dataform::V1::Dataform::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataform::V1::Dataform::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::Dataform::V1::Dataform::Operations::Configuration, config + end +end diff --git a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_paths_test.rb b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_paths_test.rb index d13c36810002..34e248602750 100644 --- a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_paths_test.rb +++ b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_paths_test.rb @@ -89,6 +89,18 @@ def test_crypto_key_version_path end end + def test_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.folder_path project: "value0", location: "value1", folder: "value2" + assert_equal "projects/value0/locations/value1/folders/value2", path + end + end + def test_location_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -149,6 +161,18 @@ def test_secret_version_path end end + def test_team_folder_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.team_folder_path project: "value0", location: "value1", team_folder: "value2" + assert_equal "projects/value0/locations/value1/teamFolders/value2", path + end + end + def test_workflow_config_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do diff --git a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_rest_test.rb b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_rest_test.rb index 547fdcd40b6c..475b6e65a896 100644 --- a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_rest_test.rb +++ b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_rest_test.rb @@ -78,6 +78,839 @@ def logger end end + def test_get_team_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::TeamFolder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_team_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_get_team_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_team_folder({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_team_folder name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_team_folder ::Google::Cloud::Dataform::V1::GetTeamFolderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_team_folder({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_team_folder(::Google::Cloud::Dataform::V1::GetTeamFolderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_team_folder_client_stub.call_count + end + end + end + + def test_create_team_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::TeamFolder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + team_folder = {} + + create_team_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_create_team_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_team_folder({ parent: parent, team_folder: team_folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_team_folder parent: parent, team_folder: team_folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_team_folder ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_team_folder({ parent: parent, team_folder: team_folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_team_folder(::Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_team_folder_client_stub.call_count + end + end + end + + def test_update_team_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::TeamFolder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + team_folder = {} + + update_team_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_update_team_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_team_folder({ update_mask: update_mask, team_folder: team_folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_team_folder update_mask: update_mask, team_folder: team_folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_team_folder ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new(update_mask: update_mask, team_folder: team_folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_team_folder({ update_mask: update_mask, team_folder: team_folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_team_folder(::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new(update_mask: update_mask, team_folder: team_folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_team_folder_client_stub.call_count + end + end + end + + def test_delete_team_folder + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_team_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_delete_team_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_team_folder({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_team_folder name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_team_folder ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_team_folder({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_team_folder(::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_team_folder_client_stub.call_count + end + end + end + + def test_delete_team_folder_tree + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_team_folder_tree_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_delete_team_folder_tree_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_team_folder_tree_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_team_folder_tree({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_team_folder_tree name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_team_folder_tree ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_team_folder_tree({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_team_folder_tree(::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_team_folder_tree_client_stub.call_count + end + end + end + + def test_query_team_folder_contents + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + team_folder = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_team_folder_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_query_team_folder_contents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_team_folder_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_team_folder_contents({ team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_team_folder_contents team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_team_folder_contents ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new(team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_team_folder_contents({ team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_team_folder_contents(::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new(team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_team_folder_contents_client_stub.call_count + end + end + end + + def test_search_team_folders + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + location = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + search_team_folders_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_search_team_folders_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_team_folders_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_team_folders({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_team_folders location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_team_folders ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_team_folders({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_team_folders(::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_team_folders_client_stub.call_count + end + end + end + + def test_get_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::Folder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_get_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_folder({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_folder name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_folder ::Google::Cloud::Dataform::V1::GetFolderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_folder({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_folder(::Google::Cloud::Dataform::V1::GetFolderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_folder_client_stub.call_count + end + end + end + + def test_create_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::Folder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + folder = {} + + create_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_create_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_folder({ parent: parent, folder: folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_folder parent: parent, folder: folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_folder ::Google::Cloud::Dataform::V1::CreateFolderRequest.new(parent: parent, folder: folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_folder({ parent: parent, folder: folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_folder(::Google::Cloud::Dataform::V1::CreateFolderRequest.new(parent: parent, folder: folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_folder_client_stub.call_count + end + end + end + + def test_update_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::Folder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + folder = {} + + update_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_update_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_folder({ update_mask: update_mask, folder: folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_folder update_mask: update_mask, folder: folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_folder ::Google::Cloud::Dataform::V1::UpdateFolderRequest.new(update_mask: update_mask, folder: folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_folder({ update_mask: update_mask, folder: folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_folder(::Google::Cloud::Dataform::V1::UpdateFolderRequest.new(update_mask: update_mask, folder: folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_folder_client_stub.call_count + end + end + end + + def test_delete_folder + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_delete_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_folder({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_folder name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_folder ::Google::Cloud::Dataform::V1::DeleteFolderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_folder({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_folder(::Google::Cloud::Dataform::V1::DeleteFolderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_folder_client_stub.call_count + end + end + end + + def test_delete_folder_tree + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_folder_tree_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_delete_folder_tree_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_folder_tree_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_folder_tree({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_folder_tree name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_folder_tree ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_folder_tree({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_folder_tree(::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_folder_tree_client_stub.call_count + end + end + end + + def test_query_folder_contents + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + folder = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_folder_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_query_folder_contents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_folder_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_folder_contents({ folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_folder_contents folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_folder_contents ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new(folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_folder_contents({ folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_folder_contents(::Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new(folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_folder_contents_client_stub.call_count + end + end + end + + def test_query_user_root_contents + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + location = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_user_root_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_query_user_root_contents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_user_root_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_user_root_contents({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_user_root_contents location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_user_root_contents ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_user_root_contents({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_user_root_contents(::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_user_root_contents_client_stub.call_count + end + end + end + + def test_move_folder + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_containing_folder = "hello world" + + move_folder_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_move_folder_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.move_folder({ name: name, destination_containing_folder: destination_containing_folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.move_folder name: name, destination_containing_folder: destination_containing_folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.move_folder ::Google::Cloud::Dataform::V1::MoveFolderRequest.new(name: name, destination_containing_folder: destination_containing_folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.move_folder({ name: name, destination_containing_folder: destination_containing_folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.move_folder(::Google::Cloud::Dataform::V1::MoveFolderRequest.new(name: name, destination_containing_folder: destination_containing_folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_folder_client_stub.call_count + end + end + end + def test_list_repositories # Create test objects. client_result = ::Google::Cloud::Dataform::V1::ListRepositoriesResponse.new @@ -356,6 +1189,61 @@ def test_delete_repository end end + def test_move_repository + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_containing_folder = "hello world" + + move_repository_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_move_repository_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_repository_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.move_repository({ name: name, destination_containing_folder: destination_containing_folder }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.move_repository name: name, destination_containing_folder: destination_containing_folder do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.move_repository ::Google::Cloud::Dataform::V1::MoveRepositoryRequest.new(name: name, destination_containing_folder: destination_containing_folder) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.move_repository({ name: name, destination_containing_folder: destination_containing_folder }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.move_repository(::Google::Cloud::Dataform::V1::MoveRepositoryRequest.new(name: name, destination_containing_folder: destination_containing_folder), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_repository_client_stub.call_count + end + end + end + def test_commit_repository_changes # Create test objects. client_result = ::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse.new @@ -1367,6 +2255,7 @@ def test_query_directory_contents path = "hello world" page_size = 42 page_token = "hello world" + view = :DIRECTORY_CONTENTS_VIEW_UNSPECIFIED query_directory_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -1382,27 +2271,27 @@ def test_query_directory_contents end # Use hash object - client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token }) do |_result, response| + client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.query_directory_contents workspace: workspace, path: path, page_size: page_size, page_token: page_token do |_result, response| + client.query_directory_contents workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.query_directory_contents ::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token) do |_result, response| + client.query_directory_contents ::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.query_directory_contents(::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token), call_options) do |_result, response| + client.query_directory_contents(::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -3072,6 +3961,172 @@ def test_update_config end end + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Dataform::V1::Dataform::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb index 692e03688fdc..9845d5b9ef8d 100644 --- a/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb +++ b/google-cloud-dataform-v1/test/google/cloud/dataform/v1/dataform_test.rb @@ -63,6 +63,958 @@ def logger end end + def test_get_team_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::TeamFolder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_team_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_team_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::GetTeamFolderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_team_folder({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_team_folder name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_team_folder ::Google::Cloud::Dataform::V1::GetTeamFolderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_team_folder({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_team_folder(::Google::Cloud::Dataform::V1::GetTeamFolderRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_team_folder_client_stub.call_rpc_count + end + end + + def test_create_team_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::TeamFolder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + team_folder = {} + + create_team_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_team_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1::TeamFolder), request["team_folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_team_folder({ parent: parent, team_folder: team_folder }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_team_folder parent: parent, team_folder: team_folder do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_team_folder ::Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_team_folder({ parent: parent, team_folder: team_folder }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_team_folder(::Google::Cloud::Dataform::V1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_team_folder_client_stub.call_rpc_count + end + end + + def test_update_team_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::TeamFolder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + team_folder = {} + + update_team_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_team_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1::TeamFolder), request["team_folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_team_folder({ update_mask: update_mask, team_folder: team_folder }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_team_folder update_mask: update_mask, team_folder: team_folder do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_team_folder ::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new(update_mask: update_mask, team_folder: team_folder) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_team_folder({ update_mask: update_mask, team_folder: team_folder }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_team_folder(::Google::Cloud::Dataform::V1::UpdateTeamFolderRequest.new(update_mask: update_mask, team_folder: team_folder), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_team_folder_client_stub.call_rpc_count + end + end + + def test_delete_team_folder + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_team_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_team_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_team_folder({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_team_folder name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_team_folder ::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_team_folder({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_team_folder(::Google::Cloud::Dataform::V1::DeleteTeamFolderRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_team_folder_client_stub.call_rpc_count + end + end + + def test_delete_team_folder_tree + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_team_folder_tree_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_team_folder_tree, name + assert_kind_of ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_team_folder_tree_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_team_folder_tree({ name: name, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_team_folder_tree name: name, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_team_folder_tree ::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new(name: name, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_team_folder_tree({ name: name, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_team_folder_tree(::Google::Cloud::Dataform::V1::DeleteTeamFolderTreeRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_team_folder_tree_client_stub.call_rpc_count + end + end + + def test_query_team_folder_contents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + team_folder = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_team_folder_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_team_folder_contents, name + assert_kind_of ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest, request + assert_equal "hello world", request["team_folder"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_team_folder_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_team_folder_contents({ team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_team_folder_contents team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_team_folder_contents ::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new(team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_team_folder_contents({ team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_team_folder_contents(::Google::Cloud::Dataform::V1::QueryTeamFolderContentsRequest.new(team_folder: team_folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_team_folder_contents_client_stub.call_rpc_count + end + end + + def test_search_team_folders + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::SearchTeamFoldersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + search_team_folders_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_team_folders, name + assert_kind_of ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest, request + assert_equal "hello world", request["location"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_team_folders_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_team_folders({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_team_folders location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_team_folders ::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_team_folders({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_team_folders(::Google::Cloud::Dataform::V1::SearchTeamFoldersRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_team_folders_client_stub.call_rpc_count + end + end + + def test_get_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::Folder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::GetFolderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_folder({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_folder name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_folder ::Google::Cloud::Dataform::V1::GetFolderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_folder({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_folder(::Google::Cloud::Dataform::V1::GetFolderRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_folder_client_stub.call_rpc_count + end + end + + def test_create_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::Folder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + folder = {} + + create_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::CreateFolderRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1::Folder), request["folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_folder({ parent: parent, folder: folder }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_folder parent: parent, folder: folder do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_folder ::Google::Cloud::Dataform::V1::CreateFolderRequest.new(parent: parent, folder: folder) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_folder({ parent: parent, folder: folder }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_folder(::Google::Cloud::Dataform::V1::CreateFolderRequest.new(parent: parent, folder: folder), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_folder_client_stub.call_rpc_count + end + end + + def test_update_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::Folder.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + folder = {} + + update_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::UpdateFolderRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1::Folder), request["folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_folder({ update_mask: update_mask, folder: folder }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_folder update_mask: update_mask, folder: folder do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_folder ::Google::Cloud::Dataform::V1::UpdateFolderRequest.new(update_mask: update_mask, folder: folder) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_folder({ update_mask: update_mask, folder: folder }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_folder(::Google::Cloud::Dataform::V1::UpdateFolderRequest.new(update_mask: update_mask, folder: folder), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_folder_client_stub.call_rpc_count + end + end + + def test_delete_folder + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::DeleteFolderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_folder({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_folder name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_folder ::Google::Cloud::Dataform::V1::DeleteFolderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_folder({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_folder(::Google::Cloud::Dataform::V1::DeleteFolderRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_folder_client_stub.call_rpc_count + end + end + + def test_delete_folder_tree + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_folder_tree_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_folder_tree, name + assert_kind_of ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_folder_tree_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_folder_tree({ name: name, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_folder_tree name: name, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_folder_tree ::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new(name: name, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_folder_tree({ name: name, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_folder_tree(::Google::Cloud::Dataform::V1::DeleteFolderTreeRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_folder_tree_client_stub.call_rpc_count + end + end + + def test_query_folder_contents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::QueryFolderContentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + folder = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_folder_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_folder_contents, name + assert_kind_of ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest, request + assert_equal "hello world", request["folder"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_folder_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_folder_contents({ folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_folder_contents folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_folder_contents ::Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new(folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_folder_contents({ folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_folder_contents(::Google::Cloud::Dataform::V1::QueryFolderContentsRequest.new(folder: folder, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_folder_contents_client_stub.call_rpc_count + end + end + + def test_query_user_root_contents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1::QueryUserRootContentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + query_user_root_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_user_root_contents, name + assert_kind_of ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest, request + assert_equal "hello world", request["location"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_user_root_contents_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_user_root_contents({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_user_root_contents location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_user_root_contents ::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_user_root_contents({ location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_user_root_contents(::Google::Cloud::Dataform::V1::QueryUserRootContentsRequest.new(location: location, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_user_root_contents_client_stub.call_rpc_count + end + end + + def test_move_folder + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_containing_folder = "hello world" + + move_folder_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_folder, name + assert_kind_of ::Google::Cloud::Dataform::V1::MoveFolderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination_containing_folder"] + assert request.has_destination_containing_folder? + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.move_folder({ name: name, destination_containing_folder: destination_containing_folder }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.move_folder name: name, destination_containing_folder: destination_containing_folder do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.move_folder ::Google::Cloud::Dataform::V1::MoveFolderRequest.new(name: name, destination_containing_folder: destination_containing_folder) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.move_folder({ name: name, destination_containing_folder: destination_containing_folder }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.move_folder(::Google::Cloud::Dataform::V1::MoveFolderRequest.new(name: name, destination_containing_folder: destination_containing_folder), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_folder_client_stub.call_rpc_count + end + end + def test_list_repositories # Create GRPC objects. grpc_response = ::Google::Cloud::Dataform::V1::ListRepositoriesResponse.new @@ -374,6 +1326,72 @@ def test_delete_repository end end + def test_move_repository + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_containing_folder = "hello world" + + move_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_repository, name + assert_kind_of ::Google::Cloud::Dataform::V1::MoveRepositoryRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination_containing_folder"] + assert request.has_destination_containing_folder? + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_repository_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.move_repository({ name: name, destination_containing_folder: destination_containing_folder }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.move_repository name: name, destination_containing_folder: destination_containing_folder do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.move_repository ::Google::Cloud::Dataform::V1::MoveRepositoryRequest.new(name: name, destination_containing_folder: destination_containing_folder) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.move_repository({ name: name, destination_containing_folder: destination_containing_folder }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.move_repository(::Google::Cloud::Dataform::V1::MoveRepositoryRequest.new(name: name, destination_containing_folder: destination_containing_folder), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_repository_client_stub.call_rpc_count + end + end + def test_commit_repository_changes # Create GRPC objects. grpc_response = ::Google::Cloud::Dataform::V1::CommitRepositoryChangesResponse.new @@ -1499,6 +2517,7 @@ def test_query_directory_contents path = "hello world" page_size = 42 page_token = "hello world" + view = :DIRECTORY_CONTENTS_VIEW_UNSPECIFIED query_directory_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :query_directory_contents, name @@ -1507,6 +2526,7 @@ def test_query_directory_contents assert_equal "hello world", request["path"] assert_equal 42, request["page_size"] assert_equal "hello world", request["page_token"] + assert_equal :DIRECTORY_CONTENTS_VIEW_UNSPECIFIED, request["view"] refute_nil options end @@ -1517,35 +2537,35 @@ def test_query_directory_contents end # Use hash object - client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token }) do |response, operation| + client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view }) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use named arguments - client.query_directory_contents workspace: workspace, path: path, page_size: page_size, page_token: page_token do |response, operation| + client.query_directory_contents workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object - client.query_directory_contents ::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token) do |response, operation| + client.query_directory_contents ::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use hash object with options - client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + client.query_directory_contents({ workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view }, grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object with options - client.query_directory_contents(::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + client.query_directory_contents(::Google::Cloud::Dataform::V1::QueryDirectoryContentsRequest.new(workspace: workspace, path: path, page_size: page_size, page_token: page_token, view: view), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -3411,6 +4431,188 @@ def test_update_config end end + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure @@ -3449,4 +4651,18 @@ def test_credentials assert_equal creds, client.configure.credentials end end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Dataform::V1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataform::V1::Dataform::Operations, client.operations_client + end end diff --git a/google-cloud-dataform-v1/test/google/longrunning/operations_operations_test.rb b/google-cloud-dataform-v1/test/google/longrunning/operations_operations_test.rb new file mode 100644 index 000000000000..61e4289027f4 --- /dev/null +++ b/google-cloud-dataform-v1/test/google/longrunning/operations_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/longrunning/operations_pb" +require "google/longrunning/operations_services_pb" +require "google/longrunning/operations" + +class ::Google::Longrunning::Operations::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Longrunning::Operations::Operations.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Longrunning::Operations::Operations::Configuration, config + end +end diff --git a/google-cloud-dataform-v1/test/google/longrunning/operations_rest_test.rb b/google-cloud-dataform-v1/test/google/longrunning/operations_rest_test.rb new file mode 100644 index 000000000000..deeeeee2c568 --- /dev/null +++ b/google-cloud-dataform-v1/test/google/longrunning/operations_rest_test.rb @@ -0,0 +1,319 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/longrunning/operations_pb" +require "google/longrunning/operations/rest" + + +class ::Google::Longrunning::Operations::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create test objects. + client_result = ::Google::Longrunning::ListOperationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Longrunning::Operations::Rest::ServiceStub.stub :transcode_list_operations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_count + end + end + end + + def test_get_operation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Longrunning::Operations::Rest::ServiceStub.stub :transcode_get_operation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_operation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_operation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_operation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_count + end + end + end + + def test_delete_operation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Longrunning::Operations::Rest::ServiceStub.stub :transcode_delete_operation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_operation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_operation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_operation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_count + end + end + end + + def test_cancel_operation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Longrunning::Operations::Rest::ServiceStub.stub :transcode_cancel_operation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_operation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_operation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_operation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Longrunning::Operations::Rest::Client::Configuration, config + end +end diff --git a/google-cloud-dataform-v1/test/google/longrunning/operations_test.rb b/google-cloud-dataform-v1/test/google/longrunning/operations_test.rb new file mode 100644 index 000000000000..72ed015901db --- /dev/null +++ b/google-cloud-dataform-v1/test/google/longrunning/operations_test.rb @@ -0,0 +1,433 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/longrunning/operations_pb" +require "google/longrunning/operations" + +class ::Google::Longrunning::Operations::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Longrunning::Operations::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Longrunning::Operations::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Longrunning::Operations::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Longrunning::Operations::Operations, client.operations_client + end +end