diff --git a/google-cloud-dataform-v1beta1/.owlbot-manifest.json b/google-cloud-dataform-v1beta1/.owlbot-manifest.json index d90db815bf2f..f61553049239 100644 --- a/google-cloud-dataform-v1beta1/.owlbot-manifest.json +++ b/google-cloud-dataform-v1beta1/.owlbot-manifest.json @@ -19,20 +19,34 @@ "lib/google/cloud/dataform/v1beta1/dataform.rb", "lib/google/cloud/dataform/v1beta1/dataform/client.rb", "lib/google/cloud/dataform/v1beta1/dataform/credentials.rb", + "lib/google/cloud/dataform/v1beta1/dataform/operations.rb", "lib/google/cloud/dataform/v1beta1/dataform/paths.rb", "lib/google/cloud/dataform/v1beta1/dataform/rest.rb", "lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb", + "lib/google/cloud/dataform/v1beta1/dataform/rest/operations.rb", "lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb", "lib/google/cloud/dataform/v1beta1/dataform_pb.rb", "lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb", "lib/google/cloud/dataform/v1beta1/rest.rb", "lib/google/cloud/dataform/v1beta1/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/v1beta1/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,17 @@ "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_release_config.rb", "snippets/dataform/delete_repository.rb", + "snippets/dataform/delete_team_folder.rb", "snippets/dataform/delete_workflow_config.rb", "snippets/dataform/delete_workflow_invocation.rb", "snippets/dataform/delete_workspace.rb", @@ -64,8 +82,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 +100,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 +117,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.v1beta1.json", + "snippets/snippet_metadata_google.longrunning.json", + "test/google/cloud/dataform/v1beta1/dataform_operations_test.rb", "test/google/cloud/dataform/v1beta1/dataform_paths_test.rb", "test/google/cloud/dataform/v1beta1/dataform_rest_test.rb", "test/google/cloud/dataform/v1beta1/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-v1beta1/AUTHENTICATION.md b/google-cloud-dataform-v1beta1/AUTHENTICATION.md index 60c7f096104f..7e0f296fccd6 100644 --- a/google-cloud-dataform-v1beta1/AUTHENTICATION.md +++ b/google-cloud-dataform-v1beta1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/dataform/v1beta1" -client = ::Google::Cloud::Dataform::V1beta1::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/v1beta1" -::Google::Cloud::Dataform::V1beta1::Dataform::Client.configure do |config| +::Google::Longrunning::Operations::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::Dataform::V1beta1::Dataform::Client.new +client = ::Google::Longrunning::Operations::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/dataform/v1beta1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::Dataform::V1beta1::Dataform::Client.new +client = ::Google::Longrunning::Operations::Client.new ``` ### Local ADC file diff --git a/google-cloud-dataform-v1beta1/README.md b/google-cloud-dataform-v1beta1/README.md index 6f22f3acfc37..0f680bb868e8 100644 --- a/google-cloud-dataform-v1beta1/README.md +++ b/google-cloud-dataform-v1beta1/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/v1beta1" -client = ::Google::Cloud::Dataform::V1beta1::Dataform::Client.new -request = ::Google::Cloud::Dataform::V1beta1::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-v1beta1/latest) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/cloud/dataform/v1beta1" require "logger" -client = ::Google::Cloud::Dataform::V1beta1::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-v1beta1/Rakefile b/google-cloud-dataform-v1beta1/Rakefile index 93900c706901..1e28691359d4 100644 --- a/google-cloud-dataform-v1beta1/Rakefile +++ b/google-cloud-dataform-v1beta1/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/v1beta1/dataform/credentials" - ::Google::Cloud::Dataform::V1beta1::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-v1beta1/gapic_metadata.json b/google-cloud-dataform-v1beta1/gapic_metadata.json index 62ccd18aa92e..4356fb047906 100644 --- a/google-cloud-dataform-v1beta1/gapic_metadata.json +++ b/google-cloud-dataform-v1beta1/gapic_metadata.json @@ -10,6 +10,71 @@ "grpc": { "libraryClient": "::Google::Cloud::Dataform::V1beta1::Dataform::Client", "rpcs": { + "GetTeamFolder": { + "methods": [ + "get_team_folder" + ] + }, + "CreateTeamFolder": { + "methods": [ + "create_team_folder" + ] + }, + "UpdateTeamFolder": { + "methods": [ + "update_team_folder" + ] + }, + "DeleteTeamFolder": { + "methods": [ + "delete_team_folder" + ] + }, + "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" + ] + }, + "QueryFolderContents": { + "methods": [ + "query_folder_contents" + ] + }, + "QueryUserRootContents": { + "methods": [ + "query_user_root_contents" + ] + }, + "MoveFolder": { + "methods": [ + "move_folder" + ] + }, "ListRepositories": { "methods": [ "list_repositories" @@ -35,6 +100,11 @@ "delete_repository" ] }, + "MoveRepository": { + "methods": [ + "move_repository" + ] + }, "CommitRepositoryChanges": { "methods": [ "commit_repository_changes" @@ -279,6 +349,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-v1beta1/lib/google-cloud-dataform-v1beta1.rb b/google-cloud-dataform-v1beta1/lib/google-cloud-dataform-v1beta1.rb index a226b28badd4..f4851a8bcbb0 100644 --- a/google-cloud-dataform-v1beta1/lib/google-cloud-dataform-v1beta1.rb +++ b/google-cloud-dataform-v1beta1/lib/google-cloud-dataform-v1beta1.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/v1beta1" +# require "google/longrunning" diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb index b2212fc64ac5..5947ff254497 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/bindings_override.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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: "/v1beta1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta1/{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: "/v1beta1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta1/{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: "/v1beta1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta1/{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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform.rb index d715b820fe69..257976457e15 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform.rb @@ -24,6 +24,7 @@ require "google/cloud/dataform/v1beta1/dataform/credentials" require "google/cloud/dataform/v1beta1/dataform/paths" +require "google/cloud/dataform/v1beta1/dataform/operations" require "google/cloud/dataform/v1beta1/dataform/client" require "google/cloud/dataform/v1beta1/dataform/rest" diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/client.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/client.rb index 0cfc19fffb2b..64799dede88c 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/client.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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::V1beta1::Dataform::Stub, credentials: credentials, @@ -164,57 +171,1330 @@ 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 + @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::V1beta1::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::V1beta1::GetTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::GetTeamFolderRequest.new + # + # # Call the get_team_folder method. + # result = client.get_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CreateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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, team_folder_id: 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::V1beta1::TeamFolder, ::Hash] + # Required. The TeamFolder to create. + # @param team_folder_id [::String] + # The ID to use for the TeamFolder, which will become the final component of + # the TeamFolder's resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest.new + # + # # Call the create_team_folder method. + # result = client.create_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::UpdateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::TeamFolder, ::Hash] + # Required. The updated TeamFolder. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::UpdateTeamFolderRequest.new + # + # # Call the update_team_folder method. + # result = client.update_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::DeleteTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 + + ## + # 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::V1beta1::QueryTeamFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::SearchTeamFoldersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::GetFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::GetFolderRequest.new + # + # # Call the get_folder method. + # result = client.get_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CreateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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, folder_id: 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::V1beta1::Folder, ::Hash] + # Required. The Folder to create. + # @param folder_id [::String] + # The ID to use for the Folder, which will become the final component of + # the Folder's resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1beta1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new + # + # # Call the create_folder method. + # result = client.create_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::UpdateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Folder, ::Hash] + # Required. The updated Folder. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Dataform::V1beta1::Folder] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::UpdateFolderRequest.new + # + # # Call the update_folder method. + # result = client.update_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::DeleteFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 + + ## + # 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::V1beta1::QueryFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryFolderContentsResponse::FolderContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse::FolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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 + header_params["folder"] = request.folder 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 + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header - @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= + 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::V1beta1::QueryUserRootContentsRequest} or an equivalent Hash. # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryUserRootContentsResponse::RootContentsEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse::RootContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::MoveFolderRequest} or an equivalent Hash. # - def logger - @dataform_stub.logger - end + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 +1898,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] @@ -637,24 +1921,121 @@ def update_repository request, options = nil # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::MoveRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::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 +2052,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) @@ -5206,6 +6589,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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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 +6893,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::V1beta1::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::V1beta1::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 +7060,71 @@ 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 `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 `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 +7151,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 +7400,50 @@ 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 + 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 + 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 +7454,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 +7554,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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/operations.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/operations.rb new file mode 100644 index 000000000000..24a2ae0dfcc0 --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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 V1beta1 + 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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/paths.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/paths.rb index 76b6eeac42a4..f0521ffd0ec2 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/paths.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest.rb index 1178df30baed..9d45d4b8e42f 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest.rb @@ -25,6 +25,7 @@ require "google/cloud/dataform/v1beta1/dataform/credentials" require "google/cloud/dataform/v1beta1/dataform/paths" +require "google/cloud/dataform/v1beta1/dataform/rest/operations" require "google/cloud/dataform/v1beta1/dataform/rest/client" module Google diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb index 63d733e07436..480c3ad9ac79 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/client.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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::V1beta1::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::V1beta1::Dataform::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, @@ -157,59 +164,1240 @@ 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::V1beta1::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::V1beta1::GetTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::GetTeamFolderRequest.new + # + # # Call the get_team_folder method. + # result = client.get_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CreateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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, team_folder_id: 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::V1beta1::TeamFolder, ::Hash] + # Required. The TeamFolder to create. + # @param team_folder_id [::String] + # The ID to use for the TeamFolder, which will become the final component of + # the TeamFolder's resource name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest.new + # + # # Call the create_team_folder method. + # result = client.create_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::UpdateTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::TeamFolder, ::Hash] + # Required. The updated TeamFolder. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::TeamFolder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::UpdateTeamFolderRequest.new + # + # # Call the update_team_folder method. + # result = client.update_team_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::DeleteTeamFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 + + ## + # 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::V1beta1::QueryTeamFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::SearchTeamFoldersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse::TeamFolderSearchResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::GetFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::GetFolderRequest.new + # + # # Call the get_folder method. + # result = client.get_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CreateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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, folder_id: 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::V1beta1::Folder, ::Hash] + # Required. The Folder to create. + # @param folder_id [::String] + # The ID to use for the Folder, which will become the final component of + # the Folder's resource name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new + # + # # Call the create_folder method. + # result = client.create_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::UpdateFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Folder, ::Hash] + # Required. The updated Folder. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Folder] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::Folder] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::UpdateFolderRequest.new + # + # # Call the update_folder method. + # result = client.update_folder request + # + # # The returned object is of type Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::DeleteFolderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 + + ## + # 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::V1beta1::QueryFolderContentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryFolderContentsResponse::FolderContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse::FolderContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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 + 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::V1beta1::VERSION, + transports_version_send: [:rest] - @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 + 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 - @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= + 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::V1beta1::QueryUserRootContentsRequest} or an equivalent Hash. # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. + # @param request [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryUserRootContentsResponse::RootContentsEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse::RootContentsEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/dataform/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::MoveFolderRequest} or an equivalent Hash. # - def logger - @dataform_stub.logger - end + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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. @@ -551,13 +1739,99 @@ def update_repository request, options = nil options.apply_defaults timeout: @config.rpcs.update_repository.timeout, metadata: call_metadata, - retry_policy: @config.rpcs.update_repository.retry_policy + retry_policy: @config.rpcs.update_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dataform_stub.update_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 + + ## + # Deletes a single Repository. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::Dataform::V1beta1::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Dataform::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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.update_repository request, options do |result, operation| + @dataform_stub.delete_repository request, options do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e @@ -565,34 +1839,35 @@ def update_repository request, options = nil end ## - # Deletes a single Repository. + # Moves a Repository to a new location. # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::Dataform::V1beta1::DeleteRepositoryRequest} or an equivalent Hash. + # @overload move_repository(request, options = nil) + # Pass arguments to `move_repository` via a request object, either of type + # {::Google::Cloud::Dataform::V1beta1::MoveRepositoryRequest} or an equivalent Hash. # - # @param request [::Google::Cloud::Dataform::V1beta1::DeleteRepositoryRequest, ::Hash] + # @param request [::Google::Cloud::Dataform::V1beta1::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 +1878,31 @@ def update_repository request, options = nil # client = Google::Cloud::Dataform::V1beta1::Dataform::Rest::Client.new # # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::DeleteRepositoryRequest + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataform::V1beta1::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 +1913,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) @@ -4823,6 +6107,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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Dataform::V1beta1::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::V1beta1::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 +6390,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::V1beta1::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::V1beta1::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 +6527,71 @@ 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 `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 `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 +6618,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 +6867,50 @@ 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 + 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 + 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 +6921,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 +7021,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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/operations.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/operations.rb new file mode 100644 index 000000000000..c404df7dc1c1 --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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 V1beta1 + 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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb index 28be0472faac..b5a4d5b995c3 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform/rest/service_stub.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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::V1beta1::ListRepositoriesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListRepositoriesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListRepositoriesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListRepositoriesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::GetRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Repository] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::Repository] + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Repository.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::CreateRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Repository] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::TeamFolder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::Repository] + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Repository.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::UpdateRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Repository] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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 query_team_folder_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::DeleteRepositoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse] # A result object deserialized from the server's reply - def delete_repository 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_delete_repository_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 @@ -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: "query_team_folder_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse.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 search_team_folders REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CommitRepositoryChangesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse] # A result object deserialized from the server's reply - def commit_repository_changes 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_commit_repository_changes_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 @@ -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: "search_team_folders", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse.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 get_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ReadRepositoryFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Folder] # A result object deserialized from the server's reply - def read_repository_file 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_read_repository_file_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 @@ -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: "get_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::Folder.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 create_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryRepositoryDirectoryContentsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Folder] # A result object deserialized from the server's reply - def query_repository_directory_contents 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_query_repository_directory_contents_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 @@ -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: "create_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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 update_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::FetchRepositoryHistoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Folder] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Folder] # A result object deserialized from the server's reply - def fetch_repository_history 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_fetch_repository_history_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 @@ -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: "update_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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 delete_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ComputeRepositoryAccessTokenStatusResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def compute_repository_access_token_status 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_compute_repository_access_token_status_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 @@ -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: "delete_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusResponse.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 @@ -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 query_folder_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::FetchRemoteBranchesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse] # A result object deserialized from the server's reply - def fetch_remote_branches 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_fetch_remote_branches_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 @@ -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: "query_folder_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse.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 query_user_root_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ListWorkspacesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListWorkspacesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListWorkspacesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse] # A result object deserialized from the server's reply - def list_workspaces 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_list_workspaces_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 @@ -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: "query_user_root_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ListWorkspacesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse.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 move_folder REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Cloud::Dataform::V1beta1::Workspace] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::Workspace] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def get_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_get_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 @@ -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: "move_folder", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::Workspace.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 @@ -594,23 +594,23 @@ def get_workspace request_pb, options = nil end ## - # Baseline implementation for the create_workspace REST call + # Baseline implementation for the list_repositories REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CreateWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::Workspace] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ListRepositoriesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::Workspace] + # @return [::Google::Cloud::Dataform::V1beta1::ListRepositoriesResponse] # A result object deserialized from the server's reply - def create_workspace 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_create_workspace_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 @@ -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: "list_repositories", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::Workspace.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ListRepositoriesResponse.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 get_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::DeleteWorkspaceRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1beta1::Repository] # A result object deserialized from the server's reply - def delete_workspace 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_delete_workspace_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 @@ -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: "get_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::Repository.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 create_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::InstallNpmPackagesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Repository] # A result object deserialized from the server's reply - def install_npm_packages 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_install_npm_packages_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 @@ -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: "create_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::Repository.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 update_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::PullGitCommitsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::PullGitCommitsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Repository] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::PullGitCommitsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Repository] # A result object deserialized from the server's reply - def pull_git_commits 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_pull_git_commits_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 @@ -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: "update_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::PullGitCommitsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::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 delete_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::PushGitCommitsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::PushGitCommitsResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::PushGitCommitsResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def push_git_commits 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_push_git_commits_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 @@ -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: "delete_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::PushGitCommitsResponse.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 @@ -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 move_repository REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::FetchFileGitStatusesResponse] + # @yieldparam result [::Google::Longrunning::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesResponse] + # @return [::Google::Longrunning::Operation] # A result object deserialized from the server's reply - def fetch_file_git_statuses 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_fetch_file_git_statuses_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 @@ -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: "move_repository", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesResponse.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 @@ -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 commit_repository_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::FetchGitAheadBehindResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindResponse] + # @return [::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse] # A result object deserialized from the server's reply - def fetch_git_ahead_behind 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_fetch_git_ahead_behind_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 @@ -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: "commit_repository_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse.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 read_repository_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CommitWorkspaceChangesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileResponse] # A result object deserialized from the server's reply - def commit_workspace_changes 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_commit_workspace_changes_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 @@ -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: "read_repository_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ReadRepositoryFileResponse.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 query_repository_directory_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ResetWorkspaceChangesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsResponse] # A result object deserialized from the server's reply - def reset_workspace_changes 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_reset_workspace_changes_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 @@ -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: "query_repository_directory_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::QueryRepositoryDirectoryContentsResponse.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 fetch_repository_history REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::FetchFileDiffRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::FetchFileDiffResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::FetchFileDiffResponse] + # @return [::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryResponse] # A result object deserialized from the server's reply - def fetch_file_diff 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_fetch_file_diff_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 @@ -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: "fetch_repository_history", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::FetchFileDiffResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::FetchRepositoryHistoryResponse.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 compute_repository_access_token_status REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryDirectoryContentsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusResponse] # A result object deserialized from the server's reply - def query_directory_contents 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_query_directory_contents_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 @@ -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: "compute_repository_access_token_status", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ComputeRepositoryAccessTokenStatusResponse.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_remote_branches REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::SearchFilesRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::SearchFilesResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::SearchFilesResponse] + # @return [::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesResponse] # A result object deserialized from the server's reply - def search_files 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_search_files_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 @@ -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_remote_branches", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::SearchFilesResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::FetchRemoteBranchesResponse.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 list_workspaces REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::MakeDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::MakeDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ListWorkspacesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::MakeDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1beta1::ListWorkspacesResponse] # A result object deserialized from the server's reply - def make_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_make_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 @@ -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: "list_workspaces", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::MakeDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ListWorkspacesResponse.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 get_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::RemoveDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::RemoveDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Workspace] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::RemoveDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Workspace] # A result object deserialized from the server's reply - def remove_directory 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_remove_directory_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 @@ -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: "get_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::RemoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::Workspace.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 create_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::MoveDirectoryRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::MoveDirectoryResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::Workspace] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::MoveDirectoryResponse] + # @return [::Google::Cloud::Dataform::V1beta1::Workspace] # A result object deserialized from the server's reply - def move_directory 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_move_directory_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 @@ -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: "create_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::MoveDirectoryResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::Workspace.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 delete_workspace REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ReadFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ReadFileResponse] + # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ReadFileResponse] + # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def read_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_read_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 @@ -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: "delete_workspace", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ReadFileResponse.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 @@ -1234,23 +1234,23 @@ def read_file request_pb, options = nil end ## - # Baseline implementation for the remove_file REST call + # Baseline implementation for the install_npm_packages REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::RemoveFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::RemoveFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::RemoveFileResponse] + # @return [::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesResponse] # A result object deserialized from the server's reply - def remove_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_remove_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 @@ -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: "install_npm_packages", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::RemoveFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::InstallNpmPackagesResponse.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 pull_git_commits REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::MoveFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::MoveFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::PullGitCommitsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::MoveFileResponse] + # @return [::Google::Cloud::Dataform::V1beta1::PullGitCommitsResponse] # A result object deserialized from the server's reply - def move_file 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_move_file_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 @@ -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: "pull_git_commits", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::MoveFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::PullGitCommitsResponse.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 push_git_commits REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::WriteFileRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::WriteFileResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::PushGitCommitsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WriteFileResponse] + # @return [::Google::Cloud::Dataform::V1beta1::PushGitCommitsResponse] # A result object deserialized from the server's reply - def write_file 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_write_file_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 @@ -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: "push_git_commits", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WriteFileResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::PushGitCommitsResponse.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 fetch_file_git_statuses REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListReleaseConfigsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesResponse] # A result object deserialized from the server's reply - def list_release_configs 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_list_release_configs_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 @@ -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: "fetch_file_git_statuses", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::FetchFileGitStatusesResponse.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 fetch_git_ahead_behind REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindResponse] # A result object deserialized from the server's reply - def get_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_get_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 @@ -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: "fetch_git_ahead_behind", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::FetchGitAheadBehindResponse.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 commit_workspace_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CreateReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Cloud::Dataform::V1beta1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesResponse] # A result object deserialized from the server's reply - def create_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_create_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 @@ -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: "commit_workspace_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::CommitWorkspaceChangesResponse.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 reset_workspace_changes REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::UpdateReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ReleaseConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] + # @return [::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesResponse] # A result object deserialized from the server's reply - def update_release_config 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_update_release_config_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 @@ -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: "reset_workspace_changes", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ResetWorkspaceChangesResponse.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 fetch_file_diff REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::DeleteReleaseConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::FetchFileDiffResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1beta1::FetchFileDiffResponse] # A result object deserialized from the server's reply - def delete_release_config 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_delete_release_config_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 @@ -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: "fetch_file_diff", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::FetchFileDiffResponse.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 query_directory_contents REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ListCompilationResultsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListCompilationResultsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListCompilationResultsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsResponse] # A result object deserialized from the server's reply - def list_compilation_results 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_list_compilation_results_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 @@ -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: "query_directory_contents", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ListCompilationResultsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::QueryDirectoryContentsResponse.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 search_files REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetCompilationResultRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CompilationResult] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::SearchFilesResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::CompilationResult] + # @return [::Google::Cloud::Dataform::V1beta1::SearchFilesResponse] # A result object deserialized from the server's reply - def get_compilation_result 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_get_compilation_result_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 @@ -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: "search_files", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::SearchFilesResponse.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 make_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CreateCompilationResultRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CompilationResult] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::MakeDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::CompilationResult] + # @return [::Google::Cloud::Dataform::V1beta1::MakeDirectoryResponse] # A result object deserialized from the server's reply - def create_compilation_result 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_create_compilation_result_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 @@ -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: "make_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::CompilationResult.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::MakeDirectoryResponse.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 remove_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::QueryCompilationResultActionsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryCompilationResultActionsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::RemoveDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::QueryCompilationResultActionsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::RemoveDirectoryResponse] # A result object deserialized from the server's reply - def query_compilation_result_actions 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_query_compilation_result_actions_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 @@ -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: "remove_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::QueryCompilationResultActionsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::RemoveDirectoryResponse.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 move_directory REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ListWorkflowConfigsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListWorkflowConfigsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::MoveDirectoryResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListWorkflowConfigsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::MoveDirectoryResponse] # A result object deserialized from the server's reply - def list_workflow_configs 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_list_workflow_configs_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 @@ -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: "move_directory", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ListWorkflowConfigsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::MoveDirectoryResponse.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 read_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ReadFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1beta1::ReadFileResponse] # A result object deserialized from the server's reply - def get_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_get_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 @@ -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: "read_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ReadFileResponse.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 remove_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CreateWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Cloud::Dataform::V1beta1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::RemoveFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1beta1::RemoveFileResponse] # A result object deserialized from the server's reply - def create_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_create_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 @@ -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: "remove_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::RemoveFileResponse.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 move_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::UpdateWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::WorkflowConfig] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::MoveFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WorkflowConfig] + # @return [::Google::Cloud::Dataform::V1beta1::MoveFileResponse] # A result object deserialized from the server's reply - def update_workflow_config 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_update_workflow_config_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 @@ -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: "move_file", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WorkflowConfig.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::MoveFileResponse.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 write_file REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::DeleteWorkflowConfigRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Protobuf::Empty] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::WriteFileResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Protobuf::Empty] + # @return [::Google::Cloud::Dataform::V1beta1::WriteFileResponse] # A result object deserialized from the server's reply - def delete_workflow_config 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_delete_workflow_config_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 @@ -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: "write_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::V1beta1::WriteFileResponse.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 list_release_configs REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::ListWorkflowInvocationsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ListWorkflowInvocationsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::ListWorkflowInvocationsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsResponse] # A result object deserialized from the server's reply - def list_workflow_invocations 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_list_workflow_invocations_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 @@ -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: "list_release_configs", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::ListWorkflowInvocationsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ListReleaseConfigsResponse.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 get_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::Cloud::Dataform::V1beta1::WorkflowInvocation] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WorkflowInvocation] + # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] # A result object deserialized from the server's reply - def get_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_get_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 @@ -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: "get_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ReleaseConfig.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 create_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CreateWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::WorkflowInvocation] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::WorkflowInvocation] + # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] # A result object deserialized from the server's reply - def create_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_create_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 @@ -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: "create_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::WorkflowInvocation.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ReleaseConfig.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2034,9 +2034,49 @@ def create_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the delete_workflow_invocation REST call + # Baseline implementation for the update_release_config REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::DeleteWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::ReleaseConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::ReleaseConfig] + # A result object deserialized from the server's reply + 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_update_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: "update_release_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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. @@ -2047,10 +2087,10 @@ def create_workflow_invocation request_pb, options = nil # # @return [::Google::Protobuf::Empty] # A result object deserialized from the server's reply - def delete_workflow_invocation request_pb, options = nil + 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_workflow_invocation_request request_pb + 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 @@ -2062,7 +2102,7 @@ def delete_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "delete_workflow_invocation", + method_name: "delete_release_config", options: options ) operation = ::Gapic::Rest::TransportOperation.new response @@ -2074,23 +2114,23 @@ def delete_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the cancel_workflow_invocation REST call + # Baseline implementation for the list_compilation_results REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::CancelWorkflowInvocationRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CancelWorkflowInvocationResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::ListCompilationResultsResponse] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::CancelWorkflowInvocationResponse] + # @return [::Google::Cloud::Dataform::V1beta1::ListCompilationResultsResponse] # A result object deserialized from the server's reply - def cancel_workflow_invocation request_pb, options = nil + 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_cancel_workflow_invocation_request request_pb + 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 @@ -2102,11 +2142,11 @@ def cancel_workflow_invocation request_pb, options = nil uri: uri, body: body || "", params: query_string_params, - method_name: "cancel_workflow_invocation", + method_name: "list_compilation_results", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::CancelWorkflowInvocationResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::ListCompilationResultsResponse.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2114,23 +2154,23 @@ def cancel_workflow_invocation request_pb, options = nil end ## - # Baseline implementation for the query_workflow_invocation_actions REST call + # Baseline implementation for the get_compilation_result REST call # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::QueryWorkflowInvocationActionsRequest] + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryWorkflowInvocationActionsResponse] + # @yieldparam result [::Google::Cloud::Dataform::V1beta1::CompilationResult] # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @return [::Google::Cloud::Dataform::V1beta1::QueryWorkflowInvocationActionsResponse] + # @return [::Google::Cloud::Dataform::V1beta1::CompilationResult] # A result object deserialized from the server's reply - def query_workflow_invocation_actions request_pb, options = nil + 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_query_workflow_invocation_actions_request request_pb + 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 @@ -2142,11 +2182,11 @@ 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: "get_compilation_result", options: options ) operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Dataform::V1beta1::QueryWorkflowInvocationActionsResponse.decode_json response.body, ignore_unknown_fields: true + result = ::Google::Cloud::Dataform::V1beta1::CompilationResult.decode_json response.body, ignore_unknown_fields: true catch :response do yield result, operation if block_given? result @@ -2154,83 +2194,1001 @@ def query_workflow_invocation_actions request_pb, options = nil end ## - # Baseline implementation for the get_config REST call + # Baseline implementation for the create_compilation_result REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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::V1beta1::CompilationResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::QueryCompilationResultActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::ListWorkflowConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::WorkflowConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::ListWorkflowInvocationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::WorkflowInvocation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::WorkflowInvocation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CancelWorkflowInvocationResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::QueryWorkflowInvocationActionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::Config] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::Config] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{name}", + 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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{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::V1beta1::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: "/v1beta1/{parent}/folders", + body: "folder", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private # - # @param request_pb [::Google::Cloud::Dataform::V1beta1::GetConfigRequest] + # GRPC transcoding helper method for the update_folder REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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. + # @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: "/v1beta1/{folder.name}", + body: "folder", + matches: [ + ["folder.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::V1beta1::Config] - # @yieldparam operation [::Gapic::Rest::TransportOperation] + # GRPC transcoding helper method for the delete_folder REST call # - # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::DeleteFolderRequest] + # 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_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + 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::V1beta1::UpdateConfigRequest] + # GRPC transcoding helper method for the query_folder_contents REST call + # + # @param request_pb [::Google::Cloud::Dataform::V1beta1::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: "/v1beta1/{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::V1beta1::Config] - # @yieldparam operation [::Gapic::Rest::TransportOperation] + # GRPC transcoding helper method for the query_user_root_contents REST call # - # @return [::Google::Cloud::Dataform::V1beta1::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::V1beta1::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: "/v1beta1/{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::V1beta1::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::V1beta1::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: "/v1beta1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb end ## @@ -2340,6 +3298,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::V1beta1::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: "/v1beta1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # @@ -3389,6 +4369,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: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{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: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{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: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/repositories/[^/]+/workspaces/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/folders/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/teamFolders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end end end end diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_pb.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_pb.rb index f486e163e0f2..b1767149fc20 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_pb.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/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/v1beta1/dataform.proto\x12\x1dgoogle.cloud.dataform.v1beta1\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\"\xbc\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\x12]\n\x13git_remote_settings\x18\x02 \x01(\x0b\x32;.google.cloud.dataform.v1beta1.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\x12u\n\x1fworkspace_compilation_overrides\x18\x04 \x01(\x0b\x32G.google.cloud.dataform.v1beta1.Repository.WorkspaceCompilationOverridesB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x05 \x03(\x0b\x32\x35.google.cloud.dataform.v1beta1.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\x12V\n\x15\x64\x61ta_encryption_state\x18\x0c \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\xf1\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\x12{\n\x19ssh_authentication_config\x18\x05 \x01(\x0b\x32S.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.SshAuthenticationConfigB\x03\xe0\x41\x01\x12\x64\n\x0ctoken_status\x18\x04 \x01(\x0e\x32G.google.cloud.dataform.v1beta1.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\"\x89\x01\n\x18ListRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xb4\x01\n\x17\x43reateRepositoryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x93\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xec\x05\n\x1e\x43ommitRepositoryChangesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12K\n\x0f\x63ommit_metadata\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.CommitMetadataB\x03\xe0\x41\x02\x12%\n\x18required_head_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12o\n\x0f\x66ile_operations\x18\x03 \x03(\x0b\x32Q.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest.FileOperationsEntryB\x03\xe0\x41\x01\x1a\xa5\x02\n\rFileOperation\x12k\n\nwrite_file\x18\x01 \x01(\x0b\x32U.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest.FileOperation.WriteFileH\x00\x12m\n\x0b\x64\x65lete_file\x18\x02 \x01(\x0b\x32V.google.cloud.dataform.v1beta1.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\x82\x01\n\x13\x46ileOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Z\n\x05value\x18\x02 \x01(\x0b\x32K.google.cloud.dataform.v1beta1.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\"\x8d\x01\n(QueryRepositoryDirectoryContentsResponse\x12H\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"y\n\x1e\x46\x65tchRepositoryHistoryResponse\x12>\n\x07\x63ommits\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.CommitLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xaa\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;\n\x06\x61uthor\x18\x03 \x01(\x0b\x32+.google.cloud.dataform.v1beta1.CommitAuthor\x12\x16\n\x0e\x63ommit_message\x18\x04 \x01(\t\"o\n\x0e\x43ommitMetadata\x12@\n\x06\x61uthor\x18\x01 \x01(\x0b\x32+.google.cloud.dataform.v1beta1.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\"\xed\x01\n*ComputeRepositoryAccessTokenStatusResponse\x12k\n\x0ctoken_status\x18\x01 \x01(\x0e\x32U.google.cloud.dataform.v1beta1.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\"\x82\x03\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\x12V\n\x15\x64\x61ta_encryption_state\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.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\"\x84\x01\n\x16ListWorkspacesResponse\x12<\n\nworkspaces\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1beta1.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\"\xb1\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.v1beta1.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\"\xae\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.v1beta1.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\"\x81\x03\n\x1c\x46\x65tchFileGitStatusesResponse\x12s\n\x18uncommitted_file_changes\x18\x01 \x03(\x0b\x32Q.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange\x1a\xeb\x01\n\x15UncommittedFileChange\x12\x0c\n\x04path\x18\x01 \x01(\t\x12k\n\x05state\x18\x02 \x01(\x0e\x32W.google.cloud.dataform.v1beta1.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\"\xcb\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.v1beta1.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\"\x83\x01\n\x1eQueryDirectoryContentsResponse\x12H\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"x\n\x13SearchFilesResponse\x12\x43\n\x0esearch_results\x18\x01 \x03(\x0b\x32+.google.cloud.dataform.v1beta1.SearchResult\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x0cSearchResult\x12?\n\x04\x66ile\x18\x01 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.FileSearchResultH\x00\x12I\n\tdirectory\x18\x02 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\"\xf1\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\x12Z\n\x17\x63ode_compilation_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\x12r\n recent_scheduled_release_records\x18\x05 \x03(\x0b\x32\x43.google.cloud.dataform.v1beta1.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\"\x91\x01\n\x1aListReleaseConfigsResponse\x12\x45\n\x0frelease_configs\x18\x01 \x03(\x0b\x32,.google.cloud.dataform.v1beta1.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\"\xc3\x01\n\x1a\x43reateReleaseConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12I\n\x0erelease_config\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1beta1.ReleaseConfigB\x03\xe0\x41\x02\x12\x1e\n\x11release_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1aUpdateReleaseConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12I\n\x0erelease_config\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1beta1.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\"\x83\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\x12Z\n\x17\x63ode_compilation_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\x62\n\x12\x63ompilation_errors\x18\x06 \x03(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResult.CompilationErrorB\x03\xe0\x41\x03\x12V\n\x15\x64\x61ta_encryption_state\x18\t \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.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\x92\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\x41\n\raction_target\x18\x04 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\"\xf8\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\x12Q\n\x04vars\x18\x04 \x03(\x0b\x32>.google.cloud.dataform.v1beta1.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\x64\n default_notebook_runtime_options\x18\t \x01(\x0b\x32\x35.google.cloud.dataform.v1beta1.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\"\x9d\x01\n\x1eListCompilationResultsResponse\x12M\n\x13\x63ompilation_results\x18\x01 \x03(\x0b\x32\x30.google.cloud.dataform.v1beta1.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\"\xaf\x01\n\x1e\x43reateCompilationResultRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12Q\n\x12\x63ompilation_result\x18\x02 \x01(\x0b\x32\x30.google.cloud.dataform.v1beta1.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\"\xea\x02\n\x12RelationDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12S\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x42.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor\x12^\n\x0f\x62igquery_labels\x18\x03 \x03(\x0b\x32\x45.google.cloud.dataform.v1beta1.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\"\xcb\x1c\n\x17\x43ompilationResultAction\x12S\n\x08relation\x18\x04 \x01(\x0b\x32?.google.cloud.dataform.v1beta1.CompilationResultAction.RelationH\x00\x12W\n\noperations\x18\x05 \x01(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResultAction.OperationsH\x00\x12U\n\tassertion\x18\x06 \x01(\x0b\x32@.google.cloud.dataform.v1beta1.CompilationResultAction.AssertionH\x00\x12Y\n\x0b\x64\x65\x63laration\x18\x07 \x01(\x0b\x32\x42.google.cloud.dataform.v1beta1.CompilationResultAction.DeclarationH\x00\x12S\n\x08notebook\x18\x08 \x01(\x0b\x32?.google.cloud.dataform.v1beta1.CompilationResultAction.NotebookH\x00\x12\x62\n\x10\x64\x61ta_preparation\x18\t \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparationH\x00\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12?\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\xde\x08\n\x08Relation\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12N\n\x13relation_descriptor\x18\x04 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x12\x63\n\rrelation_type\x18\x05 \x01(\x0e\x32L.google.cloud.dataform.v1beta1.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\x12x\n\x18incremental_table_config\x18\t \x01(\x0b\x32V.google.cloud.dataform.v1beta1.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\x12r\n\x12\x61\x64\x64itional_options\x18\x0e \x03(\x0b\x32V.google.cloud.dataform.v1beta1.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\xe4\x01\n\nOperations\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12N\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x12\x0f\n\x07queries\x18\x04 \x03(\t\x12\x12\n\nhas_output\x18\x05 \x01(\x08\x1a\x92\x02\n\tAssertion\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12<\n\rparent_action\x18\x05 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\x12N\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x1a]\n\x0b\x44\x65\x63laration\x12N\n\x13relation_descriptor\x18\x01 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x1a\x7f\n\x08Notebook\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.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\xc0\x04\n\x0f\x44\x61taPreparation\x12\x17\n\rcontents_yaml\x18\x05 \x01(\tH\x00\x12l\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32T.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparation.SqlDefinitionH\x00\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xd7\x01\n\rSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12\x66\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32Q.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparation.ErrorTable\x12O\n\x04load\x18\x03 \x01(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResultAction.LoadConfig\x1a[\n\nErrorTable\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x42\x0c\n\ndefinition\x1a\x84\x03\n\nLoadConfig\x12X\n\x07replace\x18\x01 \x01(\x0b\x32\x45.google.cloud.dataform.v1beta1.CompilationResultAction.SimpleLoadModeH\x00\x12W\n\x06\x61ppend\x18\x02 \x01(\x0b\x32\x45.google.cloud.dataform.v1beta1.CompilationResultAction.SimpleLoadModeH\x00\x12]\n\x07maximum\x18\x03 \x01(\x0b\x32J.google.cloud.dataform.v1beta1.CompilationResultAction.IncrementalLoadModeH\x00\x12\\\n\x06unique\x18\x04 \x01(\x0b\x32J.google.cloud.dataform.v1beta1.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\"\x9c\x01\n%QueryCompilationResultActionsResponse\x12Z\n\x1a\x63ompilation_result_actions\x18\x01 \x03(\x0b\x32\x36.google.cloud.dataform.v1beta1.CompilationResultAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb7\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\x12O\n\x11invocation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.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\x12w\n\"recent_scheduled_execution_records\x18\x05 \x03(\x0b\x32\x46.google.cloud.dataform.v1beta1.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\"\xa5\x02\n\x10InvocationConfig\x12\x44\n\x10included_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.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\"\x94\x01\n\x1bListWorkflowConfigsResponse\x12G\n\x10workflow_configs\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"\xc7\x01\n\x1b\x43reateWorkflowConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12K\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.WorkflowConfigB\x03\xe0\x41\x02\x12\x1f\n\x12workflow_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa0\x01\n\x1bUpdateWorkflowConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12K\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.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\"\xc8\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\x12O\n\x11invocation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.InvocationConfigB\x03\xe0\x41\x05\x12K\n\x05state\x18\x04 \x01(\x0e\x32\x37.google.cloud.dataform.v1beta1.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\x12V\n\x15\x64\x61ta_encryption_state\x18\x08 \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.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\"\xa0\x01\n\x1fListWorkflowInvocationsResponse\x12O\n\x14workflow_invocations\x18\x01 \x03(\x0b\x32\x31.google.cloud.dataform.v1beta1.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\"\xb2\x01\n\x1f\x43reateWorkflowInvocationRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12S\n\x13workflow_invocation\x18\x02 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.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\"\xe1\x10\n\x18WorkflowInvocationAction\x12\x66\n\x0f\x62igquery_action\x18\x06 \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryActionB\x03\xe0\x41\x03H\x00\x12\x66\n\x0fnotebook_action\x18\x08 \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.WorkflowInvocationAction.NotebookActionB\x03\xe0\x41\x03H\x00\x12u\n\x17\x64\x61ta_preparation_action\x18\t \x01(\x0b\x32M.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationActionB\x03\xe0\x41\x03H\x00\x12:\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.TargetB\x03\xe0\x41\x03\x12\x44\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.TargetB\x03\xe0\x41\x03\x12Q\n\x05state\x18\x04 \x01(\x0e\x32=.google.cloud.dataform.v1beta1.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\xa9\t\n\x15\x44\x61taPreparationAction\x12\x1c\n\rcontents_yaml\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12y\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32\x61.google.cloud.dataform.v1beta1.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\x8e\x02\n\x13\x41\x63tionSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12s\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32^.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable\x12s\n\x0bload_config\x18\x03 \x01(\x0b\x32^.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig\x1a\x61\n\x10\x41\x63tionErrorTable\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x1a\xfe\x03\n\x10\x41\x63tionLoadConfig\x12u\n\x07replace\x18\x01 \x01(\x0b\x32\x62.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12t\n\x06\x61ppend\x18\x02 \x01(\x0b\x32\x62.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12z\n\x07maximum\x18\x03 \x01(\x0b\x32g.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x12y\n\x06unique\x18\x04 \x01(\x0b\x32g.google.cloud.dataform.v1beta1.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\"\x9f\x01\n&QueryWorkflowInvocationActionsResponse\x12\\\n\x1bworkflow_invocation_actions\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataform.v1beta1.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\"\x87\x01\n\x13UpdateConfigRequest\x12:\n\x06\x63onfig\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.ConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x32\x9d\x61\n\x08\x44\x61taform\x12\xcb\x01\n\x10ListRepositories\x12\x36.google.cloud.dataform.v1beta1.ListRepositoriesRequest\x1a\x37.google.cloud.dataform.v1beta1.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{parent=projects/*/locations/*}/repositories\x12\xb5\x01\n\rGetRepository\x12\x33.google.cloud.dataform.v1beta1.GetRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{name=projects/*/locations/*/repositories/*}\x12\xe2\x01\n\x10\x43reateRepository\x12\x36.google.cloud.dataform.v1beta1.CreateRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"k\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xe4\x01\n\x10UpdateRepository\x12\x36.google.cloud.dataform.v1beta1.UpdateRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\xa8\x01\n\x10\x44\x65leteRepository\x12\x36.google.cloud.dataform.v1beta1.DeleteRepositoryRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta1/{name=projects/*/locations/*/repositories/*}\x12\xe1\x01\n\x17\x43ommitRepositoryChanges\x12=.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest\x1a>.google.cloud.dataform.v1beta1.CommitRepositoryChangesResponse\"G\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/repositories/*}:readFile\x12\x89\x02\n QueryRepositoryDirectoryContents\x12\x46.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest\x1aG.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents\x12\xe1\x01\n\x16\x46\x65tchRepositoryHistory\x12<.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest\x1a=.google.cloud.dataform.v1beta1.FetchRepositoryHistoryResponse\"J\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchHistory\x12\x91\x02\n\"ComputeRepositoryAccessTokenStatus\x12H.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest\x1aI.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusResponse\"V\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus\x12\xdf\x01\n\x13\x46\x65tchRemoteBranches\x12\x39.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest\x1a:.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches\x12\xd2\x01\n\x0eListWorkspaces\x12\x34.google.cloud.dataform.v1beta1.ListWorkspacesRequest\x1a\x35.google.cloud.dataform.v1beta1.ListWorkspacesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces\x12\xbf\x01\n\x0cGetWorkspace\x12\x32.google.cloud.dataform.v1beta1.GetWorkspaceRequest\x1a(.google.cloud.dataform.v1beta1.Workspace\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xe9\x01\n\x0f\x43reateWorkspace\x12\x35.google.cloud.dataform.v1beta1.CreateWorkspaceRequest\x1a(.google.cloud.dataform.v1beta1.Workspace\"u\xda\x41\x1dparent,workspace,workspace_id\x82\xd3\xe4\x93\x02O\"B/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces:\tworkspace\x12\xb3\x01\n\x0f\x44\x65leteWorkspace\x12\x35.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xf0\x01\n\x12InstallNpmPackages\x12\x38.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest\x1a\x39.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse\"e\x82\xd3\xe4\x93\x02_\"Z/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages:\x01*\x12\xd1\x01\n\x0ePullGitCommits\x12\x34.google.cloud.dataform.v1beta1.PullGitCommitsRequest\x1a\x35.google.cloud.dataform.v1beta1.PullGitCommitsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull:\x01*\x12\xd1\x01\n\x0ePushGitCommits\x12\x34.google.cloud.dataform.v1beta1.PushGitCommitsRequest\x1a\x35.google.cloud.dataform.v1beta1.PushGitCommitsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push:\x01*\x12\xf0\x01\n\x14\x46\x65tchFileGitStatuses\x12:.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest\x1a;.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse\"_\x82\xd3\xe4\x93\x02Y\x12W/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses\x12\xec\x01\n\x13\x46\x65tchGitAheadBehind\x12\x39.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest\x1a:.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse\"^\x82\xd3\xe4\x93\x02X\x12V/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind\x12\xeb\x01\n\x16\x43ommitWorkspaceChanges\x12<.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest\x1a=.google.cloud.dataform.v1beta1.CommitWorkspaceChangesResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit:\x01*\x12\xe7\x01\n\x15ResetWorkspaceChanges\x12;.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest\x1a<.google.cloud.dataform.v1beta1.ResetWorkspaceChangesResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset:\x01*\x12\xd9\x01\n\rFetchFileDiff\x12\x33.google.cloud.dataform.v1beta1.FetchFileDiffRequest\x1a\x34.google.cloud.dataform.v1beta1.FetchFileDiffResponse\"]\x82\xd3\xe4\x93\x02W\x12U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff\x12\xfd\x01\n\x16QueryDirectoryContents\x12<.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest\x1a=.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse\"f\x82\xd3\xe4\x93\x02`\x12^/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents\x12\xd1\x01\n\x0bSearchFiles\x12\x31.google.cloud.dataform.v1beta1.SearchFilesRequest\x1a\x32.google.cloud.dataform.v1beta1.SearchFilesResponse\"[\x82\xd3\xe4\x93\x02U\x12S/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:searchFiles\x12\xdc\x01\n\rMakeDirectory\x12\x33.google.cloud.dataform.v1beta1.MakeDirectoryRequest\x1a\x34.google.cloud.dataform.v1beta1.MakeDirectoryResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory:\x01*\x12\xe4\x01\n\x0fRemoveDirectory\x12\x35.google.cloud.dataform.v1beta1.RemoveDirectoryRequest\x1a\x36.google.cloud.dataform.v1beta1.RemoveDirectoryResponse\"b\x82\xd3\xe4\x93\x02\\\"W/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory:\x01*\x12\xdc\x01\n\rMoveDirectory\x12\x33.google.cloud.dataform.v1beta1.MoveDirectoryRequest\x1a\x34.google.cloud.dataform.v1beta1.MoveDirectoryResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory:\x01*\x12\xc5\x01\n\x08ReadFile\x12..google.cloud.dataform.v1beta1.ReadFileRequest\x1a/.google.cloud.dataform.v1beta1.ReadFileResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile\x12\xd0\x01\n\nRemoveFile\x12\x30.google.cloud.dataform.v1beta1.RemoveFileRequest\x1a\x31.google.cloud.dataform.v1beta1.RemoveFileResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile:\x01*\x12\xc8\x01\n\x08MoveFile\x12..google.cloud.dataform.v1beta1.MoveFileRequest\x1a/.google.cloud.dataform.v1beta1.MoveFileResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile:\x01*\x12\xcc\x01\n\tWriteFile\x12/.google.cloud.dataform.v1beta1.WriteFileRequest\x1a\x30.google.cloud.dataform.v1beta1.WriteFileResponse\"\\\x82\xd3\xe4\x93\x02V\"Q/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile:\x01*\x12\xe2\x01\n\x12ListReleaseConfigs\x12\x38.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest\x1a\x39.google.cloud.dataform.v1beta1.ListReleaseConfigsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs\x12\xcf\x01\n\x10GetReleaseConfig\x12\x36.google.cloud.dataform.v1beta1.GetReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\x89\x02\n\x13\x43reateReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"\x88\x01\xda\x41\'parent,release_config,release_config_id\x82\xd3\xe4\x93\x02X\"F/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs:\x0erelease_config\x12\x8b\x02\n\x13UpdateReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"\x8a\x01\xda\x41\x1arelease_config,update_mask\x82\xd3\xe4\x93\x02g2U/v1beta1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}:\x0erelease_config\x12\xbf\x01\n\x13\x44\x65leteReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xf2\x01\n\x16ListCompilationResults\x12<.google.cloud.dataform.v1beta1.ListCompilationResultsRequest\x1a=.google.cloud.dataform.v1beta1.ListCompilationResultsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults\x12\xdf\x01\n\x14GetCompilationResult\x12:.google.cloud.dataform.v1beta1.GetCompilationResultRequest\x1a\x30.google.cloud.dataform.v1beta1.CompilationResult\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}\x12\x8f\x02\n\x17\x43reateCompilationResult\x12=.google.cloud.dataform.v1beta1.CreateCompilationResultRequest\x1a\x30.google.cloud.dataform.v1beta1.CompilationResult\"\x82\x01\xda\x41\x19parent,compilation_result\x82\xd3\xe4\x93\x02`\"J/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults:\x12\x63ompilation_result\x12\x84\x02\n\x1dQueryCompilationResultActions\x12\x43.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest\x1a\x44.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query\x12\xe6\x01\n\x13ListWorkflowConfigs\x12\x39.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest\x1a:.google.cloud.dataform.v1beta1.ListWorkflowConfigsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs\x12\xd3\x01\n\x11GetWorkflowConfig\x12\x37.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\x90\x02\n\x14\x43reateWorkflowConfig\x12:.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"\x8c\x01\xda\x41)parent,workflow_config,workflow_config_id\x82\xd3\xe4\x93\x02Z\"G/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs:\x0fworkflow_config\x12\x92\x02\n\x14UpdateWorkflowConfig\x12:.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"\x8e\x01\xda\x41\x1bworkflow_config,update_mask\x82\xd3\xe4\x93\x02j2W/v1beta1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}:\x0fworkflow_config\x12\xc2\x01\n\x14\x44\x65leteWorkflowConfig\x12:.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\xf6\x01\n\x17ListWorkflowInvocations\x12=.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest\x1a>.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations\x12\xe3\x01\n\x15GetWorkflowInvocation\x12;.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest\x1a\x31.google.cloud.dataform.v1beta1.WorkflowInvocation\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\x95\x02\n\x18\x43reateWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest\x1a\x31.google.cloud.dataform.v1beta1.WorkflowInvocation\"\x85\x01\xda\x41\x1aparent,workflow_invocation\x82\xd3\xe4\x93\x02\x62\"K/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations:\x13workflow_invocation\x12\xce\x01\n\x18\x44\x65leteWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest\x1a\x16.google.protobuf.Empty\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\xfa\x01\n\x18\x43\x61ncelWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest\x1a?.google.cloud.dataform.v1beta1.CancelWorkflowInvocationResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel:\x01*\x12\x88\x02\n\x1eQueryWorkflowInvocationActions\x12\x44.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest\x1a\x45.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query\x12\xa1\x01\n\tGetConfig\x12/.google.cloud.dataform.v1beta1.GetConfigRequest\x1a%.google.cloud.dataform.v1beta1.Config\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{name=projects/*/locations/*/config}\x12\xc4\x01\n\x0cUpdateConfig\x12\x32.google.cloud.dataform.v1beta1.UpdateConfigRequest\x1a%.google.cloud.dataform.v1beta1.Config\"Y\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02>24/v1beta1/{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\xf7\x05\n!com.google.cloud.dataform.v1beta1B\rDataformProtoP\x01Z=cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb\xaa\x02\x1dGoogle.Cloud.Dataform.V1Beta1\xca\x02\x1dGoogle\\Cloud\\Dataform\\V1beta1\xea\x02 Google::Cloud::Dataform::V1beta1\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/v1beta1/dataform.proto\x12\x1dgoogle.cloud.dataform.v1beta1\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\"\xb0\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\x12]\n\x13git_remote_settings\x18\x02 \x01(\x0b\x32;.google.cloud.dataform.v1beta1.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\x12u\n\x1fworkspace_compilation_overrides\x18\x04 \x01(\x0b\x32G.google.cloud.dataform.v1beta1.Repository.WorkspaceCompilationOverridesB\x03\xe0\x41\x01\x12J\n\x06labels\x18\x05 \x03(\x0b\x32\x35.google.cloud.dataform.v1beta1.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\x12V\n\x15\x64\x61ta_encryption_state\x18\x0c \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a\xf1\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\x12{\n\x19ssh_authentication_config\x18\x05 \x01(\x0b\x32S.google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.SshAuthenticationConfigB\x03\xe0\x41\x01\x12\x64\n\x0ctoken_status\x18\x04 \x01(\x0e\x32G.google.cloud.dataform.v1beta1.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\"\x89\x01\n\x18ListRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xb4\x01\n\x17\x43reateRepositoryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x93\x01\n\x17UpdateRepositoryRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xec\x05\n\x1e\x43ommitRepositoryChangesRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12K\n\x0f\x63ommit_metadata\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.CommitMetadataB\x03\xe0\x41\x02\x12%\n\x18required_head_commit_sha\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12o\n\x0f\x66ile_operations\x18\x03 \x03(\x0b\x32Q.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest.FileOperationsEntryB\x03\xe0\x41\x01\x1a\xa5\x02\n\rFileOperation\x12k\n\nwrite_file\x18\x01 \x01(\x0b\x32U.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest.FileOperation.WriteFileH\x00\x12m\n\x0b\x64\x65lete_file\x18\x02 \x01(\x0b\x32V.google.cloud.dataform.v1beta1.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\x82\x01\n\x13\x46ileOperationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12Z\n\x05value\x18\x02 \x01(\x0b\x32K.google.cloud.dataform.v1beta1.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\"\x8d\x01\n(QueryRepositoryDirectoryContentsResponse\x12H\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"y\n\x1e\x46\x65tchRepositoryHistoryResponse\x12>\n\x07\x63ommits\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.CommitLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xaa\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;\n\x06\x61uthor\x18\x03 \x01(\x0b\x32+.google.cloud.dataform.v1beta1.CommitAuthor\x12\x16\n\x0e\x63ommit_message\x18\x04 \x01(\t\"o\n\x0e\x43ommitMetadata\x12@\n\x06\x61uthor\x18\x01 \x01(\x0b\x32+.google.cloud.dataform.v1beta1.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\"\xed\x01\n*ComputeRepositoryAccessTokenStatusResponse\x12k\n\x0ctoken_status\x18\x01 \x01(\x0e\x32U.google.cloud.dataform.v1beta1.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\"\x95\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\x12V\n\x15\x64\x61ta_encryption_state\x18\x02 \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.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\x12^\n\x19private_resource_metadata\x18\x08 \x01(\x0b\x32\x36.google.cloud.dataform.v1beta1.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\"\x84\x01\n\x16ListWorkspacesResponse\x12<\n\nworkspaces\x18\x01 \x03(\x0b\x32(.google.cloud.dataform.v1beta1.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\"\xb1\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.v1beta1.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\"\xae\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.v1beta1.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\"\x81\x03\n\x1c\x46\x65tchFileGitStatusesResponse\x12s\n\x18uncommitted_file_changes\x18\x01 \x03(\x0b\x32Q.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse.UncommittedFileChange\x1a\xeb\x01\n\x15UncommittedFileChange\x12\x0c\n\x04path\x18\x01 \x01(\t\x12k\n\x05state\x18\x02 \x01(\x0e\x32W.google.cloud.dataform.v1beta1.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\"\xcb\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.v1beta1.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\"\x83\x01\n\x1eQueryDirectoryContentsResponse\x12H\n\x11\x64irectory_entries\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"x\n\x13SearchFilesResponse\x12\x43\n\x0esearch_results\x18\x01 \x03(\x0b\x32+.google.cloud.dataform.v1beta1.SearchResult\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x0cSearchResult\x12?\n\x04\x66ile\x18\x01 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.FileSearchResultH\x00\x12I\n\tdirectory\x18\x02 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\"\xf1\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\x12Z\n\x17\x63ode_compilation_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\x12r\n recent_scheduled_release_records\x18\x05 \x03(\x0b\x32\x43.google.cloud.dataform.v1beta1.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\"\x91\x01\n\x1aListReleaseConfigsResponse\x12\x45\n\x0frelease_configs\x18\x01 \x03(\x0b\x32,.google.cloud.dataform.v1beta1.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\"\xc3\x01\n\x1a\x43reateReleaseConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12I\n\x0erelease_config\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1beta1.ReleaseConfigB\x03\xe0\x41\x02\x12\x1e\n\x11release_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9d\x01\n\x1aUpdateReleaseConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12I\n\x0erelease_config\x18\x02 \x01(\x0b\x32,.google.cloud.dataform.v1beta1.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\"\xe3\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\x12Z\n\x17\x63ode_compilation_config\x18\x04 \x01(\x0b\x32\x34.google.cloud.dataform.v1beta1.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\x62\n\x12\x63ompilation_errors\x18\x06 \x03(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResult.CompilationErrorB\x03\xe0\x41\x03\x12V\n\x15\x64\x61ta_encryption_state\x18\t \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.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\x12^\n\x19private_resource_metadata\x18\x0c \x01(\x0b\x32\x36.google.cloud.dataform.v1beta1.PrivateResourceMetadataB\x03\xe0\x41\x03\x1a\x92\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\x41\n\raction_target\x18\x04 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\"\xf8\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\x12Q\n\x04vars\x18\x04 \x03(\x0b\x32>.google.cloud.dataform.v1beta1.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\x64\n default_notebook_runtime_options\x18\t \x01(\x0b\x32\x35.google.cloud.dataform.v1beta1.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\"\x9d\x01\n\x1eListCompilationResultsResponse\x12M\n\x13\x63ompilation_results\x18\x01 \x03(\x0b\x32\x30.google.cloud.dataform.v1beta1.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\"\xaf\x01\n\x1e\x43reateCompilationResultRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12Q\n\x12\x63ompilation_result\x18\x02 \x01(\x0b\x32\x30.google.cloud.dataform.v1beta1.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\"\xea\x02\n\x12RelationDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12S\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x42.google.cloud.dataform.v1beta1.RelationDescriptor.ColumnDescriptor\x12^\n\x0f\x62igquery_labels\x18\x03 \x03(\x0b\x32\x45.google.cloud.dataform.v1beta1.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\"\xbe\x1f\n\x17\x43ompilationResultAction\x12S\n\x08relation\x18\x04 \x01(\x0b\x32?.google.cloud.dataform.v1beta1.CompilationResultAction.RelationH\x00\x12W\n\noperations\x18\x05 \x01(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResultAction.OperationsH\x00\x12U\n\tassertion\x18\x06 \x01(\x0b\x32@.google.cloud.dataform.v1beta1.CompilationResultAction.AssertionH\x00\x12Y\n\x0b\x64\x65\x63laration\x18\x07 \x01(\x0b\x32\x42.google.cloud.dataform.v1beta1.CompilationResultAction.DeclarationH\x00\x12S\n\x08notebook\x18\x08 \x01(\x0b\x32?.google.cloud.dataform.v1beta1.CompilationResultAction.NotebookH\x00\x12\x62\n\x10\x64\x61ta_preparation\x18\t \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparationH\x00\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12?\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\xd1\x0b\n\x08Relation\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12N\n\x13relation_descriptor\x18\x04 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x12\x63\n\rrelation_type\x18\x05 \x01(\x0e\x32L.google.cloud.dataform.v1beta1.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\x12x\n\x18incremental_table_config\x18\t \x01(\x0b\x32V.google.cloud.dataform.v1beta1.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\x12r\n\x12\x61\x64\x64itional_options\x18\x0e \x03(\x0b\x32V.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.AdditionalOptionsEntry\x12\x17\n\nconnection\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12\x66\n\x0ctable_format\x18\x10 \x01(\x0e\x32K.google.cloud.dataform.v1beta1.CompilationResultAction.Relation.TableFormatB\x03\xe0\x41\x01\x12\x64\n\x0b\x66ile_format\x18\x11 \x01(\x0e\x32J.google.cloud.dataform.v1beta1.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\xe4\x01\n\nOperations\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12N\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x12\x0f\n\x07queries\x18\x04 \x03(\t\x12\x12\n\nhas_output\x18\x05 \x01(\x08\x1a\x92\x02\n\tAssertion\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12<\n\rparent_action\x18\x05 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\x12N\n\x13relation_descriptor\x18\x06 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x1a]\n\x0b\x44\x65\x63laration\x12N\n\x13relation_descriptor\x18\x01 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.RelationDescriptor\x1a\x7f\n\x08Notebook\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.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\xc0\x04\n\x0f\x44\x61taPreparation\x12\x17\n\rcontents_yaml\x18\x05 \x01(\tH\x00\x12l\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32T.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparation.SqlDefinitionH\x00\x12\x41\n\x12\x64\x65pendency_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x10\n\x08\x64isabled\x18\x02 \x01(\x08\x12\x0c\n\x04tags\x18\x04 \x03(\t\x1a\xd7\x01\n\rSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12\x66\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32Q.google.cloud.dataform.v1beta1.CompilationResultAction.DataPreparation.ErrorTable\x12O\n\x04load\x18\x03 \x01(\x0b\x32\x41.google.cloud.dataform.v1beta1.CompilationResultAction.LoadConfig\x1a[\n\nErrorTable\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x42\x0c\n\ndefinition\x1a\x84\x03\n\nLoadConfig\x12X\n\x07replace\x18\x01 \x01(\x0b\x32\x45.google.cloud.dataform.v1beta1.CompilationResultAction.SimpleLoadModeH\x00\x12W\n\x06\x61ppend\x18\x02 \x01(\x0b\x32\x45.google.cloud.dataform.v1beta1.CompilationResultAction.SimpleLoadModeH\x00\x12]\n\x07maximum\x18\x03 \x01(\x0b\x32J.google.cloud.dataform.v1beta1.CompilationResultAction.IncrementalLoadModeH\x00\x12\\\n\x06unique\x18\x04 \x01(\x0b\x32J.google.cloud.dataform.v1beta1.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\"\x9c\x01\n%QueryCompilationResultActionsResponse\x12Z\n\x1a\x63ompilation_result_actions\x18\x01 \x03(\x0b\x32\x36.google.cloud.dataform.v1beta1.CompilationResultAction\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb7\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\x12O\n\x11invocation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.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\x12w\n\"recent_scheduled_execution_records\x18\x05 \x03(\x0b\x32\x46.google.cloud.dataform.v1beta1.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\"\xe6\x03\n\x10InvocationConfig\x12\x44\n\x10included_targets\x18\x01 \x03(\x0b\x32%.google.cloud.dataform.v1beta1.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\x12_\n\x0equery_priority\x18\t \x01(\x0e\x32=.google.cloud.dataform.v1beta1.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\"\x94\x01\n\x1bListWorkflowConfigsResponse\x12G\n\x10workflow_configs\x18\x01 \x03(\x0b\x32-.google.cloud.dataform.v1beta1.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\"\xc7\x01\n\x1b\x43reateWorkflowConfigRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12K\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.WorkflowConfigB\x03\xe0\x41\x02\x12\x1f\n\x12workflow_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa0\x01\n\x1bUpdateWorkflowConfigRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12K\n\x0fworkflow_config\x18\x02 \x01(\x0b\x32-.google.cloud.dataform.v1beta1.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\"\xa8\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\x12O\n\x11invocation_config\x18\x03 \x01(\x0b\x32/.google.cloud.dataform.v1beta1.InvocationConfigB\x03\xe0\x41\x05\x12K\n\x05state\x18\x04 \x01(\x0e\x32\x37.google.cloud.dataform.v1beta1.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\x12V\n\x15\x64\x61ta_encryption_state\x18\x08 \x01(\x0b\x32\x32.google.cloud.dataform.v1beta1.DataEncryptionStateB\x03\xe0\x41\x03\x12#\n\x11internal_metadata\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12^\n\x19private_resource_metadata\x18\n \x01(\x0b\x32\x36.google.cloud.dataform.v1beta1.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\"\xa0\x01\n\x1fListWorkflowInvocationsResponse\x12O\n\x14workflow_invocations\x18\x01 \x03(\x0b\x32\x31.google.cloud.dataform.v1beta1.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\"\xb2\x01\n\x1f\x43reateWorkflowInvocationRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/Repository\x12S\n\x13workflow_invocation\x18\x02 \x01(\x0b\x32\x31.google.cloud.dataform.v1beta1.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\"\xe1\x10\n\x18WorkflowInvocationAction\x12\x66\n\x0f\x62igquery_action\x18\x06 \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.WorkflowInvocationAction.BigQueryActionB\x03\xe0\x41\x03H\x00\x12\x66\n\x0fnotebook_action\x18\x08 \x01(\x0b\x32\x46.google.cloud.dataform.v1beta1.WorkflowInvocationAction.NotebookActionB\x03\xe0\x41\x03H\x00\x12u\n\x17\x64\x61ta_preparation_action\x18\t \x01(\x0b\x32M.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationActionB\x03\xe0\x41\x03H\x00\x12:\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.TargetB\x03\xe0\x41\x03\x12\x44\n\x10\x63\x61nonical_target\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.TargetB\x03\xe0\x41\x03\x12Q\n\x05state\x18\x04 \x01(\x0e\x32=.google.cloud.dataform.v1beta1.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\xa9\t\n\x15\x44\x61taPreparationAction\x12\x1c\n\rcontents_yaml\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12y\n\x0c\x63ontents_sql\x18\x06 \x01(\x0b\x32\x61.google.cloud.dataform.v1beta1.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\x8e\x02\n\x13\x41\x63tionSqlDefinition\x12\r\n\x05query\x18\x01 \x01(\t\x12s\n\x0b\x65rror_table\x18\x02 \x01(\x0b\x32^.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionErrorTable\x12s\n\x0bload_config\x18\x03 \x01(\x0b\x32^.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionLoadConfig\x1a\x61\n\x10\x41\x63tionErrorTable\x12\x35\n\x06target\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.Target\x12\x16\n\x0eretention_days\x18\x02 \x01(\x05\x1a\xfe\x03\n\x10\x41\x63tionLoadConfig\x12u\n\x07replace\x18\x01 \x01(\x0b\x32\x62.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12t\n\x06\x61ppend\x18\x02 \x01(\x0b\x32\x62.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionSimpleLoadModeH\x00\x12z\n\x07maximum\x18\x03 \x01(\x0b\x32g.google.cloud.dataform.v1beta1.WorkflowInvocationAction.DataPreparationAction.ActionIncrementalLoadModeH\x00\x12y\n\x06unique\x18\x04 \x01(\x0b\x32g.google.cloud.dataform.v1beta1.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\"\x9f\x01\n&QueryWorkflowInvocationActionsResponse\x12\\\n\x1bworkflow_invocation_actions\x18\x01 \x03(\x0b\x32\x37.google.cloud.dataform.v1beta1.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\"\x87\x01\n\x13UpdateConfigRequest\x12:\n\x06\x63onfig\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\"\x9f\x01\n\x13\x43reateFolderRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x06\x66older\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.FolderB\x03\xe0\x41\x02\x12\x11\n\tfolder_id\x18\x03 \x01(\t\"\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\"\x87\x01\n\x13UpdateFolderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12:\n\x06\x66older\x18\x02 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.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\"\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\"\xb2\x02\n\x1bQueryFolderContentsResponse\x12_\n\x07\x65ntries\x18\x01 \x03(\x0b\x32N.google.cloud.dataform.v1beta1.QueryFolderContentsResponse.FolderContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x98\x01\n\x13\x46olderContentsEntry\x12\x37\n\x06\x66older\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.FolderH\x00\x12?\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xb2\x02\n\x1dQueryUserRootContentsResponse\x12_\n\x07\x65ntries\x18\x01 \x03(\x0b\x32N.google.cloud.dataform.v1beta1.QueryUserRootContentsResponse.RootContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x96\x01\n\x11RootContentsEntry\x12\x37\n\x06\x66older\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.FolderH\x00\x12?\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xb1\x01\n\x17\x43reateTeamFolderRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bteam_folder\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.TeamFolderB\x03\xe0\x41\x02\x12\x16\n\x0eteam_folder_id\x18\x03 \x01(\t\"P\n\x14GetTeamFolderRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"dataform.googleapis.com/TeamFolder\"\x94\x01\n\x17UpdateTeamFolderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x43\n\x0bteam_folder\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xc2\x02\n\x1fQueryTeamFolderContentsResponse\x12g\n\x07\x65ntries\x18\x01 \x03(\x0b\x32V.google.cloud.dataform.v1beta1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x9c\x01\n\x17TeamFolderContentsEntry\x12\x37\n\x06\x66older\x18\x01 \x01(\x0b\x32%.google.cloud.dataform.v1beta1.FolderH\x00\x12?\n\nrepository\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.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\"\xfb\x01\n\x19SearchTeamFoldersResponse\x12`\n\x07results\x18\x01 \x03(\x0b\x32O.google.cloud.dataform.v1beta1.SearchTeamFoldersResponse.TeamFolderSearchResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x1a\x63\n\x16TeamFolderSearchResult\x12@\n\x0bteam_folder\x18\x02 \x01(\x0b\x32).google.cloud.dataform.v1beta1.TeamFolderH\x00\x42\x07\n\x05\x65ntry\"\xcf\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\x46\n\x05state\x18\x04 \x01(\x0e\x32\x37.google.cloud.dataform.v1beta1.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\"\xd7\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\x12J\n\x05state\x18\x04 \x01(\x0e\x32;.google.cloud.dataform.v1beta1.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\x32\x8b\x82\x01\n\x08\x44\x61taform\x12\xb4\x01\n\rGetTeamFolder\x12\x33.google.cloud.dataform.v1beta1.GetTeamFolderRequest\x1a).google.cloud.dataform.v1beta1.TeamFolder\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1beta1/{name=projects/*/locations/*/teamFolders/*}\x12\xd5\x01\n\x10\x43reateTeamFolder\x12\x36.google.cloud.dataform.v1beta1.CreateTeamFolderRequest\x1a).google.cloud.dataform.v1beta1.TeamFolder\"^\xda\x41\x12parent,team_folder\x82\xd3\xe4\x93\x02\x43\"4/v1beta1/{parent=projects/*/locations/*}/teamFolders:\x0bteam_folder\x12\xe6\x01\n\x10UpdateTeamFolder\x12\x36.google.cloud.dataform.v1beta1.UpdateTeamFolderRequest\x1a).google.cloud.dataform.v1beta1.TeamFolder\"o\xda\x41\x17team_folder,update_mask\x82\xd3\xe4\x93\x02O2@/v1beta1/{team_folder.name=projects/*/locations/*/teamFolders/*}:\x0bteam_folder\x12\xa7\x01\n\x10\x44\x65leteTeamFolder\x12\x36.google.cloud.dataform.v1beta1.DeleteTeamFolderRequest\x1a\x16.google.protobuf.Empty\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36*4/v1beta1/{name=projects/*/locations/*/teamFolders/*}\x12\xf9\x01\n\x17QueryTeamFolderContents\x12=.google.cloud.dataform.v1beta1.QueryTeamFolderContentsRequest\x1a>.google.cloud.dataform.v1beta1.QueryTeamFolderContentsResponse\"_\xda\x41\x0bteam_folder\x82\xd3\xe4\x93\x02K\x12I/v1beta1/{team_folder=projects/*/locations/*/teamFolders/*}:queryContents\x12\xcd\x01\n\x11SearchTeamFolders\x12\x37.google.cloud.dataform.v1beta1.SearchTeamFoldersRequest\x1a\x38.google.cloud.dataform.v1beta1.SearchTeamFoldersResponse\"E\x82\xd3\xe4\x93\x02?\x12=/v1beta1/{location=projects/*/locations/*}/teamFolders:search\x12\xa4\x01\n\tGetFolder\x12/.google.cloud.dataform.v1beta1.GetFolderRequest\x1a%.google.cloud.dataform.v1beta1.Folder\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta1/{name=projects/*/locations/*/folders/*}\x12\xbb\x01\n\x0c\x43reateFolder\x12\x32.google.cloud.dataform.v1beta1.CreateFolderRequest\x1a%.google.cloud.dataform.v1beta1.Folder\"P\xda\x41\rparent,folder\x82\xd3\xe4\x93\x02:\"0/v1beta1/{parent=projects/*/locations/*}/folders:\x06\x66older\x12\xc7\x01\n\x0cUpdateFolder\x12\x32.google.cloud.dataform.v1beta1.UpdateFolderRequest\x1a%.google.cloud.dataform.v1beta1.Folder\"\\\xda\x41\x12\x66older,update_mask\x82\xd3\xe4\x93\x02\x41\x32\x37/v1beta1/{folder.name=projects/*/locations/*/folders/*}:\x06\x66older\x12\x9b\x01\n\x0c\x44\x65leteFolder\x12\x32.google.cloud.dataform.v1beta1.DeleteFolderRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1beta1/{name=projects/*/locations/*/folders/*}\x12\xe5\x01\n\x13QueryFolderContents\x12\x39.google.cloud.dataform.v1beta1.QueryFolderContentsRequest\x1a:.google.cloud.dataform.v1beta1.QueryFolderContentsResponse\"W\xda\x41\x06\x66older\x82\xd3\xe4\x93\x02H\x12\x46/v1beta1/{folder=projects/*/locations/*/folders/*}:queryFolderContents\x12\xe7\x01\n\x15QueryUserRootContents\x12;.google.cloud.dataform.v1beta1.QueryUserRootContentsRequest\x1a<.google.cloud.dataform.v1beta1.QueryUserRootContentsResponse\"S\xda\x41\x08location\x82\xd3\xe4\x93\x02\x42\x12@/v1beta1/{location=projects/*/locations/*}:queryUserRootContents\x12\xf3\x01\n\nMoveFolder\x12\x30.google.cloud.dataform.v1beta1.MoveFolderRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41+\n\x15google.protobuf.Empty\x12\x12MoveFolderMetadata\xda\x41\"name,destination_containing_folder\x82\xd3\xe4\x93\x02:\"5/v1beta1/{name=projects/*/locations/*/folders/*}:move:\x01*\x12\xcb\x01\n\x10ListRepositories\x12\x36.google.cloud.dataform.v1beta1.ListRepositoriesRequest\x1a\x37.google.cloud.dataform.v1beta1.ListRepositoriesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{parent=projects/*/locations/*}/repositories\x12\xb5\x01\n\rGetRepository\x12\x33.google.cloud.dataform.v1beta1.GetRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{name=projects/*/locations/*/repositories/*}\x12\xe2\x01\n\x10\x43reateRepository\x12\x36.google.cloud.dataform.v1beta1.CreateRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"k\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02\x43\"5/v1beta1/{parent=projects/*/locations/*}/repositories:\nrepository\x12\xe4\x01\n\x10UpdateRepository\x12\x36.google.cloud.dataform.v1beta1.UpdateRepositoryRequest\x1a).google.cloud.dataform.v1beta1.Repository\"m\xda\x41\x16repository,update_mask\x82\xd3\xe4\x93\x02N2@/v1beta1/{repository.name=projects/*/locations/*/repositories/*}:\nrepository\x12\xa8\x01\n\x10\x44\x65leteRepository\x12\x36.google.cloud.dataform.v1beta1.DeleteRepositoryRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta1/{name=projects/*/locations/*/repositories/*}\x12\x84\x02\n\x0eMoveRepository\x12\x34.google.cloud.dataform.v1beta1.MoveRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x9c\x01\xca\x41/\n\x15google.protobuf.Empty\x12\x16MoveRepositoryMetadata\xda\x41\"name,destination_containing_folder\x82\xd3\xe4\x93\x02?\":/v1beta1/{name=projects/*/locations/*/repositories/*}:move:\x01*\x12\xe1\x01\n\x17\x43ommitRepositoryChanges\x12=.google.cloud.dataform.v1beta1.CommitRepositoryChangesRequest\x1a>.google.cloud.dataform.v1beta1.CommitRepositoryChangesResponse\"G\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/repositories/*}:readFile\x12\x89\x02\n QueryRepositoryDirectoryContents\x12\x46.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsRequest\x1aG.google.cloud.dataform.v1beta1.QueryRepositoryDirectoryContentsResponse\"T\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/repositories/*}:queryDirectoryContents\x12\xe1\x01\n\x16\x46\x65tchRepositoryHistory\x12<.google.cloud.dataform.v1beta1.FetchRepositoryHistoryRequest\x1a=.google.cloud.dataform.v1beta1.FetchRepositoryHistoryResponse\"J\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchHistory\x12\x91\x02\n\"ComputeRepositoryAccessTokenStatus\x12H.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusRequest\x1aI.google.cloud.dataform.v1beta1.ComputeRepositoryAccessTokenStatusResponse\"V\x82\xd3\xe4\x93\x02P\x12N/v1beta1/{name=projects/*/locations/*/repositories/*}:computeAccessTokenStatus\x12\xdf\x01\n\x13\x46\x65tchRemoteBranches\x12\x39.google.cloud.dataform.v1beta1.FetchRemoteBranchesRequest\x1a:.google.cloud.dataform.v1beta1.FetchRemoteBranchesResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1beta1/{name=projects/*/locations/*/repositories/*}:fetchRemoteBranches\x12\xd2\x01\n\x0eListWorkspaces\x12\x34.google.cloud.dataform.v1beta1.ListWorkspacesRequest\x1a\x35.google.cloud.dataform.v1beta1.ListWorkspacesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces\x12\xbf\x01\n\x0cGetWorkspace\x12\x32.google.cloud.dataform.v1beta1.GetWorkspaceRequest\x1a(.google.cloud.dataform.v1beta1.Workspace\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xe9\x01\n\x0f\x43reateWorkspace\x12\x35.google.cloud.dataform.v1beta1.CreateWorkspaceRequest\x1a(.google.cloud.dataform.v1beta1.Workspace\"u\xda\x41\x1dparent,workspace,workspace_id\x82\xd3\xe4\x93\x02O\"B/v1beta1/{parent=projects/*/locations/*/repositories/*}/workspaces:\tworkspace\x12\xb3\x01\n\x0f\x44\x65leteWorkspace\x12\x35.google.cloud.dataform.v1beta1.DeleteWorkspaceRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}\x12\xf0\x01\n\x12InstallNpmPackages\x12\x38.google.cloud.dataform.v1beta1.InstallNpmPackagesRequest\x1a\x39.google.cloud.dataform.v1beta1.InstallNpmPackagesResponse\"e\x82\xd3\xe4\x93\x02_\"Z/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:installNpmPackages:\x01*\x12\xd1\x01\n\x0ePullGitCommits\x12\x34.google.cloud.dataform.v1beta1.PullGitCommitsRequest\x1a\x35.google.cloud.dataform.v1beta1.PullGitCommitsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:pull:\x01*\x12\xd1\x01\n\x0ePushGitCommits\x12\x34.google.cloud.dataform.v1beta1.PushGitCommitsRequest\x1a\x35.google.cloud.dataform.v1beta1.PushGitCommitsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:push:\x01*\x12\xf0\x01\n\x14\x46\x65tchFileGitStatuses\x12:.google.cloud.dataform.v1beta1.FetchFileGitStatusesRequest\x1a;.google.cloud.dataform.v1beta1.FetchFileGitStatusesResponse\"_\x82\xd3\xe4\x93\x02Y\x12W/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileGitStatuses\x12\xec\x01\n\x13\x46\x65tchGitAheadBehind\x12\x39.google.cloud.dataform.v1beta1.FetchGitAheadBehindRequest\x1a:.google.cloud.dataform.v1beta1.FetchGitAheadBehindResponse\"^\x82\xd3\xe4\x93\x02X\x12V/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:fetchGitAheadBehind\x12\xeb\x01\n\x16\x43ommitWorkspaceChanges\x12<.google.cloud.dataform.v1beta1.CommitWorkspaceChangesRequest\x1a=.google.cloud.dataform.v1beta1.CommitWorkspaceChangesResponse\"T\x82\xd3\xe4\x93\x02N\"I/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:commit:\x01*\x12\xe7\x01\n\x15ResetWorkspaceChanges\x12;.google.cloud.dataform.v1beta1.ResetWorkspaceChangesRequest\x1a<.google.cloud.dataform.v1beta1.ResetWorkspaceChangesResponse\"S\x82\xd3\xe4\x93\x02M\"H/v1beta1/{name=projects/*/locations/*/repositories/*/workspaces/*}:reset:\x01*\x12\xd9\x01\n\rFetchFileDiff\x12\x33.google.cloud.dataform.v1beta1.FetchFileDiffRequest\x1a\x34.google.cloud.dataform.v1beta1.FetchFileDiffResponse\"]\x82\xd3\xe4\x93\x02W\x12U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:fetchFileDiff\x12\xfd\x01\n\x16QueryDirectoryContents\x12<.google.cloud.dataform.v1beta1.QueryDirectoryContentsRequest\x1a=.google.cloud.dataform.v1beta1.QueryDirectoryContentsResponse\"f\x82\xd3\xe4\x93\x02`\x12^/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:queryDirectoryContents\x12\xd1\x01\n\x0bSearchFiles\x12\x31.google.cloud.dataform.v1beta1.SearchFilesRequest\x1a\x32.google.cloud.dataform.v1beta1.SearchFilesResponse\"[\x82\xd3\xe4\x93\x02U\x12S/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:searchFiles\x12\xdc\x01\n\rMakeDirectory\x12\x33.google.cloud.dataform.v1beta1.MakeDirectoryRequest\x1a\x34.google.cloud.dataform.v1beta1.MakeDirectoryResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:makeDirectory:\x01*\x12\xe4\x01\n\x0fRemoveDirectory\x12\x35.google.cloud.dataform.v1beta1.RemoveDirectoryRequest\x1a\x36.google.cloud.dataform.v1beta1.RemoveDirectoryResponse\"b\x82\xd3\xe4\x93\x02\\\"W/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeDirectory:\x01*\x12\xdc\x01\n\rMoveDirectory\x12\x33.google.cloud.dataform.v1beta1.MoveDirectoryRequest\x1a\x34.google.cloud.dataform.v1beta1.MoveDirectoryResponse\"`\x82\xd3\xe4\x93\x02Z\"U/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveDirectory:\x01*\x12\xc5\x01\n\x08ReadFile\x12..google.cloud.dataform.v1beta1.ReadFileRequest\x1a/.google.cloud.dataform.v1beta1.ReadFileResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile\x12\xd0\x01\n\nRemoveFile\x12\x30.google.cloud.dataform.v1beta1.RemoveFileRequest\x1a\x31.google.cloud.dataform.v1beta1.RemoveFileResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:removeFile:\x01*\x12\xc8\x01\n\x08MoveFile\x12..google.cloud.dataform.v1beta1.MoveFileRequest\x1a/.google.cloud.dataform.v1beta1.MoveFileResponse\"[\x82\xd3\xe4\x93\x02U\"P/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:moveFile:\x01*\x12\xcc\x01\n\tWriteFile\x12/.google.cloud.dataform.v1beta1.WriteFileRequest\x1a\x30.google.cloud.dataform.v1beta1.WriteFileResponse\"\\\x82\xd3\xe4\x93\x02V\"Q/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:writeFile:\x01*\x12\xe2\x01\n\x12ListReleaseConfigs\x12\x38.google.cloud.dataform.v1beta1.ListReleaseConfigsRequest\x1a\x39.google.cloud.dataform.v1beta1.ListReleaseConfigsResponse\"W\xda\x41\x06parent\x82\xd3\xe4\x93\x02H\x12\x46/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs\x12\xcf\x01\n\x10GetReleaseConfig\x12\x36.google.cloud.dataform.v1beta1.GetReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H\x12\x46/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\x89\x02\n\x13\x43reateReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.CreateReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"\x88\x01\xda\x41\'parent,release_config,release_config_id\x82\xd3\xe4\x93\x02X\"F/v1beta1/{parent=projects/*/locations/*/repositories/*}/releaseConfigs:\x0erelease_config\x12\x8b\x02\n\x13UpdateReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.UpdateReleaseConfigRequest\x1a,.google.cloud.dataform.v1beta1.ReleaseConfig\"\x8a\x01\xda\x41\x1arelease_config,update_mask\x82\xd3\xe4\x93\x02g2U/v1beta1/{release_config.name=projects/*/locations/*/repositories/*/releaseConfigs/*}:\x0erelease_config\x12\xbf\x01\n\x13\x44\x65leteReleaseConfig\x12\x39.google.cloud.dataform.v1beta1.DeleteReleaseConfigRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x04name\x82\xd3\xe4\x93\x02H*F/v1beta1/{name=projects/*/locations/*/repositories/*/releaseConfigs/*}\x12\xf2\x01\n\x16ListCompilationResults\x12<.google.cloud.dataform.v1beta1.ListCompilationResultsRequest\x1a=.google.cloud.dataform.v1beta1.ListCompilationResultsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults\x12\xdf\x01\n\x14GetCompilationResult\x12:.google.cloud.dataform.v1beta1.GetCompilationResultRequest\x1a\x30.google.cloud.dataform.v1beta1.CompilationResult\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}\x12\x8f\x02\n\x17\x43reateCompilationResult\x12=.google.cloud.dataform.v1beta1.CreateCompilationResultRequest\x1a\x30.google.cloud.dataform.v1beta1.CompilationResult\"\x82\x01\xda\x41\x19parent,compilation_result\x82\xd3\xe4\x93\x02`\"J/v1beta1/{parent=projects/*/locations/*/repositories/*}/compilationResults:\x12\x63ompilation_result\x12\x84\x02\n\x1dQueryCompilationResultActions\x12\x43.google.cloud.dataform.v1beta1.QueryCompilationResultActionsRequest\x1a\x44.google.cloud.dataform.v1beta1.QueryCompilationResultActionsResponse\"X\x82\xd3\xe4\x93\x02R\x12P/v1beta1/{name=projects/*/locations/*/repositories/*/compilationResults/*}:query\x12\xe6\x01\n\x13ListWorkflowConfigs\x12\x39.google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest\x1a:.google.cloud.dataform.v1beta1.ListWorkflowConfigsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs\x12\xd3\x01\n\x11GetWorkflowConfig\x12\x37.google.cloud.dataform.v1beta1.GetWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\x90\x02\n\x14\x43reateWorkflowConfig\x12:.google.cloud.dataform.v1beta1.CreateWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"\x8c\x01\xda\x41)parent,workflow_config,workflow_config_id\x82\xd3\xe4\x93\x02Z\"G/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowConfigs:\x0fworkflow_config\x12\x92\x02\n\x14UpdateWorkflowConfig\x12:.google.cloud.dataform.v1beta1.UpdateWorkflowConfigRequest\x1a-.google.cloud.dataform.v1beta1.WorkflowConfig\"\x8e\x01\xda\x41\x1bworkflow_config,update_mask\x82\xd3\xe4\x93\x02j2W/v1beta1/{workflow_config.name=projects/*/locations/*/repositories/*/workflowConfigs/*}:\x0fworkflow_config\x12\xc2\x01\n\x14\x44\x65leteWorkflowConfig\x12:.google.cloud.dataform.v1beta1.DeleteWorkflowConfigRequest\x1a\x16.google.protobuf.Empty\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I*G/v1beta1/{name=projects/*/locations/*/repositories/*/workflowConfigs/*}\x12\xf6\x01\n\x17ListWorkflowInvocations\x12=.google.cloud.dataform.v1beta1.ListWorkflowInvocationsRequest\x1a>.google.cloud.dataform.v1beta1.ListWorkflowInvocationsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations\x12\xe3\x01\n\x15GetWorkflowInvocation\x12;.google.cloud.dataform.v1beta1.GetWorkflowInvocationRequest\x1a\x31.google.cloud.dataform.v1beta1.WorkflowInvocation\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\x95\x02\n\x18\x43reateWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.CreateWorkflowInvocationRequest\x1a\x31.google.cloud.dataform.v1beta1.WorkflowInvocation\"\x85\x01\xda\x41\x1aparent,workflow_invocation\x82\xd3\xe4\x93\x02\x62\"K/v1beta1/{parent=projects/*/locations/*/repositories/*}/workflowInvocations:\x13workflow_invocation\x12\xce\x01\n\x18\x44\x65leteWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.DeleteWorkflowInvocationRequest\x1a\x16.google.protobuf.Empty\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}\x12\xfa\x01\n\x18\x43\x61ncelWorkflowInvocation\x12>.google.cloud.dataform.v1beta1.CancelWorkflowInvocationRequest\x1a?.google.cloud.dataform.v1beta1.CancelWorkflowInvocationResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:cancel:\x01*\x12\x88\x02\n\x1eQueryWorkflowInvocationActions\x12\x44.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsRequest\x1a\x45.google.cloud.dataform.v1beta1.QueryWorkflowInvocationActionsResponse\"Y\x82\xd3\xe4\x93\x02S\x12Q/v1beta1/{name=projects/*/locations/*/repositories/*/workflowInvocations/*}:query\x12\xa1\x01\n\tGetConfig\x12/.google.cloud.dataform.v1beta1.GetConfigRequest\x1a%.google.cloud.dataform.v1beta1.Config\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1beta1/{name=projects/*/locations/*/config}\x12\xc4\x01\n\x0cUpdateConfig\x12\x32.google.cloud.dataform.v1beta1.UpdateConfigRequest\x1a%.google.cloud.dataform.v1beta1.Config\"Y\xda\x41\x12\x63onfig,update_mask\x82\xd3\xe4\x93\x02>24/v1beta1/{config.name=projects/*/locations/*/config}:\x06\x63onfig\x12\x8b\x03\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xbf\x02\xda\x41\x08resource\x82\xd3\xe4\x93\x02\xad\x02\x12\x46/v1beta1/{resource=projects/*/locations/*/repositories/*}:getIamPolicyZU\x12S/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:getIamPolicyZC\x12\x41/v1beta1/{resource=projects/*/locations/*/folders/*}:getIamPolicyZG\x12\x45/v1beta1/{resource=projects/*/locations/*/teamFolders/*}:getIamPolicy\x12\x8c\x03\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xc0\x02\x82\xd3\xe4\x93\x02\xb9\x02\"F/v1beta1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*ZX\"S/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:setIamPolicy:\x01*ZF\"A/v1beta1/{resource=projects/*/locations/*/folders/*}:setIamPolicy:\x01*ZJ\"E/v1beta1/{resource=projects/*/locations/*/teamFolders/*}:setIamPolicy:\x01*\x12\xc4\x03\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xd8\x02\x82\xd3\xe4\x93\x02\xd1\x02\"L/v1beta1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*Z^\"Y/v1beta1/{resource=projects/*/locations/*/repositories/*/workspaces/*}:testIamPermissions:\x01*ZL\"G/v1beta1/{resource=projects/*/locations/*/folders/*}:testIamPermissions:\x01*ZP\"K/v1beta1/{resource=projects/*/locations/*/teamFolders/*}:testIamPermissions:\x01*\x1at\xca\x41\x17\x64\x61taform.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xf7\x05\n!com.google.cloud.dataform.v1beta1B\rDataformProtoP\x01Z=cloud.google.com/go/dataform/apiv1beta1/dataformpb;dataformpb\xaa\x02\x1dGoogle.Cloud.Dataform.V1Beta1\xca\x02\x1dGoogle\\Cloud\\Dataform\\V1beta1\xea\x02 Google::Cloud::Dataform::V1beta1\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" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -55,8 +58,10 @@ module V1beta1 Repository::GitRemoteSettings::SshAuthenticationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.SshAuthenticationConfig").msgclass Repository::GitRemoteSettings::TokenStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.Repository.GitRemoteSettings.TokenStatus").enummodule Repository::WorkspaceCompilationOverrides = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.Repository.WorkspaceCompilationOverrides").msgclass + PrivateResourceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.PrivateResourceMetadata").msgclass ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.ListRepositoriesRequest").msgclass ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.ListRepositoriesResponse").msgclass + MoveRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveRepositoryRequest").msgclass GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.GetRepositoryRequest").msgclass CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CreateRepositoryRequest").msgclass UpdateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.UpdateRepositoryRequest").msgclass @@ -149,6 +154,8 @@ module V1beta1 CompilationResultAction::Relation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Relation").msgclass CompilationResultAction::Relation::IncrementalTableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Relation.IncrementalTableConfig").msgclass CompilationResultAction::Relation::RelationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Relation.RelationType").enummodule + CompilationResultAction::Relation::TableFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Relation.TableFormat").enummodule + CompilationResultAction::Relation::FileFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Relation.FileFormat").enummodule CompilationResultAction::Operations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Operations").msgclass CompilationResultAction::Assertion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Assertion").msgclass CompilationResultAction::Declaration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CompilationResultAction.Declaration").msgclass @@ -164,6 +171,7 @@ module V1beta1 WorkflowConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.WorkflowConfig").msgclass WorkflowConfig::ScheduledExecutionRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.WorkflowConfig.ScheduledExecutionRecord").msgclass InvocationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.InvocationConfig").msgclass + InvocationConfig::QueryPriority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.InvocationConfig.QueryPriority").enummodule ListWorkflowConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.ListWorkflowConfigsRequest").msgclass ListWorkflowConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.ListWorkflowConfigsResponse").msgclass GetWorkflowConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.GetWorkflowConfigRequest").msgclass @@ -194,6 +202,33 @@ module V1beta1 Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.Config").msgclass GetConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.GetConfigRequest").msgclass UpdateConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.UpdateConfigRequest").msgclass + Folder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.Folder").msgclass + CreateFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CreateFolderRequest").msgclass + MoveFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveFolderRequest").msgclass + GetFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.GetFolderRequest").msgclass + UpdateFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.UpdateFolderRequest").msgclass + DeleteFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.DeleteFolderRequest").msgclass + QueryFolderContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryFolderContentsRequest").msgclass + QueryFolderContentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryFolderContentsResponse").msgclass + QueryFolderContentsResponse::FolderContentsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryFolderContentsResponse.FolderContentsEntry").msgclass + QueryUserRootContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryUserRootContentsRequest").msgclass + QueryUserRootContentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryUserRootContentsResponse").msgclass + QueryUserRootContentsResponse::RootContentsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryUserRootContentsResponse.RootContentsEntry").msgclass + TeamFolder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.TeamFolder").msgclass + CreateTeamFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.CreateTeamFolderRequest").msgclass + GetTeamFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.GetTeamFolderRequest").msgclass + UpdateTeamFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.UpdateTeamFolderRequest").msgclass + DeleteTeamFolderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.DeleteTeamFolderRequest").msgclass + QueryTeamFolderContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryTeamFolderContentsRequest").msgclass + QueryTeamFolderContentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryTeamFolderContentsResponse").msgclass + QueryTeamFolderContentsResponse::TeamFolderContentsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.QueryTeamFolderContentsResponse.TeamFolderContentsEntry").msgclass + SearchTeamFoldersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.SearchTeamFoldersRequest").msgclass + SearchTeamFoldersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.SearchTeamFoldersResponse").msgclass + SearchTeamFoldersResponse::TeamFolderSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.SearchTeamFoldersResponse.TeamFolderSearchResult").msgclass + MoveFolderMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveFolderMetadata").msgclass + MoveFolderMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveFolderMetadata.State").enummodule + MoveRepositoryMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveRepositoryMetadata").msgclass + MoveRepositoryMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dataform.v1beta1.MoveRepositoryMetadata.State").enummodule end end end diff --git a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb index 4487ffca96c8..c50430ea3061 100644 --- a/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb +++ b/google-cloud-dataform-v1beta1/lib/google/cloud/dataform/v1beta1/dataform_services_pb.rb @@ -34,6 +34,35 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'google.cloud.dataform.v1beta1.Dataform' + # Fetches a single TeamFolder. + rpc :GetTeamFolder, ::Google::Cloud::Dataform::V1beta1::GetTeamFolderRequest, ::Google::Cloud::Dataform::V1beta1::TeamFolder + # Creates a new TeamFolder in a given project and location. + rpc :CreateTeamFolder, ::Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest, ::Google::Cloud::Dataform::V1beta1::TeamFolder + # Updates a single TeamFolder. + rpc :UpdateTeamFolder, ::Google::Cloud::Dataform::V1beta1::UpdateTeamFolderRequest, ::Google::Cloud::Dataform::V1beta1::TeamFolder + # Deletes a single TeamFolder. + rpc :DeleteTeamFolder, ::Google::Cloud::Dataform::V1beta1::DeleteTeamFolderRequest, ::Google::Protobuf::Empty + # Returns the contents of a given TeamFolder. + rpc :QueryTeamFolderContents, ::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsRequest, ::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse + # Returns all TeamFolders in a given location that the caller has access to + # and match the provided filter. + rpc :SearchTeamFolders, ::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersRequest, ::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse + # Fetches a single Folder. + rpc :GetFolder, ::Google::Cloud::Dataform::V1beta1::GetFolderRequest, ::Google::Cloud::Dataform::V1beta1::Folder + # Creates a new Folder in a given project and location. + rpc :CreateFolder, ::Google::Cloud::Dataform::V1beta1::CreateFolderRequest, ::Google::Cloud::Dataform::V1beta1::Folder + # Updates a single Folder. + rpc :UpdateFolder, ::Google::Cloud::Dataform::V1beta1::UpdateFolderRequest, ::Google::Cloud::Dataform::V1beta1::Folder + # Deletes a single Folder. + rpc :DeleteFolder, ::Google::Cloud::Dataform::V1beta1::DeleteFolderRequest, ::Google::Protobuf::Empty + # Returns the contents of a given Folder. + rpc :QueryFolderContents, ::Google::Cloud::Dataform::V1beta1::QueryFolderContentsRequest, ::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse + # 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. + rpc :QueryUserRootContents, ::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsRequest, ::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse + # Moves a Folder to a new Folder, TeamFolder, or the root location. + rpc :MoveFolder, ::Google::Cloud::Dataform::V1beta1::MoveFolderRequest, ::Google::Longrunning::Operation # Lists Repositories in a given project and location. # # **Note:** *This method can return repositories not shown in the [Dataform @@ -52,6 +81,8 @@ class Service rpc :UpdateRepository, ::Google::Cloud::Dataform::V1beta1::UpdateRepositoryRequest, ::Google::Cloud::Dataform::V1beta1::Repository # Deletes a single Repository. rpc :DeleteRepository, ::Google::Cloud::Dataform::V1beta1::DeleteRepositoryRequest, ::Google::Protobuf::Empty + # Moves a Repository to a new location. + rpc :MoveRepository, ::Google::Cloud::Dataform::V1beta1::MoveRepositoryRequest, ::Google::Longrunning::Operation # Applies a Git commit to a Repository. The Repository must not have a value # for `git_remote_settings.url`. rpc :CommitRepositoryChanges, ::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesRequest, ::Google::Cloud::Dataform::V1beta1::CommitRepositoryChangesResponse @@ -170,6 +201,23 @@ class Service # as a bad request, and when the `field_mask` is omitted, the request is # treated as a full update on all modifiable fields.* rpc :UpdateConfig, ::Google::Cloud::Dataform::V1beta1::UpdateConfigRequest, ::Google::Cloud::Dataform::V1beta1::Config + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # + # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # 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. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-dataform-v1beta1/lib/google/longrunning.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning.rb new file mode 100644 index 000000000000..00d81c010e10 --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/longrunning.rb @@ -0,0 +1,41 @@ +# 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" +require "google/cloud/dataform/v1beta1/version" + +module Google + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/longrunning" + # client = ::Google::Longrunning::Operations::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/longrunning" + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + module Longrunning + end +end + +helper_path = ::File.join __dir__, "longrunning", "_helpers.rb" +require "google/longrunning/_helpers" if ::File.file? helper_path diff --git a/google-cloud-dataform-v1beta1/lib/google/longrunning/bindings_override.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/bindings_override.rb new file mode 100644 index 000000000000..113c0d0821b6 --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/longrunning/bindings_override.rb @@ -0,0 +1,71 @@ +# 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" + +module Google + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/longrunning/rest" + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + module Longrunning + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google"] + 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 = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end +end diff --git a/google-cloud-dataform-v1beta1/lib/google/longrunning/operations.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations.rb new file mode 100644 index 000000000000..fbab23f1f3ba --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations.rb @@ -0,0 +1,59 @@ +# 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/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/dataform/v1beta1/version" + +require "google/longrunning/operations/credentials" +require "google/longrunning/operations/operations" +require "google/longrunning/operations/client" +require "google/longrunning/operations/rest" + +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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/longrunning/operations" + # client = ::Google::Longrunning::Operations::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/longrunning/operations/rest" + # client = ::Google::Longrunning::Operations::Rest::Client.new + # + module Operations + end + end +end + +helper_path = ::File.join __dir__, "operations", "helpers.rb" +require "google/longrunning/operations/helpers" if ::File.file? helper_path diff --git a/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/client.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/client.rb new file mode 100644 index 000000000000..da89386288ae --- /dev/null +++ b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/client.rb @@ -0,0 +1,952 @@ +# 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/cloud/location" +require "google/iam/v1" + +module Google + module Longrunning + module Operations + ## + # 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::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Operations clients + # ::Google::Longrunning::Operations::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::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 client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Longrunning::Operations::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Client::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 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 = 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 = ::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, + logger: @config.logger + ) + + @operations_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 = @operations_stub.endpoint + config.universe_domain = @operations_stub.universe_domain + config.logger = @operations_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 = @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::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 + @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 [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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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-v1beta1/lib/google/longrunning/operations/credentials.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/credentials.rb new file mode 100644 index 000000000000..7076d1962dc3 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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-v1beta1/lib/google/longrunning/operations/operations.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/operations.rb new file mode 100644 index 000000000000..673e035c195d --- /dev/null +++ b/google-cloud-dataform-v1beta1/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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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-v1beta1/lib/google/longrunning/operations/rest.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/rest.rb new file mode 100644 index 000000000000..941b11d0a0d0 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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/v1beta1/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-v1beta1/lib/google/longrunning/operations/rest/client.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/rest/client.rb new file mode 100644 index 000000000000..f0ddf1e72e6f --- /dev/null +++ b/google-cloud-dataform-v1beta1/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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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-v1beta1/lib/google/longrunning/operations/rest/operations.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/rest/operations.rb new file mode 100644 index 000000000000..038fd06a4046 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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-v1beta1/lib/google/longrunning/operations/rest/service_stub.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/operations/rest/service_stub.rb new file mode 100644 index 000000000000..29f29229b6fc --- /dev/null +++ b/google-cloud-dataform-v1beta1/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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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: "/v1beta1/{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-v1beta1/lib/google/longrunning/rest.rb b/google-cloud-dataform-v1beta1/lib/google/longrunning/rest.rb new file mode 100644 index 000000000000..63ce8e1407b3 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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/v1beta1/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-v1beta1/proto_docs/google/cloud/dataform/v1beta1/dataform.rb b/google-cloud-dataform-v1beta1/proto_docs/google/cloud/dataform/v1beta1/dataform.rb index 63da560d6572..8bfd6a46293a 100644 --- a/google-cloud-dataform-v1beta1/proto_docs/google/cloud/dataform/v1beta1/dataform.rb +++ b/google-cloud-dataform-v1beta1/proto_docs/google/cloud/dataform/v1beta1/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. @@ -178,6 +191,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] @@ -225,6 +248,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] @@ -270,9 +308,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 @@ -550,6 +592,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::V1beta1::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 @@ -1342,6 +1392,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::V1beta1::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 @@ -1657,6 +1712,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::V1beta1::CompilationResultAction::Relation::TableFormat] + # Optional. The table format for the BigQuery table. + # @!attribute [rw] file_format + # @return [::Google::Cloud::Dataform::V1beta1::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 @@ -1719,6 +1792,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. @@ -2036,9 +2127,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::V1beta1::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. @@ -2167,6 +2279,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::V1beta1::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 @@ -2531,6 +2648,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 @@ -2556,6 +2678,529 @@ 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::V1beta1::Folder] + # Required. The Folder to create. + # @!attribute [rw] folder_id + # @return [::String] + # The ID to use for the Folder, which will become the final component of + # the Folder's resource name. + 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::V1beta1::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 + + # `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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::TeamFolder] + # Required. The TeamFolder to create. + # @!attribute [rw] team_folder_id + # @return [::String] + # The ID to use for the TeamFolder, which will become the final component of + # the TeamFolder's resource name. + 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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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 end end end diff --git a/google-cloud-dataform-v1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-dataform-v1beta1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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-v1beta1/snippets/dataform/create_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/create_folder.rb new file mode 100644 index 000000000000..99368ccc4fcb --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_CreateFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#create_folder. +# +def create_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new + + # Call the create_folder method. + result = client.create_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::Folder. + p result +end +# [END dataform_v1beta1_generated_Dataform_CreateFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/create_team_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/create_team_folder.rb new file mode 100644 index 000000000000..ef453265a52d --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_CreateTeamFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest.new + + # Call the create_team_folder method. + result = client.create_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::TeamFolder. + p result +end +# [END dataform_v1beta1_generated_Dataform_CreateTeamFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/delete_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/delete_folder.rb new file mode 100644 index 000000000000..e5ab0cfa54bc --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_DeleteFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#delete_folder. +# +def delete_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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_v1beta1_generated_Dataform_DeleteFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/delete_team_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/delete_team_folder.rb new file mode 100644 index 000000000000..d08b248c5a4a --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_DeleteTeamFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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_v1beta1_generated_Dataform_DeleteTeamFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/get_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/get_folder.rb new file mode 100644 index 000000000000..052b23245234 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_GetFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#get_folder. +# +def get_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::GetFolderRequest.new + + # Call the get_folder method. + result = client.get_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::Folder. + p result +end +# [END dataform_v1beta1_generated_Dataform_GetFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/get_iam_policy.rb b/google-cloud-dataform-v1beta1/snippets/dataform/get_iam_policy.rb new file mode 100644 index 000000000000..7e28a08a97cd --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_GetIamPolicy_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::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_v1beta1_generated_Dataform_GetIamPolicy_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/get_team_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/get_team_folder.rb new file mode 100644 index 000000000000..3aacd862c565 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_GetTeamFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::GetTeamFolderRequest.new + + # Call the get_team_folder method. + result = client.get_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::TeamFolder. + p result +end +# [END dataform_v1beta1_generated_Dataform_GetTeamFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/move_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/move_folder.rb new file mode 100644 index 000000000000..cdb76516a228 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_MoveFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#move_folder. +# +def move_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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_v1beta1_generated_Dataform_MoveFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/move_repository.rb b/google-cloud-dataform-v1beta1/snippets/dataform/move_repository.rb new file mode 100644 index 000000000000..34d3dd7bae24 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_MoveRepository_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#move_repository. +# +def move_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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_v1beta1_generated_Dataform_MoveRepository_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/query_folder_contents.rb b/google-cloud-dataform-v1beta1/snippets/dataform/query_folder_contents.rb new file mode 100644 index 000000000000..96bd9b70705b --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_QueryFolderContents_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryFolderContentsResponse::FolderContentsEntry. + p item + end +end +# [END dataform_v1beta1_generated_Dataform_QueryFolderContents_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/query_team_folder_contents.rb b/google-cloud-dataform-v1beta1/snippets/dataform/query_team_folder_contents.rb new file mode 100644 index 000000000000..188f6ab5abe4 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_QueryTeamFolderContents_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryTeamFolderContentsResponse::TeamFolderContentsEntry. + p item + end +end +# [END dataform_v1beta1_generated_Dataform_QueryTeamFolderContents_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/query_user_root_contents.rb b/google-cloud-dataform-v1beta1/snippets/dataform/query_user_root_contents.rb new file mode 100644 index 000000000000..6d6d27815850 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_QueryUserRootContents_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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::V1beta1::QueryUserRootContentsResponse::RootContentsEntry. + p item + end +end +# [END dataform_v1beta1_generated_Dataform_QueryUserRootContents_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/search_team_folders.rb b/google-cloud-dataform-v1beta1/snippets/dataform/search_team_folders.rb new file mode 100644 index 000000000000..d7ed21668969 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_SearchTeamFolders_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::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::V1beta1::SearchTeamFoldersResponse::TeamFolderSearchResult. + p item + end +end +# [END dataform_v1beta1_generated_Dataform_SearchTeamFolders_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/set_iam_policy.rb b/google-cloud-dataform-v1beta1/snippets/dataform/set_iam_policy.rb new file mode 100644 index 000000000000..e36b52be992c --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_SetIamPolicy_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::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_v1beta1_generated_Dataform_SetIamPolicy_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/test_iam_permissions.rb b/google-cloud-dataform-v1beta1/snippets/dataform/test_iam_permissions.rb new file mode 100644 index 000000000000..9340ac593ab6 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_TestIamPermissions_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::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_v1beta1_generated_Dataform_TestIamPermissions_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/update_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/update_folder.rb new file mode 100644 index 000000000000..352026a1982c --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_UpdateFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::Dataform::Client#update_folder. +# +def update_folder + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Dataform::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::UpdateFolderRequest.new + + # Call the update_folder method. + result = client.update_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::Folder. + p result +end +# [END dataform_v1beta1_generated_Dataform_UpdateFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/dataform/update_team_folder.rb b/google-cloud-dataform-v1beta1/snippets/dataform/update_team_folder.rb new file mode 100644 index 000000000000..e68e97a9e232 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_generated_Dataform_UpdateTeamFolder_sync] +require "google/cloud/dataform/v1beta1" + +## +# 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::V1beta1::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::V1beta1::Dataform::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Dataform::V1beta1::UpdateTeamFolderRequest.new + + # Call the update_team_folder method. + result = client.update_team_folder request + + # The returned object is of type Google::Cloud::Dataform::V1beta1::TeamFolder. + p result +end +# [END dataform_v1beta1_generated_Dataform_UpdateTeamFolder_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/operations/cancel_operation.rb b/google-cloud-dataform-v1beta1/snippets/operations/cancel_operation.rb new file mode 100644 index 000000000000..d01d915aca98 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_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_v1beta1_generated_Operations_CancelOperation_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/operations/delete_operation.rb b/google-cloud-dataform-v1beta1/snippets/operations/delete_operation.rb new file mode 100644 index 000000000000..8e30fec11953 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_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_v1beta1_generated_Operations_DeleteOperation_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/operations/get_operation.rb b/google-cloud-dataform-v1beta1/snippets/operations/get_operation.rb new file mode 100644 index 000000000000..00e544859977 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_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_v1beta1_generated_Operations_GetOperation_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/operations/list_operations.rb b/google-cloud-dataform-v1beta1/snippets/operations/list_operations.rb new file mode 100644 index 000000000000..379b8da7230e --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_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_v1beta1_generated_Operations_ListOperations_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/operations/wait_operation.rb b/google-cloud-dataform-v1beta1/snippets/operations/wait_operation.rb new file mode 100644 index 000000000000..a0772b70425f --- /dev/null +++ b/google-cloud-dataform-v1beta1/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_v1beta1_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_v1beta1_generated_Operations_WaitOperation_sync] diff --git a/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.cloud.dataform.v1beta1.json b/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.cloud.dataform.v1beta1.json index 2b38ed04cace..26cbf43f1857 100644 --- a/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.cloud.dataform.v1beta1.json +++ b/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.cloud.dataform.v1beta1.json @@ -11,6 +11,526 @@ ] }, "snippets": [ + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#get_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::GetTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "GetTeamFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.GetTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#create_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "CreateTeamFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.CreateTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#update_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::UpdateTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::TeamFolder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "UpdateTeamFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.UpdateTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#delete_team_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::DeleteTeamFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "DeleteTeamFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.DeleteTeamFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#query_team_folder_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::QueryTeamFolderContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "QueryTeamFolderContents", + "full_name": "google.cloud.dataform.v1beta1.Dataform.QueryTeamFolderContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#search_team_folders", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::SearchTeamFoldersResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "SearchTeamFolders", + "full_name": "google.cloud.dataform.v1beta1.Dataform.SearchTeamFolders", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#get_folder.", + "file": "dataform/get_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_folder", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#get_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::GetFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "GetFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.GetFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#create_folder.", + "file": "dataform/create_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_folder", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#create_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::CreateFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "CreateFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.CreateFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#update_folder.", + "file": "dataform/update_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_folder", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#update_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::UpdateFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::Folder", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "UpdateFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.UpdateFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#delete_folder.", + "file": "dataform/delete_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_folder", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#delete_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::DeleteFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "DeleteFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.DeleteFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#query_folder_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::QueryFolderContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::QueryFolderContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "QueryFolderContents", + "full_name": "google.cloud.dataform.v1beta1.Dataform.QueryFolderContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::Dataform::Client#query_user_root_contents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Dataform::V1beta1::QueryUserRootContentsResponse", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "QueryUserRootContents", + "full_name": "google.cloud.dataform.v1beta1.Dataform.QueryUserRootContents", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#move_folder.", + "file": "dataform/move_folder.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_folder", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#move_folder", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::MoveFolderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "MoveFolder", + "full_name": "google.cloud.dataform.v1beta1.Dataform.MoveFolder", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "dataform_v1beta1_generated_Dataform_ListRepositories_sync", "title": "Snippet for the list_repositories call in the Dataform service", @@ -211,6 +731,46 @@ } ] }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::Dataform::Client#move_repository.", + "file": "dataform/move_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_repository", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client#move_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Dataform::V1beta1::MoveRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Dataform::Client", + "full_name": "::Google::Cloud::Dataform::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "MoveRepository", + "full_name": "google.cloud.dataform.v1beta1.Dataform.MoveRepository", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, { "region_tag": "dataform_v1beta1_generated_Dataform_CommitRepositoryChanges_sync", "title": "Snippet for the commit_repository_changes call in the Dataform service", @@ -2170,6 +2730,126 @@ "type": "FULL" } ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::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::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.dataform.v1beta1.Dataform.GetIamPolicy", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::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::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.dataform.v1beta1.Dataform.SetIamPolicy", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.Dataform" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "dataform_v1beta1_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::V1beta1::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::V1beta1::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::V1beta1::Dataform::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.dataform.v1beta1.Dataform.TestIamPermissions", + "service": { + "short_name": "Dataform", + "full_name": "google.cloud.dataform.v1beta1.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-v1beta1/snippets/snippet_metadata_google.longrunning.json b/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.longrunning.json new file mode 100644 index 000000000000..1b0903a3339b --- /dev/null +++ b/google-cloud-dataform-v1beta1/snippets/snippet_metadata_google.longrunning.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-dataform-v1beta1", + "version": "0.14.1", + "language": "RUBY", + "apis": [ + { + "id": "google.longrunning", + "version": "longrunning" + } + ] + }, + "snippets": [ + { + "region_tag": "dataform_v1beta1_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_v1beta1_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_v1beta1_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_v1beta1_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_v1beta1_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-v1beta1/test/google/cloud/dataform/v1beta1/dataform_operations_test.rb b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_operations_test.rb new file mode 100644 index 000000000000..2d95f2be7444 --- /dev/null +++ b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/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/v1beta1/dataform_pb" +require "google/cloud/dataform/v1beta1/dataform_services_pb" +require "google/cloud/dataform/v1beta1/dataform" + +class ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::Dataform::Operations::Configuration, config + end +end diff --git a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_paths_test.rb b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_paths_test.rb index 7760dc6e1cac..fa801024e1e5 100644 --- a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_paths_test.rb +++ b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/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::V1beta1::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::V1beta1::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-v1beta1/test/google/cloud/dataform/v1beta1/dataform_rest_test.rb b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_rest_test.rb index 9b44a6cf56f6..a9f1b3753fe9 100644 --- a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_rest_test.rb +++ b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_rest_test.rb @@ -78,6 +78,731 @@ def logger end end + def test_get_team_folder + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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 = {} + team_folder_id = "hello world" + + 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::V1beta1::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::V1beta1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_team_folder({ parent: parent, team_folder: team_folder, team_folder_id: team_folder_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_team_folder parent: parent, team_folder: team_folder, team_folder_id: team_folder_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_team_folder ::Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder, team_folder_id: team_folder_id) 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, team_folder_id: team_folder_id }, 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::V1beta1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder, team_folder_id: team_folder_id), 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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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_query_team_folder_contents + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::Folder.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + folder = {} + folder_id = "hello world" + + 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::V1beta1::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::V1beta1::Dataform::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_folder({ parent: parent, folder: folder, folder_id: folder_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_folder parent: parent, folder: folder, folder_id: folder_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_folder ::Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new(parent: parent, folder: folder, folder_id: folder_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_folder({ parent: parent, folder: folder, folder_id: folder_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_folder(::Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new(parent: parent, folder: folder, folder_id: folder_id), 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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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_query_folder_contents + # Create test objects. + client_result = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::ListRepositoriesResponse.new @@ -356,6 +1081,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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CommitRepositoryChangesResponse.new @@ -3072,6 +3852,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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb index 8538c2e08f09..822d7498016e 100644 --- a/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb +++ b/google-cloud-dataform-v1beta1/test/google/cloud/dataform/v1beta1/dataform_test.rb @@ -63,6 +63,832 @@ def logger end end + def test_get_team_folder + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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 = {} + team_folder_id = "hello world" + + 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::V1beta1::CreateTeamFolderRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1beta1::TeamFolder), request["team_folder"] + assert_equal "hello world", request["team_folder_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1beta1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_team_folder({ parent: parent, team_folder: team_folder, team_folder_id: team_folder_id }) 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, team_folder_id: team_folder_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_team_folder ::Google::Cloud::Dataform::V1beta1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder, team_folder_id: team_folder_id) 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, team_folder_id: team_folder_id }, 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::V1beta1::CreateTeamFolderRequest.new(parent: parent, team_folder: team_folder, team_folder_id: team_folder_id), 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::V1beta1::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::V1beta1::UpdateTeamFolderRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1beta1::TeamFolder), request["team_folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_team_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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_query_team_folder_contents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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 = {} + folder_id = "hello world" + + 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::V1beta1::CreateFolderRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1beta1::Folder), request["folder"] + assert_equal "hello world", request["folder_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1beta1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_folder({ parent: parent, folder: folder, folder_id: folder_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_folder parent: parent, folder: folder, folder_id: folder_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_folder ::Google::Cloud::Dataform::V1beta1::CreateFolderRequest.new(parent: parent, folder: folder, folder_id: folder_id) 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, folder_id: folder_id }, 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::V1beta1::CreateFolderRequest.new(parent: parent, folder: folder, folder_id: folder_id), 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::V1beta1::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::V1beta1::UpdateFolderRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Dataform::V1beta1::Folder), request["folder"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_folder_client_stub do + # Create client + client = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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_query_folder_contents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Dataform::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::ListRepositoriesResponse.new @@ -374,6 +1200,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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::CommitRepositoryChangesResponse.new @@ -3411,6 +4303,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::V1beta1::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::V1beta1::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::V1beta1::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 +4523,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::V1beta1::Dataform::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Dataform::V1beta1::Dataform::Operations, client.operations_client + end end diff --git a/google-cloud-dataform-v1beta1/test/google/longrunning/operations_operations_test.rb b/google-cloud-dataform-v1beta1/test/google/longrunning/operations_operations_test.rb new file mode 100644 index 000000000000..61e4289027f4 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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-v1beta1/test/google/longrunning/operations_rest_test.rb b/google-cloud-dataform-v1beta1/test/google/longrunning/operations_rest_test.rb new file mode 100644 index 000000000000..deeeeee2c568 --- /dev/null +++ b/google-cloud-dataform-v1beta1/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-v1beta1/test/google/longrunning/operations_test.rb b/google-cloud-dataform-v1beta1/test/google/longrunning/operations_test.rb new file mode 100644 index 000000000000..72ed015901db --- /dev/null +++ b/google-cloud-dataform-v1beta1/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